LaTeX: Creating, Saving, and Converting
Creating and Saving a LaTeX Document
Before really getting started, making and saving a test document is
a good way to recheck your skills and the system you're using.
- To make your document in LaTeX, open Emacs.
- Begin by including all the parts of your document that you know
you will need. (See the sample
document structure).
You can always add components and
packages later, but this will save time and confusion.
- Once the basic structure is in place, add some simple text to
make sure that no problems already exist (like missing brackets).
- Make sure your document is saved as a .tex file.
- Then run LaTeX on your input file by typing:
latex filename.tex
- LaTeX will output a .dvi file if it succeeds.
- Now you should have yourfile.tex and yourfile.dvi. To view the LaTeX file, from a shell type:
xdvi filename.dvi &
(The above only works with Unix, for Windows try yap, which is another previewer.)
Converting Your Document
Once you have your basic document created and you successfully get a .dvi file, it's time to convert your document to one of the many formats LaTeX supports.
- Postscript
-
To convert the file above to PostScript for printing or viewing with GhostScript, (from a shell) type:
dvips -Pcmz filename.dvi -o filename.ps
- PDF
-
To convert the file to PDF, type:
dvipdf filename.dvi
- HTML
-
To convert the file to HTML, in the shell, type:
latex2html filename.tex
Or, to convert the file to HTML, type the following in the shell:
tth filename.tex
|
Remember that LaTeX2HTML does not make the best code, so you
will need to go through and clean it up a bit - like adding a
background color to the body tag and other basic bits. As long as you
use LaTeX2HTML properly, you will simply need to edit the code and
LaTeX2HTML will save you time. With that, remember to only use
LaTeX2HTML for works that would benefit from being in HTML. HTML is
not the best choice for highly controlled documents like
letterhead. If you use LaTeX2HTML for extremely difficult textual
design and then port that to HTML, you will most likely end up with a
number of images instead of text. |
- RTF
-
To convert the file to RTF, from the shell, type:
latex2rtf filename.tex
- Using BIBTeX
-
Please see the BIBTeX Basics page for how to use and run BIBTeX.
Back