Environment Variables for Running LaTeX
To run LaTeX and produce PostScript, you should set the following
environment variables. I do so in my .environset file.
setenv TEXINPUTS .:$HOME/mytex::
- This environment variable tells TeX where it will find
additional input files. I have
a directory, ~thc/mytex, which has files like page.tex and
thcmac2e.tex. When a source file has the line
then TeX will look in ~thc/mytex for the page.tex file if it doesn't
find page.tex in its usual places or the current directory.
You can, of course, use a different directory than ~/mytex and
then set the
TEXINPUTS environment variable
setenv DVIPSHEADERS ".:/usr/share/texmf/fonts//:/usr/local/share/texmf/fonts//:/usr/local/share/texmf/dvips//:/usr/share/texmf/dvips//"
- This environment variable tells the dvips program where it will
find some of the files it needs. Although you might be able to
punt some of the directories in this environment variable, I
recommend using them all.
Some aliases are nice to use as well. I have the following set up in
my shell, which is tcsh:
alias makeps 'dvips -e 0 -f < \!*.dvi >! \!*.ps'
alias psl 'makeps \!latex:$'
alias pps 'lpr \!latex:$.ps ; lpq'
alias gv '/usr/X11R6/bin/gv -magstep 0 -geometry +150+0 \!* &'
alias gvl 'gv \!latex:$ &'
That way, I can do the following sequence of commands:
latex bozo ; runs latex on bozo.tex
psl ; creates bozo.ps
gvl ; runs gv on bozo.ps
pps ; sends bozo.ps to my default printer
For repeated editing:
Thomas H. Cormen <email@example.com>
Last modified: Fri Sep 26 10:23:52 2003