English logga in

StartTeX och LaTeX

Klassen cluu

Denna sida finns bara på engelska.

We have a local document class cluu meant for course reports etc. It is also used for writing a Master’s Thesis here.

It can be used as:


\course{Introduction to introductions}
\author{Ellen Kaka}
\title{My report}

Bla bla bla.

That's all.


These are standard LaTeX commands, except for \course which says which course the report is for.

In /local/doc/tex/ are some example LaTeX files, including

  • palindromes.tex (with output palindromes.pdf) which shows a very short mock report using the class.
  • compling.tex (with output compling.pdf) with an example using twocolumn mode. It uses an image in the same directory which you need if you want to experiment with this example.

It just works

One main purpose of the cluu class is that you shouldn’t have to specify a lot of things. You will get a suitable font, good margins, etc. by default. Several packages are used in the background to give you access to more commands, make various things work better and give better output, so you don’t have to do anything special about it.

The cluu class builds upon the KOMA-Script classes instead of the standard LaTeX classes. See the document for that to see for example how to change document colours or make lots of other changes if you are interested.

More options

You can change the appearance by including options to the class. These are put inside brackets like this:

If you have several options separate them with commas as in the example. Options can be single words like marg above or a parameter with a values like fonts=palatino. Here are some of the most useful ones. Those ending with = need values as well.

twocolumnstdMake a twocolumn layout
landscapestdMake a horizontal layout
margcluu Make the right margin wider, for example so it can be used for marginal notes
marg=cluu As the previous, but explicitly say how wide the margin needs to be at least, for example marg=5cm.
fontsize=komaChange the fontsize. The default is 11pt for 11 typographic points. You can use other units instead of pt, but for example 1cm is very big.
widecluuAllow the text to be wider than it would normally be. This can make text harder to read.
xwidecluuAllow the text to be even wider.
fonts=cluuUse a set of fonts. Possible arguments are libertine (Linux Libertine, the default), times, palatino, fourier, lm (Latin Modern), uu (the fonts that are part of the graphical profile of Uppsala University), none (do nothing; keep TeX defaults).
parskipkoma Indicate new paragraphs with skips instead of indents. That will display the text more like for example a web page than a printed book.

The cluu class takes most of these into consideration when calculating a suitable layout, so changing for example the fonts will also change the line width.

On your own computer

To use this you need the file cluu.cls.

New commands

Since this class loads several other packages many extra commands are available, like \url and \includegraphics.

There are also a few commands that are specific to this class.

In an example above we saw \course which says which course a report is for. There is also a command \subtitle which gives a subtitle after the main title.

One minor but convenient command is \q for quotes.

He wrote that \q{colorless green ideas sleep furiously}.

This command just puts quotation marks around its argument, but it takes care to use the right opening and ending marks, also when a quote is inside another quote.