LoweyPages - The Next Inevitable Step

Nicer Layouts

Fancy Headers

\usepackage{fancyhdr}
\pagestyle{fancy}

Use this to enable prettier headers in your document.  If you want to make the chapter names to be lower-case in the title then you can also use

\renewcommand{\chaptermark}[1]{
\markboth{\chaptername\ \thechapter.\ #1}{}}

Nicer Table of Contents (TOC)

\usepackage{tocloft}

There are options for this package, but I find the defaults look great anyway.

Setting the Margins

This is surprisingly hard to do in LaTeX.  You can either use the Geometry package, which is supposed to make life easier (I just found it annoying) or you can do this:

\topmargin = 0in
\headheight = 0.5in
\headsep = 0.25in
\textheight = 8.69in
\oddsidemargin = 0.25in
\textwidth = 5.77in
\parindent = 0pt
\parskip = 12pt

Potential trip-ups here are:  topmargin is the top-margin PLUS 1 inch.  ie Setting \topmargin to 0 will result in a 1 inch margin at the top of the page.  The same goes for \oddsidemargin (and \evensidemargin if you set it).  I've set my \oddsidemargin to 0.25in which is actually 1.25 inches on paper.  There is no direct way of setting the right-side margin of the page.  You do this by setting the \oddsidemargin (and \evensidemargin if necessary) and then specify \textwidth.

There is a great picture on [this site] which explains how the margins fit together far better than I can hope to explain here.  Have a look at it.

Preamble

It is normal to number the pre-amble pages in an official document with roman numerals, and then switch to arabic numbering and restart the page-count for the main bulk of the document.  This can be done very easily in LaTeX:

\pagenumbering{roman}
%% All your pre-amble goes in here: Abstract, acknowledgements,
%% table of contents etc
\pagenumbering{arabic}
\setcounter{page}{1}

Suppressing numbering of chapters

Sometimes you want to use all the formatting of a chapter, or a section or whatever, but you don't want it to be numbered.  For exmaple, I want my chapters to start from the introduction onwards, but I want "Abstract" and "Acknowledgements" (which come before the introduction) to be formatted as chapters.  This is incredibly easy to do (as I found after some searching).

Change this:

\chapter{Abstract}

This is a document about stuff.

\chapter{Acknowledgements}

I'd like to thank my pet spider, Boris, for all his help.

To this:

\chapter*{Abstract}

This is a document about stuff.

\chapter*{Acknowledgements}

I'd like to thank my pet spider, Boris, for all his help.

Abstract and Acknowledgements will now appear with the same formatting as chapters, but will not be counted as chapters.  It will also remove them from the table of contents.

What's that you say?  You don't want them removing from the table of contents?  Then you'd better read on:

Adding items to the TOC

In the previous example we made the Abstract and Acknowledgements sections disappear from the table of contents.  You can put them back in with the command:

\addcontentsline{toc}{chapter}{Abstract}
\addcontentsline{toc}{chapter}{Acknowledgements}

I put each of those lines directly before the \chapter commands for the Abstract and the Acknowledgements sections.  I'm not sure how well they work in other locations.  This same trick can be used to add your bibliography section to your table of contents.

[<< LaTeX 2e information]

Last updated 11 of March 2005 at 11:10

For web design go to Shoestring Websites!

| Home |
---
| Blog |
| Serious |
| Software |
| Linux |
| Humour |
| Tunes |
---
| Disclaimer |