Sei sulla pagina 1di 4

Chapter 1 Intro

Chapter 2 how to typeset simple documents


Chapter 3 logical structures for handling a variety of formatting problems
Chapter 4 Features useful for large documents - e.g automatic cross referencing,
how to split a large file into smaller pieces
Chapter 5 How to make books, slides, letters
Chapter 6 Visual formatting of text - how to change document style, correct
misaligned line/page breaks, how to do custom formatting of structures not handled
by LaTex
Chapter 7 Pictures - drawing them yourself vs inserting those created by other
programs - and color.
Chapter 8 How To Deal With Errors

Appendix A: How To Use The Program MakeIndex To Make An Index


Appendix B: How To Make a Bibliographi Database To Use With BibTex
Appendix C: a comprehensive reference for LaTex

Chapter 2 Getting Started

2.1

These characters are used only in LaTex commands - # $ % & ~ _ ^ \ { }


Any amount of spaces are compressed to one
But a blank *line* is considered to be the end of a paragraph

The ends of words and sentences are marked by spaces. One is as good as a hundred.

One or more blank lines denote the end of a paragraph.

Quotation marks:

Typewritten text has only two quotation marks " and '. But printed text angles
these two ways to get 4.

single left quote = `


single right quote = '

double each for double quotes

\, == a small amount of space to disambiguate ''' etc thus '' \, '

-, -- ,--- provide three different types of dashes.

LaTex assumes that a period ends a sentence unless it follows (NOT followed *by*) a
capital letter.

To denote that a period does *not* end a sentence (as in etc. et al.) use \sp after
the period

"Mallus, Gujaratis etc.\sp get special treatment" Don't leave space between period
and backslash.

In the uncommon case where a period following a capital letter *does* end the
sentence, use *precede* the period with \@

"The Romans added I and I to get II\@. Really!"


if a sentence ending period is followed by a right parenthesis or right quote
(single or double) the period's extra space goes after the parenthesis or quote. IF
this is not required, use \@

to get "have vitamin B." (the quotes are part of the displayed sentence use ``have
vitamin B\''

Special Symbols that are onely a part of LaTex commands = # $ % & ~ _ ^ \ { }

To produce these as part of prose,

to produce $, &, % # _ { } just add a \ so \$ \& \% \# \_ \{ \}


to produce the other 3, ~ ^ \, use special commands (3.7)

Simple Text Generating Commands

e.g
\TeX \LaTeX
\today
\ldots produces an ellipsis

generalizing \ plus a non-letter or sequence of letters is a TeX command


LaTeX knows it has come to the end of a command when it encounters a non letter, a
digit, a punctuation character, spaces, end of line.
LaTeX ignores all spaces following a command ending space or EOL

To specificially have a space after a command use \sp

e.g
This page of the \LaTeX\sp manual was produced \today .
note 1: note the \sp after \LaTex
note 2: the space after \today will be ignored.

Emphasised Text
use \emph{your-text-here} Note that this is a command with an argument.
An \emph{ } command can be nested within another. Use sparingly.

Preventing Line Breaks


Some splits for line breaks should be avoided. e.g Mr.Jones shouldn't be split.

To tell Latex about these situations, the tilde character creates an interword
space where LaTex will never cause a line break.

Mr.~Jones

the \mbox command tells TeX to print its argument on the same line

\mbox{YourNameHere}

Footnotes. Blah blah di blah \footnote{A Gnu is a big animal}

Formulas

are enclosed with \( \).


Subscripts are created with _ and superscripts with ^. These work only inside a
mathematical formula.
When used inside a formula a right quote character ' produces a prime. Two produces
two primes. And so on.
Beginning a sentence with a formula makes it hard to find the start of a sentence.
Don't do it (then how to write an equational proof?)

To save some typing LaTex treats $something$ to be equal to \(something\)

Use $..$ only for a short formula.

You can use

\begin{math}

\end{math}

for long formulas.

Ignorable Input
when LaTex encounters a % in the input, it ignores the input and all characters
following it

2.2.2 The Document

basic structure
prepended_files
\documentclass{...}
\begin{document}
\end{document}

LaTex ignores everything after the \end{document}

e.g the small2e.tex (ignoring initial comments) looks like this

\documentclass{article} % Your input file must contain these two lines


\begin{document} % plus the \end{document} command at the end.

\section{Simple Text} % This command makes a section title.

Words are separated by one or more spaces. Paragraphs are separated by


one or more blank lines. The output is not affected by adding extra
spaces or extra blank lines to the input file.

Double quotes are typed like this: ``quoted text''.


Single quotes are typed like this: `single-quoted text'.

Long dashes are typed as three dash characters---like this.

Emphasized text is typed like this: \emph{this is emphasized}.


Bold text is typed like this: \textbf{this is bold}.

\subsection{A Warning or Two} % This command makes a subsection title.

If you get too much space after a mid-sentence period---abbreviations


like etc.\ are the common culprits)---then type a backslash followed by
a space after the period, as in this sentence.

Remember, don't type the 10 special characters (such as dollar sign and
backslash) except as directed! The following seven are printed by
typing a backslash in front of them: \$ \& \# \% \_ \{ and \}.
The manual tells how to make other symbols.

\end{document} % The input file ends with this command.

in addition to choosing the class, we can have some options for \docmuentclass

e.g: font size, number of columns, suggestions - LaTex has no control over actual
printing - for 2 sided printing

so

\documentclass [twoside,twocolumn, 12pt] {article}

Potrebbero piacerti anche