tex

LaTeX \cite giving a [?]

in blah.tex , I have a \cite{blah} I have a 'blah' entry in blah.bib I run my file with : latex blah.tex && blah.tex && dvipdf blah.dvi The blah.pdf results in [?] How do I fix this? Thanks! ...

How to generate a polygon number figure using metapost?

I'm learning metapost and i want to know how to generate a figure like a polygon number http://en.wikipedia.org/wiki/Polygonal_number , i got triangular numbers but not hexagonal. Thanks for help. ...

Getting two tables in LaTeX to have the same (right-aligned) column width

I have two very short and consecutive sections (for a CV), each containing a small table: \section{Work Experience} \begin{tabular}{r|p{11cm}} Current & Your job at Your Company, Town \\ Jan 2009 & What your company does \\ & A description of what you do\\ \multicolumn{2}{c}{}\ \end{tabular} \section{Education} \begin{tabular}{r|p{1...

LaTeX font in Postscript document

Hello, I am starting off with Postscript, and would like to do something very simple: include a LaTeX symbol within my Postscript document. For example: %! /FontSize 12 def newpath 0 0 moveto ("Hello \LaTeX") show % This is where I would like % the rendering of \LaTeX % with actual LaTeX fo...

Why does LaTeX not render my gantt-diagram into pdf

Hi, is there anybody out there, with experiences about how to do a gantt-diagram / chart using latex. I tryed it for a lot of hours today, lastly it worked switching outpout from pdf to dvi. Maybe someone can tell me what to include, besides pst-gantt, and the normal pstricks stuff. It showed more than 100 errors for 4 Tasks.. after s...

LaTeX: Redefining starred command

I want to redefine the \part* command so that it automatically adds a contents line. This proves difficult since I want to reuse the original \part* command inside my starred version. Normally (i.e. for unstarred commands) I would do it like this: \let\old@part\part \renewcommand\part[2][]{ \old@part[#1]{#2} … rest of definition} ...

Tex command which affects the next complete word

Is it possible to have a TeX command which will take the whole next word (or the next letters up to but not including the next punctuation symbol) as an argument and not only the next letter or {} group? I’d like to have a \caps command on certain acronyms but don’t want to type curly brackets over and over. ...

Transform a tex source so that all macros are replaced by their definition

Is it possible to see the output of the TeX ‘pre-processor’, i. e. the intermediate step before the actual output is done but with all user-defined macros replaced and only a subset of TeX primitives left? Or is there no such intermediate step? ...

How to create diagrams for papers.

I want to create some diagrams for some papers. Diagrams will contain some text, e.g. some console output. I need images for using also in html files. There is TikZ so can create images like this: http://www.texample.net/tikz/examples/boxes-with-text-and-math/ http://www.texample.net/tikz/examples/rule-based-diagram/ http://www.te...

Making TeX tables smaller?

I have a LaTeX table that looks like this: \begin{table}[!ht] \centering \small \caption{ \bf{Caption}} \begin{tabular}{l|c|c|l|c|c|c|c|c} field1 & field 2 & ... \\ \hline ... the problem is that even with "\small" the table is too big, since I use: \usepackage{setspace} \doublespacing in the header. How can I: 1) Make the table...

How to prevent latex memory overflow

I've got a latex macro that makes small pictures. In that picture I need to draw area. Borders of that area are quadratic bezier curves and that area is to be filled. I did not know how to do it so currently I'm "filling" the area by drawing a plenty of bezier curves inside it... This slows down typeseting and when a macro is used multi...

The way to find out whole picture width in PGF (Latex)

I've got a latex macro that draws a picture using PGF and Tikz according to given parameters. The width of picture drawn depends on these parameters. PGF automatically calculates the resulting width of any picture drawn so the user does not have to set it explicitly(like for example when using latex build in picture environment). Howe...

Is there a programmatic way to transform a sequence of image files into a PDF?

I have a sequence of JPG images. Each of the scans is already cropped to the exact size of one page. They are sequential pages of a valuable and out of print book. The publishing application requires that these pages be submitted as a single PDF file. I could take each of these images and just past them into a word-processor (e.g. Open...

Is there a standard lexer/parser tool for Python?

A volunteer job requires us to convert a large number of LaTeX documents into ePub format. It's a series of open-source fiction book which has so far only been produced only on paper via a print on demand service. We'd like to be able to offer the book to users of book-reader devices (such as Kindle) which require the ePub format for bes...

Does LaTeX have an array data structure?

Are there arrays in LaTeX? I don't mean the way to typeset arrays. I mean arrays as the data structure in LaTeX/TeX as a "programming language". I need to store a number of vbox-es or hbox-es in an array. It may be something like "an array of macros". More details: I have an environment that should typeset songs. I need to store some s...

xelatex Invalid fontname

I want to use the openoffice chinese fonts, eg AR PL SungtiL GB, but the xelatex tells me that it is an invalid name (as shown below). It seems like the font name has spaces and so it doesn't recognize it? How should I get around this? (/usr/share/texmf-texlive/tex/latex/base/syntonly.sty)kpathsea: Invalid fontname `AR PL SungtiL GB', ...

matplotlib - write TeX on Qt form

I'd like to add some TeX text to my Qt form, like label - just text, no graph, no lines, no borders, just TeX. I thought something like this: render TeX to bitmap and then place that bitmap on form, e.g. into QLabel. Or even better - use some backend, add it to form and use something tex_label.print_tex(<tex code>). Seems matplotplot has...

How can I determine a file extension given a file path in LaTeX?

I am attempting to write a LaTeX package which leverages the minted package's \inputminted command. My \mycommand command takes two parameters, the first being a path to a file, and I want to pass the file's extension to the \inputminted command: \newcommand\mycommand[2]{ \inputminted{#1}{...} } Note that the above won't work since ...

How can I save shell output to a variable in LaTeX?

I need to be able to execute a shell command through LaTeX [*] and have the resulting output available for use later on in the form of a LaTeX 'variable' (e.g., via a subsequent \newcommand command). If necessary a temporary file could be used to hold the output, although I would like to avoid this. I have been able to use \immediate\wr...

How to pass an option containing a space to a package in LaTeX/XeLaTeX

When I declare an option containing a space, LaTeX/XeLaTeX eats it. In the main .tex, I have : \usepackage[test font]{test} In my .sty file I have : \DeclareOption*{\newfontfamily\testfont[Scale=1]{\CurrentOption}} \ProcessOptions But the Tex engine passes to the package testfont option and not test font. So the question is how ...