Leslie Lamport
December 12, 1984
This is a sample input file. Comparing it with the output it generates can show you how to produce a simple document of your own.
The ends of words and sentences are marked by spaces. It doesn't matter how many spaces you type; one is as good as 100. The end of a line counts as a space. One or more blank lines denote the end of a paragraph. Since any number of consecutive spaces are treated like a single one, the formatting of the input file makes no difference to TEX, but it makes a difference to you. When you use LATEX, making your input file as easy to read as possible will be a great help as you write your document and when you change it. This sample file shows how you can add comments to your own input file. Because printing is different from typewriting, there are a number of things that you have to do differently when preparing an input file than if you were just typing the document directly. Quotation marks like ``this'' have to be handled specially, as do quotes within quotes: ```this' is what I just wrote, not `that'''. Dashes come in three sizes: an intra-word dash, a medium dash for number ranges like 1-2, and a punctuation dash--like this. A sentence-ending space should be larger than the space between words within a sentence. You sometimes have to type special commands in conjunction with punctuation characters to get this right, as in the following sentence. Gnats, gnus, etc. all begin with G. You should check the spaces after periods when reading your output to make sure you haven't forgotten any special cases. Generating an ellipsis ... with the right spacing around the periods requires a special command. TEX interprets some common characters as commands, so you must type special commands to generate them. These characters include the following: $ & % # { and }. In printing, text is emphasized by using an italic type style. A long segment of text can also be emphasized in this way. Text within such a segment given additional emphasis with Roman type. Italic type loses its ability to emphasize and become simply distracting when used excessively. It is sometimes necessary to prevent TEX from breaking a line where it might otherwise do so. This may be at a space, as between the ``Mr.'' and ``Jones'' in ``Mr. Jones'', or within a word--especially when the word is a symbol like itemnum that makes little sense when hyphenated across lines. Footnotes1 pose no problem. TEX is good at typesetting mathematical formulas like x-3y = 7 or a1 > x2n / y2n > x'. Remember that a letter like x is a formula when it denotes a mathematical symbol, and should be treated as one.
This is a short a quotation. It consists of a single paragraph of text. There is no paragraph indentation.and longer ones.
This is a longer quotation. It consists of two paragraphs of text. The beginning of each paragraph is indicated by an extra indentation. This is the second paragraph of the quotation. It is just as dull as the first paragraph.Another frequently-displayed structure is a list. The following is an example of an itemized list.
There is an environment for verseMathematical formulas may also be displayed. A displayed formula is one-line long; multiline formulas require special formatting instructions.
Whose features some poets will curse.For instead of making
Them do all line breaking,
It allows them to put too many words on a line when they'd rather be forced to be terse.