テスト用ファイルの整理
[makefiles.git] / latex_mk / test / sample / sample.tex
1 % This is a sample LaTeX input file.  (Version of 9 April 1986)
2 %
3 % A '%' character causes TeX to ignore all remaining text on the line,
4 % and is used for comments like this one.
5
6 \documentclass{article}    % Specifies the document style.
7
8                            % The preamble begins here.
9 \title{A Sample Document}  % Declares the document's title.
10 \author{Leslie Lamport}    % Declares the author's name.
11 \date{December 12, 1984}   % Deleting this command produces today's date.
12
13 \begin{document}           % End of preamble and beginning of text.
14
15 \maketitle                 % Produces the title.
16
17 This is a sample input file.  Comparing it with the output it
18 generates can show you how to produce a simple document of
19 your own.
20
21 \section{Ordinary Text}  % Produces section heading.  Lower-level
22                          % sections are begun with similar 
23                          % \subsection and \subsubsection commands.
24
25 The ends  of words and sentences are marked 
26   by   spaces. It  doesn't matter how many 
27 spaces    you type; one is as good as 100.  The
28 end of   a line counts as a space.
29
30 One   or more   blank lines denote the  end 
31 of  a paragraph.  
32
33 Since any number of consecutive spaces are treated like a single
34 one, the formatting of the input file makes no difference to
35       \TeX,         % The \TeX command generates the TeX logo.
36 but it makes a difference to you.  
37 When you use
38       \LaTeX,       % The \LaTeX command generates the LaTeX logo.
39 making your input file as easy to read as possible
40 will be a great help as you write your document and when you
41 change it.  This sample file shows how you can add comments to
42 your own input file.
43
44 Because printing is different from typewriting, there are a 
45 number of things that you have to do differently when preparing 
46 an input file than if you were just typing the document directly.  
47 Quotation marks like 
48        ``this'' 
49 have to be handled specially, as do quotes within quotes: 
50        ``\,`this' % \, separates the double and single quote.
51         is what I just 
52         wrote, not  `that'\,''.  
53
54 Dashes come in three sizes: an 
55        intra-word 
56 dash, a medium dash for number ranges like 
57        1--2, 
58 and a punctuation 
59        dash---like 
60 this.
61
62 A sentence-ending space should be larger than the space between words
63 within a sentence.  You sometimes have to type special commands in
64 conjunction with punctuation characters to get this right, as in the
65 following sentence.
66        Gnats, gnus, etc.\    % `\ ' makes an inter-word space.
67        all begin with G\@.   % \@ marks end-of-sentence punctuation.
68 You should check the spaces after periods when reading your output to
69 make sure you haven't forgotten any special cases.
70 Generating an ellipsis 
71        \ldots\    % `\ ' needed because TeX ignores spaces after 
72                   % command names like \ldots made from \ + letters.
73                   %
74                   % Note how a `%' character causes TeX to ignore the 
75                   % end of the input line, so these blank lines do not
76                   % start a new paragraph.
77 with the right spacing around the periods 
78 requires a special  command.  
79
80 \TeX\ interprets some common characters as commands, so you 
81 must type special commands to generate them.  These 
82 characters include the following: 
83        \$ \& \% \# \{ and \}.
84
85 In printing, text is emphasized by using an %% END OF FIRST PAGE
86        {\em italic\/}  % The \/ command produces the tiny 
87                        % extra space that should be added 
88                        % between a slanted and a following
89                        % unslanted letter.
90 type style.  
91
92 \begin{em}
93    A long segment of text can also be emphasized in this way.  Text within
94    such a segment given additional emphasis 
95           with\/ {\em Roman} 
96    type.  Italic type loses its ability to emphasize and become simply
97    distracting when used excessively.  
98 \end{em}
99
100 It is sometimes necessary to prevent \TeX\ from breaking a line where
101 it might otherwise do so.  This may be at a space, as between the
102 ``Mr.'' and ``Jones'' in
103        ``Mr.~Jones'',        % ~ produces an unbreakable interword space.
104 or within a word---especially when the word is a symbol like
105        \mbox{\em itemnum\/} 
106 that makes little sense when hyphenated across 
107        lines.
108
109 Footnotes\footnote{This is an example of a footnote.}
110 pose no problem.
111
112 \TeX\ is good at typesetting mathematical formulas like
113        \( x-3y = 7 \) 
114 or
115        \( a_{1} > x^{2n} / y^{2n} > x' \).
116 Remember that a letter like
117        $x$        % $ ... $  and  \( ... \)  are equivalent
118 is a formula when it denotes a mathematical symbol, and should
119 be treated as one.
120
121 \section{Displayed Text}
122
123 Text is displayed by indenting it from the left margin.
124 Quotations are commonly displayed.  There are short quotations
125 \begin{quote}
126    This is a short a quotation.  It consists of a 
127    single paragraph of text.  There is no paragraph
128    indentation.
129 \end{quote}
130 and longer ones.
131 \begin{quotation}
132    This is a longer quotation.  It consists of two paragraphs
133    of text.  The beginning of each paragraph is indicated
134    by an extra indentation.
135
136    This is the second paragraph of the quotation.  It is just
137    as dull as the first paragraph.
138 \end{quotation}
139 Another frequently-displayed structure is a list.
140 The following is an example of an {\em itemized} list.
141 \begin{itemize}
142    \item  This is the first item of an itemized list.  Each item 
143           in the list is marked with a ``tick''.  The document
144           style determines what kind of tick mark is used.
145
146    \item  This is the second item of the list.  It contains another
147           list nested inside it.  The inner list is an {\em enumerated}
148           list.
149           \begin{enumerate}
150               \item This is the first item of an enumerated list that
151                     is nested within the itemized list.
152
153               \item This is the second item of the inner list.  \LaTeX\
154                     allows you to nest lists deeper than you really should.
155           \end{enumerate}
156           This is the rest of the second item of the outer list.  It
157           is no more interesting than any other part of the item.
158                                 %% END OF SECOND PAGE
159    \item  This is the third item of the list.
160 \end{itemize}
161 You can even display poetry.
162 \begin{verse}
163    There is an environment for verse \\    % The \\ command separates lines
164    Whose features some poets will curse.   % within a stanza.
165
166                            % One or more blank lines separate stanzas.
167
168    For instead of making\\
169    Them do {\em all\/} line breaking, \\
170    It allows them to put too many words on a line when they'd 
171    rather be forced to be terse.
172 \end{verse}
173
174 Mathematical formulas may also be displayed.  A displayed formula is
175 one-line long; multiline formulas require special formatting
176 instructions.
177    \[  x' + y^{2} = z_{i}^{2}\]
178 Don't start a paragraph with a displayed equation, nor make
179 one a paragraph by itself.
180
181 \end{document}             % End of document.
182