Home
Courses
Director of Undergrad Research
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:
- 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.
- 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.
- To view your document on an X terminal:
xdvi test.dvi
- To convert your document to a PostScript file:
dvips -o test.ps test.dvi
This creates a file called test.ps.
- To print your document to the department main office (Math 260):
lpr test.ps
- To convert PostScript file to pdf file:
ps2pdf test.ps
- 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:
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).
- 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).
- Click on New Terminal Window. You should be at the terminal prompt called "euclid :~>"
- 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).
- 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:
- Download all of the software:
- MiKTeX: Select Current stable release: MiKTeX 2.0, download the five miktex-2.0-*.zip files, manual PDF, and update mt20up1.exe.
- 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)
- 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)
- Install MiKTeX first.
- Create a temporary subdirectory with the MiKTeX zip files and unzip them
- Follow the installation instructions in 00readme.txt or index.html
- Run the four MiKTeX maintenance programs, which initialize some datafiles. (See the Start->Programs->MiKTeX->Maintenance program list.)
- Install ghostscript, then ghostview.
- Execute gs600w32.exe and follow the instructions.
- Similarly, run gsv28w32.exe
- Install WinEdt. It will find the other programs on your system and set up links to them.
- Run self-extracting executable winedt5.exe
- 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.
- 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:
-
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}
- 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}
- 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.
- log into euclid.colorado.edu
- 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).
- Any (.html,...) files you put in this directory will become your website.
- 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).
- If you want your webpage linked to the department's, then contact <<Donna Maes: donna.maes@colorado.edu>>
HTML quick and dirty:
-
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>
<head>
<title>Simple</title>
</head>
<body>
<h1>This is the large heading</h1>
<p>This is paragraph number one.</p>
<p>This is paragraph number two.</p>
</body>
</html>
- A more complex file (courtesy of Tim Schumacher).
<html>
<head>
<title>Workshop HTML Template</title>
</head><body text="#003366" vlink="#808080" alink="#cc9900" background="../mathback.gif" bgcolor="#ffffff" link="#9900cc">
<br>
<br>
<p align="center">
<b><font size="8" color="#425187">Welcome to the HTML workshop</font></b>
</p>
<p>
</p>
<p>
<img src="http://timmy.colorado.edu/%7Eschumact/SPtimmywithbanjo.png">
</p>
<p></p>
<b><font size="+1">My contact info:</font></b><br>
Timothy Schumacher <br>
Math 362 <br>
schumact@colorado.edu <br>
P.O. Box 7413 <br>
Boulder, CO <br>
80306-7214 <br>
Office Phone: 303.492.3493<br>
<a href="http://timmy.colorado.edu/%7Eschumact">http://timmy.colorado.edu/~schumact</a><br>
<!-- This is a comment -->
</body></html>
Spreadsheet (for keeping grades) on Linux machine:
The following are steps to run a CALC, a spreadsheet software, on Linux machines found in your office. Assuming Linux distros is some version of RedHat Fedora:
- run Calc (Applications -> Office -> Calc).
- this is quite user-friendly and similar to MS Excel, so I'll skip the details.
- IMPORTANT: since grades are highly sensitive information, save document in a folder that has the permission mode is set to 700 (i.e., Owner can read, write, execute; Group can do nothing; Other/Everybody can do nothing). That is, at the command prompt type, "mkdir grades" and "chmod 700 ./grades"
|