# LATEX stuffs

1. How to install LATEX1
LATEXcan be installed in various ways, here the ones that I have tried with success

(will install epstopdf too)

and then install some dvi viewers
.
.

2. How to compile LATEX files from the terminal
i.if having pdf figures: You can produce pdf's directly using pdflatex, as follows

Notice however, that pdflatex doesn't work with eps figures, You will have to convert all eps figures to pdfs using the command epstopdf. However, pdflatex will work with png's and jpg's which is really nice.

ii.if having eps figures: Here we have to compile the file in steps

1. eps to dvi
or just
this will produce a .dvi file, i.e. FILENAME.dvi

2. dvi to ps
To produce a .ps file from the .dvi file, type

Notice that dvips mean dvi-ps.

3. ps to pdf
To produce a .pdf file from the .dvi file, type

This syntax seems to be good when having .eps figures. Notice also that we can easily transform each .eps figure to pdf using epstopdf FILENAME.eps.

3. How to count the number of words in a .TeX file
This is kind of pain, and is hard to count exactly the number of words from a .tex file, but here is what I know (without having to install other fancy software). First, we have to install untex as follows
then at the terminal type

4. How to count the number of words in a .pdf file
This might be a solution to the problem mentioned above. According to my experience, this works better sometimes. First, we have to install pdftext as follows
then at the terminal type

or just

5. How to use LATEX within Emacs
First, we need to install Emacs

Notice, that some futures about the appearance of Emacs can be modified using the definition file of Emacs. This file is currently located in /home/christian/. I cannot see it, when using ls, but you can edit it, using sudo gedit .emacs or editing with Emacs sudo emacs .emacs.

and then, to install auctex (needed to compile LaTeX in Emacs)

then, we can just open a .tex file within Emacs, typing at the terminal emacs FILENAME.tex, and the LATEX options will appear.

6. How to use LATEX within Gedit (the Gnome editor)

then go to Gedit, in add-onn select LATEX, and ready to go!

7. How to install LaTeX Style Files (.sty)
At the terminal type:

To install a style file STYFILE'' you have to do as follows
1. create a directory named STYFILE'' on /usr/share/texmf-texlive/tex/latex
2. copy the file STYFILE.sty and the file STYFILE.tex to the directory /usr/share/texmf-texlive/tex/latex/STYFILE
3. run at the terminal
when installing style files for Beamer (slides presentation with LATEX), do the same as follows
1. copy the file STYFILE.sty to the directory /usr/share/texmf/tex/latex/beamer/themes/theme/
3. run at the terminal

Notice that the .sty and .tex files should be able to open by any user, and not only by the root, then the properties of them must be checked.

If the package came as .dtx and .ins files, first do

and then take the produced .sty file, and proceed as before.

8. Paper size

and in that file put letter'', that is.

Also, one can type at the terminal , and select the paper size there

9. How to install Beamer

10. How to install LATEX2html

11. How to install MetaPost
(will install MetaPost)
(is needed for using mptopdf in MetaPost)

Webmaster: Christian E. Salas Eljatib, E-mail: christian.salas@yale.edu