THIS SECTION MIGHT NOT BE UP TO DATE
To install LaTeX on a PC, check, e.g, http://www.cv.nrao.edu/~abridle/toolmemo/toolmemo.shtml.
This contains a link to MiKTeX (http://www.miktex.org/), which is free. As of March 2016, it is the version installed on the Windows laptops in the department, works very well.
Other packages are also mentioned, e.g., emtex (which is free) and PCTeX (which is not).
tex, latex, xdvi, dvips, dvipdf
,
etc.) have to be issued in a shell. For many of them one need not include
the extension in the file name.
Here is the basic sequence (see details below):
A few extra features:
- create the LaTeX file, say
FILE.tex
:- use any text editor
- process the file:
latex FILE
(will useFILE.tex
and produceFILE.dvi
)- view the result on screen:
xdvi FILE &
(will useFILE.dvi
)- printing (using a PostScript version)
dvips FILE
(will useFILE.dvi
and produceFILE.ps
)- followed by
lpr FILE.ps
Details:
- PDF-version
- If you need a PDF version. e.g. to post on the Internet, there are a few choices. The extension is indicated to emphasize the file that is used.
dvipdf FILE.dvi
(will produceFILE.pdf
); this is similar todvips
, and might produce firstFILE.ps
and convert it to PDF withps2pdf
pdflatex FILE.tex
(will produceFILE.pdf
); the figures should be available as PDF files. See more in the Pictures section.vlatex FILE.tex
(will produceFILE.pdf
); handles pictures too, butvlatex
is not part of the default installation
[by nowdvipdf
works for most cases, so no need forvlatex
]- Hyperlinks in DVI, PDF, etc.
- To add (click-able) hyperlinks for formula numbers, references etc., you could include
\usepackage{hyperref}
(preferably as the last package to be loaded). Often no other change is needed in the file. See the Fancy-stuff section.
latex
latex_file[.tex]
(or, tex tex_file[.tex]
if it is a TeX
of AmSTeX file). This will produce a DVI (DeVice Independent) file, whose
extension is ".dvi".
latex
two or three times, in order to get the references and tables of content
right. Normally LaTeX will specify this, but you can also see it from the
DVI file: it will have references replaced by question marks.
xdvi dvi_file[.dvi]
.
dvips dvi_file[.dvi]
. One can arrange that the PS file
be sent directly to the printer, instead of being saved on the disk.
dvips paper
transforms paper.dvi into a PS file
and sends it to the default printer, or saves it as paper.ps
(depending on how dvips
is set-up).
dvips -P rm645 paper
transforms paper.dvi into a
PS file and prints it on the printer rm645.
dvips -o new.ps paper
saves the PS output as
new.ps (and normally does not sent it to the printer).
ghostview
ps_file
or printed with the command lpr ps_file
(both
of these commands require the full file name as argument).
lpr
(even with the -d
flag),
it can lead to hundreds of garbage pages! If you do it, the damage can be
limited (but not always avoided) with the command lprm -
, which removes your
jobs from the printer queue. The lprm
command has to be issued
from the same machine and directed to the same printer (with the
-P
parameter) as the lpr
command.