in black and white
Main menu
Home About us Share a book
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

A Gentle Intro duction to TEX - Doob M.

Doob M. A Gentle Intro duction to TEX - MDOOB, 1994. - 96 p.
Download (direct link): gentleintroduction1994.pdf
Previous << 1 .. 6 7 8 9 10 11 < 12 > 13 14 15 16 17 18 .. 30 >> Next




intro (Canadian spelling)

Section 3: The shape of things to come

I just seem to be spread out all over the place.

If we have more than one \hfil, they will divide any extra space among themselves equally. Hence \line{left text \hfil centre text \hfil right text.} will produce

left text centre text right text.

D> Exercise 3.7 Typeset the following line:

left end left tackle left guard centre right guard right tackle right end

d> Exercise 3.8 Typeset the following line with twice as much space between left and right-centre as between right-centre and right:

left right-centre right

Its possible to move horizontally using \hskip in a manner analogous with \vskip.

D> Exercise 3.9 What happens with the following input: \line{\hskip I in ONE \hfil TWO \hfil THREE}

The right justification can be canceled by using the control word \raggedright.

3.5 Footnotes

The general pattern to make footnotes using T^X is \footnote{...}{...}.

The footnote mark goes in between the first set of braces. Some available marks are \dag (f), \ddag (J), \S (), and \P (f). The text of the footnote goes between the second set of braces. The use of numbers as marks is a little less straightforward. The footnote21 at the bottom of the page was produced by using \footnote{$-Q~{21}$HThis is the footnote at the bottom of the page.} after the word footnote in the text.

This construction is somewhat complicated; well see why its this way when we know a little more about typesetting mathematics. But for the moment we can look at it as a way of getting the job done. You may want to use \rm within the footnote to ensure that the right font appears. Usually you will not want a space between the text and the control word footnote. TgXbook: 117

21 This is the footnote at the bottom of the page.

Page 28

d> Exercise 3.10 Make up a page with a relatively long footnote spanning several lines. d> Exercise 3.11 Make up a page with two different footnotes on it.

3.6 Headlines and Footlines

The lines for title and page numbers that go above and below the main text are produced by using \headline={.. J and \f ootline={...}. ": 252-253

The principle is the same as using the control word \line{...} within the usual text on the page. A helpful control word is \pageno which represents the current page number. Thus \headline={\hf il \tenrm Page \the\pageno} would cause the page number to appear in the upper right corner preceded by the word Page (now look at the upper right corner of this page). It is safer to explicitly name the font that you want to use (in this case \tenrm to use the 10 point roman font), since you are never guaranteed that a particular font will be in use when the headline or footline is set. The control word \the takes the internal value of the next word if it is an appropriate control word and prints it as text. You can also use the control word \folio instead of \the \pageno. The difference is that \folio will give roman numerals when \pageno is negative.

You can also assign values to \pageno if you want your document to use a different sequence of page numbers from the usual. Roman numerals can be produced by using negative numbers; \pageno=-l at the beginning of a document will cause page numbers to be in roman numerals. ": 252

Different headlines can be produced for even and odd pages in the following manner:

\headline={\ifodd \pageno {.. .}\else

where the material between the first set of braces is for the right-hand pages and the material between the second set of braces is for the left-hand pages.

d> Exercise 3.12 Change the footline so that the page number is centred with an en-dash on either side.

A T^X intro (Canadian spelling) Section 3: The shape of things to come

3.7 Overfull and underfull boxes

One of the most frustrating experiences for the new T^X user is the occurrence of overfull and underfull boxes. They are duly noted in the log file and are also written to the screen when T^X is being run interactively. Overfull boxes are also marked on the output by a slug (a large filled-in black rectangle that looks like this: |) in the right margin. Various obscene terms are applied to this slug. It appears even though there is nothing wrong with the T^X input. So why is the slug there and what can be done about it?

A good way to visualize the way TgX organizes a page is to think of the printed material as being put into boxes. There are two types of boxes: bboxes and vboxes. Most of the time these correspond to the organization of horizontal text into lines and vertical paragraphs into pages. In particular, it is the spacing of the words in a hbox corresponding to a line of text that causes the slug to appear.

Recall that T^X reads in the complete paragraph before deciding how to break it up into lines. This is better than working a line at a time, since a slight improvement in one line might cause catastrophic changes farther down in the paragraph. When words are gathered together to form a line, space is added between the words to justify the right margin. Very-large spaces between words is obviously undesirable; the badness of the line is a measure of how badly the words are spaced. An underfull hbox means that there is too much space between words. More specifically, the badness of any line is a number between 0 (perfect) and 10000 (horrible). There is a parameter called \hbadness whose default value is 1000.
Previous << 1 .. 6 7 8 9 10 11 < 12 > 13 14 15 16 17 18 .. 30 >> Next