Department of Mathematics FAS Harvard University One Oxford Street Cambridge MA 02138 USA Tel: (617) 495-2171 Fax: (617) 495-5132
FAS Computer Services to Harvard University IT: (617) 495-7777.


How do I get my computer on the network?
  • Collect the following information: Name, Office Number, Jack Number, Ethernet card brand, Computer brand, Mac Address of the computer and talk to Arthur Gaer (gaer@math) to have a network request arranged.
  • In the Science center as well as in most other Harvard buildings, wireless networking is available. This is the fastest and easiest way to have your computer online. You need to have your Harvard ID ready, when you connect the first time.

How do I read my mail online?
1) If you have no other access, use the Mathdepartment webmail. Note that this is not a replacement for a desktop mail. There is a limit of filesize you can attach for example.
2) You can also use shell access. Using any browser, connect to
then login to abel and read the mail with "pine", "mail" or "mutt" etc. as usual.
3) An other possibility is to forward a copy of your email to your FAS account and read the mail using webmail
To forward the email, assume your login name is "euler" and your login name at FAS is "leonard". Put a file ".forward" into your abel account which contains the line,
Like this, a copy of your email will be sent to your FAS account, where you can read it with webmail. Also the FAS mail has a limit on the file size you can submit as an attachment.

How do I configure my email client to read email in my Math account?
The short answer: use IMAP, use as the mail server both for sending and receiving mail and make sure to enter your account name. Some visual guides for Entourage, MacOSX mail, Eudora, Evolution, Thunderbird can be found here. An other possibility of course is to connect to your account by ssh and read email with "pine" "mutt" or "mail".

How do I send an attachment from the command line?
To send a picture flower.jpg to an address
mpack -s "The picture" flower.jpg
To unpack an attachment, save the mail as a file "mail.tmp" and type
munpack mail.tmp
See More information on mime.

How do I connect to the department computers from home?
If you are already connected to an internet provider or sit on a machine connected to the web, ssh to the department:
ssh -l username

Dial-in modems have the phone number 617-949-0000. Note that if you want to connect by modem, you will need an FAS account. Here is a quick guide to establish a ppp connection.

How do get a FAS account at Harvard?
You can get an account online, if you have a Harvard ID. Start here.

How do I convert a PDF document from a DVI file?
Suppose you want to convert a DVI file document.dvi to a PDF version document.pdf. Choose one of the following options
  • dvipdf document.dvi
  • convert document.dvi document.pdf
  • dvipdf document.dvi document.pdf
  • dvips -o document.dvi; ps2pdf
Not all produce the same result. On the Macintosh with TeXShop installed, you can just click on a DVI document. It will automatically be converted to a PDF file. More information on PDF. Information on printing.

Can I edit a PDF document?
Some PDF documents can be edited using the full version of Acrobat (which is different from the free Acrobat reader).

How do I print a PDF file which is protected by DRM?
The digital right management implementation (DRM) of PDF is a joke . It turns out that practially every application except acrobat reader circumvents the printing or password protection limintation. For example:
convert drm.pdf >; lpr 
does the job. If the DRM protection were stronger, you could always take screenshots of the document and print those, or OCR the document with a OCR application like "Readiris" or "Omnipage" which recognize most PDF documents almost 100 percent.

How do I convert a PDF document to a word document?
While there is no direct way to convert PDF to word, you can open the PDF file in the Preview program on the Macintosh and open the word document in which you want to include the PDF. Just copy pages from the Preview program (with ) and paste it into the word document (with ).

How do I extract pages 2-5 from my DVI file?
dvips -p 2 -l 5 -o file.dvi
produces a PS file, which contains only the pages 2-5.

How do I setup a wireles laptop to print on a department printer?
On a Mac, the procedure is trivial. Just chose a new printer and browse for the one you like. On a PC, chose network printing and the address if you want to print on lw2 (the printer in the 5'th floor). More details on a visual guide.

How does TeXShop find my .sty and .bib files?
There are two possibilities:
1) Tex finds any file in ~/Library/texmf/tex or a subfolder of this directory. Latex will find any file in ~/Library/texmf/tex/latex or a subfolder of this directory, and bibtex and makeindex will find any file in ~/Library/texmf/bibtex and ~/Library/texmf/makeindex respectively, or a subfolder.

2) Make a folder ~/.MacOSX and place there a file environment.plist with information to where your LateX directories are.

How do concat several PS files to one PS file?
Convert them to PDF with ps2pdf and merge the PDFs using the line
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/tmp/s.pdf *.pdf; mv /tmp/s.pdf .
There is a PSUtil tool "psmerge", but it does not always work. Theoretically, you could do
psmerge ...
which produces a PS file, containing all the PS files, ... (note that there is no space after the -o flag). If the individual PS pages are one page long only, one can concat them using Latex: write a file containing
\begin{center}\scalebox{1.0}{\includegraphics{}}\end{center} \pagebreak
run it through latex and produce a PS file with dvips. Note: If the include files like has been generated by a Microsoft product, it contains incompatible geometry encoding. Adding something like
%%BoundingBox: 133 0 612 692
in the header of the PS file might then be necessary.

I got a file with DOS ^M's. How do I remove those?
To remove the control characters in a document file.txt chose from the following four options:
  • dos2unix file.txt
  •   tr -d "\15"  <  file.txt >  tmp.txt;  mv  tmp.txt  file.txt
  •   sed 's/^V^M//g' file.txt > tmp.txt; mv  tmp.txt file.txt
    where ^V is control V and ^M is control M.
  • Using the UNIX "vi" editor, delete all the ^M's by invoking the command line:

My mail or HTML files contain incompatible symbols (i.e. at places, where double quotes should be). How do I cure this?
Western language HTML documents use the ISO 8859-1 Latin-1 character set. Microsoft products use their own "extension" to Latin-1 using a variety of characters which do not appear in Latin-1 nor in Unicode. To correct such incompatibities, use a Perl script called demoroniser. It is installed in Abel. Use it as follows:
  demoroniser sickfile.txt curedfile.txt

How do I translate a MSWord file file.doc to a LaTex?
A decent translation is currently done with Abiword. It allows exportation to ASCII (txt), XML (abw), Latex (tex), HTML (thml), Palm Document (pdb) or RichText (rtf). The translation from the "high entropy format" (.doc) to a low entropy format like (La)TeX or XML must be tuned by hand in general.
Depending on the document, it can be of advantage to export a .doc document first to ASCII (for example with Word, Staroffice, or Openoffice), demoronize it and then fill-in the LaTeX structure.

How can I tune the boundaries of a LaTeX document?
Here is a template.

How do I explore new fonts in LaTeX?
Here is a template to experiment with other fonts.

How do I print a PDF file?
Two possibilities:

1) Open the file with acroread, Acrobat or Preview (the later in OS X) and print it from the menu.
2) From the command line, translate the file to PS, then print the Postscript file with
    pdf2ps file.pdf

How do I post a PDF file xyz.pdf on my mathXYZ account?
1) Here is an example to transfer a file into a folder with lectures on a FAS course account:
scp xyz.pdf's password: *******
Connecting to's password: ********
sftp> cd public_html/lectures
sftp> put xyz.pdf
3) You can use the toolkit to upload the file using your webbrowser. As with virtually any GUI stuff, this is easy to do, but confusing when described in a manual.

How do I burn a CD on the mac?
CD burning is trivial on the Mac. Just stick in the CD, drag everything you want to burn onto the CD Icon, then drag the CD icon to the trash. Instead of throwing its content it will burn it onto the CD.

How do I run Mathematica on the commandline in OS X
Just make an alias to the Mathkernel like
alias math='/Applications/Mathematica'
in the .bashrc file if you use Bash or
alias math '/Applications/Mathematica'
in your .cshrc file if you use the c shell.

Simplicity, Clarity, Generality B.W. Kernighan, R. Pike, in "The Practice of Programming".