Divya E. Vernerey, Ph.D.
Instructor

Home

Courses

Research

Mathematics Department

Computer Resources

CV

#### LaTeX on Linux machine:

The following are steps to run LaTeX on Linux machines found in your office. Assuming Linux distros is some version of RedHat Fedora:

1. Using a text editor, say, gedit (Applications -> Accessories -> Text Editor), type LaTeX text. (See LaTeX quick and dirty section below for a sample). Save the file with ending .tex'', for example, test.tex (You probably want to create a new directory to keep you files). Commonly used text editors include vi and emacs.
2. To compile your document from the terminal prompt (Applicatons -> Systems Tools -> Terminal):
latex test.tex
This creates a file called test.dvi, which is a binary file containing the formated version of your document. It also creates some other files of no immediate interest.
3. To view your document on an X terminal:
xdvi test.dvi
4. To convert your document to a PostScript file:
dvips -o test.ps test.dvi
This creates a file called test.ps.
5. To print your document to the department main office (Math 260):
lpr test.ps
6. To convert PostScript file to pdf file:
ps2pdf test.ps
7. If you make changes to your document (the .tex file from step 1), you must repeat steps 2-6 again.

Alternatively, after creating a text file, you can compile and convert your .tex file to a .pdf file in one step:

• pdflatex test.tex

But, do not print Acrobat .pdf or image files (.jpg,...) directly to the printer using lpr. The end result will be 50+ pages of wasted paper. Acrobat files need to be printed from Adobe Acrobat. You can start this application typing acroread at the command prompt.

Remember, the only files that you can print directly via lpr are PostScript files ending in .ps. For all other files, first find a program that will display the file properly on the screen, then print from that application. This will not only help save paper but also help save you aggrivation when your file doesn't print.

#### LaTeX on departmental Windows machine:

The following are steps to run LaTeX on Windows machines (found in Math 217 or throughout the university): Do NOT save your files on the desktop (they will be deleted).

1. Log-into EUCLID (Start -> All Programs -> SSH Secure Shell -> Secure File Transfer Client -> Quick Connect). Left hand side lists the files on the computer you are on now (Local). Right hand side lists your home directory on Euclid (Remote).
2. Click on New Terminal Window. You should be at the terminal prompt called "euclid :~>"
3. Using a text editor, say, notepad (Start -> All Programs -> Accessories -> Notepad), type LaTeX text. (See LaTeX quick and dirty section below for a sample). Save the file with ending .tex'', for example test.tex and transfer to Euclid (You probably want to create a new directory to keep you files using the New Folder button).
4. Follow steps 2-6 above (LaTeX on Linux section).

#### LaTeX on personal Windows machines:

The following are several components that are (practically) free and available for running LaTeX on your personal Windows machines.

• MiKTeX (freeware): compiler; a PC implementation of LaTeX, including all support utilities (bibtex, Windows dvi viewer and printer, dvips style files, packages)
• ghostscript and ghostview (freeware): Windows previewer for Postscript files, includes printing and PDF capabilities
• WinEdt (shareware): Windows text editor and GUI that integrates all of the above.

When installed on Windows 95, 97, NT, 2000, or XP, WinEdt provides color-highlighted editing capabilities plus push-button access to TeX, LaTeX, dvi previewer, bibtex, ghostview,
Postscript and PDF generation. All software is free except for WinEdt, which has a 30-day trial and educational price of $30 for students ($40 otherwise).

Suggested implementation sequence:

1. MiKTeX: Select Current stable release: MiKTeX 2.0, download the five miktex-2.0-*.zip files, manual PDF, and update mt20up1.exe.
2. ghostscript and ghostview: Scroll down to the "Windows 95, 98 or NT" section and download gs600w32.exe (Aladdin Ghostscript 6.0 for Win32) and gsv28w32.exe (GSview 2.8 for Win32)
3. WinEdt: On the Download page, select WinEdt 5 in the USA column. Also available are multilingual dictionaries and additional programming language macros (java, Fortran 77, Perl)
2. Install MiKTeX first.
1. Create a temporary subdirectory with the MiKTeX zip files and unzip them
2. Follow the installation instructions in 00readme.txt or index.html
3. Run the four MiKTeX maintenance programs, which initialize some datafiles. (See the Start->Programs->MiKTeX->Maintenance program list.)
3. Install ghostscript, then ghostview.
1. Execute gs600w32.exe and follow the instructions.
2. Similarly, run gsv28w32.exe
4. Install WinEdt. It will find the other programs on your system and set up links to them.
1. Run self-extracting executable winedt5.exe
2. Follow the installation instructions in file install.ps or install.pdf
WinEdt will find the other programs on your system and set up links to them.
5. Open WinEdt, then type LaTeX text (See LaTeX quick and dirty section below for a sample) and press button-bar icons to compile, preview, debug, and print. It can also direct you to the offending source line when MiKTeX encounters errors.

#### LaTeX quick and dirty:

1. A simple file.

Type the following file exactly as it appears. Do not confuse forward with backward slashes or capital with lowercase letters. .

\documentclass{article} \begin{document}     This is a test document. \end{document}


2. A more complex file.

% Anything on a line after a %' gets ignored by LaTeX

\documentclass[11pt]{article}      % Curly braces { } are used for grouping
\usepackage{amsmath,psfig}         % This line requests non-standard packages (which you must make available)
\begin{document}
\begin{center}
{\large \bf This is large and bold. } \\    % \\ is used to goto next row (do not include in last row)
{\large This is large but not bold. }
\end{center}

Leaving a blank line starts a paragraph.  Otherwise new lines are ignored. \newline    % include \newline to force a new line

While writing text and you want math mode, use $x + y = z$
but use $$x + y = z$$ for centered math mode. \newline
Subscripts $x_{i}$ and superscripts $x^{i}$. \newline

For (multiple) formulas in math mode, use
\begin{eqnarray}                         % \begin{eqnarray} numbers equations automatically
x & = & 17y \\                       % Relation symbols within & & are kept aligned throughout array
y & > & a + b + \nonumber \\         % \nonumber suppresses numbering
&   & + c + d                      % \\ is used to goto next row (do not include in last row)
\end{eqnarray}

Equation~\ref{euler} is interesting.                 % \ref and \label are used for cross-reference
\begin{eqnarray}
e^{i \pi} + 1 = 0  \label{euler}     % use \pi since special word/symbol
\end{eqnarray}
\end{document}


3. LaTeX can do all sorts of fancy stuff. Here's some of the stuff that's actually worth the trouble, and that you'll probably want to do pretty soon.
• Use BibTeX, the bibliography support facility.
• If you find yourself typing (almost) the same thing over and over again, look into \newcommand.

#### Personal Homepages:

Everyone can now easily create their own website.

2. make a new directory called public_html (using Linux: mkdir public_html; using Windows click Add New Folder button and rename as public_html) in your home directory. Make sure the permission mode is set to 755 (i.e., Owner can read, write, execute; Group can read, execute; Other/Everybody can read, execute).
3. Any (.html,...) files you put in this directory will become your website.
4. Please remember, everyone is responsible for their own website. To make .html files, either see HTML quick and dirty section below for a sample or use a user-friendly web development software, such as Dreamweaver (found in the departmental Windows machines: Start -> All Programs -> Adobe Design Premium CS3 -> Adobe Dreamweaver CS3).
5. If you want your webpage linked to the department's, then contact <<Donna Maes: donna.maes@colorado.edu>>

#### HTML quick and dirty:

1. A simple file.

Type the following file exactly as it appears in a text editior and save as filename.html. HTML is not case sensitive; feel free to use HEllo instead of heLLo.

<html>
<title>Simple</title>
<body>
<h1>This is the large heading</h1>
<p>This is paragraph number one.</p>
<p>This is paragraph number two.</p>
</body>
</html>

2. A more complex file (courtesy of Tim Schumacher).


<html>
<title>Workshop HTML Template</title>
<br>
<br>
<p align="center">
<b><font size="8" color="#425187">Welcome to the HTML workshop</font></b>
</p>
<p>
</p>
<p>
</p>
<p></p>
<b><font size="+1">My contact info:</font></b><br>
Timothy Schumacher	<br>
Math 362            <br>
P.O. Box 7413		<br>
Boulder, CO			<br>
80306-7214			<br>
Office	Phone:	303.492.3493<br>
</body></html>`