MRG home page · Research · Publications · Projects · Software · People

University of Edinburgh

Using LaTeX in the DReaM Group

There are various group specific style files and class files written to help you write a blue book note, a trip report, etc. To see the list of packages, do

ls /afs/

To write a blue book note, you need to set your document class to blue-note, i.e. your .tex file should start:

where nnnn is the note number.

You must set up your bash environment, .brc and .benv, before running latex using the instructions here so that latex can find the relevant style files.

To convert a .tex file to a .pdf file (.dvi is the default output format) using latex use:

latex -output-format=pdf file.tex

There is some information on latex tools for Rippling annotations at the resources page.

How to prepare colour slides.

There are many variants on producing slides in the group. One favourite is to use the latex `seminar' documentclass in conjunction with `\use_package[dvips]{color}' and some of the other local group options for wave-fronts etc in the `dream' style file.

Support for editing LaTeX

You are recommended to use the auctex package when editing LaTeX documents; it has many helpful features. It comes with its own menus, and is especially helpful when editing maths, or writing BibTeX source documents. See the xemacs page.

Using your own TeX style files

To add your own tex style files to the list of places LaTeX looks when processing your source file, use in your .benv

add_to_texinputs $HOME/tex/latex

with the appropriate directory. You can add several colon-separated directories, or include subdirectories by adding a trailing double slash.

Doing other MRG Latex stuff

A good way to find examples of how to use the DReaM rippling annotation stuff, or to see how to set the note number for a blue note, is to copy other people. You can take a look at the .tex files for some blue book notes in the archive. Not everyone puts their .tex in there, but it can be very helpful. You can try

grep '\\title' /group/reason/dream/lib/notes/archive/blue/*.tex | less

to see the list of titles for which the .tex file is in the archive. Then you can search for something suitable (maybe by pressing / to search for a word). Then look at the note number (choose a higher numbered one if you can - it's more likely to work with the current MRG latex setup). You can then copy that .tex file into your own directory and see how it was done..

Other Latex help

A good place to start for more help is the School of Infomatics tex page. This includes documentation for the classes installed for school-wide use (e.g. for a thesis, jamboree poster etc.). Good places for general Latex queries are the not so short introduction to Latex, the NASA Latex help page, and the TeX FAQ.

We used to have some good Latex textbooks in the F11 terminal room prior to The Fire. Hopefully these will soon be replaced.

Name: Ewen Maclean

Date: Wednesday, April 23, 2003 at 13:42:35

There are some problems with the informatics thesis class which are currently unresolved. I'm just putting a couple of fixes up in case you encounter any of the following:

1) cisa is an undefined option and will not show up on a title page.

The best way to sort this out is to copy the class:

to where your thesis master is. Add the following line to the file:

\DeclareOption{cisa}{\gdef\@institute{Centre for Intelligent Systems and their Applications}}

and then run latex as usual.

2) Suddenly your table of contents dissappears for no reason.

What is shown in the table of contents is determined by a variable called tocdepth. If you want chapter, sections and subsections, then this needs to be set to 3, which I think is the default.

It is possible to use a package unintentionally which overides this, and then your toc will dissappear to just chapter headings. In order to solve this, put the following line before the \begin{document} in your thesis master file:


3) Chapters all start on the left, as opposed to the right

In order for the thesis to compile in the correct format, you need to make sure that the \begin{document} and \begin{preliminary} occur *after* the abstract

Name: Ian Green

Date: Tuesday, February 4, 2003 at 15:24:18

How to do rippling annotation in LaTeX:

The options are given as follows:

The first of these gives coloured annotations as described in AlanB's BB note 1042 (via postscript). The second gives the more familiar box and hole annotations. With ColouredAnnotations, one can restrict the colours to black and white with the further option Mono. For example:

The dream-note class knows to pass these options to the dream package, so it is also possible to use:
\documentclass[ColouredAnnotations]{blue-book} for example.

There are still some problems concerning the presentation of wave-front fragments with the ColouredAnnotions option. (Wave-front fragments are for drawing a wave-front across multiple lines.)

the top-level macros you are likely to use are:

\wf{..} plain wave front
\wfout{..} outward wave front
\wfin{..} inward wave front

\wh{..} wave-hole

\sink{..} sink

All of the above have an optional first argument to select a colour for the annotation other than the default. This option silently fails if the option ColouredAnnotations is not made. For example:


will give a yellow wave-front.

The following are for fragments:

\wfl{..} left part of wave-front
\wfm{..} middle part of wave-front
\wfr{..} right part of wave-front

Similarly, there are \wfoutl{..} commands etc.

Name: Alan Smaill

Date: Tuesday, February 4, 2003 at 15:19:28

If you want to use changebars in the margin of a LaTeX2e document to indicate changed material, you can use:


and then a changebar environment, eg
changed material

More info via on-line documentation:

texdoc changebar

A reminder that to find where style files are being accessed,
you can use

latexfind changebar

The style file may or may not be documented; if not, it's worth looking for formatted documentation as above.

NB, as this uses PS manipulations, the changebars will not be visible via xdvi as currently set up; but they are there after dvips is run.

Name: Alan Smaill

Date: Tuesday, February 4, 2003 at 15:10:46

Do your landscape slides come out upside down with the default postscript viewer?

Help is at hand: I've put the following into the mrg default environment
-- which you will get next time you log in, or by doing

source /group/reason/dream/REASON_DOT_BASHRC

# to flip pages in a landscape postscript file,
# which often come out upside down;
# two arguments are input file and output file

flip_ps infile outfile

Name: Ian Stark

Date: Tuesday, February 4, 2003 at 15:03:51

Q: it would be nice to be able to have 'live' hyperlinks in our PDF papers, so that if you're viewing them on the web you can just click on the links for the dream homepage, our own webpages etc. Does anybody know if this be done with the software we have at the department?


A combination of the hyperref package (which lets you embed links) and pdflatex (which generates PDF directly from latex) will do this.

Here's an example:

The hyperref package can also put links into plain DVI, but that seems less well supported. I don't know of any way to get hyperlinks in postscript.

Hope this helps,


Add a tip to this page.

Return to the MRG computing page.