|
|||
Department of Engineering | |
University of Cambridge > Engineering Department > computing help |
\documentclass[dvips,12pt]{book} \usepackage{a4,color,graphics,palatino,fancyhdr} \begin{document} \pagestyle{empty} \tableofcontents \listoffigures \pagestyle{fancy} \input{chapter1} \input{chapter2} \input{fig2} \input{chapter3} \input{chapter4} \appendix \input{appendices} \end{document}on which you can run latex just as if the master file contained all the text of chapter1.tex etc. The advantage of this is that once you have a chapter correct, you can comment out the corresponding `input' line and avoid unnecessary processing. Remember to take out the
\begin{document}
and \end{document}
lines from the
component files.
\begin{document}
line.
\setlength{\topmargin}{-0.4in} \setlength{\topskip}{0.3in} % between header and text \setlength{\textheight}{9.5in} % height of main text \setlength{\textwidth}{6in} % width of text \setlength{\oddsidemargin}{0.75in} % odd page left margin \setlength{\evensidemargin}{0.75in} % even page left margin
Note that a margin width of 0cm gives you a margin 4cm wide. Rather than set absolute sizes you can modify the default sizes using commands like the following -
\addtolength{\evensidemargin}{-1cm} \addtolength{\oddsidemargin}{-1cm} \addtolength{\textwidth}{2cm}Better support for control of page layout is provided by the geometry package. To see the current values of these dimensions, use the
layout
package, which defines a \layout
command.
For A3 output, add \usepackage{a3}
to your
latex source file (foo.tex say), run latex on it, convert the
resulting file to
Postscript using
``dvips -t a3 foo.dvi -ofoo.ps
'' then print using
``lp -oa3 foo.ps
''.
\title{Advanced \LaTeX} \author{Tim Love} \date{\today} \maketitle
\tableofcontents
to create a contents list
at that point in the document. LATEX will pick out the sections,
subsections, etc for you. You'll have to run LATEX at least twice though.
pagestyle{}
.
\maketitle
. The workaround in
this case is to do
\maketitle \thispagestyle{empty}with no gap between the two lines.
fancyhdr
is a popular package that adds useful page
headers when the command \pagestyle{fancy}
is used. This handout uses it.
Long section titles can cause trouble in headers. The section commands let you specify an extra, shorter title for use in the header and contents page. Section 2.3 was specified as follows
\subsection[Pagebreaks, footnotes, etc] {Pagebreaks, space, footnotes, references, boxes, etc}
\chapter{Life}
.
Similar commands to start a part, section or subsection
also exist in most document classes (articles don't have chapters or parts
though).
If you use the *-form of the command then the sections will not be numbered, neither will it appear in the table of contents.
A title will only be numbered if its 'depth' isn't more than secnumdepth and will only appear in the contents page if the 'depth' isn't more than the value of tocdepth. So, for example, doing
\setcounter{tocdepth}{2} \setcounter{secnumdepth}{3}will cause section 1.4.3 to be numbered, but it won't appear in the contents.
| computing help | |