Katherine Blundell
computing tips
Tips on using colour in LaTeX
To use colours in regular LaTeX files, just do the following:
- To put colours into a usual LaTeX file just include the line
\usepackage{color}
directly below the line which looks approximately like\documentclass{article}
- Ensure that the file rgb.tex is in your current directory or path.
- Include the following line below the
\usepackage{color}
line:
\input{rgb}
- Then colour bits of text or equations etc with a construction like:
{\color{red} ...bit of LaTeX text...}
an example of making an equation the colour DarkSeaGreen (rather a sophisticated shade, I think) one types the following:
\begin{equation}
{\color{DarkSeaGreen} x = \log_{10} (\nu/\rm MHz) }
\end{equation}
- Then just run
latex filename
in the usual way.
Here are some examples of the LaTeX seminar slides:
- An example of a regular LaTeX file which is coloured is example_latex.tex - you can view what this should look like by ghostviewing example_latex.ps
- An example of a LaTeX file which makes use of the seminar.cls package is example_ohps.tex -- you can view what this should look like by ghostviewing example_ohps.ps