






<div class="p"><!----></div>

      
<div class="p"><!----></div>
                             
<h1 align="center">An Example Document </h1>  
<h3 align="center">Leslie Lamport </h3>      
<h3 align="center">January 21, 1994 </h3>      
<div class="p"><!----></div>
                                                          
<div class="p"><!----></div>
                                                          
<div class="p"><!----></div>
              
<div class="p"><!----></div>
                   
<div class="p"><!----></div>
This is an example input file.  Comparing it with
the output it generates can show you how to
produce a simple document of your own.

<div class="p"><!----></div>
 <h2><a name="tth_sEc1">
1</a>&nbsp;&nbsp;Ordinary Text</h2>                                                                
<div class="p"><!----></div>
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.

<div class="p"><!----></div>
One   or more   blank lines denote the  end 
of  a paragraph.  

<div class="p"><!----></div>
Since any number of consecutive spaces are treated
like a single one, the formatting of the input
file makes no difference to
      
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>,                but it makes a difference to you.  When you use

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>, 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.

<div class="p"><!----></div>
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:
       "&nbsp;`this'                    is what I just 
        wrote, not  `that'&nbsp;".  

<div class="p"><!----></div>
Dashes come in three sizes: an 
       intra-word 
dash, a medium dash for number ranges like 
       1-2, 
and a punctuation 
       dash-like 
this.

<div class="p"><!----></div>
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.&nbsp;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
       ...&nbsp;                                                                                                                                                                                                           with the right spacing around the periods requires
a special command.

<div class="p"><!----></div>

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>&nbsp;interprets some common characters as
commands, so you must type special commands to
generate them.  These characters include the
following:
       $ &amp; % # { and }.

<div class="p"><!----></div>
In printing, text is usually emphasized with an
       <em>italic</em>  
type style.  

<div class="p"><!----></div>
<em>   A long segment of text can also be emphasized 
   in this way.  Text within such a segment can be 
   given <em>additional</em> emphasis.
</em>

<div class="p"><!----></div>
It is sometimes necessary to prevent 
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>&nbsp;from
breaking a line where it might otherwise do so.
This may be at a space, as between the "Mr." and
"Jones" in
       "Mr.&nbsp;Jones",        or within a word-especially when the word is a
symbol like
       <em>itemnum</em> 
that makes little sense when hyphenated across
lines.

<div class="p"><!----></div>
Footnotes<a href="#tthFtNtAAB" name="tthFrefAAB">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>1</mn></mrow>
</msup>
</mrow></math></a>
pose no problem.

<div class="p"><!----></div>

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>&nbsp;is good at typesetting mathematical formulas
like
       
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>x</mi><mo>-</mo><mn>3</mn><mi>y</mi><mo>+</mo><mi>z</mi><mo>=</mo><mn>7</mn></mrow></math> 
or
       
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>a</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
<mo>&gt;</mo>
<msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn><mi>n</mi></mrow>
</msup>
<mo>+</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn><mi>n</mi></mrow>
</msup>
<mo>&gt;</mo><mi>x</mi><mo>'</mo></mrow></math>
or  
       
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mo stretchy="false">(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo stretchy="false">)</mo><mo>=</mo>
<munder><mo>&sum;</mo><mrow><mi>i</mi></mrow>
</munder>

<msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi></mrow>
</msub>

<msub><mrow><mi>b</mi></mrow><mrow><mi>i</mi></mrow>
</msub>
</mrow></math>.
The spaces you type in a formula are 
ignored.  Remember that a letter like
       
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>x</mi></mrow></math>                   is a formula when it denotes a mathematical
symbol, and it should be typed as one.

<div class="p"><!----></div>
 <h2><a name="tth_sEc2">
2</a>&nbsp;&nbsp;Displayed Text</h2>

<div class="p"><!----></div>
Text is displayed by indenting it from the left
margin.  Quotations are commonly displayed.  There
are short quotations

<blockquote>
   This is a short a quotation.  It consists of a 
   single paragraph of text.  See how it is formatted.
</blockquote>
and longer ones.

<blockquote>
   This is a longer quotation.  It consists of two
   paragraphs of text, neither of which are
   particularly interesting.

<div class="p"><!----></div>
   This is the second paragraph of the quotation.  It
   is just as dull as the first paragraph.
</blockquote>
Another frequently-displayed structure is a list.
The following is an example of an <em>itemized</em>
list.

<ul>
<li> This is the first item of an itemized list.
         Each item in the list is marked with a "tick".
         You don't have to worry about what kind of tick
         mark is used.
<div class="p"><!----></div>
</li>

<li> This is the second item of the list.  It
         contains another list nested inside it.  The inner
         list is an <em>enumerated</em> list.
         
<ol type="1">
<li> This is the first item of an enumerated 
                  list that is nested within the itemized list.
<div class="p"><!----></div>
</li>

<li> This is the second item of the inner list.  
                  
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow><mi fontstyle="normal">L</mi></mrow><mrow><mi fontstyle="normal">A</mi></mrow>
</msup>

<msub><mrow><mi fontstyle="normal">T</mi></mrow><mrow><mi fontstyle="normal">E</mi></mrow>
</msub>
<mi fontstyle="normal">X</mi></mrow></math>&nbsp;allows you to nest lists deeper than 
                  you really should.
<div class="p"><!----></div>
</li>
</ol>
         This is the rest of the second item of the outer
         list.  It is no more interesting than any other
         part of the item.
<div class="p"><!----></div>
</li>

<li> This is the third item of the list.
<div class="p"><!----></div>
</li>
</ul>
You can even display poetry.

<blockquote>
   There is an environment 
    for verse <br />   Whose features some poets    will curse.   

<div class="p"><!----></div>
                             
<div class="p"><!----></div>
   For instead of making<br />
   Them do <em>all</em> line breaking, <br />
   It allows them to put too many words on a line when they'd rather be 
   forced to be terse.
</blockquote>

<div class="p"><!----></div>
Mathematical formulas may also be displayed.  A
displayed formula 
is 
one-line long; multiline
formulas require special formatting instructions.
   <br />
<table width="100%"><tr><td align="center">
    <math xmlns="http://www.w3.org/1998/Math/MathML">
    <mstyle displaystyle="true"><mrow><mo stretchy="false">(</mo><mi>&Gamma;</mi><mo>,</mo><mi>&psi;</mi><mo>'</mo><mo stretchy="false">)</mo><mo>=</mo><mi>x</mi>"<mo>+</mo>
<msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>+</mo>
<msubsup><mrow><mi>z</mi></mrow><mrow><mi>i</mi> </mrow>
<mrow><mi>n</mi></mrow></msubsup>
</mrow>
    </mstyle></math>
</td></tr></table>
<br />

Don't start a paragraph with a displayed equation,
nor make one a paragraph by itself.

<div class="p"><!----></div>
<hr /><h3>Footnotes:</h3>

<div class="p"><!----></div>
<a name="tthFtNtAAB"></a><a href="#tthFrefAAB">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mrow></mrow><mrow><mn>1</mn></mrow>
</msup>
</mrow></math></a>This is an example of a footnote.