<< . . . 2( : 23) . . >>
X-rays are discussed in pages 221--225 of Volume 3---the volume on
electromagnetic waves.

Note that a single dash character in the input - produces a hyphen in the output, two
dashes -- produces a longer dash (“) in the output and three dashes --- produce the
longest dash (”) in the output.
11
SIMPLE
I.2. TYPESETTING

Accents
I.2.4.

Sometimes, especially when typing foreign words in English, we need to put different
types of accents over the letters. The table below shows the accents available in LTEX.
A

Each column shows some of the accents and the inputs to generate them.

` ´ ˆ ˜
o o o o
\˜o \™o \ˆo \˜o
¯ ™ ¨
o o o c
¸
\=o \.o \"o \c c
˜ ˇ ˝
o o o o
\u o \v o \H o \d o
.
o oo
\b o \t oo
¯
The letters i and j need special treatment with regard to accents, since they should not
have their customary dots when accented. The commands \i and \j produce dot-less i
and j as ± and j. Thus to get

´ ´
El esta aqu´
±

you must type
\™{E}l est\™{a} aqu\™{\i}

Some symbols from non-English languages are also available in LTEX, as shown in
A

the table below:

“ ’ ¦ Æ
\oe \OE \ae \AE
\aa \AA
ø ˜ ‚ Ł
\o \O \l \L
ß \ss
¡ ¿
!˜ ?˜

Special symbols
I.2.5.

We have see that the input \LaTeX produces LTEX in the output and \ produces a space.
A

Thus TEX uses the symbol \ for a special purpose”to indicate the program that what
follows is not text to be typeset but an instruction to be carried out. So what if you
want to get \ in your output (improbable as it may be)? The command \textbackslash
produces \ in the output.
Thus \ is a symbol which has a special meaning for TEX and cannot be produced by
direct input. As another example of such a special symbol, see what is obtained from the
input below
Maybe I have now learnt about 1% of \LaTeX.

You only get

Maybe I have now learnt about 1

What happened to the rest of the line? You see, TEX uses the per cent symbol % as the
comment character; that is a symbol which tells TEX to consider the text following as
˜comments™ and not as text to be typeset. This is especially useful for a TEX programmer
to explain a particularly sticky bit of code to others (and perhaps to himself). Even for
ordinary users, this comes in handy, to keep a ˜to do™ list within the document itself for
example.
But then, how do you get a percent sign in the output? Just type \% as in
12 THE BASICS
I.

Maybe I have now learnt about 1\% of \LaTeX.
The symbols \ and % are just two of the ten charcaters TEX reserves for its internal
use. The complete list is
˜#$%ˆ&_\{} We have seen how TEX uses two of these symbols (or is it four? Did not we use { } in one of our examples?) The use of others we will see as we proceed. Also, we have noted that \ is produced in the output by the command \textbackslash and % is produced by \%. What about the other symbols? The table below gives the inputs to produce these symbols. ˜ & \textasciitilde \& # \# \_$ \
\\$ \textbackslash
% {
\% \{
ˆ }
\textasciicircum \}

You can see that except for three, all special symbols are produced by preceding them
with a \. Of the exceptional three, we have seen that \˜ and \ˆ are used for producing
accents. So what does \\ do? It is used to break lines. For example,
This is the first line.\\ This is the second line
produces

This is the ¬rst line.
This is the second line

We can also give an optional argument to \\ to increase the vertical distance between the
lines. For example,
This is the first line.\\[10pt]
This is the second line
gives

This is the ¬rst line.

This is the second line

Now there is an extra 10 points of space between the lines (1 point is about 1/72nd of an
inch).

Text positioning
I.2.6.

We have seen that TEX aligns text in its own way, regardless of the way text is formatted
in the input ¬le. Now suppose you want to typeset something like this

The TEXnical Institute

Certi¬cate

This is to certify that Mr. N. O. Vice has undergone a course at this institute
and is quali¬ed to be a TEXnician.

The Director
The TEXnical Institute

This is produced by
13
FONTS
I.3.

\begin{center}
The \TeX nical Institute\\[.75cm]
Certificate
\end{center}
\noindent This is to certify that Mr. N. O. Vice has undergone a
course at this institute and is qualified to be a \TeX nician.
\begin{flushright}
The Director\\
The \TeX nical Institute
\end{flushright}

Here, the commands
\begin{center} ... \end{center}

typesets the text between them exactly at the center of the page and the commands
\begin{flushright} ... \end{flushright}

typesets text ¬‚ush with the right margin. The corresponding commands
\begin{flushleft} ... \end{flushleft}

places the enclosed text ¬‚ush with the left margin. (Change the flushright to flushleft
and see what happens to the output.)
These examples are an illustration of a LTEX construct called an environment, which
A

is of the form
\begin{name} ... \end{name}

where name is the name of the environment. We have seen an example of an environment
at the very beginning of this chapter (though not identi¬ed as such), namely the document
environment.

FONTS
I.3.

The actual letters and symbols (collectively called type) that LTEX (or any other typeset-
A

ting system) produces are characterized by their style and size. For example, in this book
emphasized text is given in italic style and the example inputs are given in typewriter
bigger type. A set of types of a particular style
style. We can also produce smaller and
and size is called a font.

Type style
I.3.1.

In LTEX, a type style is speci¬ed by family, series and shape. They are shown in the table
A

I.1.
Any type style in the output is a combination of these three characteristics. For exam-
ple, by default we get roman family, medium series, upright shape type style in a LTEX A

output. The \textit command produces roman family, medium series, italic shape type.
Again, the command \textbf produces roman family, boldface series, upright shape type.
We can combine these commands to produce a wide variety of type styles. For exam-
ple, the input
\textsf{\textbf{sans serif family, boldface series, upright shape}}
\textrm{\textsl{roman family, medium series, slanted shape}}
14 THE BASICS
I.

Table I.1:

COMMAND
STYLE
roman \textrm{roman}

FAMILY
sans serif \textsf{sans serif}
typewriter \texttt{typewriter}
medium \textmd{medium}

SERIES
boldface \textbf{boldface}
upright \textup{upright}
italic
SHAPE

\textit{italic}
slanted \textsl{slanted}
\textsc{small cap}
SMALL CAP

produces the output shown below:

sans serif family, boldface series, upright shape
roman family, medium series, slanted shape

Some of these type styles may not be available in your computer. In that case, LTEX A

gives a warning message on compilation and substitutes another available type style
which it thinks is a close approximation to what you had requested.
We can now tell the whole story of the \emph command. We have seen that it usually,
that is when we are in the middle of normal (upright) text, it produces italic shape. But if
the current type shape is slanted or italic, then it switches to upright shape. Also, it uses
the family and series of the current font. Thus
\textit{A polygon of three sides is called a \emph{triangle} and a
polygon of four sides is called a \emph{quadrilateral}}

gives

A polygon of three sides is called a triangle and a polygon of four sides is called a quadrilateral

while the input
\textbf{A polygon of three sides is called a
\emph{triangle} and a polygon of four sides is called a
\emph{quadrilateral}}

produces

A polygon of three sides is called a triangle and a polygon of four sides is called a quadrilateral

Each of these type style changing commands has an alternate form as a declaration.
For example, instead of \textbf{boldface} you can also type {\bfseries boldface} to
get boldface. Note that that not only the name of the command, but its usage also is
different. For example, to typeset
15
TYPE
I.4. SIZE

By a triangle, we mean a polygon of three sides.

if you type
By a \bfseries{triangle}, we mean a polygon of three sides.

you will end up with

By a triangle, we mean a polygon of three sides.

Thus to make the declaration act upon a speci¬c piece of text (and no more), the decla-
ration and the text should be enclosed in braces.
The table below completes the one given earlier, by giving also the declarations to
produce type style changes.
COMMAND DECLARATION
STYLE
\textup{upright} {\upshape upright}
upright
SHAPE

\textit{italic} {\itshape italic}
italic
\textsl{slanted} {\slshape slanted}
slanted
SMALL CAP \textsc{small cap} {\scshape small cap}
\textmd{medium} {\mdseries medium}
medium
FAMILY SERIES

\textbf{boldface} {\bfseries boldface}
boldface
\textrm{roman} {\rmfamily roman}
roman
\textsf{sans serif} {\sffamily sans serif}
sans serif
typewriter \texttt{typewriter} {\ttfamily typewriter}

These declaration names can also be used as environment names. Thus to type-
set a long passage in, say, sans serif, just enclose the passage within the commands
\begin{sffmily} ... \end{sffamily}.

TYPE
I.4. SIZE

Traditionally, type size is measured in (printer) points. The default type that TEX pro-
duces is of 10 pt size. There are some declarations (ten, to be precise) provided in LTEX
A

for changing the type size. They are given in the following table:

size
{\tiny size} {\large size}
size

size
{\scriptsize size} {\Large size}
size

size
{\footnotesize size} {\LARGE size}
size

size
size {\small size} {\huge size}

size
size {\normalsize size} {\Huge size}

Note that the \normalsize corresponds to the size we get by default and the sizes form
an ordered sequence with \tiny producing the smallest and \Huge producing the largest.
Unlike the style changing commands, there are no command-with-one-argument forms
for these declarations.
We can combine style changes with size changes. For example, the “certi¬cate” we
typed earlier can now be ˜improved™ as follows
\begin{center}
{\bfseries\huge The \TeX nical Institute}\\[1cm]
{\scshape\LARGE Certificate}
16 THE BASICS
I.

\end{center}

\noindent This is to certify that Mr. N. O. Vice has undergone a
course at this institute and is qualified to be a \TeX nical Expert.

\begin{flushright}
{\sffamily The Director\\
The \TeX nical Institute}
\end{flushright}

and this produces

The TEXnical Institute
CERTIFICATE
This is to certify that Mr. N. O. Vice has undergone a course at this institute and is
quali¬ed to be a TEXnical Expert.

The Director
The TEXnical Institute
TUTORIAL II

THE DOCUMENT

DOCUMENT
II.1. CLASS

We now describe how an entire document with chapters and sections and other embellish-
ments can be produced with LTEX. We have seen that all LTEX ¬les should begin by spec-
 << . . . 2( : 23) . . >>