| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 1993-2025 |
| 4 |
% The LaTeX Project and any individual authors listed elsewhere |
| 5 |
% in this file. |
| 6 |
% |
| 7 |
% This file is part of the LaTeX base system. |
| 8 |
% ------------------------------------------- |
| 9 |
% |
| 10 |
% It may be distributed and/or modified under the |
| 11 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 12 |
% of this license or (at your option) any later version. |
| 13 |
% The latest version of this license is in |
| 14 |
% http://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 16 |
% version 2008 or later. |
| 17 |
% |
| 18 |
% This file has the LPPL maintenance status "maintained". |
| 19 |
% |
| 20 |
% The list of all files belonging to the LaTeX base distribution is |
| 21 |
% given in the file `manifest.txt'. See also `legal.txt' for additional |
| 22 |
% information. |
| 23 |
% |
| 24 |
% The list of derived (unpacked) files belonging to the distribution |
| 25 |
% and covered by LPPL is defined by the unpacking scripts (with |
| 26 |
% extension .ins) which are part of the distribution. |
| 27 |
% |
| 28 |
% \fi |
| 29 |
% Filename: usrguide-historic.tex |
| 30 |
|
| 31 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 32 |
|
| 33 |
\documentclass{ltxguide}[2001/05/28] |
| 34 |
|
| 35 |
\title{\LaTeX\ for authors --- historic version} |
| 36 |
|
| 37 |
\author{\copyright~Copyright 1995--2023, \LaTeX\ Project Team.\\ |
| 38 |
All rights reserved.% |
| 39 |
\footnote{This file may be distributed and/or modified under the |
| 40 |
conditions of the \LaTeX{} Project Public License, either version 1.3c |
| 41 |
of this license or (at your option) any later version. See the source |
| 42 |
\texttt{usrguide-historic.tex} for full details.}% |
| 43 |
} |
| 44 |
|
| 45 |
\date{09 November 2023} |
| 46 |
|
| 47 |
|
| 48 |
\begin{document} |
| 49 |
|
| 50 |
\maketitle |
| 51 |
|
| 52 |
\tableofcontents |
| 53 |
|
| 54 |
\section{Introduction} |
| 55 |
|
| 56 |
Welcome to \LaTeXe, the new standard version of the \LaTeX{} Document |
| 57 |
Preparation System. |
| 58 |
|
| 59 |
This document describes how to take advantage of the new features of |
| 60 |
\LaTeX, and how to process your old \LaTeX{} documents with |
| 61 |
\LaTeXe. However, this document is only a brief introduction to the |
| 62 |
new facilities and is intended for authors who are already familiar |
| 63 |
with the old version of \LaTeX{}. It is \emph{not} a reference manual |
| 64 |
for \LaTeXe{} nor is it a complete introduction to \LaTeX. |
| 65 |
|
| 66 |
It is somewhat of an historical document now, since \LaTeXe{} came into |
| 67 |
existence in 1994. |
| 68 |
|
| 69 |
\subsection[\LaTeXe---The new \LaTeX~release] |
| 70 |
{\LaTeXe---The new \LaTeX~release\\ (well, for more than 10 years now)} |
| 71 |
|
| 72 |
The previous version of \LaTeX{} was known as \LaTeX~2.09. Over the |
| 73 |
years many extensions have been developed for \LaTeX. This is, of |
| 74 |
course, a sure sign of its continuing popularity but it has had one |
| 75 |
unfortunate result: incompatible \LaTeX{} formats came into use at |
| 76 |
different sites. This included `standard \LaTeX~2.09', \LaTeX{} built |
| 77 |
with the \emph{New Font Selection Scheme}~(\NFSS), \SLiTeX, \AmSLaTeX, |
| 78 |
and so on. Thus, to process documents from various places, a site |
| 79 |
maintainer was forced to keep multiple versions of the \LaTeX{} |
| 80 |
program. In addition, when looking at a source file it was not always |
| 81 |
clear for which format the document was written. |
| 82 |
|
| 83 |
To put an end to this unsatisfactory situation, \LaTeXe{} has been |
| 84 |
produced; it brings all such extensions back under a single format and |
| 85 |
thus prevents the proliferation of mutually incompatible dialects of |
| 86 |
\LaTeX~2.09. With \LaTeXe{} the `new font selection scheme' is |
| 87 |
standard and, for example, \textsf{amsmath} (formerly the \AmSLaTeX{} |
| 88 |
format) or \textsf{slides} (formerly the \SLiTeX{} format) are simply |
| 89 |
extensions, which may be loaded by documents using the same base format. |
| 90 |
|
| 91 |
The introduction of a new release also made it possible to add a small |
| 92 |
number of often-requested features and to make the task of writing |
| 93 |
packages and classes simpler. |
| 94 |
|
| 95 |
\subsection{\LaTeX3---The long-term future of \LaTeX} |
| 96 |
\label{Sec:ltx3} |
| 97 |
|
| 98 |
\LaTeXe{} is the consolidation step in a comprehensive |
| 99 |
reimplementation of the \LaTeX{} system. The next major release of |
| 100 |
\LaTeX{} will be \LaTeX3, which will include a radical overhaul of the |
| 101 |
document designers' and package writers' interface to \LaTeX. |
| 102 |
|
| 103 |
\LaTeX3 is a long-term research project but, until it is completed, |
| 104 |
the project team are committed to the active maintenance of \LaTeXe{}. |
| 105 |
Thus the experience gained from the production and maintenance of |
| 106 |
\LaTeXe{} will be a major influence on the design of \LaTeX3. |
| 107 |
A brief description of the project can be found in the document |
| 108 |
|ltx3info.tex|. |
| 109 |
|
| 110 |
If you would like to support the project then you are welcome to send |
| 111 |
donations to the \LaTeX\ Project Fund; this has been set up to help |
| 112 |
the research team by financing various expenses associated with this |
| 113 |
voluntary work of maintaining the current \LaTeX{} and developing |
| 114 |
\LaTeX\ further. |
| 115 |
|
| 116 |
The fund is administered by The \TeX{} Users Group and by various |
| 117 |
local user groups. Information about making donations and joining |
| 118 |
these groups is available from: |
| 119 |
\begin{quote}\small\label{addrs} |
| 120 |
\texttt{http://www.tug.org/lugs.html} |
| 121 |
\end{quote} |
| 122 |
|
| 123 |
The \LaTeX3{} project has its home page |
| 124 |
on the World Wide Web at: |
| 125 |
\begin{verbatim} |
| 126 |
http://www.latex-project.org/ |
| 127 |
\end{verbatim} |
| 128 |
This page describes \LaTeX{} and the \LaTeX3 project, and contains |
| 129 |
pointers to other \LaTeX{} resources, such as the user guides, the |
| 130 |
\TeX{} Frequently Asked Questions, and the \LaTeX{} bugs database. |
| 131 |
|
| 132 |
Older articles covering aspects of the \LaTeX3 project are also |
| 133 |
available for anonymous ftp from the Comprehensive \TeX{} Archive, in |
| 134 |
the directory: |
| 135 |
\begin{verbatim} |
| 136 |
ctan:info/ltx3pub |
| 137 |
\end{verbatim} |
| 138 |
The file |ltx3pub.bib| in that directory contains an abstract of each |
| 139 |
of the files. |
| 140 |
|
| 141 |
\subsection{Overview} |
| 142 |
|
| 143 |
This document contains an overview of the new structure and features |
| 144 |
of \LaTeX. It is \emph{not} a self-contained document, as it contains |
| 145 |
only the features of \LaTeX{} which have changed since version 2.09. |
| 146 |
You should read this document in conjunction with an introduction to |
| 147 |
\LaTeX{}. |
| 148 |
|
| 149 |
\begin{description} |
| 150 |
|
| 151 |
\item[Section~\ref{Sec:class+packages}] |
| 152 |
contains an overview of the new structure of |
| 153 |
\LaTeX{} documents. It describes how classes and packages work and |
| 154 |
how class and package options can be used. It lists the standard |
| 155 |
packages and classes which come with \LaTeX. |
| 156 |
|
| 157 |
\item[Section~\ref{Sec:commands}] describes the new commands available |
| 158 |
to authors in \LaTeXe. |
| 159 |
|
| 160 |
\item[Section~\ref{Sec:209}] shows how to process old \LaTeX{} |
| 161 |
documents with \LaTeXe. |
| 162 |
|
| 163 |
\item[Section~\ref{Sec:problems}] contains advice on dealing with |
| 164 |
problems you may encounter in running \LaTeXe. |
| 165 |
It lists some error messages which are new in \LaTeXe{} and |
| 166 |
it describes some of the more common problems and how to cure them, |
| 167 |
or where to find further information. |
| 168 |
|
| 169 |
\end{description} |
| 170 |
|
| 171 |
\subsection{Further information} |
| 172 |
|
| 173 |
For a general introduction to \LaTeX, including the new features of |
| 174 |
\LaTeXe, you should read \emph{\LaTeXbook} |
| 175 |
by Leslie Lamport~\cite{A-W:LLa94}. |
| 176 |
|
| 177 |
A more detailed description of the new features of \LaTeX, including an |
| 178 |
overview of more than 200 packages and nearly 1000 ready to run examples, is |
| 179 |
to be found in \emph{\LaTeXcomp second edition} by Frank Mittelbach and |
| 180 |
Michel Goossens~\cite{A-W:MG2004}. |
| 181 |
|
| 182 |
Packages and programs for producing and manipulating graphics are |
| 183 |
discussed at length in \emph{\LaTeXGcomp} by Michel Goossens, |
| 184 |
Sebastian Rahtz and Frank Mittelbach~\cite{A-W:GRM97}. |
| 185 |
|
| 186 |
Solutions for publishing with \LaTeX{} on the World Wide Web are given |
| 187 |
in \emph{\LaTeXWcomp} by Michel Goossens and Sebastian |
| 188 |
Rahtz~\cite{A-W:GR99}. |
| 189 |
|
| 190 |
For more information about the many new \LaTeX{} packages you should |
| 191 |
read the package documentation, which should be available from the |
| 192 |
same source as your copy of \LaTeX. |
| 193 |
|
| 194 |
There are a number of documentation files which accompany every copy |
| 195 |
of \LaTeX. A copy of \emph{\LaTeX{} News} will come out with each |
| 196 |
six-monthly release of \LaTeX; it will be found in the files |
| 197 |
|ltnews*.tex|. The class- and package-writer's guide \emph{\clsguide} |
| 198 |
describes the new \LaTeX{} features for writers of document classes |
| 199 |
and packages; it is in |clsguide.tex|. The guide \emph{\fntguide} |
| 200 |
describes the \LaTeX{} font selection scheme for class- and |
| 201 |
package-writers; it is in |fntguide.tex|. Support for Cyrillic languages |
| 202 |
in \LaTeX{} is described in \emph{\cyrguide}. |
| 203 |
|
| 204 |
The documented source code (from the files used to produce the kernel |
| 205 |
format via |latex.ltx|) is now available as |
| 206 |
\emph{The \LaTeXe\ Sources}. ] |
| 207 |
This very large document also includes an index of |
| 208 |
\LaTeX{} commands. It can be typeset from the \LaTeX{} file |
| 209 |
|source2e.tex| in the |base| directory, using the source files and |
| 210 |
the class file |ltxdoc.cls| from this directory. |
| 211 |
|
| 212 |
For more information about \TeX{} and \LaTeX{}, please contact your |
| 213 |
local \TeX{} Users Group, or the international \TeX{} Users Group (see |
| 214 |
page \pageref{addrs}). |
| 215 |
|
| 216 |
|
| 217 |
\section{Classes and packages} |
| 218 |
\label{Sec:class+packages} |
| 219 |
|
| 220 |
This section describes the new structure of \LaTeX{} documents and the |
| 221 |
new types of file: \emph{classes} and \emph{packages}. |
| 222 |
|
| 223 |
\subsection{What are classes and packages?} |
| 224 |
|
| 225 |
The main difference between \LaTeX~2.09 and \LaTeXe{} is in the |
| 226 |
commands before |\begin{document}|. |
| 227 |
|
| 228 |
In \LaTeX~2.09, documents had \emph{styles}, |
| 229 |
such as \textsf{article} or \textsf{book}, and \emph{options}, |
| 230 |
such as \textsf{twoside} or \textsf{epsfig}. |
| 231 |
These were indicated by the |\documentstyle| command: |
| 232 |
\begin{quote} |
| 233 |
|\documentstyle|\oarg{options}\arg{style} |
| 234 |
\end{quote} |
| 235 |
For example, to specify a two-sided article with encapsulated |
| 236 |
PostScript figures, you said: |
| 237 |
\begin{verbatim} |
| 238 |
\documentstyle[twoside,epsfig]{article} |
| 239 |
\end{verbatim} |
| 240 |
However, there were two different types of document style option: |
| 241 |
\emph{built-in options} such as |twoside|; and \emph{packages} such as |
| 242 |
|epsfig.sty|. These were very different, since any \LaTeX{} document |
| 243 |
style could use the \textsf{epsfig} package but only document styles |
| 244 |
which declared the \textsf{twoside} option could use that option. |
| 245 |
|
| 246 |
To avoid this confusion, \LaTeXe{} differentiates between built-in |
| 247 |
options and packages. These are given by the new |\documentclass| and |
| 248 |
|\usepackage| commands: |
| 249 |
\begin{quote} |
| 250 |
|\documentclass|\oarg{options}\arg{class} \\ |
| 251 |
|\usepackage|\oarg{options}\arg{packages} |
| 252 |
\end{quote} |
| 253 |
For example, to specify a two-sided article with encapsulated |
| 254 |
PostScript figures, you now write: |
| 255 |
\begin{verbatim} |
| 256 |
\documentclass[twoside]{article} |
| 257 |
\usepackage{epsfig} |
| 258 |
\end{verbatim} |
| 259 |
You can load more than one package with a single |\usepackage| |
| 260 |
command; for example, rather than writing: |
| 261 |
\begin{verbatim} |
| 262 |
\usepackage{epsfig} |
| 263 |
\usepackage{multicol} |
| 264 |
\end{verbatim} |
| 265 |
you can specify: |
| 266 |
\begin{verbatim} |
| 267 |
\usepackage{epsfig,multicol} |
| 268 |
\end{verbatim} |
| 269 |
Note that \LaTeXe{} still understands the \LaTeX~2.09 |\documentstyle| |
| 270 |
command. This command causes \LaTeXe{} to enter \emph{\LaTeX~2.09 |
| 271 |
compatibility mode}, which is described in Section~\ref{Sec:209}. |
| 272 |
|
| 273 |
You should not, however, use the |\documentstyle| command for new |
| 274 |
documents because this compatibility mode is very slow and the new |
| 275 |
features of \LaTeXe{} are not available in this mode. |
| 276 |
|
| 277 |
To help differentiate between classes and packages, document classes |
| 278 |
now end with |.cls| rather than |.sty|. Packages still end with |
| 279 |
|.sty|, since most \LaTeX~2.09 packages work well with \LaTeXe. |
| 280 |
|
| 281 |
\subsection{Class and package options} |
| 282 |
|
| 283 |
In \LaTeX~2.09, only document styles could have options such as |
| 284 |
|twoside| or |draft|. In \LaTeXe{}, both classes and packages are |
| 285 |
allowed to have options. For example, to specify a two-sided article |
| 286 |
with graphics using the |dvips| driver, you write: |
| 287 |
|
| 288 |
\begin{verbatim} |
| 289 |
\documentclass[twoside]{article} |
| 290 |
\usepackage[dvips]{graphics} |
| 291 |
\end{verbatim} |
| 292 |
It is possible for packages to share common options. For example, |
| 293 |
you could, in addition, load the \textsf{color} package by specifying: |
| 294 |
\begin{verbatim} |
| 295 |
\documentclass[twoside]{article} |
| 296 |
\usepackage[dvips]{graphics} |
| 297 |
\usepackage[dvips]{color} |
| 298 |
\end{verbatim} |
| 299 |
But because |\usepackage| allows more than one package to be listed, |
| 300 |
this can be shortened to: |
| 301 |
\begin{verbatim} |
| 302 |
\documentclass[twoside]{article} |
| 303 |
\usepackage[dvips]{graphics,color} |
| 304 |
\end{verbatim} |
| 305 |
In addition, packages will also use each option given to |
| 306 |
the |\documentclass| command (if they know what to do with it), so you |
| 307 |
could also write: |
| 308 |
\begin{verbatim} |
| 309 |
\documentclass[twoside,dvips]{article} |
| 310 |
\usepackage{graphics,color} |
| 311 |
\end{verbatim} |
| 312 |
Class and package options are covered in more detail in |
| 313 |
\emph{\LaTeXcomp} and in \emph{\clsguide}. |
| 314 |
|
| 315 |
\subsection{Standard classes} |
| 316 |
|
| 317 |
The following classes are distributed with \LaTeX: |
| 318 |
\begin{description} |
| 319 |
|
| 320 |
\item[article] The |article| class described in \emph{\LaTeXbook}. |
| 321 |
\item[book] The |book| class described in \emph{\LaTeXbook}. |
| 322 |
\item[report] The |report| class described in \emph{\LaTeXbook}. |
| 323 |
\item[letter] The |letter| class described in \emph{\LaTeXbook}. |
| 324 |
\item[slides] The |slides| class described in \emph{\LaTeXbook}, |
| 325 |
formerly \SLiTeX. |
| 326 |
\item[proc] A document class for proceedings, based on |article|. |
| 327 |
Formerly the |proc| package. |
| 328 |
\item[ltxdoc] The document class for documenting the \LaTeX{} |
| 329 |
program, based on |article|. |
| 330 |
\item[ltxguide] The document class for \emph{\usrguide} and |
| 331 |
\emph{\clsguide}, based on |article|. The document you are reading |
| 332 |
now uses the |ltxguide| class. The layout for this class is likely |
| 333 |
to change in future releases of \LaTeX. |
| 334 |
\item[ltnews] The document class for the \emph{\LaTeX{} News} |
| 335 |
information sheet, based on |article|. The layout for this class |
| 336 |
is likely to change in future releases of \LaTeX. |
| 337 |
\item[minimal] |
| 338 |
\NEWfeature{1995/12/01} |
| 339 |
This class is the bare minimum (3 lines) that is needed in a |
| 340 |
\LaTeX\ class file. It just sets the text width and height, and |
| 341 |
defines |\normalsize|. It is principally intended for debugging |
| 342 |
and testing \LaTeX\ code in situations where you do not need to |
| 343 |
load a `full' class such as |article|. If, however, you are |
| 344 |
designing a completely new class that is aimed for documents with |
| 345 |
structure radically different from the structure supplied by the |
| 346 |
article class, then it may make sense to use this as a base and add |
| 347 |
to it code implementing the required structure, rather than |
| 348 |
starting from |article| and modifying the code there. |
| 349 |
\end{description} |
| 350 |
|
| 351 |
\subsection{Standard packages} |
| 352 |
\label{Sec:st-pack} |
| 353 |
|
| 354 |
The following packages are distributed with \LaTeX: |
| 355 |
\begin{description} |
| 356 |
\item[alltt] |
| 357 |
\NEWfeature{1994/12/01} |
| 358 |
This package provides the |alltt| environment, which is like |
| 359 |
the |verbatim| environment except that |\|, |{|, and |}| |
| 360 |
have their usual meanings. It is described in |alltt.dtx| and |
| 361 |
\emph{\LaTeXbook}. |
| 362 |
\item[doc] This is the basic package for typesetting the documentation |
| 363 |
of \LaTeX{} programs. It is described in |doc.dtx| and in |
| 364 |
\emph{\LaTeXcomp}. |
| 365 |
\item[exscale] This provides scaled versions of the math extension |
| 366 |
font. It is described in |exscale.dtx| and \emph{\LaTeXcomp}. |
| 367 |
\item[fontenc] This is used to specify which font encoding \LaTeX{} |
| 368 |
should use. It is described in |ltoutenc.dtx|. |
| 369 |
\item[graphpap] |
| 370 |
\NEWfeature{1994/12/01} |
| 371 |
This package defines the |\graphpaper| command; this |
| 372 |
can be used in a |picture| environment. |
| 373 |
\item[ifthen] Provides commands of the form `if\dots then do\dots |
| 374 |
otherwise do\dots'. |
| 375 |
It is described in |ifthen.dtx| and \emph{\LaTeXcomp}. |
| 376 |
\item[inputenc] |
| 377 |
\NEWfeature{1994/12/01} |
| 378 |
This is used to specify which input encoding \LaTeX{} should use. |
| 379 |
It is described in |inputenc.dtx|. |
| 380 |
\item[latexsym] \LaTeXe{} no longer loads the \LaTeX{} symbol font by |
| 381 |
default. To access it, you should use the |latexsym| package. It |
| 382 |
is described in |latexsym.dtx| and in \emph{\LaTeXcomp}; see also |
| 383 |
Section~\ref{Sec:problems}. |
| 384 |
\item[makeidx] This provides commands for producing indexes. It is |
| 385 |
described in \emph{\LaTeXbook} and in \emph{\LaTeXcomp}. |
| 386 |
\item[newlfont] This is used to emulate the font commands of |
| 387 |
\LaTeX~2.09 with the New Font Selection Scheme. It is described in |
| 388 |
\emph{\LaTeXcomp}. |
| 389 |
\item[oldlfont] This is used to emulate the font commands of |
| 390 |
\LaTeX~2.09. It is described in \emph{\LaTeXcomp}. |
| 391 |
\item[showidx] |
| 392 |
This causes the argument of each |\index| command to |
| 393 |
be printed on the page where it occurs. |
| 394 |
It is described in \emph{\LaTeXbook}. |
| 395 |
\item[syntonly] This is used to process a document without |
| 396 |
typesetting it. It is described in |syntonly.dtx| and in |
| 397 |
\emph{\LaTeXcomp}. |
| 398 |
\item[tracefnt] This allows you to control how much information about |
| 399 |
\LaTeX's font loading is displayed. It is described in |
| 400 |
\emph{\LaTeXcomp}. |
| 401 |
\end{description} |
| 402 |
|
| 403 |
\subsection{Related software} |
| 404 |
|
| 405 |
\NEWdescription{1998/12/01} |
| 406 |
The following software should be available from the same distributor |
| 407 |
as your copy of \LaTeXe. You should obtain at least the |
| 408 |
\textsf{graphics} and \textsf{tools} collections in order to have all |
| 409 |
the files described in \emph{\LaTeXbook}. The |amsmath| package (part |
| 410 |
of \textsf{amslatex} and formerly known as |amstex|) |
| 411 |
and \textsf{babel} are also mentioned in the list |
| 412 |
of `standard packages' in section C.5.2 of that book. |
| 413 |
\begin{description} |
| 414 |
\item[amslatex] Advanced mathematical typesetting from the American |
| 415 |
Mathematical Society. This includes the |amsmath| package; it |
| 416 |
provides many commands for typesetting mathematical formulas of |
| 417 |
higher complexity. It is produced and supported by the American |
| 418 |
Mathematical Society and it is described in \emph{\LaTeXcomp}. |
| 419 |
\item[babel] This package and related files support typesetting in |
| 420 |
many languages. It is described in \emph{\LaTeXcomp}. |
| 421 |
\item[cyrillic] |
| 422 |
\NEWfeature{1998/12/01} |
| 423 |
Everything you need (except the fonts themselves) for |
| 424 |
typesetting with Cyrillic fonts. |
| 425 |
\item[graphics] This includes the |graphics| package which |
| 426 |
provides support for the inclusion and transformation of graphics, |
| 427 |
including files produced by other software. Also included, is the |
| 428 |
|color| package which provides support for typesetting in colour. |
| 429 |
Both these packages are described in \emph{\LaTeXbook}. |
| 430 |
\item[psnfss] Everything you need (except the fonts themselves) for |
| 431 |
typesetting with a large range of Type~1 (PostScript) fonts. |
| 432 |
\item[tools] Miscellaneous packages written by the \LaTeX3 |
| 433 |
project team. |
| 434 |
\end{description} |
| 435 |
These packages come with documentation and each of them is also |
| 436 |
described in at least one of the books \emph{\LaTeXcomp} and |
| 437 |
\emph{\LaTeXbook}. |
| 438 |
|
| 439 |
\subsubsection{Tools} |
| 440 |
|
| 441 |
This collection of packages includes, at least, the following (some |
| 442 |
files may have slightly different names on certain systems): |
| 443 |
|
| 444 |
\begin{description} |
| 445 |
\item[array] |
| 446 |
Extended versions of the environments |array|, |tabular| |
| 447 |
and |tabular*|, with many extra features. |
| 448 |
\item[calc] |
| 449 |
\NEWfeature{1996/12/01} |
| 450 |
Enables the use of certain algebraic notation when specifying |
| 451 |
values for lengths and counters. |
| 452 |
\item[dcolumn] |
| 453 |
Alignment on `decimal points' in tabular entries. Requires the |
| 454 |
|array| package. |
| 455 |
\item[delarray] |
| 456 |
Adds `large delimiters' around arrays. Requires |array|. |
| 457 |
\item[hhline] |
| 458 |
Finer control over horizontal rules in tables. Requires |array|. |
| 459 |
\item[longtable] |
| 460 |
Multi-page tables. (Does not require |array|, but it uses the |
| 461 |
extended features if both are loaded.) |
| 462 |
\item[tabularx] |
| 463 |
Defines a |tabularx| environment that is similar to |tabular*| |
| 464 |
but it modifies the column widths, rather than the inter-column |
| 465 |
space, to achieve the desired table width. |
| 466 |
\item[afterpage] |
| 467 |
Place text after the current page. |
| 468 |
\item[bm] |
| 469 |
Access bold math symbols. |
| 470 |
\item[enumerate] |
| 471 |
Extended version of the |enumerate| environment. |
| 472 |
\item[fontsmpl] |
| 473 |
Package and test file for producing `font samples'. |
| 474 |
\item[ftnright] |
| 475 |
Place all footnotes in the right-hand column in two-column mode. |
| 476 |
\item[indentfirst] |
| 477 |
Indent the first paragraph of sections, etc. |
| 478 |
\item[layout] |
| 479 |
Show the page layout defined by the current document class. |
| 480 |
\item[multicol] |
| 481 |
Typeset text in columns, with the length of the columns |
| 482 |
`balanced'. |
| 483 |
\item[rawfonts] |
| 484 |
Preload fonts using the old internal font names of \LaTeX~2.09. |
| 485 |
See Section~\ref{Sec:oldinternals}. |
| 486 |
\item[somedefs] |
| 487 |
Selective handling of package options. (Used by the rawfonts |
| 488 |
package.) |
| 489 |
\item[showkeys] |
| 490 |
Prints the `keys' used by |\label|, |\ref|, |\cite| etc.; useful |
| 491 |
whilst drafting. |
| 492 |
\item[theorem] |
| 493 |
Flexible declaration of `theorem-like' environments. |
| 494 |
\item[varioref] |
| 495 |
`Smart' handling of page references. |
| 496 |
\item[verbatim] |
| 497 |
Flexible extension of the verbatim environment. |
| 498 |
\item[xr] |
| 499 |
Cross reference other `external' documents. |
| 500 |
\item[xspace] |
| 501 |
`Smart space' command that helps you to avoid the common mistake |
| 502 |
of missing spaces after command names. |
| 503 |
\end{description} |
| 504 |
|
| 505 |
|
| 506 |
\section{Commands} |
| 507 |
\label{Sec:commands} |
| 508 |
|
| 509 |
This section describes the new commands available in \LaTeXe. |
| 510 |
They are covered in more detail in \emph{\LaTeXbook} and in |
| 511 |
\emph{\LaTeXcomp}. |
| 512 |
|
| 513 |
\subsection{Preamble commands} |
| 514 |
\label{Sec:pre} |
| 515 |
|
| 516 |
The changes to the preamble commands are intentionally designed to make |
| 517 |
\LaTeXe{} documents look clearly different from old documents. The |
| 518 |
commands should be used only before |\begin{document}|. |
| 519 |
|
| 520 |
\begin{decl} |
| 521 |
|\documentclass| \oarg{option-list} \arg{class-name} |
| 522 |
\oarg{release-date} |
| 523 |
\end{decl} |
| 524 |
|
| 525 |
This command replaces the |
| 526 |
\LaTeX~2.09 command |\documentstyle|. |
| 527 |
|
| 528 |
There must be exactly one |\documentclass| command in a document; and |
| 529 |
it should normally come before any other command. (There are some |
| 530 |
exceptions, e.g., you can have |filecontents| environments before it |
| 531 |
or |\RequirePackage| but these should be only used in special |
| 532 |
scenarios as discussed elsewhere.) |
| 533 |
|
| 534 |
The \m{option-list} is a list of options, each of which may modify the |
| 535 |
formatting of elements which are defined in the \m{class-name} file, |
| 536 |
as well as those in all following |\usepackage| commands (see |
| 537 |
below). |
| 538 |
|
| 539 |
The optional argument \m{release-date} can be used to specify the |
| 540 |
earliest desired release date of the class file; it should contain a |
| 541 |
date in the format \textsc{yyyy/mm/dd}. If a version of the class |
| 542 |
older than this date is found, a warning is issued. |
| 543 |
|
| 544 |
For example, to specify a two-column article, using a version of |
| 545 |
|article.cls| released after June 1994, you specify: |
| 546 |
\begin{verbatim} |
| 547 |
\documentclass[twocolumn]{article}[1994/06/01] |
| 548 |
\end{verbatim} |
| 549 |
|
| 550 |
\begin{decl} |
| 551 |
|\documentstyle| \oarg{option-list} \arg{class-name} |
| 552 |
\end{decl} |
| 553 |
|
| 554 |
This command is still supported for compatibility with old files. It |
| 555 |
is essentially the same as |\documentclass| except that it invokes |
| 556 |
\emph{\LaTeX~2.09 compatibility mode}. It also causes any options in |
| 557 |
the \m{option-list} that are not processed by the class file to be |
| 558 |
loaded as packages after the class has been loaded. See |
| 559 |
Section~\ref{Sec:209} for more details on \LaTeX~2.09 compatibility |
| 560 |
mode. |
| 561 |
|
| 562 |
\begin{decl} |
| 563 |
|\usepackage| \oarg{option-list} \arg{package-name} \oarg{release-date} |
| 564 |
\end{decl} |
| 565 |
|
| 566 |
Any number of |\usepackage| commands is allowed. Each package file |
| 567 |
(as denoted by \m{package-name}) defines new elements (or modifies |
| 568 |
those defined in the class file loaded by the \m{class-name} argument |
| 569 |
of the |\documentclass| command). A package file thus extends the |
| 570 |
range of documents which can be processed. |
| 571 |
|
| 572 |
The \m{option-list} argument can contain a list of options, each of |
| 573 |
which can modify the formatting of elements which are defined in this |
| 574 |
\m{package-name} file. |
| 575 |
|
| 576 |
As above, \m{release-date} can contain the earliest desired release |
| 577 |
date of the package file in the format \textsc{yyyy/mm/dd}; if an |
| 578 |
older version of the package is found, a warning is issued. |
| 579 |
|
| 580 |
For example, to load the |graphics| package for the |dvips| driver, |
| 581 |
using a version of |graphics.sty| released after June 1994, you write: |
| 582 |
\begin{verbatim} |
| 583 |
\usepackage[dvips]{graphics}[1994/06/01] |
| 584 |
\end{verbatim} |
| 585 |
Each package is loaded only once. If the same package is requested |
| 586 |
more than once, nothing happens in the second or following attempt |
| 587 |
unless the package has been requested with options that were not given |
| 588 |
in the original |\usepackage|. If such extra options are specified |
| 589 |
then an error message is produced. See Section~\ref{Sec:problems} how |
| 590 |
to resolve this problem. |
| 591 |
|
| 592 |
As well as processing the options given in the \m{option-list} of the |
| 593 |
|\usepackage| command, each package processes the |
| 594 |
\m{option-list} of the |\documentclass| command as well. This |
| 595 |
means that any option which should be processed by every package (to |
| 596 |
be precise, by every package that specifies an action for it) can be |
| 597 |
specified just once, in the |\documentclass| command, rather than |
| 598 |
being repeated for each package that needs it. |
| 599 |
|
| 600 |
\begin{decl} |
| 601 |
|\listfiles| |
| 602 |
\end{decl} |
| 603 |
|
| 604 |
If this command is placed in the preamble then a list of the files |
| 605 |
read in (as a result of processing the document) will be displayed |
| 606 |
on the terminal (and in the log file) at the end of the run. Where |
| 607 |
possible, a short description will also be produced. |
| 608 |
|
| 609 |
\NEWdescription{1995/12/01} |
| 610 |
\emph{Warning}: this command will list only files which were read |
| 611 |
using \LaTeX{} commands such as |\input|\arg{file} or |
| 612 |
|\include|\arg{file}. If the file was read using the primitive \TeX{} |
| 613 |
syntax |\input |\emph{file} (without |{ }| braces around the file name) |
| 614 |
then it will not be listed; failure to use the \LaTeX{} form with the |
| 615 |
braces can cause more severe problems, possibly leading to overwriting |
| 616 |
important files, so \textbf{always put in the braces}. |
| 617 |
|
| 618 |
|
| 619 |
\begin{decl} |
| 620 |
|\setcounter{errorcontextlines}| \arg{num} |
| 621 |
\end{decl} |
| 622 |
|
| 623 |
\TeX~3 introduced a new primitive |\errorcontextlines| which controls |
| 624 |
the format of error messages. \LaTeXe\ provides an interface to this |
| 625 |
through the standard |\setcounter| command. As most \LaTeX\ users do |
| 626 |
not want to see the internal definitions of \LaTeX\ commands each time |
| 627 |
they make an error, \LaTeXe{} sets this to $-1$ by default. |
| 628 |
|
| 629 |
|
| 630 |
\subsection{Environments to write out support files} |
| 631 |
|
| 632 |
\NEWfeature{2019} |
| 633 |
% |
| 634 |
Until the \LaTeX\ release in 2019 the |filecontents| environment was |
| 635 |
restricted to a place before the |\documentclass| command. These days |
| 636 |
it can be used anywhere, though we still think that in most cases it is |
| 637 |
best to only use it a the top of your document or in the preamble. |
| 638 |
|
| 639 |
\begin{decl} |
| 640 |
|\begin{filecontents}| \oarg{option-list} \arg{file-name} \\ |
| 641 |
\m{file-contents} \\ |
| 642 |
|\end{filecontents}| |
| 643 |
\end{decl} |
| 644 |
|
| 645 |
The |filecontents| environment is intended for bundling within a |
| 646 |
single document file the contents of packages, options, or other |
| 647 |
files. When the document file is run through \LaTeXe{} the body of |
| 648 |
this environment is written verbatim (preceded by a comment line) to a |
| 649 |
file whose name is given as the environment's only argument. However, |
| 650 |
if that file already exists then nothing happens except for an |
| 651 |
information message. |
| 652 |
|
| 653 |
These days most UTF-8 text characters can be used in a |
| 654 |
|filecontents| envi\-ronment---they will be written unchanged to the |
| 655 |
output file. However, tabs and form feeds produce a warning, |
| 656 |
explaining that they are turned into spaces or blank lines, |
| 657 |
respectively. |
| 658 |
|
| 659 |
By default the environment does not overwrite an existing file and it |
| 660 |
even refuses to write out the data if there exists a file that is |
| 661 |
anywhere in the path that \TeX\ searches when inputting files. With |
| 662 |
the option |nosearch| you can ask it to look only into the current |
| 663 |
directory and with the option |overwrite| (or |force|) you can request |
| 664 |
it to write the file regardless. It will, however, never write to |
| 665 |
|\jobname.tex| to avoid overwriting itself. |
| 666 |
|
| 667 |
The |filecontents| environment is used for including \LaTeX{} files. |
| 668 |
For other plain text files (such as Encapsulated PostScript files), |
| 669 |
you should use the |filecontents*| environment which does not add a |
| 670 |
comment line. |
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
\subsection{Document structure} |
| 676 |
|
| 677 |
The |book| document class introduces new commands to indicate |
| 678 |
document structure. |
| 679 |
\begin{decl} |
| 680 |
|\frontmatter| \\ |\mainmatter| \\ |\backmatter| |
| 681 |
\end{decl} |
| 682 |
These commands indicate the beginning of the front matter (title page, |
| 683 |
table of contents and prefaces), main matter (main text) and back |
| 684 |
matter (bibliography, indexes and colophon). |
| 685 |
|
| 686 |
\subsection{Definitions} |
| 687 |
|
| 688 |
In \LaTeX, commands can have both mandatory and optional arguments, |
| 689 |
for example in: |
| 690 |
\begin{verbatim} |
| 691 |
\documentclass[11pt]{article} |
| 692 |
\end{verbatim} |
| 693 |
the |11pt| argument is optional, whereas the |article| class name is |
| 694 |
mandatory. |
| 695 |
|
| 696 |
In \LaTeX~2.09 users could define commands with arguments, but these |
| 697 |
had to be mandatory arguments. With \LaTeXe, users can now define |
| 698 |
commands and environments which also have one optional argument. |
| 699 |
|
| 700 |
\begin{decl} |
| 701 |
|\newcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\ |
| 702 |
|\newcommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\ |
| 703 |
|\renewcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\ |
| 704 |
|\renewcommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} |
| 705 |
\end{decl} |
| 706 |
|
| 707 |
These commands have a new, second, optional argument; this is used for |
| 708 |
defining commands which themselves take one optional argument. This |
| 709 |
new argument is best introduced by means of a simple (and hence not |
| 710 |
very practical) example: |
| 711 |
\begin{verbatim} |
| 712 |
\newcommand{\example}[2][YYY]{Mandatory arg: #2; |
| 713 |
Optional arg: #1.} |
| 714 |
\end{verbatim} |
| 715 |
This defines |\example| to be a command with two arguments, referred |
| 716 |
to as |#1| and |#2| in the \arg{definition}---nothing new so far. But |
| 717 |
by adding a second optional argument to this |\newcommand| (the |
| 718 |
|[YYY]|) the first argument (|#1|) of the newly defined command |
| 719 |
|\example| is made optional with its default value being |YYY|. |
| 720 |
|
| 721 |
Thus the usage of |\example| is either: |
| 722 |
\begin{verbatim} |
| 723 |
\example{BBB} |
| 724 |
\end{verbatim} |
| 725 |
which prints: |
| 726 |
\begin{quote} |
| 727 |
Mandatory arg: BBB; |
| 728 |
Optional arg: YYY. |
| 729 |
\end{quote} |
| 730 |
or: |
| 731 |
\begin{verbatim} |
| 732 |
\example[XXX]{AAA} |
| 733 |
\end{verbatim} |
| 734 |
which prints: |
| 735 |
\begin{quote} |
| 736 |
Mandatory arg: AAA; |
| 737 |
Optional arg: XXX. |
| 738 |
\end{quote} |
| 739 |
|
| 740 |
The default value of the optional argument is \texttt{YYY}. |
| 741 |
This value is specified as the \oarg{default} argument of the |
| 742 |
|\newcommand| that created |\example|. |
| 743 |
|
| 744 |
As another more useful example, the definition: |
| 745 |
\begin{verbatim} |
| 746 |
\newcommand{\seq}[2][n]{\lbrace #2_{0},\ldots,\,#2_{#1} \rbrace} |
| 747 |
\end{verbatim} |
| 748 |
means that the input |$\seq{a}$| produces |
| 749 |
the formula $\lbrace a_{0},\ldots,\,a_{n} \rbrace$, |
| 750 |
whereas the input |$\seq[k]{x}$| produces the formula |
| 751 |
$\lbrace x_{0},\ldots,\,x_{k} \rbrace$. |
| 752 |
|
| 753 |
In summary, the command: |
| 754 |
\begin{quote} |
| 755 |
|\newcommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} |
| 756 |
\end{quote} |
| 757 |
defines \m{cmd} to be a command with \m{num} arguments, the first of |
| 758 |
which is optional and has default value \m{default}. |
| 759 |
|
| 760 |
Note that there can only be one optional argument but, as before, |
| 761 |
there can be up to nine arguments in total. |
| 762 |
|
| 763 |
\begin{decl} |
| 764 |
|\newenvironment| |
| 765 |
\arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\ |
| 766 |
|\newenvironment*| |
| 767 |
\arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\ |
| 768 |
|\renewenvironment| |
| 769 |
\arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} \\ |
| 770 |
|\renewenvironment*| |
| 771 |
\arg{cmd} \oarg{num} \oarg{default} \arg{beg-def} \arg{end-def} |
| 772 |
\end{decl} |
| 773 |
|
| 774 |
\LaTeXe\ also supports the creation of environments that have one |
| 775 |
optional argument. Thus the syntax of these two commands has |
| 776 |
been extended in the same way as that of |\newcommand|. |
| 777 |
|
| 778 |
\begin{decl} |
| 779 |
|\providecommand| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} \\ |
| 780 |
|\providecommand*| \arg{cmd} \oarg{num} \oarg{default} \arg{definition} |
| 781 |
\end{decl} |
| 782 |
|
| 783 |
This takes the same arguments as |\newcommand|. If \m{cmd} is already |
| 784 |
defined then the existing definition is kept; but if it is currently |
| 785 |
undefined then the effect of |\providecommand| is to define \m{cmd} |
| 786 |
just as if |\newcommand| had been used. |
| 787 |
|
| 788 |
\NEWfeature{1994/12/01} |
| 789 |
All the above five `defining commands' now have \texttt{*}-forms that |
| 790 |
are usually the better form to use when defining commands with |
| 791 |
arguments, unless any of these arguments is intended to contain |
| 792 |
whole paragraphs of text. Moreover, if you ever do find yourself |
| 793 |
needing to use the non-star form then you should ask whether |
| 794 |
that argument would not better be treated as the contents of a |
| 795 |
suitably defined environment. |
| 796 |
|
| 797 |
\NEWfeature{1995/12/01} |
| 798 |
The commands produced by the above five `defining commands' are |
| 799 |
now robust. |
| 800 |
|
| 801 |
\subsection{Boxes} |
| 802 |
|
| 803 |
These next three commands for making LR-boxes all existed in |
| 804 |
\LaTeX~2.09. They have been enhanced in two ways. |
| 805 |
|
| 806 |
\begin{decl} |
| 807 |
|\makebox| \oarg{width} \oarg{pos} \arg{text} \\ |
| 808 |
|\framebox| \oarg{width} \oarg{pos} \arg{text} \\ |
| 809 |
|\savebox| \arg{cmd} \oarg{width} \oarg{pos} \arg{text} |
| 810 |
\end{decl} |
| 811 |
|
| 812 |
One small but far-reaching change for \LaTeXe\ is that, within the |
| 813 |
\m{width} argument only, four special lengths can be used. These are |
| 814 |
all dimensions of the box that would be produced by using simply |
| 815 |
|\mbox|\arg{text}: |
| 816 |
\begin{itemize} |
| 817 |
\item [] |\height|\quad its height above the baseline; |
| 818 |
\item [] |\depth|\quad its depth below the baseline; |
| 819 |
\item [] |\totalheight|\quad the sum of |\height| and |\depth|; |
| 820 |
\item [] |\width|\quad its width. |
| 821 |
\end{itemize} |
| 822 |
Thus, to put `hello' in the centre of a box of twice its natural |
| 823 |
width, you would use: |
| 824 |
\begin{verbatim} |
| 825 |
\makebox[2\width]{hello} |
| 826 |
\end{verbatim} |
| 827 |
Or you could put \textit{f} into a square box, like |
| 828 |
this: |
| 829 |
\framebox{\makebox[\totalheight]{\itshape f\/}} |
| 830 |
\begin{verbatim} |
| 831 |
\framebox{\makebox[\totalheight]{\itshape f\/}} |
| 832 |
\end{verbatim} |
| 833 |
Note that it is the total width of the framed box, including the |
| 834 |
frame, which is set to |\totalheight|. |
| 835 |
|
| 836 |
The other change is a new possibility for \m{pos}: |s| has been added |
| 837 |
to |l| and |r|. If \m{pos} is |s| then the text is stretched the full |
| 838 |
length of the box, making use of any `rubber lengths' (including any |
| 839 |
inter-word spaces) in the contents of the box. If no such `rubber |
| 840 |
length' is present, an `underfull box' will probably be produced. |
| 841 |
|
| 842 |
\begin{decl} |
| 843 |
|\parbox| \oarg{pos} \oarg{height} \oarg{inner-pos} \arg{width} |
| 844 |
\arg{text} \\ |
| 845 |
|\begin{minipage}| |
| 846 |
\oarg{pos} \oarg{height} \oarg{inner-pos} \arg{width}\\ |
| 847 |
\m{text}\\ |
| 848 |
|\end{minipage}| |
| 849 |
\end{decl} |
| 850 |
|
| 851 |
As for the box commands above, |\height|, |\width|, etc.~may be used |
| 852 |
in the \oarg{height} argument to denote the natural dimensions of the |
| 853 |
box. |
| 854 |
|
| 855 |
The \m{inner-pos} argument is new in \LaTeXe. It is the vertical |
| 856 |
equivalent to the \m{pos} argument for |\makebox|, etc, determining |
| 857 |
the position of \m{text} within the box. The \m{inner-pos} may be any |
| 858 |
one of |t|, |b|, |c|, or |s|, denoting top, bottom, centered, or |
| 859 |
`stretched' alignment respectively. When the \m{inner-pos} argument |
| 860 |
is not specified, \LaTeX\ gives it same value as \m{pos} (this could be |
| 861 |
the latter's default value). |
| 862 |
|
| 863 |
|
| 864 |
\begin{decl} |
| 865 |
|\begin{lrbox}| \arg{cmd}\\ |
| 866 |
\m{text}\\ |
| 867 |
|\end{lrbox}| |
| 868 |
\end{decl} |
| 869 |
|
| 870 |
This is an environment which does not directly print anything. |
| 871 |
Its effect is to save the typeset \m{text} in the bin \m{cmd}. Thus |
| 872 |
it is like |\sbox| \arg{cmd} \arg{text}, except that any white space |
| 873 |
before or after the contents \m{text} is ignored. |
| 874 |
|
| 875 |
This is very useful as it enables both the |\verb| command and the |
| 876 |
\texttt{verbatim} environment to be used within \m{text}. |
| 877 |
|
| 878 |
It also makes it possible to define, for example, a `framed box' |
| 879 |
environment. This is done by first using this environment to save |
| 880 |
some text in a bin \m{cmd} and then calling |
| 881 |
|\fbox{\usebox{|\m{cmd}|}}|. |
| 882 |
|
| 883 |
The following example defines an environment, called |fmpage|, that is |
| 884 |
a framed version of |minipage|. |
| 885 |
\begin{verbatim} |
| 886 |
\newsavebox{\fmbox} |
| 887 |
\newenvironment{fmpage}[1] |
| 888 |
{\begin{lrbox}{\fmbox}\begin{minipage}{#1}} |
| 889 |
{\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} |
| 890 |
\end{verbatim} |
| 891 |
|
| 892 |
|
| 893 |
\subsection{Measuring things} |
| 894 |
|
| 895 |
The first of these next commands was in \LaTeX~2.09. The two new |
| 896 |
commands are the obvious analogues. |
| 897 |
|
| 898 |
\begin{decl} |
| 899 |
|\settowidth| \arg{length-cmd} \arg{lr text} \\ |
| 900 |
|\settoheight| \arg{length-cmd} \arg{lr text} \\ |
| 901 |
|\settodepth| \arg{length-cmd} \arg{lr text} |
| 902 |
\end{decl} |
| 903 |
|
| 904 |
\subsection{Line endings} |
| 905 |
|
| 906 |
\NEWdescription{1994/12/01} |
| 907 |
The command |\\|, which is used to indicate a line-end in various |
| 908 |
places, is now a robust command when used within arguments such as |
| 909 |
section titles. |
| 910 |
|
| 911 |
Also, because it is often necessary to distinguish which type of line |
| 912 |
is to be ended, we have introduced the following new command; it |
| 913 |
has the same argument syntax as that of |\\|. |
| 914 |
\begin{decl}[1994/12/01] |
| 915 |
|\tabularnewline| \oarg{vertical-space} |
| 916 |
\end{decl} |
| 917 |
One example of its use is when the text in the last |
| 918 |
column of a |tabular| environment is set with |\raggedright|; then |
| 919 |
|\tabularnewline| can be used to indicate the end of a row of the |
| 920 |
|tabular|, whilst |\\| will indicate the end of a line of text in a |
| 921 |
paragraph within the column. This command can be used in the |array| |
| 922 |
environment as well as |tabular|, and also the extended versions of |
| 923 |
these environments offered by the \textsf{array} and \textsf{longtable} |
| 924 |
packages in the tools collection. |
| 925 |
|
| 926 |
\subsection{Controlling page breaks} |
| 927 |
|
| 928 |
Sometimes it is necessary, for a final version of a document, to |
| 929 |
`help' \LaTeX\ break the pages in the best way. \LaTeX~2.09 had a |
| 930 |
variety of commands for this situation: |\clearpage|, |\pagebreak| |
| 931 |
etc. \LaTeXe\ provides, in addition, commands which can produce |
| 932 |
longer pages as well as shorter ones. |
| 933 |
|
| 934 |
|
| 935 |
\begin{decl} |
| 936 |
|\enlargethispage| \arg{size} \\ |
| 937 |
|\enlargethispage*| \arg{size} |
| 938 |
\end{decl} |
| 939 |
|
| 940 |
These commands increase the height of a page (from its normal value of |
| 941 |
|\textheight|) by the specified amount \m{size}, a rigid length. This |
| 942 |
change affects \emph{only} the current page. |
| 943 |
|
| 944 |
This can be used, for example, to allow an extra line to be fitted |
| 945 |
onto the page or, with a negative length, to produce a page |
| 946 |
shorter than normal. |
| 947 |
|
| 948 |
The star form also shrinks any vertical white space on the page as |
| 949 |
much as possible, so as to fit the maximum amount of text on the |
| 950 |
page. |
| 951 |
|
| 952 |
\NEWdescription{1995/12/01} |
| 953 |
These commands do not change the position of the footer text; thus, if |
| 954 |
a page is lengthened too far, the main text may overprint the footer. |
| 955 |
|
| 956 |
\subsection{Floats} |
| 957 |
|
| 958 |
There is a new command, |\suppressfloats|, and a new `float |
| 959 |
specifier'. These will enable people to gain better |
| 960 |
control of \LaTeX's float placement algorithm. |
| 961 |
|
| 962 |
\begin{decl} |
| 963 |
|\suppressfloats| \oarg{placement} |
| 964 |
\end{decl} |
| 965 |
|
| 966 |
This command stops any further floating environments from being placed |
| 967 |
on the current page. With an optional argument, which should be either |
| 968 |
|t| or |b| (not both), this restriction applies only to putting |
| 969 |
further floats at the top or at the bottom. Any floats which would |
| 970 |
normally be placed on this page are placed on the next page instead. |
| 971 |
|
| 972 |
\begin{decl} |
| 973 |
The extra float location specifier: \ \texttt{!} |
| 974 |
\end{decl} |
| 975 |
|
| 976 |
This can be used, along with at least one of \texttt{h}, \texttt{t}, |
| 977 |
\texttt{b} and \texttt{p}, in the location optional argument of a |
| 978 |
float. |
| 979 |
|
| 980 |
If a \texttt{!} is present then, just for this particular float, |
| 981 |
whenever it is processed by the float mechanism the following are |
| 982 |
ignored: |
| 983 |
\begin{itemize} |
| 984 |
\item all restrictions on the number of floats which can appear; |
| 985 |
\item all explicit restrictions on the amount of space on a text page |
| 986 |
which may be occupied by floats or must be occupied by text. |
| 987 |
\end{itemize} |
| 988 |
The mechanism will, however, still attempt to ensure that pages are |
| 989 |
not overfull and that floats of the same type are printed in the |
| 990 |
correct order. |
| 991 |
|
| 992 |
Note that its presence has no effect on the production of float pages. |
| 993 |
|
| 994 |
A \texttt{!} specifier overrides the effect of any |\suppressfloats| |
| 995 |
command for this particular float. |
| 996 |
|
| 997 |
\subsection{Font changing: text} |
| 998 |
|
| 999 |
The font selection scheme used in \LaTeXe{} differs a lot from that |
| 1000 |
used in \LaTeX~2.09. In this section, we give a brief description of |
| 1001 |
the new commands. A more detailed description with examples is given |
| 1002 |
in \emph{\LaTeXcomp}, and the interface for class- and package-writers |
| 1003 |
is described in \emph{\fntguide}. |
| 1004 |
|
| 1005 |
\begin{decl} |
| 1006 |
|\normalfont|\\ |
| 1007 |
|\rmfamily|\\ |
| 1008 |
|\sffamily|\\ |
| 1009 |
|\ttfamily|\\ |
| 1010 |
|\mdseries|\\ |
| 1011 |
|\bfseries|\\ |
| 1012 |
|\upshape|\\ |
| 1013 |
|\itshape|\\ |
| 1014 |
|\slshape|\\ |
| 1015 |
|\scshape| |
| 1016 |
\end{decl} |
| 1017 |
|
| 1018 |
These are font commands whose use is the same as the commands |\rm|, |
| 1019 |
|\bf|, etc. The difference is that each command changes just one |
| 1020 |
attribute of the font (the attribute changed is part of the name). |
| 1021 |
One result of this is that, for example, |\bfseries\itshape| produces |
| 1022 |
both a change of series and a change of shape, to give a bold italic |
| 1023 |
font. |
| 1024 |
|
| 1025 |
\begin{decl} |
| 1026 |
|\textnormal|\arg{text}\\ |
| 1027 |
|\textrm|\arg{text}\\ |
| 1028 |
|\textsf|\arg{text}\\ |
| 1029 |
|\texttt|\arg{text}\\ |
| 1030 |
|\textmd|\arg{text}\\ |
| 1031 |
|\textbf|\arg{text}\\ |
| 1032 |
|\textup|\arg{text}\\ |
| 1033 |
|\textit|\arg{text}\\ |
| 1034 |
|\textsl|\arg{text}\\ |
| 1035 |
|\textsc|\arg{text}\\ |
| 1036 |
|\emph|\arg{text} |
| 1037 |
\end{decl} |
| 1038 |
|
| 1039 |
These are one-argument commands; they take as an argument the |
| 1040 |
text which is to be typeset in the particular font. They also |
| 1041 |
automatically insert italic corrections where appropriate; if you do |
| 1042 |
not like the result, you can add an italic correction with |\/| or |
| 1043 |
remove it with |\nocorr|. The |\nocorr| should always be the first or |
| 1044 |
last thing within the \arg{text} argument. |
| 1045 |
|
| 1046 |
\subsection{Font changing: math} |
| 1047 |
|
| 1048 |
Most of the fonts used within math mode do not need to be explicitly |
| 1049 |
invoked; but to use letters from a range of fonts, the following |
| 1050 |
class of commands is provided. |
| 1051 |
|
| 1052 |
\begin{decl} |
| 1053 |
|\mathrm| \arg{letters}\\ |
| 1054 |
|\mathnormal| \arg{letters}\\ |
| 1055 |
|\mathcal| \arg{letters}\\ |
| 1056 |
|\mathbf| \arg{letters}\\ |
| 1057 |
|\mathsf| \arg{letters}\\ |
| 1058 |
|\mathtt| \arg{letters}\\ |
| 1059 |
|\mathit| \arg{letters} |
| 1060 |
\end{decl} |
| 1061 |
|
| 1062 |
These are also one-argument commands which take as an argument the |
| 1063 |
letters which are to be typeset in the particular font. The argument |
| 1064 |
is processed in math mode so spaces within it will be ignored. Only |
| 1065 |
letters, digits and accents have their font changed, for example |
| 1066 |
|$\mathbf{\tilde A \times 1}$| produces $\mathbf{\tilde A \times 1}$. |
| 1067 |
|
| 1068 |
\subsection{Ensuring math mode} |
| 1069 |
|
| 1070 |
\begin{decl} |
| 1071 |
|\ensuremath| \arg{math commands} |
| 1072 |
\end{decl} |
| 1073 |
|
| 1074 |
In \LaTeX~2.09, if you wanted a command to work both in math mode and |
| 1075 |
in text mode, the suggested method was to define something like: |
| 1076 |
\begin{verbatim} |
| 1077 |
\newcommand{\Gp}{\mbox{$G_p$}} |
| 1078 |
\end{verbatim} |
| 1079 |
Unfortunately, the |\mbox| stops |\Gp| changing size correctly in (for |
| 1080 |
instance) subscripts or a fraction. |
| 1081 |
|
| 1082 |
In \LaTeXe{} you can define it thus: |
| 1083 |
\begin{verbatim} |
| 1084 |
\newcommand{\Gp}{\ensuremath{G_p}} |
| 1085 |
\end{verbatim} |
| 1086 |
Now |\Gp| will work correctly in all contexts. |
| 1087 |
|
| 1088 |
This is because the |\ensuremath| does nothing, producing simply |
| 1089 |
|G_p|, when |\Gp| is used within math mode; but it ensures that math |
| 1090 |
mode is entered (and exited) as required when |\Gp| is used in text |
| 1091 |
mode. |
| 1092 |
|
| 1093 |
|
| 1094 |
\subsection{Setting text superscripts} |
| 1095 |
|
| 1096 |
\begin{decl} |
| 1097 |
|\textsuperscript| \arg{text} |
| 1098 |
\end{decl} |
| 1099 |
|
| 1100 |
\NEWfeature{1995/06/01} In \LaTeX~2.09 textual superscripts such as |
| 1101 |
footnote markers were produced by internally entering math mode and |
| 1102 |
typesetting the number as a math superscript. This normally looked |
| 1103 |
fine since the digits in math fonts are the same as those in text |
| 1104 |
fonts when Computer Modern fonts are used. But when a different |
| 1105 |
document font (such as Times) is selected, the results look rather |
| 1106 |
strange. For this reason the command |\textsuperscript| has been |
| 1107 |
introduced which typesets its argument in the current text font, in a |
| 1108 |
superscript position and in the correct size. |
| 1109 |
|
| 1110 |
\subsection{Text commands: all encodings} |
| 1111 |
|
| 1112 |
\NEWdescription{1994/12/01} |
| 1113 |
One of the main differences between \LaTeXe{} and \LaTeX~2.09 is |
| 1114 |
that \LaTeXe{} can deal with fonts in arbitrary \emph{encodings}. |
| 1115 |
(A font encoding is the sequence of characters in the font---for |
| 1116 |
example a Cyrillic font would have a different encoding from a Greek |
| 1117 |
font.) |
| 1118 |
|
| 1119 |
The two major font encodings that are used for Latin languages such |
| 1120 |
as English or German are |OT1| (Donald Knuth's 7-bit encoding, which |
| 1121 |
has been used during most of \TeX's lifetime) and |T1| (the new |
| 1122 |
8-bit `Cork' encoding). |
| 1123 |
|
| 1124 |
\LaTeX~2.09 only supported the |OT1| encoding, whereas \LaTeXe{} has |
| 1125 |
support for both |OT1| and |T1| built-in. The next section will |
| 1126 |
cover the new commands which are available if you have |T1|-encoded |
| 1127 |
fonts. This section describes new commands which are available in |
| 1128 |
all encodings. |
| 1129 |
|
| 1130 |
Most of these commands provide characters which were available in |
| 1131 |
\LaTeX~2.09 already. For example |\textemdash| gives an `em dash', |
| 1132 |
which was available in \LaTeX~2.09 by typing |---|. However, some |
| 1133 |
fonts (for example a Greek font) may not have the |---| ligature, |
| 1134 |
but you will still be able to access an em dash by typing |
| 1135 |
|\textemdash|. |
| 1136 |
|
| 1137 |
\begin{decl}[1994/12/01] |
| 1138 |
|\r{<text>}| |
| 1139 |
\end{decl} |
| 1140 |
This command gives a `ring' accent, for example `\r{o}' can be typed |
| 1141 |
|\r{o}|. |
| 1142 |
|
| 1143 |
\begin{decl}[1994/12/01] |
| 1144 |
|\SS| |
| 1145 |
\end{decl} |
| 1146 |
This command produces a German `SS', that is a capital `\ss'. This |
| 1147 |
letter can hyphenate differently from `SS', so is needed for entering |
| 1148 |
all-caps German. |
| 1149 |
|
| 1150 |
\begin{decl}[1994/12/01] |
| 1151 |
|\textcircled{<text>}| |
| 1152 |
\end{decl} |
| 1153 |
This command is used to build `circled characters' such as |
| 1154 |
|\copyright|. For example |\textcircled{a}| produces |
| 1155 |
\textcircled{a}. |
| 1156 |
|
| 1157 |
\begin{decl}[1994/12/01] |
| 1158 |
|\textcompwordmark| |
| 1159 |
\end{decl} |
| 1160 |
This command is used to separate letters which would normally |
| 1161 |
ligature. For example `f\textcompwordmark i' is produced with |
| 1162 |
|f\textcompwordmark i|. Note that the `f' and `i' have not |
| 1163 |
ligatured to produce `fi'. This is rarely useful in English |
| 1164 |
(`shelf\textcompwordmark ful' is a rare example of where it might be |
| 1165 |
used) but is used in languages such as German. |
| 1166 |
|
| 1167 |
\begin{decl}[1994/12/01] |
| 1168 |
|\textvisiblespace| |
| 1169 |
\end{decl} |
| 1170 |
This command produces a `visible space' character |
| 1171 |
`\textvisiblespace'. This is sometimes used in computer listings, |
| 1172 |
for example `type \textsf{hello\textvisiblespace world}'. |
| 1173 |
|
| 1174 |
\begin{decl}[1994/12/01] |
| 1175 |
|\textemdash| |
| 1176 |
|\textendash| |
| 1177 |
|\textexclamdown| |
| 1178 |
|\textquestiondown| \\ |
| 1179 |
|\textquotedblleft| |
| 1180 |
|\textquotedblright| |
| 1181 |
|\textquoteleft| |
| 1182 |
|\textquoteright| |
| 1183 |
\end{decl} |
| 1184 |
These commands produce characters which would otherwise be |
| 1185 |
accessed via ligatures: |
| 1186 |
\begin{center} |
| 1187 |
\begin{tabular}{ccl} |
| 1188 |
\emph{ligature} & \emph{character} & \emph{command} \\ |
| 1189 |
|---| & --- & |\textemdash| \\ |
| 1190 |
|--| & -- & |\textendash| \\ |
| 1191 |
|!`| & !` & |\textexclamdown| \\ |
| 1192 |
|?`| & ?` & |\textquestiondown| \\ |
| 1193 |
|``| & `` & |\textquotedblleft| \\ |
| 1194 |
|''| & '' & |\textquotedblright| \\ |
| 1195 |
|`| & ` & |\textquoteleft| \\ |
| 1196 |
|'| & ' & |\textquoteright| |
| 1197 |
\end{tabular} |
| 1198 |
\end{center} |
| 1199 |
The reason for making these characters directly accessible is so |
| 1200 |
that they will work in encodings which do not have these characters. |
| 1201 |
|
| 1202 |
\begin{decl}[1994/12/01] |
| 1203 |
|\textbullet| |
| 1204 |
|\textperiodcentered| |
| 1205 |
\end{decl} |
| 1206 |
These commands allow access to characters which were previously only |
| 1207 |
available in math mode: |
| 1208 |
\begin{center} |
| 1209 |
\begin{tabular}{lcl} |
| 1210 |
\emph{math command} & \emph{character} & \emph{text command} \\ |
| 1211 |
|\bullet| & $\bullet$ & |\textbullet| \\ |
| 1212 |
|\cdot| & $\cdot$ & |\textperiodcentered| |
| 1213 |
\end{tabular} |
| 1214 |
\end{center} |
| 1215 |
|
| 1216 |
\begin{decl}[1995/12/01] |
| 1217 |
|\textbackslash| |
| 1218 |
|\textbar| |
| 1219 |
|\textless| |
| 1220 |
|\textgreater| |
| 1221 |
\end{decl} |
| 1222 |
These commands allow access to ASCII characters which were |
| 1223 |
only available in verbatim or math mode: |
| 1224 |
\begin{center} |
| 1225 |
\begin{tabular}{lcl} |
| 1226 |
\emph{math command} & \emph{character} & \emph{text command} \\ |
| 1227 |
|\backslash| & $\backslash$ & |\textbackslash| \\ |
| 1228 |
|\mid| & $\mid$ & |\textbar| \\ |
| 1229 |
|<<| & $<$ & |\textless| \\ |
| 1230 |
|>>| & $>$ & |\textgreater| |
| 1231 |
\end{tabular} |
| 1232 |
\end{center} |
| 1233 |
|
| 1234 |
\begin{decl}[1995/12/01] |
| 1235 |
|\textasciicircum| |
| 1236 |
|\textasciitilde| |
| 1237 |
\end{decl} |
| 1238 |
These commands allow access to ASCII characters which were |
| 1239 |
previously only available in verbatim: |
| 1240 |
\begin{center} |
| 1241 |
\begin{tabular}{cl} |
| 1242 |
\emph{verbatim} & \emph{text command} \\ |
| 1243 |
|^| & |\textasciicircum| \\ |
| 1244 |
|~| & |\textasciitilde| |
| 1245 |
\end{tabular} |
| 1246 |
\end{center} |
| 1247 |
|
| 1248 |
\begin{decl}[1995/12/01] |
| 1249 |
|\textregistered| |
| 1250 |
|\texttrademark| |
| 1251 |
\end{decl} |
| 1252 |
These commands provide the `registered trademark' (R) and |
| 1253 |
`trademark' (TM) symbols. |
| 1254 |
|
| 1255 |
\subsection{Text commands: the T1 encoding} |
| 1256 |
|
| 1257 |
\NEWdescription{1994/12/01} |
| 1258 |
The |OT1| font encoding is fine for typesetting in English, but has |
| 1259 |
problems when typesetting other languages. The |T1| encoding solves |
| 1260 |
some of these problems, by providing extra characters (such as `eth' |
| 1261 |
and `thorn'), and it allows words containing accented letters to be |
| 1262 |
hyphenated (as long as you have a package like |babel| which allows |
| 1263 |
for non-American hyphenation). |
| 1264 |
|
| 1265 |
This section describes the commands you can use if you have the |T1| |
| 1266 |
fonts. To use them, you need to get the `ec fonts', or the |
| 1267 |
|T1|-encoded PostScript fonts, as used by \textsf{psnfss}. |
| 1268 |
All these fonts are |
| 1269 |
available by anonymous ftp in the Comprehensive \TeX{} Archive, and |
| 1270 |
are also available on the CD-ROMs \emph{4all \TeX} and |
| 1271 |
\emph{\TeX{} Live} (both available from the \TeX{} Users Group). |
| 1272 |
|
| 1273 |
You can then select the |T1| fonts by saying: |
| 1274 |
\begin{verbatim} |
| 1275 |
\usepackage[T1]{fontenc} |
| 1276 |
\end{verbatim} |
| 1277 |
This will allow you to use the commands in this section. |
| 1278 |
|
| 1279 |
\emph{Note:} Since this document must be processable on any site |
| 1280 |
running an up-to-date \LaTeX, it does not contain any characters |
| 1281 |
that are present only in |T1|-encoded fonts. This means that this |
| 1282 |
document cannot show you what these glyphs look like! If you want |
| 1283 |
to see them then run \LaTeX{} on the document |fontsmpl| and |
| 1284 |
respond `|cmr|' when it prompts you for a family name. |
| 1285 |
|
| 1286 |
\begin{decl}[1994/12/01] |
| 1287 |
|\k{<text>}| |
| 1288 |
\end{decl} |
| 1289 |
This command produces an `ogonek' accent. |
| 1290 |
|
| 1291 |
\begin{decl}[1994/12/01] |
| 1292 |
|\DH| |
| 1293 |
|\DJ| |
| 1294 |
|\NG| |
| 1295 |
|\TH| |
| 1296 |
|\dh| |
| 1297 |
|\dj| |
| 1298 |
|\ng| |
| 1299 |
|\th| |
| 1300 |
\end{decl} |
| 1301 |
These commands produce characters `eth', `dbar', `eng', and `thorn'. |
| 1302 |
|
| 1303 |
\begin{decl}[1994/12/01] |
| 1304 |
|\guillemotleft| |
| 1305 |
|\guillemotright| |
| 1306 |
|\guilsinglleft| |
| 1307 |
|\guilsinglright| \\ |
| 1308 |
|\quotedblbase| |
| 1309 |
|\quotesinglbase| |
| 1310 |
|\textquotedbl| |
| 1311 |
\end{decl} |
| 1312 |
% A local hack (could be improved): |
| 1313 |
\newcommand{\fauxguillemet}[1]{$\vcenter{\hbox{$\scriptscriptstyle#1$}}$} |
| 1314 |
These commands produce various sorts of quotation mark. |
| 1315 |
Rough representations of them are: |
| 1316 |
\fauxguillemet\ll a\fauxguillemet\gg{} |
| 1317 |
\fauxguillemet<a\fauxguillemet> |
| 1318 |
,\kern -0.1em,\kern 0.05em a\kern -0.05em`` |
| 1319 |
,\kern 0.05em a\kern -0.05em` and |"|a|"|. |
| 1320 |
|
| 1321 |
\NEWdescription{2001/06/01} |
| 1322 |
There are therefore some extra short-form ligatures available for |
| 1323 |
use in documents that will only be used with |T1|-encoded fonts. |
| 1324 |
|
| 1325 |
The guillemets |\guillemotleft| and |\guillemotright|% |
| 1326 |
\footnote{We apologise once again for maintaining Adobe's |
| 1327 |
enormous solipsism~(sic) of confusing a diving bird with |
| 1328 |
punctuation marks!} |
| 1329 |
can be obtained by typing |<<<<| and |>>>>| and |\quotedblbase| |
| 1330 |
by typing |,,|\,. |
| 1331 |
|
| 1332 |
Also, unlike the unexpected results with |
| 1333 |
|OT1|-encoded fonts, |<<| and |>>| will produce \textless{} and |
| 1334 |
\textgreater{}. |
| 1335 |
|
| 1336 |
Note also that the single character |"| will no longer produce '' |
| 1337 |
but rather |\textquotedbl|. |
| 1338 |
|
| 1339 |
\subsection{Logos} |
| 1340 |
|
| 1341 |
\begin{decl} |
| 1342 |
|\LaTeX|\\ |
| 1343 |
|\LaTeXe| |
| 1344 |
\end{decl} |
| 1345 |
|
| 1346 |
|\LaTeX| (producing `\LaTeX') is still the `main' logo command, |
| 1347 |
but if you need to refer to the new features, you can write |
| 1348 |
|\LaTeXe| (producing `\LaTeXe'). |
| 1349 |
|
| 1350 |
\subsection{Picture commands} |
| 1351 |
|
| 1352 |
\begin{decl} |
| 1353 |
|\qbezier[<N>](<AX>,<AY>)(<BX>,<BY>)(<CX>,<CY>)| \\ |
| 1354 |
| \bezier{<N>}(<AX>,<AY>)(<BX>,<BY>)(<CX>,<CY>)| |
| 1355 |
\end{decl} |
| 1356 |
The |\qbezier| command can be used in |picture| mode to draw a |
| 1357 |
quadratic Bezier curve from position |(<AX>,<AY>)| to |(<CX>,<CY>)| with |
| 1358 |
control point |(<BX>,<BY>)|. The optional argument \m{N} gives the |
| 1359 |
number of points on the curve. |
| 1360 |
|
| 1361 |
For example, the diagram: |
| 1362 |
\begin{center} |
| 1363 |
\begin{picture}(50,50) |
| 1364 |
\thicklines |
| 1365 |
\qbezier(0,0)(0,50)(50,50) |
| 1366 |
\qbezier[20](0,0)(50,0)(50,50) |
| 1367 |
\thinlines |
| 1368 |
\put(0,0){\line(1,1){50}} |
| 1369 |
\end{picture} |
| 1370 |
\end{center} |
| 1371 |
is drawn with: |
| 1372 |
\begin{verbatim} |
| 1373 |
\begin{picture}(50,50) |
| 1374 |
\thicklines |
| 1375 |
\qbezier(0,0)(0,50)(50,50) |
| 1376 |
\qbezier[20](0,0)(50,0)(50,50) |
| 1377 |
\thinlines |
| 1378 |
\put(0,0){\line(1,1){50}} |
| 1379 |
\end{picture} |
| 1380 |
\end{verbatim} |
| 1381 |
The |\bezier| command is the same, except that the argument \m{N} is not |
| 1382 |
optional. It is provided for compatibility with the \LaTeX~2.09 |
| 1383 |
|bezier| document style option. |
| 1384 |
|
| 1385 |
\subsection{Old commands} |
| 1386 |
|
| 1387 |
\begin{decl} |
| 1388 |
|\samepage| |
| 1389 |
\end{decl} |
| 1390 |
|
| 1391 |
The |\samepage| command still exists but is no longer being |
| 1392 |
maintained. |
| 1393 |
This is because it only ever worked erratically; it does not |
| 1394 |
guarantee that there will be no page-breaks within its scope; and |
| 1395 |
it can cause footnotes and marginals to be wrongly placed. |
| 1396 |
|
| 1397 |
We recommend using |\enlargethispage| in conjunction with page-break |
| 1398 |
commands such as |\newpage| and |\pagebreak| to help control page |
| 1399 |
breaks. |
| 1400 |
|
| 1401 |
\begin{decl} |
| 1402 |
|\SLiTeX| |
| 1403 |
\end{decl} |
| 1404 |
Since \SLiTeX{} no longer exists, the logo is no longer defined in the |
| 1405 |
\LaTeX{} kernel. A suitable replacement is |\textsc{Sli\TeX}|. The |
| 1406 |
\SLiTeX{} logo is defined in \LaTeX~2.09 compatibility mode. |
| 1407 |
|
| 1408 |
\begin{decl} |
| 1409 |
|\mho| |\Join| |\Box| |\Diamond| |\leadsto| \\ |
| 1410 |
|\sqsubset| |\sqsupset| |\lhd| |\unlhd| |\rhd| |\unrhd| |
| 1411 |
\end{decl} |
| 1412 |
|
| 1413 |
These symbols are contained in the \LaTeX{} symbol font, which was |
| 1414 |
automatically loaded by \LaTeX~2.09. However, \TeX{} has room for |
| 1415 |
only sixteen math font families; thus many users discovered that they |
| 1416 |
ran out. Because of this, \LaTeX{} does not load the \LaTeX{} symbol |
| 1417 |
font unless you use the \textsf{latexsym} package. |
| 1418 |
|
| 1419 |
These symbols are also made available, using different fonts, by the |
| 1420 |
\textsf{amsfonts} package, which also defines a large number of other |
| 1421 |
symbols. It is supplied by the American Mathematical Society. |
| 1422 |
|
| 1423 |
The \textsf{latexsym} package is loaded automatically in \LaTeX~2.09 |
| 1424 |
compatibility mode. |
| 1425 |
|
| 1426 |
\section{\LaTeX~2.09 documents} |
| 1427 |
\label{Sec:209} |
| 1428 |
|
| 1429 |
\LaTeXe{} can process (almost) any \LaTeX~2.09 document, by entering |
| 1430 |
\emph{\LaTeX~2.09 compatibility mode}. Nothing has changed, you run |
| 1431 |
\LaTeX{} in the same way you always did, and you will get much the |
| 1432 |
same results. |
| 1433 |
|
| 1434 |
The reason for the `almost' is that some \LaTeX~2.09 packages made use |
| 1435 |
of low-level unsupported features of \LaTeX. If you discover such a |
| 1436 |
package, you should find out if it has been updated to work with |
| 1437 |
\LaTeXe. Most packages will still work with \LaTeXe---the easiest way |
| 1438 |
to find out whether a package still works is to try it! |
| 1439 |
|
| 1440 |
\LaTeX~2.09 compatibility mode is a comprehensive emulation of |
| 1441 |
\LaTeX~2.09, but at the cost of time. Documents can run up to 50\% |
| 1442 |
slower in compatibility mode than they did under \LaTeX~2.09. |
| 1443 |
In addition, many of the new features of \LaTeXe{} are not available in |
| 1444 |
\LaTeX~2.09 compatibility mode. |
| 1445 |
|
| 1446 |
\subsection{Warning} |
| 1447 |
|
| 1448 |
\NEWdescription{1995/12/01} |
| 1449 |
This \emph{\LaTeX~2.09 compatibility mode} is provided solely to allow |
| 1450 |
you to process 2.09 documents, i.e.~documents that were written (we |
| 1451 |
hope, a long time ago) for a very old system and therefore could be |
| 1452 |
processed by using a genuine antique \LaTeX~2.09 system. |
| 1453 |
|
| 1454 |
This mode is therefore \emph{not} intended to provide access to the |
| 1455 |
enhanced features of \LaTeXe{}. Thus it must not be used to process |
| 1456 |
new documents which masquerade as 2.09 documents (i.e.~they begin with |
| 1457 |
|\documentstyle|) but which could not be processed using that genuine |
| 1458 |
antique \LaTeX~2.09 system because they contain some new, |
| 1459 |
\LaTeXe{}-only, commands or environments. |
| 1460 |
|
| 1461 |
To prevent such misuse of the system, and the consequent trouble it |
| 1462 |
causes when such misleadingly encoded documents are distributed, the |
| 1463 |
\emph{\LaTeX~2.09 compatibility mode} turns off most of these new |
| 1464 |
features and commands. Any attempt to use them will give you an error |
| 1465 |
message and, moreover, many of them simply will not work, whilst |
| 1466 |
others will produce unpredictable results. |
| 1467 |
So don't bother sending us any bug reports about such occurrences since |
| 1468 |
they are intentional. |
| 1469 |
|
| 1470 |
|
| 1471 |
\subsection{Font selection problems} |
| 1472 |
\label{Sec:fsprob} |
| 1473 |
|
| 1474 |
When using compatibility mode, it is possible that you will find |
| 1475 |
problems with font-changing commands in some old documents. These |
| 1476 |
problems are of two types: |
| 1477 |
|
| 1478 |
\begin{itemize} |
| 1479 |
\item producing error messages; |
| 1480 |
\item not producing the font changes you expected. |
| 1481 |
\end{itemize} |
| 1482 |
|
| 1483 |
In case of error messages it is possible that the document (or an old |
| 1484 |
style file used therein) contains references to old internal commands |
| 1485 |
which are no longer defined, see Section~\ref{Sec:oldinternals} for |
| 1486 |
more information if this is the case. |
| 1487 |
|
| 1488 |
\NEWdescription{1995/12/01} |
| 1489 |
One example of the unexpected is if you use one of the new style of |
| 1490 |
math-mode font changing command as follows: |
| 1491 |
\begin{verbatim} |
| 1492 |
$ \mathbf{xy} A $ |
| 1493 |
\end{verbatim} |
| 1494 |
You may well find that this behaves as if you had put: |
| 1495 |
\begin{verbatim} |
| 1496 |
$ \bf {xy} A $ |
| 1497 |
\end{verbatim} |
| 1498 |
everything including the $A$ coming out bold. |
| 1499 |
|
| 1500 |
\LaTeX~2.09 allowed sites to customize their \LaTeX{} installation, |
| 1501 |
which resulted in documents producing different results on different |
| 1502 |
\LaTeX{} installations. \LaTeXe{} no longer allows so much |
| 1503 |
customization but, for compatibility with old documents, the local |
| 1504 |
configuration file |latex209.cfg| is loaded every time \LaTeXe{} |
| 1505 |
enters \LaTeX~2.09 compatibility mode. |
| 1506 |
|
| 1507 |
For example, if your site was customized to use the New Font |
| 1508 |
Selection Scheme (\NFSS) with the |oldlfont| option, then you can |
| 1509 |
make \LaTeXe{} emulate this by creating a |latex209.cfg| file |
| 1510 |
containing the commands: |
| 1511 |
\begin{verbatim} |
| 1512 |
\ExecuteOptions{oldlfont}\RequirePackage{oldlfont} |
| 1513 |
\end{verbatim} |
| 1514 |
Similarly, to emulate \NFSS{} with the |newlfont| option, you can |
| 1515 |
create a |latex209.cfg| file containing: |
| 1516 |
\begin{verbatim} |
| 1517 |
\ExecuteOptions{newlfont}\RequirePackage{newlfont} |
| 1518 |
\end{verbatim} |
| 1519 |
|
| 1520 |
|
| 1521 |
\subsection{Native mode} |
| 1522 |
\label{Sec:native} |
| 1523 |
|
| 1524 |
To run an old document faster, and use the new features of |
| 1525 |
\LaTeXe, you should try using \emph{\LaTeXe{} native mode}. |
| 1526 |
This is done by replacing the command: |
| 1527 |
\begin{quote} |
| 1528 |
|\documentstyle[|\m{options}|,|\m{packages}|]|\arg{class} |
| 1529 |
\end{quote} |
| 1530 |
with: |
| 1531 |
\begin{quote} |
| 1532 |
|\documentclass|\oarg{options}\arg{class} \\ |
| 1533 |
|\usepackage{latexsym,|\m{packages}|}| |
| 1534 |
\end{quote} |
| 1535 |
However, some documents which can be processed in \LaTeX~2.09 |
| 1536 |
compatibility mode may not work in native mode. Some \LaTeX~2.09 |
| 1537 |
packages will only work with \LaTeXe{} in 2.09 compatibility mode. |
| 1538 |
Some documents will cause errors because of \LaTeXe's improved error |
| 1539 |
detection abilities. |
| 1540 |
|
| 1541 |
But most \LaTeX~2.09 documents can be processed by \LaTeXe{}'s native |
| 1542 |
mode with the above change. Again, the easiest way to find out |
| 1543 |
whether your documents can be processed in native mode is to try it! |
| 1544 |
|
| 1545 |
|
| 1546 |
\section{Local modifications} |
| 1547 |
\label{sec:loc} |
| 1548 |
|
| 1549 |
\NEWdescription{1995/12/01} |
| 1550 |
There are two common types of local modifications that can be done |
| 1551 |
very simply. Do not forget that documents produced using such |
| 1552 |
modifications will not be usable at other places (such documents are |
| 1553 |
called `non-portable'). |
| 1554 |
|
| 1555 |
One type of modification is the use of personal commands for commonly |
| 1556 |
used symbols or constructions. These should be put into a package |
| 1557 |
file (for example, one called \texttt{mymacros.sty}) and loaded by |
| 1558 |
putting |\usepackage{mymacros}| in the document preamble. |
| 1559 |
|
| 1560 |
Another type is a local document class that is very similar to one of |
| 1561 |
the standard classes but contains some straightforward modifications |
| 1562 |
such as extra environments, different values for some parameters, etc. |
| 1563 |
These should be put into a class file; here we shall describe a simple |
| 1564 |
method of constructing such a file using, as an example, a class |
| 1565 |
called \textsf{larticle} that is very similar to the \textsf{article} |
| 1566 |
class. |
| 1567 |
|
| 1568 |
\NEWfeature{1995/12/01} |
| 1569 |
The class file called \texttt{larticle.cls} should (after the |
| 1570 |
preliminary identification commands) start as follows: |
| 1571 |
\begin{verbatim} |
| 1572 |
\LoadClassWithOptions{article} |
| 1573 |
\end{verbatim} |
| 1574 |
This command should be followed by whatever additions and changes you |
| 1575 |
wish to make to the results of reading in the file |
| 1576 |
\texttt{article.sty}. |
| 1577 |
|
| 1578 |
The effect of using the above |\LoadClassWithOptions| command is to |
| 1579 |
load the standard class file \textsf{article} with whatever options |
| 1580 |
are asked for by the document. Thus a document using your |
| 1581 |
\textsf{larticle} class can specify any option that could be specified |
| 1582 |
when using the standard \textsf{article} class; for example: |
| 1583 |
\begin{verbatim} |
| 1584 |
\documentclass[a4paper,twocolumn,dvips]{larticle} |
| 1585 |
\end{verbatim} |
| 1586 |
|
| 1587 |
|
| 1588 |
\section{Problems} |
| 1589 |
\label{Sec:problems} |
| 1590 |
|
| 1591 |
This section describes some of the things which may go wrong when |
| 1592 |
using \LaTeXe, and what you can do about it. |
| 1593 |
|
| 1594 |
\subsection{New error messages} |
| 1595 |
|
| 1596 |
\LaTeXe{} has a number of new error messages. |
| 1597 |
Please also note that many error messages now produce further helpful |
| 1598 |
information if you press |h| in response to the error prompt. |
| 1599 |
|
| 1600 |
\begin{decl} |
| 1601 |
|Option clash for package |\m{package}|.| |
| 1602 |
\end{decl} |
| 1603 |
The named package has been loaded twice with different options. If |
| 1604 |
you enter |h| you will be told what the options were, for example, if |
| 1605 |
your document contained: |
| 1606 |
\begin{verbatim} |
| 1607 |
\usepackage[foo]{fred} |
| 1608 |
\usepackage[baz]{fred} |
| 1609 |
\end{verbatim} |
| 1610 |
then you will get the error message: |
| 1611 |
\begin{verbatim} |
| 1612 |
Option clash for package fred. |
| 1613 |
\end{verbatim} |
| 1614 |
and typing |h| at the |?| prompt will give you: |
| 1615 |
\begin{verbatim} |
| 1616 |
The package fred has already been loaded with options: |
| 1617 |
[foo] |
| 1618 |
There has now been an attempt to load it with options: |
| 1619 |
[baz] |
| 1620 |
Adding the line: |
| 1621 |
\usepackage[foo,baz]{fred} |
| 1622 |
to your document may fix this. |
| 1623 |
Try typing <<return>> to proceed. |
| 1624 |
\end{verbatim} |
| 1625 |
The cure is, as suggested, to load the package with both sets of |
| 1626 |
options. Note that since \LaTeX{} packages can call other packages, |
| 1627 |
it is possible to get a package option clash without explicitly |
| 1628 |
requesting the same package twice. |
| 1629 |
|
| 1630 |
\begin{decl} |
| 1631 |
|Command |\m{command}| not provided in base NFSS.| |
| 1632 |
\end{decl} |
| 1633 |
The \m{command} is not provided by default in \LaTeXe. This error is |
| 1634 |
generated by using one of the commands: |
| 1635 |
\begin{verbatim} |
| 1636 |
\mho \Join \Box \Diamond \leadsto |
| 1637 |
\sqsubset \sqsupset \lhd \unlhd \rhd \unrhd |
| 1638 |
\end{verbatim} |
| 1639 |
which are now part of the \textsf{latexsym} package. |
| 1640 |
The cure is to add: |
| 1641 |
\begin{verbatim} |
| 1642 |
\usepackage{latexsym} |
| 1643 |
\end{verbatim} |
| 1644 |
in the preamble of your document. |
| 1645 |
|
| 1646 |
\begin{decl} |
| 1647 |
|LaTeX2e command <command> in LaTeX 2.09 document.| |
| 1648 |
\end{decl} |
| 1649 |
The \m{command} is a \LaTeXe{} command but this is a \LaTeX~2.09 |
| 1650 |
document. The cure is to replace the command by a \LaTeX~2.09 |
| 1651 |
command, or to run document in native mode, as described in |
| 1652 |
Section~\ref{Sec:native}. |
| 1653 |
|
| 1654 |
\begin{decl} |
| 1655 |
|NFSS release 1 command \newmathalphabet found.| |
| 1656 |
\end{decl} |
| 1657 |
The command |\newmathalphabet| was used by the New Font Selection |
| 1658 |
Scheme Release 1 but it has now been replaced by |
| 1659 |
|\DeclareMathAlphabet|, the use of which is described in |
| 1660 |
\emph{\fntguide}. |
| 1661 |
|
| 1662 |
The best cure is to update the package which contained the |
| 1663 |
|\newmathalphabet| command. Find out if there is a new release of |
| 1664 |
the package, or (if you wrote the package yourself) consult |
| 1665 |
\emph{\fntguide} for the new syntax of font commands. |
| 1666 |
|
| 1667 |
If there is no updated version of the package then you can cure this |
| 1668 |
error by using the \textsf{newlfont} or \textsf{oldlfont} package, |
| 1669 |
which tells \LaTeX{} which version of |\newmathalphabet| should be |
| 1670 |
emulated. |
| 1671 |
|
| 1672 |
You should use \textsf{oldlfont} if the document selects math fonts with |
| 1673 |
syntax such as this: |
| 1674 |
\begin{quote} |
| 1675 |
|{\cal A}|, etc. |
| 1676 |
\end{quote} |
| 1677 |
Use \textsf{newlfont} if the document's syntax is like this: |
| 1678 |
\begin{quote} |
| 1679 |
|\cal{A}|, etc. |
| 1680 |
\end{quote} |
| 1681 |
|
| 1682 |
|
| 1683 |
\begin{decl} |
| 1684 |
|Text for \verb command ended by end of line.| |
| 1685 |
\end{decl} |
| 1686 |
The |\verb| command has been begun but not ended on that line. This |
| 1687 |
usually means that you have forgotten to put in the end-character of |
| 1688 |
the |\verb| command. |
| 1689 |
|
| 1690 |
\begin{decl} |
| 1691 |
|Illegal use of \verb command.| |
| 1692 |
\end{decl} |
| 1693 |
The |\verb| command has been used inside the argument of another |
| 1694 |
command. This has never been allowed in \LaTeX{}---often producing |
| 1695 |
incorrect output without any warning---and so \LaTeXe{} produces |
| 1696 |
an error message. |
| 1697 |
|
| 1698 |
\subsection{Old internal commands} |
| 1699 |
\label{Sec:oldinternals} |
| 1700 |
|
| 1701 |
A number of \LaTeX~2.09 internal commands have been removed, since |
| 1702 |
their functionality is now provided in a different way. See |
| 1703 |
\emph{\clsguide} for more details of the new, supported interface for |
| 1704 |
class and package writers. |
| 1705 |
|
| 1706 |
\begin{decl} |
| 1707 |
|\tenrm| |\elvrm| |\twlrm| \dots\\ |
| 1708 |
|\tenbf| |\elvbf| |\twlbf| \dots\\ |
| 1709 |
|\tensf| |\elvsf| |\twlsf| \dots\\ |
| 1710 |
$\vdots$ |
| 1711 |
\end{decl} |
| 1712 |
These commands provided access to the seventy fonts preloaded by |
| 1713 |
\LaTeX~2.09. In contrast, \LaTeXe{} normally preloads at most |
| 1714 |
fourteen fonts, which saves a lot of font memory; but a consequence is |
| 1715 |
that any \LaTeX{} file which used the above commands to directly |
| 1716 |
access fonts will no longer work. |
| 1717 |
|
| 1718 |
Their use will usually produce an error message such as: |
| 1719 |
\begin{verbatim} |
| 1720 |
! Undefined control sequence. |
| 1721 |
l.5 \tenrm |
| 1722 |
\end{verbatim} |
| 1723 |
The cure for this is to update the document to use the new |
| 1724 |
font-changing commands provided by \LaTeXe; these are described in |
| 1725 |
\emph{\fntguide}. |
| 1726 |
|
| 1727 |
If this is not possible then, as a last resort, you can |
| 1728 |
use the \textsf{rawfonts} package, which loads the |
| 1729 |
seventy \LaTeX~2.09 fonts and provides direct access to them using the |
| 1730 |
old commands. This takes both time and memory. If you do not |
| 1731 |
wish to load all seventy fonts, you can select some of them by using the |
| 1732 |
|only| option to \textsf{rawfonts}. For example, to load only |tenrm| |
| 1733 |
and |tenbf| you write: |
| 1734 |
\begin{verbatim} |
| 1735 |
\usepackage[only,tenrm,tenbf]{rawfonts} |
| 1736 |
\end{verbatim} |
| 1737 |
|
| 1738 |
The \textsf{rawfonts} package is distributed as part of the \LaTeX{} |
| 1739 |
tools software, see Section~\ref{Sec:st-pack}. |
| 1740 |
|
| 1741 |
\subsection{Old files} |
| 1742 |
|
| 1743 |
One of the more common mistakes in running \LaTeX{} is to read in old |
| 1744 |
versions of packages instead of the new versions. If you get an |
| 1745 |
incomprehensible error message from a standard package, make sure you |
| 1746 |
are loading the most recent version of the package. You can find out |
| 1747 |
which version of the package has been loaded by looking in the log |
| 1748 |
file for a line like: |
| 1749 |
\begin{verbatim} |
| 1750 |
Package: fred 1994/06/01 v0.01 Fred's package. |
| 1751 |
\end{verbatim} |
| 1752 |
You can use the \m{release-date} options to |\documentclass| and |
| 1753 |
|\usepackage| to make sure that you are getting a suitably recent copy |
| 1754 |
of the document class or package. This is useful when sending a |
| 1755 |
document to another site, which may have out-of-date software. |
| 1756 |
|
| 1757 |
\subsection{Where to go for more help} |
| 1758 |
|
| 1759 |
If you can't find the answer for your problem here, try looking in |
| 1760 |
\emph{\LaTeXbook} or \emph{\LaTeXcomp}. If you have a problem with |
| 1761 |
installing \LaTeX, look in the installation guide files which come with |
| 1762 |
the distribution. |
| 1763 |
|
| 1764 |
If this doesn't help, contact your local \LaTeX{} guru or local |
| 1765 |
\LaTeX{} mailing list. |
| 1766 |
|
| 1767 |
If you think you've discovered a bug then please report it! First, |
| 1768 |
you should find out if the problem is with a third-party package or |
| 1769 |
class. If the problem is caused by a package or class other than |
| 1770 |
those listed in Section~\ref{Sec:class+packages} then please report |
| 1771 |
the problem to the author of the package or class, not to the \LaTeX3 |
| 1772 |
project team. |
| 1773 |
|
| 1774 |
If the bug really is with core \LaTeX{} then you should create a |
| 1775 |
\emph{short}, \emph{self-contained} document which exhibits the |
| 1776 |
problem. You should run a \emph{recent} (less than a year old) |
| 1777 |
version of \LaTeX{} on the file and then run \LaTeX{} on |
| 1778 |
|latexbug.tex|. This will create an error report which you should |
| 1779 |
send, together with the sample document and log file, to the |
| 1780 |
\LaTeX{} bugs address which can be found in the file |
| 1781 |
|latexbug.tex| or |bugs.txt|. |
| 1782 |
|
| 1783 |
|
| 1784 |
\section{Enjoy!} |
| 1785 |
\label{Sec:enjoy} |
| 1786 |
|
| 1787 |
We certainly hope you will enjoy using the new standard \LaTeX{} but, |
| 1788 |
if this is not possible, we hope that you will enjoy success and |
| 1789 |
fulfillment as a result of the documents which it will help you to |
| 1790 |
create. |
| 1791 |
|
| 1792 |
If you find that the contribution of \LaTeX{} to your life is such |
| 1793 |
that you would like to support the work of the project team, then |
| 1794 |
please read Section~\ref{Sec:ltx3} and discover practical ways to do |
| 1795 |
this. |
| 1796 |
|
| 1797 |
\begin{thebibliography}{1} |
| 1798 |
|
| 1799 |
\bibitem{A-W:GRM97} |
| 1800 |
Michel Goossens, Sebastian Rahtz and Frank Mittelbach. |
| 1801 |
\newblock {\em The {\LaTeX} Graphics Companion}. |
| 1802 |
\newblock Addison-Wesley, Reading, Massachusetts, 1997. |
| 1803 |
|
| 1804 |
|
| 1805 |
\bibitem{A-W:GR99} |
| 1806 |
Michel Goossens and Sebastian Rahtz. |
| 1807 |
\newblock {\em The {\LaTeX} Web Companion}. |
| 1808 |
\newblock Addison-Wesley, Reading, Massachusetts, 1999. |
| 1809 |
|
| 1810 |
|
| 1811 |
\bibitem{A-W:DEK91} |
| 1812 |
Donald~E. Knuth. |
| 1813 |
\newblock {\em The \TeX book}. |
| 1814 |
\newblock Addison-Wesley, Reading, Massachusetts, 1986. |
| 1815 |
\newblock Revised to cover \TeX3, 1991. |
| 1816 |
|
| 1817 |
|
| 1818 |
\bibitem{A-W:LLa94} |
| 1819 |
Leslie Lamport. |
| 1820 |
\newblock {\em {\LaTeX:} A Document Preparation System}. |
| 1821 |
\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994. |
| 1822 |
|
| 1823 |
\bibitem{A-W:MG2004} |
| 1824 |
Frank Mittelbach and Michel Goossens. |
| 1825 |
\newblock {\em The {\LaTeX} Companion second edition}. |
| 1826 |
\newblock With Johannes Braams, David Carlisle, and Chris Rowley. |
| 1827 |
\newblock Addison-Wesley, Reading, Massachusetts, 2004. |
| 1828 |
|
| 1829 |
|
| 1830 |
\end{thebibliography} |
| 1831 |
|
| 1832 |
\end{document} |