Math 300: Using LaTeX (back to Math 300 notes)

These days we generally run TeX through a third-party program such as TexMaker, but if you need to run it remotely, here is what you can do.


What to do What it does
1. Open a shell by right-clicking the background and selecting "New Terminal". We will use this to run our commands.
2. Type "gedit filename.tex&" This edits the TeX file we want to create/modify. The ampersand puts the editor in the "background", so we can continue to use our command line., Of course, you supply the filename.
3. Save the file when you want to see the results.  
4. Type "latex filename" This runs latex on the file. Errors will be indicated. If there are errors, you will want to stop latex either by typing "x" followed by <Enter>, or just hit <Ctrl>+c.
5. Type "xdvi filename&" This runs the dvi viewer, so you can see your page. It runs in the background again.



What to do What it does
1. Start->Run->cmd Open a windows command line.
2. Type "hostname" This gives us the name of the local machine. Make a note of it. For future reference, suppose it is "myhost".
3. Start->Programs->Putty->Putty Start a putty session.
4. Open a putty session on your favorite linux machine.  
5. Start->Programs->Xwin-32->Xwin-32 Start an X server on the local machine

6. In the putty window, type
"export DISPLAY=myhost:0"

See step 2. This sends X windows output to your local X server.
7. Go to step 2 of the Linux directions.  



What to do What it does

1. In your Linux command shell, type

"dvips -o filename"

This creates a postscript file called "" containing your document
2. Type "lpr -Pprintername"

This prints the file on the printer you specify. Replace "printername" with one of the following printers:

Newton Lab: use "mlabhp",

Room 3: use "ntbwpr",

Room 120: use "rm120pr".