-->
Previous | Table of Contents | Next |
A page is composed of a header, footer, and body. The header and footer contain information such as chapter title, section heading, and page number. The body is where the main information in your document appears. By changing how this information is ordered in your TeX document, you are actually designing the look of the finished product.
The \headline and \footline commands both take arguments that specify their content. The format of these commands is as follows:
\headline={parameters}
The parameters could be a list of things such as a page number command and an \hfil command:
\headline={\hfil \the\pageno} \footline={\hfil}
This pair of commands creates a right-justified page number and a blank footer on each page.
You can change the size of the text box that TeX uses for paragraphs by using the \hsize command. For instance, the text
\hsize=2in This text is 2 inches wide but we could choose to make it wider or thinner.
produces the following:
This text is 2 inches wide but we could choose to make it wider or thinner.
Margins can be adjusted inward or outward using the \leftskip and \rightskip commands, respectively. By providing positive values to these commands, they move the margin inward, depending on which side you specify (left or right). As you may expect, negative values have the opposite effect: They move the margins outward. Indentation is controlled similarly by using the \parindent command.
The \baselineskip and \parskip commands control the regular vertical spacing between lines and paragraphs, as in the following:
\baselineskip=0.15in \parskip=0.3in
Baseline refers to the distance between the bottoms of characters (such as an i) on consecutive lines.
Normally, TeX continues using such things as fonts and text styles until you explicitly change the format. The grouping features of TeX enable you to define changes that are local to particular sections of text. The formatting originally specified is then restored after the group has been processed.
There are two ways to specify how text is grouped. One is to use the \begingroup and \endgroup command pair. The other is to use the braces { and }. Although both of these perform grouping roles, braces are also used to specify parameters to commands and, as such, must be used with care.
As an illustration of the use of groups in TeX, the text
Lets see \begingroup \it how {\bf this grouping stuff} really works \endgroup, shall we?
produces the following:
Lets see how this grouping stuff really works, shall we?
You may have noted from the example that, in fact, groups can contain other groups.
One of the most powerful features of TeX is its capability to generate correct mathematical notation for formulas with convenient commands. This is one of the key reasons behind TeXs popularity among engineers and scientists.
TeX distinguishes between formulas that must appear within regular text (inline formulas) and those that must appear on their own line (displayed formulas). You must use the $ symbol to denote inline formulas, as inThe equation $2+3=x$ must evaluate to $x=5$.
which is generated as the following:
The equation 2+3=x must evaluate to x=5.
However, displayed formulas are denoted using two consecutive $ symbols, as in
The equation $$2+3=x$$ must evaluate to $$x=5$$.
which produces the following:
The equation 2+3=x must evaluate to x=5.
Table 19.1 shows some of the math symbols that TeX can generate, their associated commands, and their meaning.
Symbol | TeX Command | Meaning |
---|---|---|
[185] | \pi | Pi |
[183] | \sum | Sum |
{ | \{ | Open bracket |
} | \} | Close bracket |
[186] | \int | Integral |
[178] | \leq | Less than or equal to |
[179] | \geq | Greater than or equal to |
[173] | \neq | Not equal to |
[165] | \bullet | Bullet |
[201] | \ldots | Horizontal ellipses |
[215] | \diamond | Diamond |
[198] | \Delta | Delta |
TeX uses particular fonts for the formulas it produces. These can be overridden in the usual fashion, but the changes are applicable only to letters and digits.
Figures that are drawn outside of TeX can be inserted into their own space. This space floats. In other words, TeX knows that it must keep track of the figure space as the text around it is added or deleted. This flexibility means that you, the writer, need not worry about exactly where in the document your figures will appear.
To insert a figure that must appear at the top of a page, use the following command:
\topinsert figure \endinsert
Here, figure can be an external reference or an internal definition. TeX tries to place the figure at the top of the next page with sufficient space.
You can also tell TeX that you want a figure to appear on its own page by using this command:
\pageinsert figure \endinsert
Previous | Table of Contents | Next |