Some tips to use in latex


If you have the standard latex installation, you probably have the texdoctk package. Just type texdoctk on a command shell and you will get a nice little program with help on all topics. It should give you this window:

Pdflatex with eps figures

  • If you want to use pdflatex instead of latex just put this in the preamble:

  % if using pdflatex, we must use our .pdf images instead of .(e?)ps
  \DeclareGraphicsExtensions{.pdf,.gif,.jpg} % the formats we have images in

You will need to have the epstopdf.sty installed and the it will convert the .eps graphics to pdf on the fly. If you use hyperref, the final pdf will have links to the citations and equations. You will need to use your pdflatex command with the option: pdflatex -shell-escape


For presentations in LaTex, you can use the ''prosper'' package. Here is the source of the presentation shown in my main page:


If you need citations or references in your legend look at this: Captions

Captions usually appear under Figures and Tables, but you might be able to use them in more adventurous places (Equation Captions?). Plain old captions like this are easy to produce:

\caption{In this 2-dimensional model, two rays of light from a galaxy at
{\bf S} orbit the deflecting mass {\bf M} and recombine at observer
{\bf O}.  The observer sees two images {\bf `S'} at locations projected
back along the geodesics.}
But that's just too easy, right? Here's some other things you can do:

  • Different captions (usually shorter) in the List of Figures
  • References to equations, figures, authors, etc. inside the caption

Different entries in the List of Figures

When you include the line \listoffigures in your source, you get a nice List of Figures with the Figure number, its caption, and the page it appears on. If your captions are long and complicated, this List of Figures might stretch on for pages...You can put different captions in the List of Figures by including an optional argument of the \caption command:
...     |<-----  optional argument of \caption  ----->|
\caption[This is what shows up in the List of Figures.]{Here is the text
that appears under the Figure itself.  This text is often very long and
complicated, and is only useful when you've got the Figure sitting right
there in front of you.  It won't mean much to anyone just reading the
List of Figures.}

References in the caption

Now let's suppose you want to reference an equation or another Figure or cite an author inside the caption. Just sticking in
\caption{ ...from equation (\ref{some-eqn}) we can see ... }
won't work. To quote Jim, LaTeX blows chunks. Who knows? Maybe you're just asking too much! There are two ways get references (and maybe cites, too?) inside a caption. One is a pure kludge, one works the way it's supposed to:

  • The Kludge Use \caption[]{ ...\ref{some-eqn}...} with empty square brackets out front. Of course, then you can't have different captions in the List of Figures.
  • The Way that Always Works It turns out \ref's are fragile (Hey! that's Lamport's word; it doesn't mean they always get picked last on the ball team...) and must be protected. This property is clearly elucidated in Lamport's manual. (That's a math "clearly" by the way, which means "Ha! No way you can see it, you loser. I, on the other hand, have a Ph.D.") A bunch of other things are fragile, too, mostly things that get changed when LaTeX processes the file the second time. Anyway, the command \protect "protects" the very next word in the source. So to get fragile stuff like equation references in the caption, try this:
    \caption{The graph of the function given in (\protect \ref{some-eqn}).}
Notice that to get parentheses around the number, like "(7)", the \protect statement has to go inside the ().


* For colours: (taken from here)

Use colour with discretion Six primary colours Enable colour by putting into the preamble.

    * \usepackage[dvips]{color} if using ordinary LaTeX;
    * \usepackage{color} if using pdfLaTeX. 
The following, along with black and white, are the primary colours. They are switched in by the command \color{name} with a scope delimited by braces or by the current environment.

* red * green * blue * cyan * yellow * magenta

Sixty-six colours Make the following 66 colours available using options in the request for the color package:

     [usenames,dvips] for ordinary LaTeX;
     [usenames,dvipsnames] for pdfLaTeX. 
See src/mystyle.sty for example. These are X11 colours; note: the case is important in the names. GreenYellow, Yellow, Goldenrod, Dandelion, Apricot, Peach, Melon, YellowOrange, Orange, BurntOrange, Bittersweet, RedOrange, Mahogany, Maroon, BrickRed, Red, OrangeRed, RubineRed, WildStrawberry, Salmon, CarnationPink, Magenta, VioletRed, Rhodamine, Mulberry, RedViolet, Fuchsia, Lavender, Thistle, Orchid, DarkOrchid, Purple, Plum, Violet, RoyalPurple, BlueViolet, Periwinkle, CadetBlue, CornflowerBlue, MidnightBlue, NavyBlue, RoyalBlue, Blue, Cerulean, Cyan, ProcessBlue, SkyBlue, Turquoise, TealBlue, Aquamarine, BlueGreen, Emerald, JungleGreen, SeaGreen, Green, ForestGreen, PineGreen, LimeGreen, YellowGreen, SpringGreen, OliveGreen, RawSienna, Sepia, Brown, Tan, Gray Three final notes

    1. At the time of writing there are some glitches that may appear when using colour in pdf documents; avoid these glitches by getting and using \usepackage{pdfcolmk} (as in Src/mystyle.sty)
  1. The color package is disabled by using the option monochrome in its request.
  2. Lastly, see the grfguide document in the LaTeX Graphics package for loads more information.

Logo on the title page

From here

A logo in the header or footer for textclass komascript, a logo in the upper right

     \titlehead{\hfill \includegraphics[clip=,scale=.4]{logo.eps}}%  Logo
for all classes with fancyhdr, an example for a footer:
     \savebox{\mylogo}{\includegraphics[width=mm]{/..the path.../logo}}
with the picture environment
the values (-150,-200) have to correct, so that the eps-file is in the right upper corner.

Current Tags:
create new tag
, view all tags
Topic attachments
I Attachment Action Size Date Who Comment
pngpng Latexhelp.png manage 38.8 K 2007-10-22 - 09:53 JuanUribe latex help screenshot
elsetex elliptic_relaxation.tex manage 13.8 K 2007-10-22 - 10:34 JuanUribe internal seminar presentation source
Topic revision: r3 - 2008-08-19 - 15:17:00 - JuanUribe
Main Web
17 Dec 2017


Manchester CfdTm

Ongoing Projects


Previous Projects


Useful Links:

User Directory
Photo Wall
Upcoming Events
Add Event

Computational Fluid Dynamics and Turbulence Mechanics
@ the University of Manchester
Copyright © by the contributing authors. Unless noted otherwise, all material on this web site is the property of the contributing authors.