% LaTeX %cw0 \documentclass[leqno]{article} \usepackage{url} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{bm} \usepackage{gellmu} \usepackage[margin=100bp,nohead]{geometry} \setlength{\parskip}{6bp} \setlength{\parindent}{0bp} \thispagestyle{empty} \title{An Example Document} %cs0 %cs0 \date{January 21, 1994} %cs0 %nul %nul %nul %cw0 %cw0 %nul %cw0 %cw0 %nul %cm0 %cs0 %nul %nul %nul \newlength{\centerskip} \setlength{\centerskip}{\topsep} \newcommand{\hsf}{\hspace*{\fill}} \newcommand{\tdbc}[1]{\hsf\textbf{#1}\hsf} \newenvironment{menulist}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0.03\linewidth} \setlength{\leftmargin}{0.06\linewidth} \setlength{\itemindent}{0bp} \setlength{\itemsep}{-6bp} \setlength{\parsep}{6bp}} }{\end{list}} \newenvironment{Menulist}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0.03\linewidth} \setlength{\leftmargin}{0.06\linewidth} \setlength{\itemindent}{0bp} \setlength{\itemsep}{3bp} \setlength{\parsep}{6bp}} }{\end{list}} \newenvironment{toclist}{\normalsize \begin{list}{}{ }}{\end{list}} \newenvironment{Toclist}{\large \begin{list}{}{ }}{\end{list}} \newenvironment{citations}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0bp} \setlength{\leftmargin}{0.04\linewidth} \setlength{\labelsep}{0bp} \setlength{\itemindent}{-0.2\leftmargin} \setlength{\itemsep}{3bp} \setlength{\parsep}{0bp}} }{\end{list}} \author{Leslie Lamport} \begin{document} \begin{center}\LARGE\bfseries{} An Example Document \end{center} \begin{center}\Large\bfseries{} \textsl{Leslie Lamport} \end{center} \begin{center} \large\bfseries{} January 21, 1994 \end{center} \medskip %cs0 %cs0 \par{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. \ } \section*{1\ \ \label{SU-1}Ordinary Text} %cs0 %cw0 %cw0 \par{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. \ } \par{One or more blank lines denote the end of a paragraph. \ } \par{Since any number of consecutive spaces are treated like a single one, the formatting of the input file makes no difference to \LaTeX{}, %cs0 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. \ } \par{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' %cs0 is what I just wrote, not `that'\,''. \ } \par{Dashes come in three sizes: an intra-word dash, a medium dash for number ranges like 1--2, and a punctuation dash---like this. \ } \par{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 %cs0 begin with G\@. \ %cs0 You should check the spaces after periods when reading your output to make sure you haven't forgotten any special cases. \ Generating an ellipsis \ldots{}\ %cs0 %cw0 %cw0 %cw0 %cw0 %cw0 %cw0 %cw0 with the right spacing around the periods requires a special command. \ } \par{\LaTeX{}\ interprets some common characters as commands, so you must type special commands to generate them. \ These characters include the following: \$ \& \% \# \{ and \}. \ } \par{In printing, text is usually emphasized with an \emph{italic} type style. \ } \par{\emph{ A long segment of text can also be emphasized in this way. \ Text within such a segment can be given \emph{additional} emphasis. \ } } \par{It is sometimes necessary to prevent \LaTeX{}\ 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'', %cs0 or within a word---especially when the word is a symbol like \emph{itemnum} that makes little sense when hyphenated across lines. \ } \par{Footnotes\footnote{This is an example of a footnote.} pose no problem. \ } \par{\LaTeX{}\ is good at typesetting mathematical formulas like \,\( x-3y + z \, = \, 7 \)\, or \,\( a_{1} > x^{2n} + y^{2n} > x' \)\, or %nul \,\( (A, B) \, = \, \sum_{i} a_{i} b_{i} \)\,. \ The spaces you type in a formula are ignored. \ Remember that a letter like \(x\) %cs0 is a formula when it denotes a mathematical symbol, and it should be typed as one. \ } \section*{2\ \ \label{SU-2}Displayed Text} \par{Text is displayed by indenting it from the left margin. \ Quotations are commonly displayed. \ There are short quotations \begin{quote} This is a short a quotation. \ It consists of a single paragraph of text. \ See how it is formatted. \ \end{quote} and longer ones. \ \begin{quotation} This is a longer quotation. \ It consists of two paragraphs of text, neither of which are particularly interesting. \ This is the second paragraph of the quotation. \ It is just as dull as the first paragraph. \ \end{quotation} Another frequently-displayed structure is a list. \ The following is an example of an \emph{itemized} list. \ \begin{itemize} \item 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. \ \item This is the second item of the list. \ It contains another list nested inside it. \ The inner list is an \emph{enumerated} list. \ \begin{enumerate} \item This is the first item of an enumerated list that is nested within the itemized list. \ \item This is the second item of the inner list. \ \LaTeX{}\ allows you to nest lists deeper than you really should. \ \end{enumerate} This is the rest of the second item of the outer list. \ It is no more interesting than any other part of the item. \ \item This is the third item of the list. \ \end{itemize} You can even display poetry. \ \begin{verse} There is an environment for verse \\{} %cs0 Whose features some poets %cs0 will curse. \ %cw0 For instead of making \\{} Them do \emph{all} line breaking, \\{} It allows them to put too many words on a line when they'd rather be forced to be terse. \ \end{verse} } \par{Mathematical formulas may also be displayed. \ A displayed formula is one-line long; multiline formulas require special formatting instructions. \ \[ (\Gamma{}, \psi{}') \ = \ x'' + y^{2} + z_{i}^{n}\] Don't start a paragraph with a displayed equation, nor make one a paragraph by itself. \ } \end{document} %cs0