]> git.lyx.org Git - lyx.git/blob - 3rdparty/dtl/example.tex
Update sk.po
[lyx.git] / 3rdparty / dtl / example.tex
1 % This file is public domain.
2 % Originally written 1995, Geoffrey Tobin.
3 % The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
4 % This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
5
6 % This is the TeX source file for the "TeXnical Typesetting" document.
7 % Notice how you can put in comments?  If TeX sees a % it simply ignores
8 % the rest of the line.
9
10 % A4 paper is 8.3in wide and 11.7in high; we set the page dimensions so that
11 % there are 1in margins all around:
12 \hsize 6.3in                           % page width
13 \vsize 9.7in                           % page height
14
15 \parskip 8pt plus 2pt minus 1pt        % glue before a paragraph
16
17 % Define a few extra fonts for later use:
18 \font\bigrm=cmr10 scaled\magstep4      % big version of the standard roman font
19 \font\ninerm=cmr9                      % 9pt roman
20 \font\fiverm=cmr5                      % 5pt roman
21 \font\sm=cmcsc10                       % caps and small caps
22 \font\ss=cmss10                        % sans serif
23
24 % Here's a macro that we'll use to produce all subheadings:
25 \def\subhead#1{\bigskip                % extra glue before subheading
26                \noindent{\bf #1}\par   % unindented boldface subheading
27                \nobreak}               % prevent a page break after subheading
28
29 \centerline{\bigrm \TeX nical Typesetting}
30
31 \vskip 2.5cm                           % dimensions can be metric
32
33 \subhead{What is \TeX?}
34
35 \TeX\ (pronounced ``teck'') is a computerized typesetting system developed by
36 Donald Knuth and others at Stanford University.  It is used to create
37 high-quality documents, particularly those containing mathematics.
38 The name \TeX\ is an uppercase form of the Greek letters $\tau\epsilon\chi$,
39 the first three letters of a Greek word meaning {\sl art} as well as
40 {\sl technology}.
41 The lowering of the ``E'' is a reminder that \TeX\ is about typesetting,
42 which can be thought of as the next stage beyond word processing.
43 On devices where such lowering is difficult or impossible you may see \TeX\
44 written as {\tt TeX}.
45
46 % the above blank line ends the first paragraph
47
48 Most word processors allow you to
49 create and modify a document interactively --- what
50 you see on the screen is usually what your output will look like.
51 \TeX\ does {\it not} work in this way.
52 Like other typesetting systems (such as SCRIBE and
53 {\sl troff\/}), \TeX\ is known as a ``document compiler''.  Using your
54 favourite text editor you need to create a file containing the
55 text of your manuscript along with the \TeX\ typesetting commands.
56 \TeX\ gives you the ability to produce printed matter with a quality
57 matching that found in books, depending on the output device.
58 Adelaide University has an {\sm imagen} laser printer
59 with a resolution of 240 dots per inch.
60 This publication shows both the capabilities of \TeX\ and
61 the output quality of the laser printer.
62
63 \subhead{Fonts}
64
65 One of the more obvious advantages of \TeX\ is the large range of fonts from
66 which you can choose.  A font is a collection of characters each having a
67 similar size and style.  Some of the fonts currently available include:
68 $$        % enter display math mode just to get space above and below \line
69 \line
70   {\hfil  % infinitely stretchable glue
71    \rm roman\hfil  \sl slanted\hfil  \it italic\hfil  \bf boldface\hfil
72    \tt typewriter\hfil  \ss sans serif\hfil  \sm small caps\hfil
73   }       % take care to ensure each { has a matching }
74 $$
75 Many of these also come in a variety of sizes:
76 $$
77 \centerline{{\bigrm from the very big},~         % extra space after comma
78               {\ninerm to the very small},~
79                 {\fiverm to the ridiculous}.}
80 $$
81 Apart from a large selection of mathematical symbols,
82 many special characters and accents are available:
83 $$
84 \vbox
85   {\tabskip 10pt plus 1fil   % glue before and after all columns
86    \halign to\hsize
87      {& \hfil#\hfil\cr       % specify a variable number of centred columns
88       \copyright& \it\$& \S& \P& \dag& \ddag&
89         $\circ$& $\bigcirc$&   % some symbols must be accessed from math mode
90           $\leftarrow$& $\rightarrow$& $\triangle$& $\clubsuit$&
91             \`a& \'e& \c c& \^o& \"u\cr
92      }
93   }
94 $$
95 \TeX\ does a few subtle things automatically.
96 Certain sequences of characters in your text will
97 be replaced by {\sl ligatures} in the printed output (consider the ``{\tt ffi}''
98 in ``difficult''), while other pairs of characters need to be {\sl kerned}
99 (e.g., the ``o'' and ``x'' in ``box'' look better if they are moved closer
100 together).  The range and quality of fonts available will continue to improve.
101
102 \subhead{Mathematics}
103
104 A major design goal of \TeX\ was to simplify the task of typesetting
105 mathematics --- and to do it properly.  Mathematicians will be pleasantly
106 surprised at the ease with which formulae and expressions can be created;
107 from simple in-line equations
108 such as $e^{i\pi}=-1$ and $f_{n+2}=f_{n+1}+f_n$, to more extravagant displays:
109 $$
110 \sum_{k\ge1} \sqrt{x_k-\ln k}\quad\ne\quad
111 \int_{0}^\infty {e^{-x^3}+\sqrt{x} \over \left(123-x\right)^3} \,dx
112 $$
113 \TeX\ looks after most of the nitty gritty details, such as spacing things
114 correctly and choosing the right sizes for superscripts, parentheses,
115 square root signs etc.  (The discoverer of the above relation wishes to
116 remain anonymous.)
117
118 \subhead{Alignment}
119
120 The preparation of tabular material such as in lists and matrices can be a
121 tedious job for a person armed only with a typewriter and a bottle of
122 correction fluid.  With a little help from \TeX, computers can make it so
123 much easier:
124 $$
125 \vcenter                               % a vertically centred \vbox
126   {\tabskip 0pt                        % no space before column 1
127    \halign to 3.5in                    % width of table
128      {\strut#&                         % col 1 is a strut
129        \vrule#\tabskip .5em plus2em&   % col 2 is a vrule; also set col spacing
130         #\hfil&                        % col 3 is left justified
131          \vrule#&                      % col 4 is a vrule
132           \hfil#\hfil&                 % col 5 is centred
133            \vrule#&                    % col 6 is a vrule
134             \hfil#&                    % col 7 is right justified
135              \vrule#\tabskip 0pt       % col 8 is a vrule; no space after it
136               \cr                      % end of the preamble
137       \noalign{\hrule}
138       & & \multispan5 \hfil Oldest players to represent\hfil& \cr
139       & & \multispan5 \hfil England in a Test Match\hfil& \cr
140       \noalign{\hrule}
141       & & \omit\hfil Name\hfil& &      % \omit ignores template in preamble
142             \omit\hfil Age\hfil& &
143               \omit\hfil Versus\hfil& \cr
144       \noalign{\hrule}
145       & & W.Rhodes& & 52y 165d& & West Indies, 1930& \cr
146       \noalign{\hrule}
147       & & W.G.Grace& & 50y 320d& & Australia, 1899& \cr
148       \noalign{\hrule}
149       & & G.Gunn& & 50y 303d& & West Indies, 1929& \cr
150       \noalign{\hrule}
151       & & J.Southerton{\ninerm*}& & 49y 139d& & Australia, 1877& \cr
152       \noalign{\hrule\smallskip}
153       & \multispan7\ninerm* (This was actually his Test debut.)\hfil \cr
154      }
155   }
156 \hskip .5in           % space between table and matrix
157 A=\pmatrix            % parenthesized matrix
158     {a_{11}& a_{12}& \ldots& a_{1n}\cr
159      a_{21}& a_{22}& \ldots& a_{2n}\cr
160      \vdots& \vdots& \ddots& \vdots\cr
161      a_{m1}& a_{m2}& \ldots& a_{mn}\cr
162     }
163 $$
164
165 \vskip -\the\belowdisplayskip      % avoid too much space below display
166
167 \subhead{Other features}
168
169 Space does not permit examples of all the things \TeX\ can do.  Here are some
170 more features you might like to know about:
171
172 \item{$\bullet$}
173 Multi-column output can be generated.
174
175 {\parskip=0pt       % temporarily turn off the skipping between paragraphs
176 \item{$\bullet$}
177 \TeX\ has a very sophisticated paragraph building algorithm and rarely needs
178 to resort to hyphenation.  Paragraphs can be indented and shaped in many
179 different ways.
180
181 \item{$\bullet$}
182 Automatic insertion of footnotes,\footnote{\dag}{\ninerm Here is
183 a footnote.} running heads, page numbers etc.
184
185 \item{$\bullet$}
186 \TeX\ makes provision for generating a table of contents, a bibliography, even
187 an index.  Automatic section numbering and cross referencing are also possible.
188
189 \item{$\bullet$}
190 A powerful macro facility is built into \TeX.  This lets you do some very
191 useful things, like creating an abbreviation for a commonly used phrase, or
192 defining a new command that will have varying effects depending on the
193 parameters it is given.  A macro package can enhance \TeX\ by making it much
194 easier to generate a document in a predefined format.
195 \par                % end the last paragraph BEFORE ending the group
196 }                   % \parskip will now revert to its previous value
197
198 \subhead{What CAN'T \TeX\ do?}
199
200 Complex graphics such as diagrams and illustrations pose
201 a major problem --- at the moment you have to leave an appropriate amount of
202 blank space and paste them in later.
203 Graphic facilities are the subject of current research.
204
205 \subhead{\TeX\ and VAX/VMS}
206
207 The \TeX\ source file used to generate this document is available for
208 inspection on any VAX node that has \TeX ---
209 just type `{\tt scroll tex\char'137 inputs:example.tex}'.
210 A few steps are needed to print such a file:
211
212 \item{(1)}
213 Type `{\tt tex example}' to ``compile'' the file.
214 (\TeX\ looks for a {\tt .tex} file by default.  If it can't find the given
215 file in your current directory it will look in {\tt tex\char'137 inputs}.)
216 Two new files will be created in your current directory:
217 {\tt example.dvi} and {\tt example.lis}.
218 The former is a device independent description of the document;
219 the latter is simply a log of the \TeX\ run.
220
221 {\parskip=0pt    % temporarily turn off \parskip
222 \item{(2)}
223 Type `{\tt dvitovdu example}' to preview the document on a terminal screen.
224 This program can be used to detect a variety of formatting problems,
225 saving both time and paper.
226
227 \item{(3)}
228 Type `{\tt imprint example}' to print the document.
229 (Note that the DVIto\kern-.15em VDU and IMPRINT commands
230 accept a {\tt .dvi} file by default).
231
232 }                % restore \parskip
233
234 Detailed help on all these commands is available on-line --- try typing
235 `{\tt help tex}' to get started.
236
237 \bye