Concatenating PDF files
You can use pdftex and include PDF documents as images directly, or you can use ghostscript:
gs -dBATCH -sDEVICE=pdfwrite -sOutputfile gs -dBATCH -sDEVICE=pdfwrite -sOutputfile
Here's another way to do it:
texexec --pdfarrange --result outputfile.pdf input1.pdf input2.pdf ...
Convert a PS file to a JPG with decent results
convert -quality 100 -density 200x200 file.ps file.jpg
"-quality 100" changes the JPG quality from the default of 75% to 100%
"-density 200x200" changes the image density when converting from a PS from the default of 75 pixels per inch in the horiz. and vert. direction to 200 in both directions (<width>x<height>)
Multi-line equations
Sometimes your equations are just too damn long to fit on a single line. As far as I know you have two options: the array environment and the eqnarray environment. The array environment only gives one equation number to the whole thing, which is good, but it tries to typeset everything in a smaller font, which is bad. The eqnarray environment has slightly wacky syntax, and it tries to give each line of the multi-line equation a number, which is bad. The solution I like best is to use eqnarray with the nonumber command to suppress equation numbers. Try the following:
\begin{eqnarray}
f(x) & = & lots \nonumber \\
& & of \nonumber \\
& & stuff \\
\end{eqnarray}
Printing EPS Files
I produce many plots. Postscript files print well, but aren't well suited for incorporation into larger documents. Encapsulated Postscript files are good for incorporation into larger documents, but don't print well by themselves. So, I store my plots as eps files and I wrote this Answers/Code/PrintPlotScript to wrap them inside a postscript file for printing. To make the plots 4 inches wide and then print them, type printplot 4in plot1.eps plot2.eps
Auctex
AucTeX is a high-powered emacs mode for editing LaTeX files. I particularly like the C-x C-e command--you basically don't have to remember any environment formats.
Poster Printing
Sometimes I print posters for conferences. Often I want to preview them, but scaling them all the way down to 8.5x11 leaves them unreadable. I'd like to scale the poster to, say 17x22, then print it out on four standard 8.5x11 sheets that are then taped together.
Here's how to do it.
EPS and PDF files
It is occastionally necessary to convert eps files to pdf files for inclusion in LaTeX documents (for example, when using one of several toolsets to make sa presentation). The situation on this seems to be extremely confused. Bounding boxes are typically handled very poorly. Here's an Answers/Code/EpsToPdfScript (I didn't write it) which seems to do the right thing. (Note: At least the Windows MikTex distribution of latex includes the epstopdf program as part of pdftex.)
Converting JPEG images to EPS
To include images in latex documents, they have to be converted to EPS files. Standard ways of doing this (e.g. "convert") decompress the JPEG image and encodes it as an EPS, typically leading to an increase in file size of about two orders of magnitude. If you are including many images, this can make your final postscript file prohibitively large. The program jpeg2ps creates an EPS file but keeps the JPEG-encoded image (which is valid postscript 2), leading to a negligible increase in file size. This page has interesting information about including compressed images in latex files. An alternative is to use pdflatex which allows direct inclusion of JPEG images and creates a PDF for output.
Stripping comments from a LaTeX file
If you want to strip comments from a LaTeX file, you can use query-replace-regexp in emacs and substitute \(^\|[^\\]\)%.*$ for "".
