Tex and Latex Tidbits



Basic TeX-related Unix Commands

acroread
Opens a PDF file. If the file is currently opened, then the command is not executed. On the other hand, acroread -openInNewWindow [filename] opens the file in a new Adobe Reader 7, regardless of the PDF file(s) already opened. This can be useful when comparing two versions of the same manuscript, or checking cross references. (For most Linux machines, the combination [alt+tab] makes changing between windows very fast and convenient.).
To make this easier, create a file called, say acr which contains these lines:
#!/bin/csh
acroread -openInNewWindow $1
Put it in your ~/bin directory and make it executable by typing chmod u+x acr. Now it will be possible to open a PDF file in a new window by simply typing acr [filename]. Acrobat Reader 5 works in a similar fashion with acroread5 +useFrontEndProgram [filename].
NOTE: acroread5 is only available on the linux PCs, not the suns.
bibtex
Processes .bib files for use with LaTeX.
clean
Cleans up the .dvi, .aux, .log and other files created by TeX and its relatives in the current directory. See also rmjunk and listjunk.
dvips
Converts .dvi files to .ps.
latex
Processes LaTeX documents.
latex2html
Converts LaTeX documents to HTML.
listjunk
Lists the .dvi, .aux, .log and other files created by TeX and its relatives. rmjunk will then remove these files. These two commands will descend your directory tree, and remove these files in subdirectories. rmjunk is more powerful than the clean command.
ps2pdf
Converts .ps files to .pdf.
rmjunk
Removes the files listed by listjunk
tex
Processes TeX documents.
tth
Converts LaTeX or TeX documents to HTML (works very well on documents which are mostly text. See the tth Manual.
xdvi
Views .dvi files.
gs -sDEVICE=bbox -dNOPAUSE -dBATCH file.ps
Calculates the (natural) bounding box of file.ps


Examples

Here are a few examples of working TeX and LaTeX code.

LaTeX Sample
Letter
Resume
Quiz template
Math Symbols
Tables
Slides
Figures
Thesis aka LaTeX Short Course