Click [slideshow] to begin presentation.
Page Zero
The LaTeX Language
- Special characters.
- The structure of a LaTeX document.
- Document classes (stylesheets/templates).
- LaTeX environments (lists, tables. . .).
- Sections, subsectionsAccents and special symbols.
The LaTeX Language
Some Fundamentals
- Special Characters
-
- TeX Commands
-
- begin with \;
- are case-sensitive;
- Some commands have arguments, some don't:
-
|
\begin{document}
Here is an {\it italicised phrase\/} in the middle of a sentence.
\end{document}
|
The LaTeX Language
LaTeX
- A macro package for (Plain) TeX.
- Uses document class — cf. wordprocessor template or HTML CSS
- Many styles available: research papers, books, articles, letters. . .
- Most journals have own style sheet to download and use.
- Presentations:
Beamer
—
example
Structure:
|
\documentclass[11pt]{article} % Select style.
\begin{document} % Begin document.
.
. % Text of document.
.
\end{document} % End document.
|
The LaTeX Language
Example Document: A LaTeX Letter
|
\documentclass{letter}
\begin{document}
\address{1234 Avenue of the Armadillos \\
Gnu York, G.Y. 56789}
\signature{R. (Ma) Dillo \\ Director of Cuisine}
\begin{letter}{G. Nathaniel Picking \\
Acme Exterminators \\
Illinois}
\opening{Dear Nat,}
I'm afraid that the armadillo problem is still with us.
\closing{Best Regards,}
\cc{Jimmy Carter\\Richard M. Nixon}
\end{letter}
\end{document}
|
The LaTeX Language
Document Classes
Several standard document styles available in LaTeX including:
- article
-
For short structured documents, e.g., journal articles (no chapters; title at
top of first page).
- report
-
For longer documents (chapters available; title on own page).
- book
-
Layout adjusted for verso (even, left-hand) and recto (odd, right-hand).
- letter
-
Address, signature, etc.
. . .And many more. . .
The LaTeX Language
Document Class Options
Stylesheets can we tweaked
- a4paper
-
Default is US "letter" size.
- 11pt, 12pt
-
Prints document using 11pt or 12pt running text (default is 10pt).
- twoside
-
Layout adjusted as book.
- twocolumn
-
Two columns a page.
- titlepage
-
Causes title to be on its own page.
N.B. Not all options apply to all style-sheets.
The LaTeX Language
LaTeX Environments
A number of special effects are obtained by putting text into
particular environments.
Lists
Lists in LaTeX are very much like those in HTML:
Centering and Flushing
Verbatim Output
Quotations
The LaTeX Language
LaTeX Environments: Tables
Tables
- Tabbing Environment — simple tables:
-
- The fully-functioning tabular environment. . .
-
- Multicolumn and Multirow
-
- . . .with caption added via the table environment:
-
The LaTeX Language
LaTeX Fonts and Typefaces
- The typefaces and font sizes available by default are listed below.
- Many, many, more are available by loading extra fonts.
Type Faces
By default we have Roman, Italic, Small Caps, Slanted, Typewriter,
Boldface and Sans Serif. Here they are:
Font Size
The easiest way to change font size in LaTeX is to use the following
commands:
|
\tiny \small \large \huge
\scriptsize \normalsize \Large \Huge
\footnotesize \LARGE
|
for example
|
Some {\Large text} in a sentence.
|
The LaTeX Language
LaTeX Title, Author, etc.
- The article, report, and some other stylesheets have these attributes
in common,
- To add a title, just after \begin{document}, include something like
|
\title{Introduction to \LaTeX}
\author{Simon Hood}
\date{14th February 2001}
\maketitle
|
- The format depends on the document style.
The LaTeX Language
LaTeX Sections and Tables of Contents
LaTex makes it easy to divide a document into (chapters and) sections,
using
|
\chapter \subsection \paragraph
\section \subsubsection \subparagraph
|
- LaTeX takes care of the section numbering.
- \paragraph and \subparagraph are really
"\subsubsubsection" and
"\subsubsubsubsection", not paragraphs.
- Including the command
will cause a table of contents to be included!
(You may need to compile/process twice.)
N.B. Article, report, etc.; not letter.
The LaTeX Language
LaTeX Special Symbols
You can include many symbols that do not appear on your keyboard:
- Accents
-
- Other symbols
-
The LaTeX Language
Hands On
Where appropriate below, use Kile, or your favourite editor (e.g.,
gedit) and the command-line; use evince to view PDFs.
- Download letter.tex
— choose save file.
- Compile and preview the letter. Next, modify letter.tex
— add a sentence or two to the main letter content — then
compile again and refresh your preview.
- Download lists.tex
— choose save file.
- Modify the file lists.tex to produce a list of lists of lists
— experiment with the three list environments (bullets, numbered
and titled); compile and preview.
- Download sections.tex
— choose save file.
- First, compile it — twice — and preview it. Notice the
table of contents. Add some sections, subsections and subsubsections of
your own, then re-compile and refresh your preview.