diff options
Diffstat (limited to 'info/tcdmanual')
-rw-r--r-- | info/tcdmanual/README | 33 | ||||
-rw-r--r-- | info/tcdmanual/amsbsy.sty | 106 | ||||
-rw-r--r-- | info/tcdmanual/cover.tex | 53 | ||||
-rw-r--r-- | info/tcdmanual/la_furth.tex | 339 | ||||
-rw-r--r-- | info/tcdmanual/la_intro.tex | 202 | ||||
-rw-r--r-- | info/tcdmanual/la_math.tex | 897 | ||||
-rw-r--r-- | info/tcdmanual/la_mthcs.tex | 250 | ||||
-rw-r--r-- | info/tcdmanual/la_summ.tex | 407 | ||||
-rw-r--r-- | info/tcdmanual/la_text.tex | 437 | ||||
-rw-r--r-- | info/tcdmanual/la_txtcs.tex | 68 | ||||
-rw-r--r-- | info/tcdmanual/lalong.tex | 38 | ||||
-rw-r--r-- | info/tcdmanual/lalong.tim | 40 | ||||
-rw-r--r-- | info/tcdmanual/lashort.tex | 27 | ||||
-rw-r--r-- | info/tcdmanual/lashort.tim | 29 | ||||
-rw-r--r-- | info/tcdmanual/output.tex | 71 | ||||
-rw-r--r-- | info/tcdmanual/pl_furth.tex | 228 | ||||
-rw-r--r-- | info/tcdmanual/pl_intro.tex | 187 | ||||
-rw-r--r-- | info/tcdmanual/pl_math.tex | 810 | ||||
-rw-r--r-- | info/tcdmanual/pl_mthcs.tex | 219 | ||||
-rw-r--r-- | info/tcdmanual/pl_summ.tex | 364 | ||||
-rw-r--r-- | info/tcdmanual/pl_text.tex | 335 | ||||
-rw-r--r-- | info/tcdmanual/pl_txtcs.tex | 64 | ||||
-rw-r--r-- | info/tcdmanual/pllong.tex | 29 | ||||
-rw-r--r-- | info/tcdmanual/plshort.tex | 26 |
24 files changed, 5259 insertions, 0 deletions
diff --git a/info/tcdmanual/README b/info/tcdmanual/README new file mode 100644 index 0000000000..d3a935a940 --- /dev/null +++ b/info/tcdmanual/README @@ -0,0 +1,33 @@ +These manuals were written by Dr David Wilkins (dwilkins@maths.tcd.ie), +in the School of Mathematics, Trinity College Dublin. + +They may be freely copied and modified, +providing due acknowledgement to the author is retained. + +There are 4 documents: short and long manuals for TeX and LaTeX. +All are written in LaTeX. + +To print the long LaTeX manual (for example), give the command + +% latex lalong + +The others are processed by substituting +"plshort", "pllong", or "lashort" for "lalong". + +Notes + +1. These manuals were originally written for non-NFSS LaTeX +but have been modified to "compile" under NFSS LaTeX. +I have tried to ensure that they still compile +under non-NFSS LaTeX, +but unfortunately have no way of testing this. +Please let me know if there is any problem. + +2. If you want to specify A4 paper size, +comment in the \documentstyle[a4,12pt]... +lines at the start of lalong.tex, lashort.tex, +pllong.tex and plshort.tex, +and comment out the following line in each case. + +Timothy Murphy <tim@maths.tcd.ie> + diff --git a/info/tcdmanual/amsbsy.sty b/info/tcdmanual/amsbsy.sty new file mode 100644 index 0000000000..bd3d62ea2c --- /dev/null +++ b/info/tcdmanual/amsbsy.sty @@ -0,0 +1,106 @@ +%% This is file `amsbsy.sty' generated from `amsbsy.doc' +%% on 21-JUN-1991 by the docstrip.ams utility (1.0). +%% +%%@texfile{ +%% filename="amsbsy.sty", +%% version="1.1", +%% date="21-JUN-1991", +%% filetype="AMS-LaTeX: option", +%% copyright="Copyright (C) American Mathematical Society, all rights +%% reserved. Copying of this file is authorized only if either: +%% (1) you make absolutely no changes to your copy, including name; +%% OR (2) if you do make changes, you first rename it to some other +%% name.", +%% author="American Mathematical Society", +%% address="American Mathematical Society, +%% Technical Support Department, +%% P. O. Box 6248, +%% Providence, RI 02940, +%% USA", +%% telephone="401-455-4080 or (in the USA) 800-321-4AMS", +%% email="Internet: Tech-Support@Math.AMS.org", +%% checksumtype="line count", +%% checksum="106", +%% codetable="ISO/ASCII", +%% keywords="latex, amslatex, ams-latex, bold symbol, math symbol", +%% abstract="This file is part of the AMS-\LaTeX{} package, ver. 1.1. +%% It is a \LaTeX{} option that provides a a command for producing +%% bold math symbols when appropriate fonts exist, and a `poor man's +%% bold' command that can be applied when an appropriate bold font +%% doesn't exist." +%%} +\expandafter\ifx\csname amsbsy.sty\endcsname\relax +\expandafter\def\csname amsbsy.sty\endcsname{} +\else\message{---already loaded}\endinput\fi +\def\filename{amsbsy.sty} +\def\fileversion{1.1} \def\filedate{21-JUN-1991} +\immediate\write16{% +AMS-LaTeX option `\filename' (\fileversion, \filedate)} +%%% end of file header +\@ifundefined{extract@font} + {\errmessage{The style option `amsbsy' does not make sense if you + do not use a format with the new font selection scheme.} + \endinput} + {} +\def\boldsymbol{\protect\p@boldsymbol} +\def\p@boldsymbol#1{% + \begingroup + \let\@nomath\@gobble \mathversion{bold}% + \math@atom{#1}{% + \mathchoice% + {\hbox{$\m@th\displaystyle#1$}}% + {\hbox{$\m@th\textstyle#1$}}% + {\hbox{$\m@th\scriptstyle#1$}}% + {\hbox{$\m@th\scriptscriptstyle#1$}}}% + \endgroup} +\@ifundefined{amstext.sty}{\input{amstext.sty}}{} +\def\setboxz@h{\setbox\z@\hbox} +\def\wdz@{\wd\z@} +\def\boxz@{\box\z@} +\def\setbox@ne{\setbox\@ne} +\def\wd@ne{\wd\@ne} +\def\math@atom#1#2{% + \binrel@{#1}\binrel@@{#2}} +\def\binrel@#1{\setboxz@h{\thinmuskip0mu + \medmuskip\m@ne mu\thickmuskip\@ne mu$#1\m@th$}% + \setbox@ne\hbox{\thinmuskip0mu\medmuskip\m@ne mu\thickmuskip + \@ne mu${}#1{}\m@th$}% + \setbox\tw@\hbox{\hskip\wd@ne\hskip-\wdz@}} +\def\pmb{\RIfM@\expandafter\mathpalette\expandafter\pmb@\else + \expandafter\pmb@@\fi} +\def\pmb@@#1{\leavevmode\setboxz@h{#1}% + \dimen@-\wdz@ + \kern-.5\ex@\copy\z@ + \kern\dimen@\kern.25\ex@\raise.4\ex@\copy\z@ + \kern\dimen@\kern.25\ex@\box\z@ +} +\def\binrel@@#1{\ifdim\wd2<\z@\mathbin{#1}\else\ifdim\wd\tw@>\z@ + \mathrel{#1}\else{#1}\fi\fi} +\newdimen\pmbraise@ +\def\pmb@#1#2{\setbox\thr@@\hbox{$\m@th#1{#2}$}% + \setbox4\hbox{$\m@th#1\mkern.5mu$}\pmbraise@\wd4\relax + \binrel@{#2}% + \dimen@-\wd\thr@@ + \binrel@@{% + \mkern-.8mu\copy\thr@@ + \kern\dimen@\mkern.4mu\raise\pmbraise@\copy\thr@@ + \kern\dimen@\mkern.4mu\box\thr@@ +}} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput +%% +%% End of file `amsbsy.sty'. diff --git a/info/tcdmanual/cover.tex b/info/tcdmanual/cover.tex new file mode 100644 index 0000000000..835f2fe8ff --- /dev/null +++ b/info/tcdmanual/cover.tex @@ -0,0 +1,53 @@ +\documentstyle[12pt,a4,epsf]{article} + +\font\HUGEPalatino = Palatino-Roman scaled 2986 % \magstep6 +\font\HugePalatino = Palatino-Roman scaled \magstep5 +\font\LARGEPalatino = Palatino-Roman scaled \magstep4 +\font\LargePalatino = Palatino-Roman scaled \magstep3 +\font\SmallPalatinoBold = Palatino-Bold +\font\SmallPalatino = Palatino-Roman +\font\LARGEChancery = ZapfChancery-MediumItalic scaled \magstep4 +\font\LargeChancery = ZapfChancery-MediumItalic scaled \magstep3 +\font\Hugebf = cmbx12 scaled \magstep5 + +\begin{document} + +\thispagestyle{empty} + +\begin{center} + +{\LargePalatino UNIVERSITY OF DUBLIN} + +\bigskip + +{\HugePalatino TRINITY COLLEGE} + +\medskip + +{\LargePalatino SCHOOL OF MATHEMATICS} + +\vspace{1in} + +\epsfxsize=5cm\mbox{\epsffile{/usr/local/lib/tex/inputs/Local/tcdarms.pss}}\ + +\vspace{1.5in} + +{\Hugebf David Wilkins} + +\bigskip +\bigskip +\bigskip + +{\huge\bf An Introduction to \LaTeX} +%{\huge\bf A \LaTeX\ Summary} + +\vspace{1.5in} + +{\LargeChancery Computer Notes \#2} +%{\LargeChancery Computer Notes \#3} + + +\end{center} + +\end{document} + diff --git a/info/tcdmanual/la_furth.tex b/info/tcdmanual/la_furth.tex new file mode 100644 index 0000000000..a901d2732a --- /dev/null +++ b/info/tcdmanual/la_furth.tex @@ -0,0 +1,339 @@ +\sectiontitle{Further Features of \LaTeX} +\label{la-furth} +\subsectiontitle{Producing Blank Space in \LaTeX} +To produce (horizontal) blank space within a paragraph, use +\verb?\hspace? and \verb?\hspace*?, followed by the length +of the blank space enclosed within curly brackets. The length +of the skip should be expressed in a unit recognized by \TeX. +These recognized units are given in the following table: +\begin{quote} +\begin{tabular}{lll} +\verb?pt? & point & (1 in = 72.27 pt) \\ +\verb?pc? & pica & (1 pc = 12 pt) \\ +\verb?in? & inch & (1 in = 25.4 mm) \\ +\verb?bp? & big point & (1 in = 72 bp) \\ +\verb?cm? & centimetre & (1 cm = 10 mm) \\ +\verb?mm? & millimetre & \\ +\verb?dd? & didot point & (1157 dd = 1238 pt) \\ +\verb?cc? & cicero & (1 cc = 12 dd) \\ +\verb?sp? & scaled point & (65536 sp = 1 pt) +\end{tabular} +\end{quote} +Thus to produce a horizontal blank space of 20 mm in the middle +of a paragraph one would type \verb?\hspace{20 mm}? (or +\verb?\hspace*{20 mm}?. + + The difference between \verb?\hspace? and \verb?\hspace*? +is that if \TeX\ decides to break between lines at the point +where an \verb?\hspace? is specified, then the \verb?\hspace? +is ignored. Using \verb?\hspace*? forces \TeX\ to produce a +horizontal space, whether of not \TeX\ breaks between lines. + +To produce (vertical) blank space between paragraphs, use +\verb?\vspace? and \verb?\vspace*?, followed by the length +of the blank space enclosed within curly brackets. A +\verb?\vspace? will be ignored if it comes at a +break between pages, whereas blank space will always be +produced by \verb?\vspace*?, whether or not there is a +page break. Thus to obtain +\begin{quotation} +{\small This is the first paragraph of some text. It is +separated from the second paragraph by a vertical skip of +10 millimetres.} + +\vspace{10 mm} + +{\small This is the second paragraph.} +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +This is the first paragraph of some text. It is +separated from the second paragraph by a vertical skip of +10 millimetres. + +\vspace{10 mm} + +This is the second paragraph. +\end{verbatim} +\end{quote} + +\subsectiontitle{Blank Spaces: Fine Tuning} +We describe certain features of \TeX\ relating to blank spaces +and paragraph indentation which will improve the appearance +of the final document. Experienced users of \TeX\ will improve +the appearance of their documents if they bear these remarks in mind. + + First note that, as a general rule, you should never put +a blank space after a left parenthesis or before a right +parenthesis. If you were to put a blank space in these +places, then you run the risk that \TeX\ might start a +new line immediately after the left parenthesis or before +the right parenthesis, leaving the parenthesis marooned at +the beginning or end of a line. + + \TeX\ has its own rules for deciding the lengths of blank +spaces. For instance, \TeX\ will put an extra amount of space +after a full stop if it considers that the full stop marks the +end of a sentence. + +\begin{quotation} +\footnotesize +The rule adopted by \TeX\ is to regard a period (full stop) as +the end of a sentence if it is preceded by a lowercase letter. +If the period is preceded by an uppercase letter then +\TeX\ assumes that it is not a full stop but follows the +initials of somebody's name. +\end{quotation} + + This works very well in most cases. However +\TeX\ occasionally gets things wrong. This happens with +a number of common abbreviations (as in `Mr.\ Smith' or +in `etc.'), and, in particular, in the names of +journals given in abbreviated form (e.g., +`Proc.\ Amer.\ Math.\ Soc.'). The way to overcome this +problem is to put a backslash before the blank space in +question. Thus we should type +\begin{quote} +\begin{verbatim} +Mr.\ Smith +etc.\ and +Proc.\ Amer.\ Math.\ Soc. +\end{verbatim} +\end{quote} + + \TeX\ determines itself how to break up a paragraph into +lines, and will occasionally hyphenate long words where this +is desirable. However it is sometimes necessary to tell +\TeX\ not to break at a particular blank space. The special +character used for this purpose is \verb?~?. It represents +a blank space at which \TeX\ is not allowed to break between +lines. It is often desirable to use \verb?~? in names where +the forenames are represented by initials. Thus to obtain +`W.~R.~Hamilton' it is best to type \verb?W.~R.~Hamilton?. +It is also desirable in phrases like `Example~7' and `the +length~$l$ of the rod', obtained by typing \verb?Example~7? +and \verb?the length~$l$ of the rod?. This feature of +\TeX\ may be safely ignored by beginners, though more +experienced \TeX nical typists should gradually accustom +themselves to using it occasionally where appropriate. + + \TeX\ will automatically indent paragraphs (with the +exception of the first paragraph of a new section). One +can prevent \TeX\ from indenting a paragraph though by +beginning the paragraph with the control sequence +\verb?\noindent?. Thus one obtains +\begin{quotation} +\small + +\noindent +This is the beginning of a paragraph which is not +indented in the usual way. This has been achieved +by placing an appropriate control sequence at the +beginning of the paragraph. + +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} + +\noindent +This is the beginning of a paragraph which is not +indented in the usual way. This has been achieved +by placing an appropriate control sequence at the +beginning of the paragraph. + +\end{verbatim} +\end{quote} + +Conversely, the control sequence \verb?\indent? forces +\TeX\ to indent the paragraph. + +\subsectiontitle{The Preamble of the \LaTeX\ Input file} + We describe the options available in \LaTeX\ for specifying +the overall style of a document. + +Every \LaTeX\ document should begin with a \verb?\documentstyle? +command followed by the \verb?\begin{document}? command, and +must end with the \verb?\end{document}? command. A typical such +document is the following: +\begin{quote} +%% \begin{verbatim} +%% \documentstyle[tcda,12pt]{article} +\begin{verbatim} +\documentstyle[a4,12pt]{article} +\begin{document} + +This is the first paragraph of a typical document. It is +produced in a `12~point' size. A {\it point} is a unit of +length used by printers. One point is approximately +$1/72$~inch. In a `12~point' font the height of the +parentheses is 12~points (i.e. about $1/6$~inch) and the +letter~`m' is about 12 points long. + +This is the second paragraph of the document. There are +also `10 point' and `11 point' styles available in \LaTeX. +The required size is specified in the `documentstyle' +command. If no such size is specified then the 10~point +size is assumed. + +\end{document} +\end{verbatim} +\end{quote} + + The syntax of the \verb?\documentstyle? command is as +follows. The command begins with \verb?\documentstyle? +and ends with the names of one of the available styles, +enclosed in curly brackets. The available styles are +`{\tt article}', `{\tt report}', `{\tt book}' and +`{\tt letter}'. Between the ``\verb?\documentstyle?'' +and the name of the document style, one may place a +list of {\it options}. These options are separated by +commas and the list of options is enclosed in square +brackets (as in the above example). The options +available (which are usually the names of certain +`style files') include the following: +\begin{description} +\item[11pt] Specifies a size of type known as + {\it eleven-point}, which is ten percent larger than + the ten-point type normally used. +\item[12pt] Specifies a twelve-point type size, which is + twenty percent larger than ten-point. +%%\item[twoside] Formats the output for printing on both +%% sides of the page. +\item[twocolumn] Produces two-column output. +%% \item[tcda] A (locally produced) `style file' which +\item[a4] A `style file' which + ensures that the page is appropriately positioned + on A4 size paper. It is recommended that most \LaTeX\ + documents produced on the LaserWriter in the School of + Mathematics use this option. +%% \item[tcdh] A (locally produced) `style file' which +%% ensures that the page is appropriately positioned on +%% the headed notepaper of the T.C.D. School of Mathematics. +\end{description} + +\begin{quotation} +\small + Typing simply \verb?\documentstyle{article}? will produce a +document in ten-point type size. However the printed output +will not be nicely positioned on A4 paper, since the default +size is intended for a different (American) paper size. +\end{quotation} + + Pages will be automatically numbered at the bottom of the +page, unless you specify otherwise. This can be done using the +\verb?\pagestyle? command. This command should come after the +\verb?\documentstyle? command and before the +\verb?\begin{document}? command. This command has the +syntax \verb?\pagestyle{?{\it option}\verb?}?, where +the {\it option} is one of the following: +\begin{description} +\item[plain] The page number is at the foot of the page. + This is the default page style for the {\tt article} + and {\tt report} document styles. +\item[empty] No page number is printed. +\item[headings] The page number (and any other information + determined by the document style) is put at the top of + the page. +\item[myheadings] Similar to the {\bf headings} pagestyle, + except that the material to go at the top of the + page is determined by \verb?\markboth? and + \verb?\markright? commands (see the \LaTeX\ manual). +\end{description} +For example, the input file +\begin{quote} +%% \begin{verbatim} +%% \documentstyle[tcda]{article} +\begin{verbatim} +\documentstyle[a4]{article} +\pagestyle{empty} +\begin{document} + +The main body of the document is placed here. + +\end{document} +\end{verbatim} +\end{quote} +produces a document without page numbers, using the +standard ten-point type size. + +\newcommand{\inftyint}{\int_{-\infty}^{+\infty}} +\newcommand{\intwrtx}[1]{\int_{-\infty}^{+\infty} #1 \,dx} +\newcommand{\intwrt}[2]{\int_{-\infty}^{+\infty} #2 \,d #1} + +\subsectiontitle{Defining your own Control Sequences in \LaTeX} +Suppose that we are producing a paper that makes frequent +use of some mathematical expression. For example, +suppose that integrals like +\[ \int_{-\infty}^{+\infty} f(x)\,dx. \] +occur frequently throughout the text. This formula is +obtained by typing +\begin{quote} +\begin{verbatim} +\[ \int_{-\infty}^{+\infty} f(x)\,dx. \] +\end{verbatim} +\end{quote} +It would be nice if we could type \verb?\inftyint? (say) +to obtain the integral sign at the beginning. This can +be done using \verb?\newcommand?. What we do is to place +a line with the command +\begin{quote} +\begin{verbatim} +\newcommand{\inftyint}{\int_{-\infty}^{+\infty}} +\end{verbatim} +\end{quote} +near the beginning of the input file (the best place being +after the \verb?\documentstyle? command but before the +\verb?\begin{document}? command). Then we only have to +type +\begin{quote} +\begin{verbatim} +\[ \inftyint f(x)\,dx. \] +\end{verbatim} +\end{quote} +to obtain the above formula. + +We can modify this procedure slightly. Suppose that we +we defined a new control sequence \verb?\intwrtx? by +putting the line +\begin{quote} +\begin{verbatim} +\newcommand{\intwrtx}[1]{\int_{-\infty}^{+\infty} #1 \,dx} +\end{verbatim} +\end{quote} +at the beginning of the input file. If we then type the line +\begin{quote} +\begin{verbatim} +\[ \intwrtx{f(x)}. \] +\end{verbatim} +\end{quote} +then we obtain +\[ \intwrtx{f(x)}. \] +What has happened is that the expression in curly brackets +after \verb?\intwrtx? has been substituted in the expression +defining \verb?\intwrtx?, replacing the \verb?#1? in that +expression. + + The number 1 inside square brackets in the +\verb?\newcommand? line defining \verb?\intwrtx? indicates +to \LaTeX\ that it is to expect one expression (in curly +brackets) after \verb?\intwrtx? to substitute for \verb?#1? +in the definition of \verb?\intwrtx?. If we defined a +control sequence \verb?\intwrt? by +\begin{quote} +\begin{verbatim} +\newcommand{\intwrt}[2]{\int_{-\infty}^{+\infty} #2 \,d #1} +\end{verbatim} +\end{quote} +then it would expect two expressions to substitute in for +\verb?#1? and \verb?#2? in the definition of \verb?\intwrt?. +Thus if we then type +\begin{quote} +\begin{verbatim} +\[ \intwrt{y}{f(y)}. \] +\end{verbatim} +\end{quote} +we obtain +\[ \intwrt{y}{f(y)}. \] + diff --git a/info/tcdmanual/la_intro.tex b/info/tcdmanual/la_intro.tex new file mode 100644 index 0000000000..f14d52ecb0 --- /dev/null +++ b/info/tcdmanual/la_intro.tex @@ -0,0 +1,202 @@ +\sectiontitle{Introduction to \LaTeX} +\label{la-intro} +\subsectiontitle{What is \LaTeX?} +\TeX\ is a computer program for typesetting documents. It +takes a computer file, prepared according to the rules of +\TeX, and converts it to a form that may be printed on a +high-quality printer, such as a laser writer, to produce +a printed document of a quality comparable with good +quality books and journals. Simple documents, which do +not contain mathematical formulae or tables may be produced +very easily: effectively all one has to do is to type the +text straight in (though observing certain rules relating to +quotation marks and punctuation dashes). Typesetting +mathematics is somewhat more complicated, but even here +\TeX\ is comparatively straightforward to use when one +considers the complexity of some of the formulae that it +has to produce and the large number of mathematical symbols +which it has to produce. + + There are several `dialects' of \TeX, all based on the +version of \TeX\ created by D.~E.~Knuth which is known as +Plain \TeX. \LaTeX\ (created by L.~B.~Lamport) is one of +these `dialects'. It is particularly suited to the +production of long articles and books, since it has +facilities for the automatic numbering of chapters, sections, +theorems, equations etc., and also has facilities for +cross-referencing. It is probably the most suitable +version of \TeX\ for beginners to use, and the manual +``\LaTeX---User's Guide and Reference Manual'' is certainly +easier to read than the corresponding manual +(i.e., ``The \TeX book'') for Plain \TeX. + +\subsectiontitle{A Typical \LaTeX\ Input File} +In order to produce a document using \LaTeX, we must first +create a suitable {\it input file\/} on the computer. We +apply the \TeX\ program to the input file and then use the +printer to print out the so-called `DVI' file produced by +the \TeX\ program (after first using another program to +translate the `DVI' file into a form that the printer +can understand). Here is an example of a typical +\LaTeX\ input file: +\begin{quote} +\begin{verbatim} +\documentstyle[tcda,12pt]{article} +\begin{document} + +The foundations of the rigorous study of {\it analysis} +were laid in the nineteenth century, notably by the +mathematicians Cauchy and Weierstrass. Central to the +study of this subject are the formal definitions of +{\it limits} and {\it continuity}. + +Let $D$ be a subset of $\bf R$ and let +$f \colon D \to {\bf R}$ be a real-valued function on +$D$. The function $f$ is said to be {\it continuous} on +$D$ if, for all $\epsilon > 0$ and for all $x \in D$, +there exists some $\delta > 0$ (which may depend on $x$) +such that if $y \in D$ satisfies +\[ |y - x| < \delta \] +then +\[ |f(y) - f(x)| < \epsilon. \] + +One may readily verify that if $f$ and $g$ are continuous +functions on $D$ then the functions $f+g$, $f-g$ and +$f.g$ are continuous. If in addition $g$ is everywhere +non-zero then $f/g$ is continuous. + +\end{document} + +\end{verbatim} +\end{quote} +When we apply \TeX\ to these paragraphs we produce the text +\begin{quotation} +\small +The foundations of the rigorous study of {\it analysis} +were laid in the nineteenth century, notably by the +mathematicians Cauchy and Weierstrass. Central to the +study of this subject are the formal definitions of +{\it limits} and {\it continuity}. + +Let $D$ be a subset of $\bf R$ and let +$f \colon D \to {\bf R}$ be a real-valued function on +$D$. The function $f$ is said to be {\it continuous} on +$D$ if, for all $\epsilon > 0$ and for all $x \in D$, +there exists some $\delta > 0$ (which may depend on $x$) +such that if $y \in D$ satisfies +\[ |y - x| < \delta \] +then +\[ |f(y) - f(x)| < \epsilon. \] + +One may readily verify that if $f$ and $g$ are continuous +functions on $D$ then the functions $f+g$, $f-g$ and +$f.g$ are continuous. If in addition $g$ is everywhere +non-zero then $f/g$ is continuous. + +\end{quotation} + + This example illustrates various features of \LaTeX. Note +that the lines +\begin{quote} +\begin{verbatim} +\documentstyle[tcda,12pt]{article} +\begin{document} +\end{verbatim} +\end{quote} +are placed at the beginning of the input file. These are followed +by the main body of the text, followed by the concluding line +\begin{quote} +\begin{verbatim} +\end{document} +\end{verbatim} +\end{quote} +Note also that, although most characters occurring in this file +have their usual meaning, yet there are special characters such +as \verb?\?, \verb?$?, \verb?{? and \verb?}? which have special +meanings within \TeX. Note in particular that there are +sequences of characters which begin with a `backslash' +\verb?\? which are used to produce mathematical symbols and +Greek letters and to accomplish tasks such as changing fonts. +These sequences of characters are known as +{\it control sequences}. + +\subsectiontitle{Characters and Control Sequences} +We now describe in more detail some of the features of +\TeX\ illustrated in the above example. + + Most characters on the keyboard, such as letters and +numbers, have their usual meaning. However the characters +\begin{quote} +\begin{verbatim} +\ { } $ ^ _ % ~ # & +\end{verbatim} +\end{quote} +are used for special purposes within \TeX. Thus typing one of +these characters will not produce the corresponding character +in the final document. Of course these characters are very +rarely used in ordinary text, and there are methods of +producing them when they are required in the final document. + + In order to typeset a mathematical document it is +necessary to produce a considerable number of special +mathematical symbols. One also needs to be able to +change fonts. Also mathematical documents often contain +arrays of numbers or symbols (matrices) and other complicated +expressions. These are produced in \TeX\ using {\it control +sequences}. Most control sequences consist of a backslash +\verb?\? followed by a string of (upper or lower case) letters. +For example, \verb?\alpha?, \verb?\it?, \verb?\sum? and +\verb?\TeX? are control sequences. + + In the example above we used the control sequences +\verb?\it? and \verb?\bf? to change the font to {\it italic} +and {\bf boldface} respectively. Also we used the control +sequences \verb?\to?, \verb?\in?, \verb?\delta? and +\verb?\epsilon? to produce the mathematical symbols $\to$ +and $\in$ and the Greek letters $\delta$ and $\epsilon$. + +\begin{quotation} +\footnotesize +There is another variety of control sequence which consists +of a backslash followed by a {\it single} character that +is not a letter. Examples of control sequences of this sort +are \verb?\{?, \verb?\"? and \verb?\$?. +\end{quotation} + + The special characters \verb?{? and \verb?}? are used for +{\it grouping} purposes. Everything enclosed within +matching pair of such brackets is treated as a single unit. +We have applied these brackets in the example above whenever +we changed fonts. We shall see other instances where one needs +to use \verb?{? and \verb?}? in \TeX\ to group words and symbols +together (e.g., when we need to produce superscripts and +subscripts which contain more than one symbol). + + The special character \verb?$? is used when one is +changing from ordinary text to a mathematical expression +and when one is changing back to ordinary text. Thus we +used +\begin{quote} +\begin{verbatim} +for all $\epsilon > 0$ and for all $x \in D$, +\end{verbatim} +\end{quote} +to produce the phrase +\begin{quote} +\small +for all $\epsilon > 0$ and for all $x \in D$, +\end{quote} +in the example given above. Note also that we used +\verb?\[? and \verb?\]? in the example above to mark the beginning +and end respectively of a mathematical formula that is displayed +on a separate line. + +The remaining special characters +\begin{quote} +\begin{verbatim} +^ _ % ~ # & +\end{verbatim} +\end{quote} +have special purposes within \TeX\ that we shall discuss +later. + diff --git a/info/tcdmanual/la_math.tex b/info/tcdmanual/la_math.tex new file mode 100644 index 0000000000..464a374e1d --- /dev/null +++ b/info/tcdmanual/la_math.tex @@ -0,0 +1,897 @@ +\sectiontitle{Mathematical Formulae using \LaTeX} +\label{la-math} +\subsectiontitle{Mathematics Mode} +In order to obtain a mathematical formula using \TeX, one must +enter {\it mathematics mode} before the formula and leave it +afterwards. Mathematical formulae can occur either embedded in text +or else displayed on a separate line. When a formula occurs within +the text of a paragraph one should place a \verb?$? sign before and +after the formula, in order to enter and leave mathematics mode. +Thus to obtain a sentence like +\begin{quotation} +\small +Let $f$ be the function defined by $f(x) = 3x + 7$, and +let $a$ be a positive real number. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $f$ be the function defined by $f(x) = 3x + 7$, and +let $a$ be a positive real number. +\end{verbatim} +\end{quote} +In particular, note that even mathematical expressions consisting +of a single character, like $f$ and $a$ in the example above, are +placed within \verb?$? signs. This is to ensure that they are set +in italic type, as is customary in mathematical typesetting. + +\begin{quotation} +\footnotesize +\LaTeX\ also allows you to use \verb?\(? and \verb?\)? to mark +the beginning and the end respectively of a mathematical formula +embedded in text. Thus +\begin{quote} +Let \( f \) be the function defined by \( f(x) = 3x + 7 \). +\end{quote} +may be produced by typing +\begin{quote} +\begin{verbatim} +Let \( f \) be the function defined by \( f(x) = 3x + 7 \). +\end{verbatim} +\end{quote} +However this use of \verb?\(?$\ldots$\verb?\)? is only permitted +in \LaTeX, whereas \verb?$?$\ldots$\verb?$? is more standard, and is +used in other dialects of \TeX, such as Plain \TeX\ and \AmSTeX. +\end{quotation} + + In order to obtain an mathematical formula or equation which +is displayed on a line by itself, one places \verb?\[? before and +\verb?\]? after the formula. Thus to obtain +\begin{quotation} +\small +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +\[ f(x)g(x) = 3x^2 + 19x +28. \] +The converse does not hold for polynomials over the field of +real numbers. However if we consider polynomials over the +complex field then every polynomial factorizes as a product +of first degree polynomials, by the Fundamental Theorem of Algebra. +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +\[ f(x)g(x) = 3x^2 + 19x +28. \] +The converse does not hold for polynomials over the field of +real numbers. However if we consider polynomials over the +complex field then every polynomial factorizes as a product +of first degree polynomials, by the Fundamental Theorem of Algebra. +\end{verbatim} +\end{quote} + +\begin{quotation} +\footnotesize +It is also possible to use \verb?$$? in place of both \verb?\[ ? +and \verb?\]? to mark the beginning and end of a displayed +mathematical equation. Thus +$$f(x)g(x) = 3x^2 + 19x +28.$$ +can be produced by typing +\begin{quote} +\begin{verbatim} +$$f(x)g(x) = 3x^2 + 19x +28.$$ +\end{verbatim} +\end{quote} +Indeed this the method of producing displayed equations in +dialects of \TeX\ other than \LaTeX, such as Plain \TeX\ and +\AmSTeX. +\end{quotation} + + \LaTeX\ provides facilities for the automatic numbering of +displayed equations. If you want an numbered equation then you +use \verb?\begin{equation}? and \verb?\end{equation}? instead +of using \verb?\[ ? and \verb?\]? . Thus +\begin{quote} +\begin{verbatim} +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +\begin{equation} +f(x)g(x) = 3x^2 + 19x +28. +\end{equation} +\end{verbatim} +\end{quote} +produces +\begin{quote} +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +\begin{equation} +f(x)g(x) = 3x^2 + 19x +28. +\end{equation} +\end{quote} + +\subsectiontitle{Characters in Mathematics Mode} +All the characters on the keyboard have their standard meaning +in mathematics mode, with the exception of the characters +\begin{verbatim} + # $ % & ~ _ ^ \ { } ' +\end{verbatim} +Letters are set in italic type. In mathematics mode the character +\verb?'? has a special meaning: typing \verb?$f' + g''$? +produces $f' + g''$. When in mathematics mode the spaces you type +between letters and other symbols do not affect the spacing of +the final result, since \TeX\ determines the spacing of characters +in formulae by its own internal rules. Thus \verb?$x ( y + z )$? +and \verb?$x(y+z)$? both produce $x ( y + z )$. You can +also type carriage returns where necessary in your input file +(e.g., if you are typing in a complicated formula with many +Greek characters and funny symbols) and this will have no effect on +the final result if you are in mathematics mode. + +\begin{quotation} +\footnotesize +To obtain the characters +\[ \# \quad \$ \quad \% \quad \& \quad \_ \quad \{ \quad \} \] +in mathematics mode, one should type +\begin{verbatim} + \# \$ \% \& \_ \{ \} . +\end{verbatim} +To obtain $\backslash$ in mathematics mode, one may type +\verb?\backslash?. +\end{quotation} + +\subsectiontitle{Subscripts and Superscripts} +Subscripts and superscripts are obtained using the special +characters \verb?_? and \verb?^? respectively. Thus the +expression $t^3 + x_1^2 - x_2$ is obtained by typing +\verb?$t^3 + x_1^2 - x_2$?. When the subscript or superscript +consists of more than one character then the characters involved +should be enclosed in curly brackets. Thus to obtain the +expression $u_{i,j}^{12}$ one would type +{\verb?$u_{i,j}^{12}$?}. + + It is immaterial whether one specifies the subscript before the +superscript or vica versa. Thus \verb?$u_1^2$? and \verb?$u^2_1$? +both produce $u_1^2$. However \TeX\ does not like it if you type +\verb?$s_n_j$? since this could be interpreted either as +$s_{n j}$ or as $s_{n_j}$. The first of these alternatives is +obtained by typing \verb?$s_{n j}$?, the second by typing +\verb?$s_{n_j}$?. A similar remark applies to superscripts. +Incidentally, the second alternative illustrates the fact that +one can obtain subscripts (or superscripts) on subscripts +(or superscripts). However one should not go beyond this to +try to obtain triple subscripts. + +\begin{quotation} +\footnotesize +It is sometimes necessary to obtain expressions such as +$R_i{}^j{}_{kl}$ in which the exact positioning of the subscripts +and superscripts is important (e.g., in papers on general relativity +and tensor analysis). The way this is done is to include the +`empty group' \verb?{}? at the appropriate places to enable the +superscripts and subscripts to be aligned correctly. Thus to +obtain $R_i{}^j{}_{kl}$ one would type +\verb?$R_i{}^j{}_{kl}$?. +\end{quotation} + +\subsectiontitle{Greek Letters} +Greek letters are produced in mathematics mode by preceding the +name of the letter by a backslash \verb?\?. Thus the Greek letters +alpha~($\alpha$), pi~($\pi$) and chi~($\chi$) are obtained by +typing \verb?\alpha?,\verb?\pi? and \verb?\chi? respectively. +Thus the sentence +\begin{quotation} +\small +The area $A$ of a circle of radius $r$ is given by the +formula $A = \pi r^2$. +\end{quotation} +is obtained by typing +\begin{quote} +\begin{verbatim} +The area~$A$ of a circle of radius~$r$ is given by the +formula $A = \pi r^2$. +\end{verbatim} +\end{quote} +Upper case Greek letters are obtained by making the first character +of the name upper case. Thus $\Gamma$,$\Phi$ and $\Lambda$ are +obtained by typing \verb?\Gamma?,\verb?\Phi? and \verb?\Lambda?. +\begin{quotation} +\footnotesize +There is no special command for omicron: just use \verb?o?. +\end{quotation} + + Some Greek letters occur in variant forms. The variant forms +are obtained by preceding the name of the Greek letter by `var'. +The following table lists the usual form of these letters and +the variant forms:- +{\def\displayandname#1{\rlap{$\displaystyle\csname #1\endcsname$}% + \qquad {\tt \char92 #1}} +\[ \vcenter{\halign{\displayandname{#}\hfil&&\qquad + \displayandname{#}\hfil\cr +epsilon&varepsilon\cr +theta&vartheta\cr +pi&varpi\cr +rho&varrho\cr +sigma&varsigma\cr +phi&varphi\cr}}$$} + +\subsectiontitle{Mathematical Symbols} +There are numerous mathematical symbols that can be used in +mathematics mode. These are obtained by typing an appropriate +control sequence. These are listed in Appendix~\ref{la-mthcs}. +For example \verb?\neq?, \verb?\leq? and \verb?\geq? produce +$\neq$, $\leq$ and $\geq$ respectively, \verb?\infty? produces +$\infty$, \verb?\times? and \verb?\div? produce $\times$ and +$\div$, both \verb?\to? and \verb?\rightarrow? produce $\to$, +\verb?\in? produces $\in$, \verb?\cup?, \verb?\cap?, +\verb?\setminus? and \verb?\subset? produce $\cup$,$\cap$, +$\setminus$ and $\subset$ respectively. The list seems endless. + +\subsectiontitle{Changing Fonts in Mathematics Mode} +\ifx\selectfont\undefined +One can change fonts in mathematics mode in exactly the same +way as when typesetting ordinary text. For instance \verb?\rm? +changes to the $\rm roman$ font, \verb?\bf? changes to the +$\bf boldface$ font and \verb?\mit? changes to the +$math$ $italic$ font. The $math$ $italic$ font is automatically +used in mathematics mode unless you explicitly change the font. +In addition there is a `calligraphic' font which is obtained using +the control sequence \verb?\cal?. {\it This font can only be used +for uppercase letters.} These calligraphic letters have the form +\else +The $math$ $italic$ font is automatically +used in mathematics mode unless you explicitly change the font. +The rules for changing the font in mathematics mode are rather different +to those applying when typesetting ordinary text. +Firstly, any change only applies to the single character +or symbol that follows. +Secondly, to change a character to the +$\mathrm{r}\mathrm{o}\mathrm{m}\mathrm{a}\mathrm{n}$ font, +the control sequence \verb?\mathrm? must be used +(rather than \verb?\rm?). +Thirdly to change a character to the +$\boldsymbol{b}\boldsymbol{o}\boldsymbol{l}\boldsymbol{d}% +\boldsymbol{f}\boldsymbol{a}\boldsymbol{c}\boldsymbol{e}$ +font the control sequence \verb?\boldsymbol? must be used, +{\em and in addition the \verb?amsbsy? style must be included +in the \verb?\documentstyle? heading}. + +There is also a `calligraphic' font available in mathematics mode. +This is obtained using the control sequence \verb?\cal?. +{\it This font can only be used for uppercase letters.} +These calligraphic letters have the form +\fi +\[ \cal{A}\cal{B}\cal{C}\cal{D}\cal{E}\cal{F}\cal{G}\cal{H}\cal{I} +\cal{J}\cal{K}\cal{L}\cal{M}\cal{N}\cal{O}\cal{P}\cal{Q}\cal{R} +\cal{S}\cal{T}\cal{U}\cal{V}\cal{W}\cal{X}\cal{Y}\cal{Z}. \] + + The following example shows how fonts are changed in an +example involving mathematics. To obtain +\ifx\selectfont\undefined +\begin{quotation} +\small +Let $\bf u$,$\bf v$ and $\bf w$ be three vectors in +${\bf R}^3$. The volume~$V$ of the parallelepiped with +corners at the points $\bf 0$,$\bf u$,$\bf v$, +$\bf w$,${\bf u}+{\bf v}$, +${\bf u}+{\bf w}$,${\bf v}+{\bf w}$ +and ${\bf u}+{\bf v}+{\bf w}$ +is given by the formula +\[ V = ({\bf u} \times {\bf v}) \cdot {\bf w}. \] +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +Let $\bf u$,$\bf v$ and $\bf w$ be three vectors +in ${\bf R}^3$. The volume~$V$ of the parallelepiped with corners +at the points $\bf 0$,$\bf u$,$\bf v$, +$\bf w$,${\bf u}+{\bf v}$, +${\bf u}+{\bf w}$,${\bf v}+{\bf w}$ +and ${\bf u}+{\bf v}+{\bf w}$ +is given by the formula +\[ V = ({\bf u} \times {\bf v}) . {\bf w}. \] +\end{verbatim} +\end{quote} +\else +\begin{quotation} +\small +Let $\boldsymbol u$,$\boldsymbol v$ and $\boldsymbol w$ be three vectors in +${\boldsymbol R}^3$. The volume~$V$ of the parallelepiped with +corners at the points $\boldsymbol{0}$,$\boldsymbol{u}$,$\boldsymbol{v}$, +$\boldsymbol{w}$,$\boldsymbol{u}+\boldsymbol{v}$, +$\boldsymbol{u}+\boldsymbol{w}$,$\boldsymbol{v}+\boldsymbol{w}$ +and $\boldsymbol{u}+\boldsymbol{v}+\boldsymbol{w}$ +is given by the formula +\[ V = (\boldsymbol{u} \times \boldsymbol{v}) \cdot \boldsymbol{w}. \] +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +Let $\boldsymbol u$,$\boldsymbol v$ and $\boldsymbol w$ be three vectors +in ${\boldsymbol R}^3$. The volume~$V$ of the parallelepiped with corners +at the points $\boldsymbol{0}$,$\boldsymbol{u}$,$\boldsymbol{v}$, +$\boldsymbol{w}$,$\boldsymbol{u}+\boldsymbol{v}$, +$\boldsymbol{u}+\boldsymbol{w}$,$\boldsymbol{v}+\boldsymbol{w}$ +and $\boldsymbol{u}+\boldsymbol{v}+\boldsymbol{w}$ +is given by the formula +\[ V = (\boldsymbol{u} \times \boldsymbol{v}) . \boldsymbol{w}. \] +\end{verbatim} +\end{quote} +\fi + +\subsectiontitle{Standard Functions and Embedded Text} +The names of certain standard functions and abbreviations are +obtained by typing a backlash \verb?\? before the name. The +complete list in \TeX\ is as follows:- + +\[ \vcenter{\halign{$\backslash${\tt #}&&\quad $\backslash${\tt #}\cr +arccos&cos&csc&exp&ker&limsup&min&sinh\cr +arcsin&cosh°&gcd&lg&ln&Pr&sup\cr +arctan&cot&det&hom&lim&log&sec&tan\cr +arg&coth&dim&inf&liminf&max&sin&tanh\cr}} \] + + Names of functions and other abbreviations not in this list can be +obtained by converting to the roman font. Thus one obtains +${\rm Aut}(V)$ by typing \verb?${\rm Aut}(V)$?. +\begin{quotation} +\footnotesize +Note that if one were to type simply \verb?$Aut(V)$? one +would obtain $Aut(V)$, because \TeX\ has treated +\verb?Aut? as the product of three quantities $A$,$u$ and $t$ and +typeset the formula accordingly. +\end{quotation} + +The recommended way to obtain ordinary text in displayed mathematical +formulae is to use \verb?\mbox?. Thus one obtains +\[ M^\bot = \{ f \in V' : f(m) = 0 \mbox{ for all } m \in M \}. \] +by typing +\begin{quote} +\begin{verbatim} +\[ M^\bot = \{ f \in V' : f(m) = 0 \mbox{ for all } m \in M \}. \] +\end{verbatim} +\end{quote} +Note the blank spaces before and after the words `for all' in the above +example. Had we typed +\begin{quote} +\begin{verbatim} +\[ M^\bot = \{ f \in V' : f(m) = 0 \mbox{for all} m \in M \}. \] +\end{verbatim} +\end{quote} +we would have obtained +\[ M^\bot = \{ f \in V' : f(m) = 0 \mbox{for all} m \in M \}. \] + +\begin{quotation} +\footnotesize +One can use \verb?\hbox? as an alternative to \verb?\mbox? in +mathematical formulae. Indeed \verb?\mbox? is specific to +\LaTeX, whereas \verb?\hbox? is used in Plain \TeX\ and in +other dialects of \TeX. Also \verb?\hbox? and \verb?\mbox? +only differ in their behaviour when used to begin a paragraph +of ordinary text, and in particular behave in an identical +manner when used in a mathematical formula. +\end{quotation} + +\subsectiontitle{Fractions,Roots and Ellipsis} +Fractions of the form +\[ \frac{\mbox{\it numerator}}{\mbox{\it denominator}} \] +are obtained in \LaTeX\ using the construction +\begin{quote} +\verb?\frac{?{\it numerator\verb?}{?denominator}\verb?}?. +\end{quote} +For example, to obtain +\begin{quotation} +\small +The function $f$ is given by +\[ f(x) = 2x + \frac{x - 7}{x^2 + 4} \] +for all real numbers $x$. +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +The function $f$ is given by +\[ f(x) = 2x + \frac{x - 7}{x^2 + 4} \] +for all real numbers $x$. +\end{verbatim} +\end{quote} + + To obtain square roots one uses the control sequence +\verb?\sqrt?. For example, $\sqrt{x^2 + y^2}$ is produced +by typing \verb?$\sqrt{x^2 + y^2}$?. In \LaTeX, an $n$th +root is produced using +\begin{quote} +\verb?\sqrt[n]{?{\it expression}\verb?}?. +\end{quote} +Thus $\sqrt[3]{x + 3y}$ is produced in \LaTeX\ by typing +\verb?$\sqrt[3]{x + 3y}$? + +Ellipsis (three dots) is produced in mathematics mode using +the control sequences \verb?\cdots? and \verb?\ldots?. A +low ellipsis, such as $(x_1,x_2,\ldots ,x_n)$, is produced by +typing +\begin{quote} +\begin{verbatim} +$(x_1,x_2,\ldots ,x_n)$. +\end{verbatim} +\end{quote} +A centred ellipsis, such as $x_1 + x_2 + \cdots + x_n$ is produced +by typing +\begin{quote} +\begin{verbatim} +$x_1 + x_2 + \cdots + x_n$. +\end{verbatim} +\end{quote} + +\subsectiontitle{Accents in Mathematics Mode} +The control sequences \verb?\underline?, \verb?\overline?, + \verb?\hat?, \verb?\check?, \verb?\tilde?, \verb?\acute?, +\verb?\grave?, \verb?\dot?, \verb?\ddot?, \verb?\breve?, +\verb?\bar? and \verb?\vec? produce underlining, overlining, +and various accents, {\it but only in mathematics mode}. +For example, $\tilde c$ is produced by \verb?$\tilde{c}$?. +The effect of these accents on the letter $a$ is shown in +the table below: +\begin{quote} +\begin{tabular}{ll} +\verb?$\underline{a}$? & $\underline{a}$\\ +\verb?$\overline{a}$? & $\overline{a}$\\ +\verb?$\hat{a}$? & $\hat{a}$\\ +\verb?$\check{a}$? & $\check{a}$\\ +\verb?$\tilde{a}$? & $\tilde{a}$\\ +\verb?$\acute{a}$? & $\acute{a}$\\ +\verb?$\grave{a}$? & $\grave{a}$\\ +\verb?$\dot{a}$? & $\dot{a}$\\ +\verb?$\ddot{a}$? & $\ddot{a}$\\ +\verb?$\breve{a}$? & $\breve{a}$\\ +\verb?$\bar{a}$? & $\bar{a}$\\ +\verb?$\vec{a}$? & $\vec{a}$ +\end{tabular} +\end{quote} +You should bear in mind that when a character is underlined in +a mathematical manuscript then it is normally typeset in +bold face without any underlining. Underlining is used very +rarely in print. + +\begin{quotation} +\footnotesize +The control sequences such as \verb?\'? and \verb?\"?, used +to produce accents in ordinary text, may not be used in +mathematics mode. +\end{quotation} + +\subsectiontitle{Brackets and Norms} +The frequently used left delimiters include $($, $[$ and $\{$, +which are obtained by typing \verb?(?, \verb?[? and \verb?\{? +respectively. The corresponding right delimiters are of +course $)$, $]$ and $\}$, obtained by typing \verb?)?, +\verb?]? and \verb?\}?. In addition $|$ and $\|$ are used as +both left and right delimiters, and are obtained by typing +\verb?|? and \verb?\|? respectively. For example, we obtain +\begin{quotation} +\small +Let $X$ be a Banach space and let $f \colon B \to {\bf R}$ +be a bounded linear functional on $X$. The {\it norm} of +$f$, denoted by $\|f\|$, is defined by +\[ \|f\| = \inf \{ K \in [0,+\infty) : + |f(x)| \leq K \|x\| \mbox{ for all } x \in X \}. \] +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +Let $X$ be a Banach space and let $f \colon B \to {\bf R}$ +be a bounded linear functional on $X$. The {\it norm} of +$f$, denoted by $\|f\|$, is defined by +\[ \|f\| = \inf \{ K \in [0,+\infty) : + |f(x)| \leq K \|x\| \mbox{ for all } x \in X \}. \] +\end{verbatim} +\end{quote} + + Larger delimiters are sometimes required which have the +appropriate height to match the size of the subformula which +they enclose. Consider, for instance, the problem of typesetting +the following formula: +\[ f(x,y,z) = 3y^2 z \left( 3 + \frac{7x+5}{1 + y^2} \right). \] +The way to type the large parentheses is to type \verb?\left(? +for the left parenthesis and \verb?\right)? for the right +parenthesis, and let \TeX\ do the rest of the work for you. +Thus the above formula was obtained by typing +\begin{quote} +\begin{verbatim} +\[ f(x,y,z) = 3y^2 z \left( 3 + \frac{7x+5}{1 + y^2} \right). \] +\end{verbatim} +\end{quote} +If you type a delimiter which is preceded by \verb?\left? then +\TeX\ will search for a corresponding delimiter preceded by +\verb?\right? and calculate the size of the delimiters required +to enclose the intervening subformula. One is allowed to balance +a \verb?\left(? with a \verb?\right]? (say) if one desires: there +is no reason why the enclosing delimiters have to have the same +shape. One may also nest pairs of delimiters within one another: +by typing +\begin{quote} +\begin{verbatim} +\[ \left| 4 x^3 + \left( x + \frac{42}{1+x^4} \right) \right|. \] +\end{verbatim} +\end{quote} +we obtain +\[ \left| 4 x^3 + \left( x + \frac{42}{1+x^4} \right) \right|. \] + +\begin{quotation} +\footnotesize +By typing \verb?\left.? and \verb?\right.? one obtains +{\it null delimiters} which are completely invisible. Consider, +for example, the problem of typesetting +\[ \left. \frac{du}{dx} \right|_{x=0}. \] +We wish to make the vertical bar big enough to match the +derivative preceding it. To do this, we suppose that the +derivative is enclosed by delimiters, where the left delimiter +is invisible and the right delimiter is the vertical line. +The invisible delimiter is produced using \verb?\left.? and thus +the whole formula is produced by typing +\begin{verbatim} +\[ \left. \frac{du}{dx} \right|_{x=0}. \] +\end{verbatim} +\end{quotation} + +\subsectiontitle{Multiline Formulae in \LaTeX} +Consider the problem of typesetting the formula +\begin{eqnarray*} +\cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\ + & = & 2 \cos^2 \theta - 1. +\end{eqnarray*} +It is necessary to ensure that the $=$ signs are aligned with one +another. In \LaTeX, such a formula is typeset using the +\verb?eqnarray*? environment. The above example was obtained by +typing the lines +\begin{quote} +\begin{verbatim} +\begin{eqnarray*} +\cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\ + & = & 2 \cos^2 \theta - 1. +\end{eqnarray*} +\end{verbatim} +\end{quote} +Note the use of the special character \verb?&? as an {it alignment +tab}. When the formula is typeset, the part of the second line of +the formula beginning with an occurrence of \verb?&? will be +placed immediately beneath that part of the first line of the +formula which begins with the corresponding occurrence of \verb?&?. +Also \verb?\\? is used to separate the lines of the formula. + +Although we have placed corresponding occurrences of \verb?&? +beneath one another in the above example, it is not necessary to +do this in the input file. It was done in the above example merely +to improve the appearance (and readability) of the input file. + + The more complicated example +\begin{quotation} +\small +If $h \leq \frac{1}{2} |\zeta - z|$ then +\[ |\zeta - z - h| \geq \frac{1}{2} |\zeta - z| \] +and hence +\begin{eqnarray*} +\left| \frac{1}{\zeta - z - h} - \frac{1}{\zeta - z} \right| +& = & \left| +\frac{(\zeta - z) - (\zeta - z - h)}{(\zeta - z - h)(\zeta - z)} +\right| \\ & = & +\left| \frac{h}{(\zeta - z - h)(\zeta - z)} \right| \\ + & \leq & \frac{2 |h|}{|\zeta - z|^2}. +\end{eqnarray*} +\end{quotation} +was obtained by typing +\begin{quote} +\begin{verbatim} +If $h \leq \frac{1}{2} |\zeta - z|$ then +\[ |\zeta - z - h| \geq \frac{1}{2} |\zeta - z| \] +and hence +\begin{eqnarray*} +\left| \frac{1}{\zeta - z - h} - \frac{1}{\zeta - z} \right| +& = & \left| +\frac{(\zeta - z) - (\zeta - z - h)}{(\zeta - z - h)(\zeta - z)} +\right| \\ & = & +\left| \frac{h}{(\zeta - z - h)(\zeta - z)} \right| \\ + & \leq & \frac{2 |h|}{|\zeta - z|^2}. +\end{eqnarray*} +\end{verbatim} +\end{quote} + + The asterisk in \verb?eqnarray*? is put there to suppress the +automatic equation numbering produced by \LaTeX. If you wish for +an automatically numbered multiline formula, you should use +\verb?\begin{eqnarray}? and \verb?\end{eqnarray}?. + +\subsectiontitle{Matrices and other arrays in \LaTeX} +Matrices and other arrays are produced in \LaTeX\ using the +{\bf array} environment. For example, suppose that we wish to +typeset the following passage: +\begin{quotation} +\small +The {\em characteristic polynomial} $\chi(\lambda)$ of the +$3 \times 3$~matrix +\[ \left( \begin{array}{ccc} +a & b & c \\ +d & e & f \\ +g & h & i \end{array} \right) \] +is given by the formula +\[ \chi(\lambda) = \left| \begin{array}{ccc} +\lambda - a & -b & -c \\ +-d & \lambda - e & -f \\ +-g & -h & \lambda - i \end{array} \right|. \] +\end{quotation} +This passage is produced by the following input: +\begin{quote} +\begin{verbatim} +The {\em characteristic polynomial} $\chi(\lambda)$ of the +$3 \times 3$~matrix +\[ \left( \begin{array}{ccc} +a & b & c \\ +d & e & f \\ +g & h & i \end{array} \right) \] +is given by the formula +\[ \chi(\lambda) = \left| \begin{array}{ccc} +\lambda - a & -b & -c \\ +-d & \lambda - e & -f \\ +-g & -h & \lambda - i \end{array} \right|. \] +\end{verbatim} +\end{quote} +First of all, note the use of \verb?\left? and \verb?\right? +to produce the large delimiters around the arrays. As we have +already seen, if we use +$$\hbox{\verb?\left(?} \qquad \ldots \qquad + \hbox{\verb?\right)?}$$ +then the size of the parentheses is chosen to match the subformula +that they enclose. Next note the use of the alignment tab +character \verb?&? to separate the entries of the matrix and +the use of \verb?\\? to separate the rows of the matrix, exactly +as in the construction of multiline formulae described above. +We begin the array with \verb?\begin{array}? and end it with +\verb?\end{array}?. The only thing left to explain, therefore, +is the mysterious \verb?{ccc}? which occurs immediately after +\verb?\begin{array}?. + Now each of the \verb?c?'s in \verb?{ccc}? represents a +column of the matrix and indicates that the entries of the +column should be {\em centred}. If the \verb?c? were replaced by +\verb?l? then the corresponding column would be typeset with +all the entries flush {\em left}, and \verb?r? would produce a +column with all entries flush {\em right}. Thus +\begin{quote} +\begin{verbatim} +\[ \begin{array}{lcr} +\mbox{First number} & x & 8 \\ +\mbox{Second number} & y & 15 \\ +\mbox{Sum} & x + y & 23 \\ +\mbox{Difference} & x - y & -7 \\ +\mbox{Product} & xy & 120 \end{array} \] +\end{verbatim} +\end{quote} +produces +\begin{quotation} +\small +\[ \begin{array}{lcr} +\mbox{First number} & x & 8 \\ +\mbox{Second number} & y & 15 \\ +\mbox{Sum} & x + y & 23 \\ +\mbox{Difference} & x - y & -7 \\ +\mbox{Product} & xy & 120 \end{array} \] +\end{quotation} + + We can use the array environment to produce formulae such as +\[ |x| = \left\{ \begin{array}{ll} + x & \mbox{if $x \geq 0$};\\ + -x & \mbox{if $x < 0$}.\end{array} \right. \] +Note that both columns of this array are set flush left. Thus we +use \verb?{ll}? immediately after \verb?\begin{array}?. The large +curly bracket is produced using \verb?\left\{?. However this +requires a corresponding \verb?\right? delimiter to match it. +We therefore use the {\em null delimiter} \verb?\right.? +discussed earlier. This delimiter is invisible. We can +therefore obtain the above formula by typing +\begin{quote} +\begin{verbatim} +\[ |x| = \left{ \begin{array}{ll} + x & \mbox{if $x \geq 0$};\\ + -x & \mbox{if $x < 0$}.\end{array} \right. \] +\end{verbatim} +\end{quote} + +\subsectiontitle{Derivatives, Limits, Sums and Integrals} +The expressions +\[ \frac{du}{dt} \mbox{ and } \frac{d^2 u}{dx^2} \] +are obtained in \LaTeX\ by typing \verb?\frac{du}{dt}? +and \verb?\frac{d^2 u dx^2}? respectively. The mathematical +symbol $\partial$ is produced using \verb?\partial?. Thus +partial derivatives such as +$\displaystyle\frac{\partial u}{\partial t}$ and +$\displaystyle\frac{\partial^2 u}{\partial x^2}$ are obtained +in \LaTeX\ by typing +\begin{quote} +\verb?\frac{\partial u}{\partial t}? and +\verb?\frac{\partial^2 u}{\partial x^2}?. +\end{quote} + +To obtain mathematical expressions such as +\[ \lim_{x \to +\infty} \mbox{, } \inf_{x > s} \mbox{ and } \sup_K \] +in displayed equations we type \verb?\lim_{x \to +\infty}?, +\verb?\inf_{x > s}? and \verb?\sup_K? respectively. Thus to obtain +\[ \lim_{x \to 0} \frac{3x^2 +7}{x^2 +1} = 3. \] +(in \LaTeX) we type +\begin{quote} +\begin{verbatim} +\[ \lim_{x \to 0} \frac{3x^2 +7x^3}{x^2 +5x^4} = 3. \] +\end{verbatim} +\end{quote} + +To obtain a summation sign such as +\[ \sum_{i=1}^{2n} \] +we type \verb?\sum_{i=1}^{2n}?. Thus +\[ \sum_{k=1}^n k^2 = \frac{1}{2} n (n+1). \] +is obtained by typing +\begin{quote} +\begin{verbatim} +\[ \sum_{k=1}^n k^2 = \frac{1}{2} n (n+1). \] +\end{verbatim} +\end{quote} + + We now discuss how to obtain {\it integrals} in mathematical +documents. A typical integral is the following: +\[ \int_a^b f(x)\,dx. \] +This is typeset using +\begin{quote} +\begin{verbatim} +\[ \int_a^b f(x)\,dx. \] +\end{verbatim} +\end{quote} +The integral sign $\int$ is typeset using the control sequence +\verb?\int?, and the {\it limits of integration} (in this case +$a$ and $b$) are treated as a subscript and a superscript on the +integral sign. It remains to describe the purpose of the \verb?\,? +occurring immediately before the \verb?dx?. This is the means of telling +\TeX\ to put extra space before the $d$. This is necessary to +produce the correct appearance. + + Most integrals occurring in mathematical documents begin with +an integral sign and contain one or more instances of \verb?d? +followed by another (Latin or Greek) letter, as in $dx$, $dt$, +and $d\theta$. To obtain the correct appearance one should put +extra space before the $d$, using \verb?\,?. Thus +\[ \int_0^{+\infty} x^n e^{-x} \,dx = n!. \] +\[ \int \cos \theta \,d\theta = \sin \theta. \] +\[ \int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy + = \int_{\theta=0}^{2\pi} \int_{r=0}^R + f(r\cos\theta,r\sin\theta) r\,dr\,d\theta. \] +and +\[ \int_0^R \frac{2x\,dx}{1+x^2} = \log(1+R^2). \] +are obtained by typing +\begin{quote} +\begin{verbatim} +\[ \int_0^{+\infty} x^n e^{-x} \,dx = n!. \] +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +\[ \int \cos \theta \,d\theta = \sin \theta. \] +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +\[ \int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy + = \int_{\theta=0}^{2\pi} \int_{r=0}^R + f(r\cos\theta,r\sin\theta) r\,dr\,d\theta. \] +\end{verbatim} +\end{quote} +and +\begin{quote} +\begin{verbatim} +\[ \int_0^R \frac{2x\,dx}{1+x^2} = \log(1+R^2). \] +\end{verbatim} +\end{quote} +respectively. + + In some multiple integrals (i.e., integrals containing more than +one integral sign) one finds that \TeX\ puts too much space +between the integral signs. The way to improve the appearance of +of the integral is to use the control sequence \verb?\!? to +remove a thin strip of unwanted space. Thus, for example, the +multiple integral +\[ \int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy. \] +is obtained by typing +\begin{quote} +\begin{verbatim} +\[ \int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy. \] +\end{verbatim} +\end{quote} +Had we typed +\begin{quote} +\begin{verbatim} +\[ \int_0^1 \int_0^1 x^2 y^2\,dx\,dy. \] +\end{verbatim} +\end{quote} +we would have obtained +\[ \int_0^1 \int_0^1 x^2 y^2\,dx\,dy. \] + + A particularly noteworthy example comes when we are +typesetting a multiple integral such as +\[ \int \!\!\! \int_D f(x,y)\,dx\,dy. \] +Here we use \verb?\!? three times to obtain suitable spacing +between the integral signs. We typeset this integral using +\begin{quote} +\begin{verbatim} +\[ \int \!\!\! \int_D f(x,y)\,dx\,dy. \] +\end{verbatim} +\end{quote} +Had we typed +\begin{quote} +\begin{verbatim} +\[ \int \int_D f(x,y)\,dx\,dy. \] +\end{verbatim} +\end{quote} +we would have obtained +\[ \int \int_D f(x,y)\,dx\,dy. \] + + The following (reasonably complicated) passage exhibits a +number of the features which we have been discussing: +\begin{quotation} +\small + In non-relativistic wave mechanics, the wave function +$\psi({\bf r},t)$ of a particle satisfies the +{\it Schr\"{o}dinger Wave Equation} +\[ i\hbar\frac{\partial \psi}{\partial t} + = \frac{-\hbar^2}{2m} \left( + \frac{\partial^2}{\partial x^2} + + \frac{\partial^2}{\partial y^2} + + \frac{\partial^2}{\partial z^2} + \right) \psi + V \psi. \] +It is customary to normalize the wave equation by +demanding that +\[ \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},0) \right|^2\,dx\,dy\,dz = 1. \] +A simple calculation using the Schr\"{o}dinger wave +equation shows that +\[ \frac{d}{dt} \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 0, \] +and hence +\[ \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 1 \] +for all times~$t$. If we normalize the wave function in this +way then, for any (measurable) subset~$V$ of ${\bf R}^3$ and +time~$t$, +\[ \int \!\!\! \int \!\!\! \int_V + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz \] +represents the probability that the particle is to be found +within the region~$V$ at time~$t$. +\end{quotation} +One would typeset this in \LaTeX\ by typing +\begin{quote} +\begin{verbatim} + In non-relativistic wave mechanics, the wave function +$\psi({\bf r},t)$ of a particle satisfies the +{\it Schr\"{o}dinger Wave Equation} +\[ i\hbar\frac{\partial \psi}{\partial t} + = \frac{-\hbar^2}{2m} \left( + \frac{\partial^2}{\partial x^2} + + \frac{\partial^2}{\partial y^2} + + \frac{\partial^2}{\partial z^2} + \right) \psi + V \psi. \] +It is customary to normalize the wave equation by +demanding that +\[ \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},0) \right|^2\,dx\,dy\,dz = 1. \] +A simple calculation using the Schr\"{o}dinger wave +equation shows that +\[ \frac{d}{dt} \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 0, \] +and hence +\[ \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 1 \] +for all times~$t$. If we normalize the wave function in this +way then, for any (measurable) subset~$V$ of ${\bf R}^3$ and +time~$t$, +\[ \int \!\!\! \int \!\!\! \int_V + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz \] +represents the probability that the particle is to be found +within the region~$V$ at time~$t$. +\end{verbatim} +\end{quote} + diff --git a/info/tcdmanual/la_mthcs.tex b/info/tcdmanual/la_mthcs.tex new file mode 100644 index 0000000000..184cb29a1d --- /dev/null +++ b/info/tcdmanual/la_mthcs.tex @@ -0,0 +1,250 @@ +\sectiontitle{Control Sequences used in Mathematics (\LaTeX)} +\label{la-mthcs} + +\subsectiontitle{Font Changes, Accents and Standard Functions} +\appenditem{Changing Fonts in Mathematical Expressions} +Fonts are changed using suitable control sequences. +\begin{quote} +\begin{tabular}{ll} +\verb?\mit? changes to the `math italic' font: & $\mit Math Italic$\\ +\verb?\rm? changes to the roman font: & $\rm Roman$\\ +\verb?\sl? changes to a slanted roman font: & $\sl Slanted$\\ +\verb?\it? changes to an italic font: & $\it Italic$\\ +\verb?\tt? changes to an ``typewriter'' font: & $\tt Typewriter$\\ +\verb?\bf? changes to a boldface font: & $\bf Boldface$\\ +\verb?\cal? changes to a calligraphic font: & $\cal CALLIGRAPHIC$ +\end{tabular} +\end{quote} +The default font for mathematics is $Math Italic$. The +$\cal CALLIGRAPHIC$ font is only available for uppercase letters. +Any change of font made within a group enclosed within curly +brackets \verb?{? and \verb?}? will only apply to text within +that group. On leaving the group, the current font is restored +to what it was before entering the group. + +\appenditem{Accents in Mathematics Mode} +Accents in mathematics mode are produced using appropriate +control sequences. The effect of these on the letter $a$ is +exhibited in the following table. +\begin{quote} +\begin{tabular}{ll} +\verb?$\underline{a}$? & $\underline{a}$\\ +\verb?$\overline{a}$? & $\overline{a}$\\ +\verb?$\hat{a}$? & $\hat{a}$\\ +\verb?$\check{a}$? & $\check{a}$\\ +\verb?$\tilde{a}$? & $\tilde{a}$\\ +\verb?$\acute{a}$? & $\acute{a}$\\ +\verb?$\grave{a}$? & $\grave{a}$\\ +\verb?$\dot{a}$? & $\dot{a}$\\ +\verb?$\ddot{a}$? & $\ddot{a}$\\ +\verb?$\breve{a}$? & $\breve{a}$\\ +\verb?$\bar{a}$? & $\bar{a}$\\ +\verb?$\vec{a}$? & $\vec{a}$ +\end{tabular} +\end{quote} +These control sequences should only be used for mathematics, +not for ordinary text. + +You should bear in mind that when a character is underlined in +a mathematical manuscript then it is normally typeset in +bold face without any underlining. Underlining is used very +rarely in print. + +\appenditem{Standard Functions} +The names of certain standard functions and abbreviations are +obtained by typing a backlash \verb?\? before the name. The +complete list in \TeX\ is as follows:- + +$$\vcenter{\halign{$\backslash${\tt #}&&\quad $\backslash${\tt #}\cr +arccos&cos&csc&exp&ker&limsup&min&sinh\cr +arcsin&cosh°&gcd&lg&ln&Pr&sup\cr +arctan&cot&det&hom&lim&log&sec&tan\cr +arg&coth&dim&inf&liminf&max&sin&tanh\cr}}$$ + +\def\displayandname#1{\rlap{$\displaystyle\csname #1\endcsname$}% + \qquad {\tt \char92 #1}} +\def\mathlexicon#1{$$\vcenter{\halign{\displayandname{##}\hfil&&\qquad + \displayandname{##}\hfil\cr #1}}$$} + +\subsectiontitle{Control Sequences for Mathematical Symbols} +\appenditem{Lowercase Greek Letters} +\mathlexicon{alpha&iota&varrho\cr +beta&kappa&sigma\cr +gamma&lambda&varsigma\cr +delta&mu&tau\cr +epsilon&nu&upsilon\cr +varepsilon&xi&phi\cr +zeta&\omit\qquad \rlap{$o$}\qquad {\tt o}\hfil&varphi\cr +eta&pi&chi\cr +theta&varpi&psi\cr +vartheta&rho&omega\cr} + +\appenditem{Uppercase Greek Letters} +\mathlexicon{Gamma&Xi&Phi\cr +Delta&Pi&Psi\cr +Theta&Sigma&Omega\cr +Lambda&Upsilon&\omit\hfil\cr} + +\appenditem{Miscellaneous Symbols} +\mathlexicon{aleph&prime&forall\cr +hbar&emptyset&exists\cr +imath&nabla&neg\cr +jmath&surd&flat\cr +ell&top&natural\cr +wp&bot&sharp\cr +Re&|&clubsuit\cr +Im&angle&diamondsuit\cr +partial&triangle&heartsuit\cr +infty&backslash&spadesuit\cr} + +\appenditem{``Large'' Operators} +\mathlexicon{sum&bigcap&bigodot\cr +prod&bigcup&bigotimes\cr +coprod&bigsqcup&bigoplus\cr +int&bigvee&biguplus\cr +oint&bigwedge&\omit\hfil\cr} + +\iftwopage\newpage\fi +\appenditem{Binary Operations} +\mathlexicon{pm&cap&vee\cr +mp&cup&wedge\cr +setminus&uplus&oplus\cr +cdot&sqcap&ominus\cr +times&sqcup&otimes\cr +ast&triangleleftø\cr +star&triangleright&odot\cr +diamond&wr&dagger\cr +circ&bigcirc&ddagger\cr +bullet&bigtriangleup&amalg\cr +div&bigtriangledown&\omit\hfil\cr} + +\appenditem{Relations} +\mathlexicon{leq&geq&equiv\cr +prec&succ&sim\cr +preceq&succeq&simeq\cr +ll&gg&asymp\cr +subset&supset&approx\cr +subseteq&supseteq&cong\cr +sqsubseteq&sqsupseteq&bowtie\cr +in&ni&propto\cr +vdash&dashv&models\cr +smile&mid&doteq\cr +frown¶llel&perp\cr} + +\appenditem{Negated Relations} +\def\negdisplayandname#1{\rlap{$\displaystyle\not\csname #1\endcsname$}% +\qquad {\tt \char92 not\char92 #1}} +$$\vcenter{\halign{\negdisplayandname{#}\hfil&&\qquad + \negdisplayandname{#}\hfil\cr +\omit\rlap{$\not<$}\qquad{\tt \char92 not<}\hfil&\omit +\qquad\rlap{$\not>$}\qquad{\tt \char92 not>}\hfil&\omit +\qquad\rlap{$\not=$}\qquad{\tt \char92 not=}\hfil\cr +leq&geq&equiv\cr +prec&succ&sim\cr +preceq&succeq&simeq\cr +subset&supset&approx\cr +subseteq&supseteq&cong\cr +sqsubseteq&sqsupseteq&asymp\cr}}$$ + +\appenditem{Arrows} +\mathlexicon{leftarrow&longleftarrow&uparrow\cr +Leftarrow&Longleftarrow&Uparrow\cr +rightarrow&longrightarrow&downarrow\cr +Rightarrow&Longrightarrow&Downarrow\cr +leftrightarrow&longleftrightarrow&updownarrow\cr +Leftrightarrow&Longleftrightarrow&Updownarrow\cr +mapsto&longmapsto&nearrow\cr +hookleftarrow&hookrightarrow&searrow\cr +leftharpoonup&rightharpoonup&swarrow\cr +leftharpoondown&rightharpoondown&nwarrow\cr +rightleftharpoons&\omit\hfil&\omit\hfil\cr} + +\appenditem{Openings} +\mathlexicon{lbrack&lfloor&lciel\cr +lbrace&langle&\omit\hfil\cr} + +\appenditem{Closings} +\mathlexicon{rbrack&rfloor&rciel\cr +rbrace&rangle&\omit\hfil\cr} + +\iftwopage\newpage\fi +\appenditem{Alternative Names} +$$\vcenter{\halign{\displayandname{#}\hfil&\qquad +(same as {\tt \char92 #})\hfil\cr +\omit\rlap{$\not=$}\qquad + {\tt \char92 ne} or {\tt \char92 neq}\hfil¬=\cr +le&leq\cr +ge&geq\cr +\omit\rlap{$\{$}\qquad{\tt \char92 \char123}\hfil&lbrace\cr +\omit\rlap{$\}$}\qquad{\tt \char92 \char125}\hfil&lbrace\cr +to&rightarrow\cr +gets&leftarrow\cr +owns&ni\cr +land&wedge\cr +lor&vee\cr +lnot&neg\cr +vert&\omit\qquad (same as {\tt |})\hfil\cr +Vert&\omit\qquad (same as {\tt \char92 |})\hfil\cr +iff&\omit\qquad (same as {\tt \char92 Longleftrightarrow}, but with\hfil\cr +\omit\hfil&\omit\qquad\ extra space at each end)\hfil\cr +colon&\omit\qquad (same as {\tt :}, but with less space around it and\hfil\cr +\omit\hfil&\omit +\qquad\ less likelihood of a line break after it)\hfil\cr}}$$ + +\subsectiontitle{Some frequently used Control Sequences of \LaTeX} +\appenditem{Control Sequences} +We list some of the control sequences and environments of \LaTeX\ +that are frequently used when typesetting mathematical formulae. +The list is by no means exhaustive. For information on how to +apply these control sequences, consult the appropriate +manual (e.g. `\LaTeX---User's Guide and Reference Manual') +Here is the list of control sequences. +\begin{quote} +\begin{tabular}{ll} +\verb?\frac? & produces fractions \\ +\verb?\sqrt? & produces square roots and $n$th roots\\ +\verb?\left? & produces left delimiter of required size \\ +\verb?\right? & produces right delimiter of required size \\ +\verb?\,? & produces a thin space \\ +\verb?\!? & removes a thin space \\ +\verb?\mbox? & creates a box of text within mathematics \\ +\end{tabular} +\end{quote} + +\appenditem{Environments} +The following environments are often used in typesetting mathematics. +\begin{quote} +\begin{flushleft} +\begin{verbatim} +\begin{equation} ... \end{equation} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces a numbered displayed formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +\begin{eqnarray} ... \end{eqnarray} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces a numbered displayed multiline formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +begin{eqnarray*} ... \end{eqnarray*} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces an unnumbered displayed multiline formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +\begin{array} ... \end{array} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces an array or matrix) +\end{flushright} +\end{quote} + diff --git a/info/tcdmanual/la_summ.tex b/info/tcdmanual/la_summ.tex new file mode 100644 index 0000000000..2e908b149b --- /dev/null +++ b/info/tcdmanual/la_summ.tex @@ -0,0 +1,407 @@ +\sectiontitle{Rules for Ordinary Text (without mathematics)} +\subsectiontitle{Special Characters} +All characters on the keyboard have their standard meaning +in ordinary text with the exception of the +special characters +\begin{quote} +\begin{verbatim} +# $ % & ~ _ ^ \ { } ' +\end{verbatim} +\end{quote} +which have special functions within \TeX. On the rare +occasions when these special characters are required in +the final document they must be produced by an appropriate +control sequence. Thus you should type \verb?\#?, \verb?\$?, +\verb?\%?, \verb?\&?, \verb?\_?, \verb?\{? and \verb?\}? to +obtain $\#$, $\$$, $\%$, $\&$, $\_$, $\{$ and $\}$ +respectively. + +\subsectiontitle{Paragraphs} +Successive paragraphs in the input file should be separated +by a completely blank line. All paragraphs will be +automatically indented by \TeX\ with the exception of the +first paragraph of a new section. (One can override the +conventions of \TeX\ by placing the control sequence +\verb?\noindent? of the control sequence \verb?\indent? +at the beginning of the paragraph.) + +\subsectiontitle{Quotation marks} +To produce single quotation marks use the characters +\verb?`? (left quote) and \verb?'? (right quote). For +double quotation marks use \verb?``? (two left quotes) +and \verb?''? (two right quotes). {\it Do not use\/} +\verb?"? (undirected double quote). Thus to obtain +\begin{quotation} +\small +``This is easy'' he said. +\end{quotation} +you should type +\begin{quote} +\begin{verbatim} +``This is easy'' he said. +\end{verbatim} +\end{quote} + +The control sequence \verb?\,? can be used to +separate single quotes from double quotes where +necessary. + +\subsectiontitle{Dashes} +Dashes of various lengths are obtained using \verb?-?, +\verb?--? and \verb?---?. You should use \verb?-? for +hyphenation, \verb?--? when specifying ranges of numbers, +and \verb?---? to obtain a punctuation dash. Thus we obtain +\begin{quotation} +\small +The Cayley-Hamilton Theorem. +\end{quotation} +\begin{quotation} +\small +See pages 95--104. +\end{quotation} +\begin{quotation} +\small +Use three dashes to obtain a punctuation dash---like this. +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +The Cayley-Hamilton Theorem. +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +See pages 95--104. +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +Use three dashes to obtain a punctuation dash---like this. +\end{verbatim} +\end{quote} + +\subsectiontitle{Changing Fonts} +The control sequences \verb?\rm?, \verb?\sl?, \verb?\it?, \ +\verb?\tt? and \verb?\bf? change to {\rm roman}, {\sl slanted}, +{\it italic}, {\tt teletype} and {\bf boldface} fonts respectively. +Any change of font made within a group enclosed within curly +brackets \verb?{? and \verb?}? will only apply to text within +that group. On leaving the group, the current font is restored +to what it was before entering the group. Thus we can obtain +\begin{quotation} +\small +This sentence contains a word set in {\bf boldface} type +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +This sentence contains a word set in {\bf boldface} type +\end{verbatim} +\end{quote} + + The control sequence \verb?\/? produces the so-called +`italic correction'. It is sometimes desirable when changing +from a slanted font (such as {\it italic\/} or {\it slanted\/}) +back to a non-slanted font such as {\rm roman} or +{\bf boldface}, in order to produce a small amount of extra +space to compensate for the slantedness of the font, and thus +improve the appearance of the final document. However the +italic correction should not be applied before a period +(full stop) or a comma. To obtain +\begin{quotation} +\small +Here is some {\it italicized\/} text. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Here is some {\it italicized\/} text. +\end{verbatim} +\end{quote} +However it usually does not matter all that much if you forget +about this italic correction. + + In \LaTeX\ there is also a control sequence \verb?\em? +for {\em emphasizing text}. This control sequence changes to the +{\em italic\/} font, {\it unless we are already in the italic +font, in which case it converts to the {\em roman} font.} + +\subsectiontitle{Accents in Text} +These are produced by control sequences such as \verb?\'?, +\verb?\`? and \verb?\"?. Thus one types \verb?Se\'{a}n? +and \verb?H\"{o}lder? to obtain `Se\'{a}n' and `H\"{o}lder' +respectively. For a full list of such accents, see +Appendix~\ref{la-txtcs}. Note however that accents within +mathematics are produced in a different fashion. + +\subsectiontitle{Producing Blank Space in \LaTeX} +To produce (horizontal) blank space within a paragraph, use +\verb?\hspace? and \verb?\hspace*?, followed by the length +of the blank space enclosed within curly brackets. The length +of the skip should be expressed in a unit recognized by \TeX. +These recognized units are given in the following table: +\begin{quote} +\begin{tabular}{lll} +\verb?pt? & point & (1 in = 72.27 pt) \\ +\verb?pc? & pica & (1 pc = 12 pt) \\ +\verb?in? & inch & (1 in = 25.4 mm) \\ +\verb?bp? & big point & (1 in = 72 bp) \\ +\verb?cm? & centimetre & (1 cm = 10 mm) \\ +\verb?mm? & millimetre & \\ +\verb?dd? & didot point & (1157 dd = 1238 pt) \\ +\verb?cc? & cicero & (1 cc = 12 dd) \\ +\verb?sp? & scaled point & (65536 sp = 1 pt) +\end{tabular} +\end{quote} +Thus to produce a horizontal blank space of 20 mm in the middle +of a paragraph one would type \verb?\hspace{20 mm}? (or +\verb?\hspace*{20 mm}?. + + The difference between \verb?\hspace? and \verb?\hspace*? +is that if \TeX\ decides to break between lines at the point +where an \verb?\hspace? is specified, then the \verb?\hspace? +is ignored. Using \verb?\hspace*? forces \TeX\ to produce a +horizontal space, whether of not \TeX\ breaks between lines. + +To produce (vertical) blank space between paragraphs, use +\verb?\vspace? and \verb?\vspace*?, followed by the length +of the blank space enclosed within curly brackets. A +\verb?\vspace? will be ignored if it comes at a +break between pages, whereas blank space will always be +produced by \verb?\vspace*?, whether or not there is a +page break. + +\subsectiontitle{Forcing Blank Spaces and Preventing Line Breaks} +To force \TeX\ to produce a blank space where it might not +otherwise put one, one should precede the blank space with a +\verb?\? (backslash). It is often advisable to precede +with a backslash blank spaces after certain abbreviations +such as `Dr.', `etc.', and `Math.\ Soc.' (so that one +should type \verb?Dr.\ Smith? etc.). + +If you wish to ensure that \TeX\ does not start a new line +at a particular blank space, then you can use \verb?~? in +place of the blank space. Thus if you type +\verb?I.~Newton? or \verb?Example~4? then you prevent +a line break at these places. + +\sectiontitle{Rules for obtaining Mathematical Formulae} +\subsectiontitle{Mathematics embedded in Text} +Any mathematical expressions embedded in text should be +preceded and followed by the character \verb?$?. Thus +to obtain +\begin{quotation} +\small +Let $f$ be the function defined by $f(x) = x + 7$. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $f$ be the function defined by $f(x) = x + 7$. +\end{verbatim} +\end{quote} + +\subsectiontitle{Displayed Mathematical Formulae} +Any displayed mathematical formula should be preceded by +\verb?\[? +and followed by \verb?\]?. Thus to obtain +\begin{quotation} +\small +Let $g$ be the function defined by +\[ g(x,y) = xy + x + y + 2. \] +The function $g$ is positive when both $x$ and $y$ are positive. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $g$ be the function defined by +\[ g(x,y) = xy + x + y + 2. \] +The function $g$ is positive when both $x$ and $y$ +are positive. +\end{verbatim} +\end{quote} + +\subsectiontitle{Special Characters in Mathematics Mode} +All characters on the keyboard have their standard meaning +in mathematical expressions with the exception of the +special characters +\begin{quote} +\begin{verbatim} +# $ % & ~ _ ^ \ { } ' +\end{verbatim} +\end{quote} +which have special functions within \TeX. On the rare +occasions when these special characters are required in +the final document they must be produced by an appropriate +control sequence. Thus you should type \verb?\#?, \verb?\$?, +\verb?\%?, \verb?\&?, \verb?\_?, \verb?\{? and \verb?\}? to +obtain $\#$, $\$$, $\%$, $\&$, $\_$, $\{$ and $\}$ +respectively. To obtain $\backslash$ in mathematics mode, +type \verb?\backslash?. + + The character \verb?'? is used to put a superscript +prime after a character. Thus if we type \verb?$f'$? and +\verb?$g''$? we obtain $f'$ and $g''$ respectively. + +\subsectiontitle{Superscripts and Subscripts} +Superscripts and subscripts are produced using the characters +\verb?^? and \verb?_? respectively. Thus we obtain +$t^2 + x_1 - x^3_1$ by typeint \verb?$t^2 + x_1 - x^3_1$?. +If a superscript or subscript consists of more than one +character then the superscripts and subscripts should be +enclosed in curly brackets. Thus one obtains $a_{i,j}$ by +typing \verb?$a_{i,j}$?. One can obtain double subscripts: +we obtain $s_{n_j}$ by typing \verb?$s_{n_j}$?. + +\subsectiontitle{Greek Letters} +Greek letters are obtained by preceding the name of the +letter by a backslash. Thus we obtain +$\alpha, \beta, \gamma$ by typing +\verb?$\alpha, \beta, \gamma$?. See Appendix~\ref{la-mthcs} +for a list of Greek letters. Some Greek letters have variant +forms---see Appendix~\ref{la-mthcs}. + +\subsectiontitle{Mathematical Symbols} +Mathematical symbols such as $\div$, $\equiv$, $\otimes$, +$\sum$, $\in$, $\cup$, $\cap$ and $\to$ are obtained using +the appropriate control sequences---see Appendix~\ref{la-mthcs}. + +\subsectiontitle{Accents in Mathematics} +These are produced using the appropriate control +sequence---see Appendix~\ref{la-mthcs}. + +\subsectiontitle{Standard Functions} +Certain standard functions such as $\sin$ and $\log$ are +obtained by preceding the name with a backslash---see +Appendix~\ref{la-mthcs} for a full list of these. To obtain +a function or similar expression not on this list you should +convert to the roman font (e.g., to obtain ${\rm Aut}(G)$ one +should type \verb?${\rm Aut}(G)$?). + +\subsectiontitle{Fractions} +Fractions are obtained in \LaTeX\ using the control sequence +\verb?\frac?. We type +\begin{quote} +\verb?\frac{? {\it numerator\/} \verb?}{? {\it denominator\/} \verb?}? +\end{quote} +to obtain the required fraction. Thus to obtain +\[ f(x) = \frac{2 x}{(1 + x^2)^2} \] +we type +\begin{quote} +\begin{verbatim} +\[ f(x) = \frac{2 x}{(1 + x^2)^2} \] +\end{verbatim} +\end{quote} + +\subsectiontitle{Roots} +Square roots are obtained using the control sequence +\verb?\sqrt?. Thus to obtain $\sqrt{3x + 7}$ we +type \verb?$\sqrt{3x + 7}$?. To obtain an $n$th +root in \LaTeX\ we use the construction +\begin{quote} +\verb?\sqrt[?$n$\verb?]{? {\it expression} \verb?}? +\end{quote} +Thus $\sqrt[3]{3x + 7}$ is obtained by typing +\verb?$\sqrt[3]{3x + 7}$?. + +\subsectiontitle{Ellipsis} +Ellipsis (three dots) is obtained in mathematical formulae +using the control sequences \verb?\cdots? (centred ellipsis) +and \verb?\ldots? (lowered ellipsis). Thus to obtain +$x_1 + x_2 + \cdots + x_n$ and $x_1, x_2, \ldots, x_n$ +we type \verb?$x_1 + x_2 + \cdots + x_n$? and +\verb?$x_1, x_2, \ldots, x_n$? respectively. + +\subsectiontitle{Delimiters} +To surround a subformula with delimiters large enough to enclose +the subformula we use the construction +\begin{quote} +\verb?\left(? $\ldots$ {\it subformula} $\ldots$ \verb?\right)? +\end{quote} +(where the parentheses \verb?(? $\ldots$ \verb?)? may be replaced +by any other pair of delimiters such as +\verb?[? $\ldots$ \verb?]? or \verb?\{? $\ldots$ \verb?\}?). +Thus to obtain the equation +\[ f(x) = \left( 1 + \frac{2x}{x^2 + 1} \right) - \sin(x) \] +we type +\begin{quote} +\begin{verbatim} +\[ f(x) = \left( 1 + \frac{2x}{x^2 + 1} \right) - \sin(x) \] +\end{verbatim} +\end{quote} + +\subsectiontitle{Embedding Text in Mathematics} +Text can be embedded in mathematics using the control sequence +\verb?\mbox?. Thus if we type +\begin{quote} +\begin{verbatim} +\[ V' = \{ f \in X' : f(v) = 0 \mbox{ for all } v \in V \} \] +\end{verbatim} +\end{quote} +we obtain +\[ V' = \{ f \in X' : f(v) = 0 \mbox{ for all } v \in V \} \] + +\subsectiontitle{Inserting and Removing Blank Space in Formulae} +The control sequence \verb?\quad? produces a `quad' +of blank space (a `quad' is approximately the width of the +letter `m'). The control sequence \verb?\,? inserts a thin +blank space and the control sequence \verb?\!? removes a +thin space. One uses \verb?\,? and \verb?\!? to improve the +appearance of mathematical formulae. For example, if we +type +\begin{quote} +\begin{verbatim} +\[ \int_0^\pi \sin x dx = 2, \] +\end{verbatim} +\end{quote} +we obtain +\[ \int_0^\pi \sin x dx = 2, \] +whereas if we type +\begin{quote} +\begin{verbatim} +\[ \int_0^\pi \sin x \,dx = 2, \] +\end{verbatim} +\end{quote} +we obtain +\[ \int_0^\pi \sin x \,dx = 2, \] +and this equation has a more satisfactory appearance. + +\subsectiontitle{Further Features of \LaTeX} +There are plenty of control sequences and `environments' +in \LaTeX\ for accomplishing various tasks. Among the most +widely used environments are +\begin{quote} +\begin{flushleft} +\begin{verbatim} +\begin{equation} ... \end{equation} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces a numbered displayed formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +\begin{eqnarray} ... \end{eqnarray} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces a numbered displayed multiline formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +begin{eqnarray*} ... \end{eqnarray*} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces an unnumbered displayed multiline formula) +\end{flushright} +\begin{flushleft} +\begin{verbatim} +\begin{array} ... \end{array} +\end{verbatim} +\end{flushleft} +\begin{flushright} +(produces an array or matrix) +\end{flushright} +\end{quote} + diff --git a/info/tcdmanual/la_text.tex b/info/tcdmanual/la_text.tex new file mode 100644 index 0000000000..2baea4f9d9 --- /dev/null +++ b/info/tcdmanual/la_text.tex @@ -0,0 +1,437 @@ +\sectiontitle{Producing Simple Documents using \LaTeX} +\label{la-text} +\subsectiontitle{Producing a \LaTeX\ Input File} +We describe the structure of a typical \LaTeX\ input file. + +The first line of the input file should consist of a +\verb?\documentstyle? command. The recommended such +\verb?\documentstyle? command for mathematical articles +and similar documents has the form +\begin{quote} +\begin{verbatim} +\documentstyle[tcda,12pt]{article} +\end{verbatim} +\end{quote} +(You do not have to worry about what this command means when +first learning to use \LaTeX: its effect is to ensure that the +final document is correctly positioned on A4 size paper and +that the text is of a size that is easy to read.) There are +variants of this \verb?\documentstyle? command which are +appropriate for letters or for books. + + The \verb?documentstyle? command may be followed by certain +other optional commands, such as the \verb?\pagestyle? command. +It is not necessary to find out about these commands when first +learning to use \LaTeX. + + After the \verb?\documentstyle? command and these other +optional commands, we place the command +\begin{quote} +\begin{verbatim} +\begin{document} +\end{verbatim} +\end{quote} + + This command is then followed by the main body of the text, +in the format prescribed by the rules of \LaTeX. + +Finally, we end the input file with a line containing the +command +\begin{quote} +\begin{verbatim} +\end{document} +\end{verbatim} +\end{quote} + +\subsectiontitle{Producing Ordinary Text using \LaTeX} +To produce a simple document using \LaTeX\ one should create a +\LaTeX\ input file, beginning with a \verb?\documentstyle? +command and the \verb?begin{document}? command, as +described above. The input file should end with the +\verb?\end{document}? command, and the text of the +document should be sandwiched between the +\verb?\begin{document}? and \verb?\end{document}? +commands in the manner described below. + +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. You do not have to worry about paragraph +indentation: \TeX\ will automatically indent all paragraphs +with the exception of the first paragraph of a new section +(unless you take special action to override the conventions +adopted by \TeX) + + For example, suppose that we wish to create a document +containing the following paragraphs: +\begin{quotation} +\small +\noindent +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. + +You do not have to worry about paragraph indentation: +all paragraphs will be indented with the exception of +the first paragraph of a new section. + +One must take care to distinguish between the `left quote' +and the `right quote' on the computer terminal. Also, one +should use two `single quote' characters in succession if +one requires ``double quotes''. One should never use the +(undirected) `double quote' character on the computer +terminal, since the computer is unable to tell whether it +is a `left quote' or a `right quote'. One also has to +take care with dashes: a single dash is used for +hyphenation, whereas three dashes in succession are required +to produce a dash of the sort used for punctuation---such as +the one used in this sentence. + +\end{quotation} +To create this document using \LaTeX\ we use the following +input file: +\begin{quote} +\begin{verbatim} + +\documentstyle[tcda,12pt]{article} +\begin{document} + +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. + +You do not have to worry about paragraph indentation: +all paragraphs will be indented with the exception of +the first paragraph of a new section. + +One must take care to distinguish between the `left quote' +and the `right quote' on the computer terminal. Also, one +should use two `single quote' characters in succession if +one requires ``double quotes''. One should never use the +(undirected) `double quote' character on the computer +terminal, since the computer is unable to tell whether it +is a `left quote' or a `right quote'. One also has to +take care with dashes: a single dash is used for +hyphenation, whereas three dashes in succession are required +to produce a dash of the sort used for punctuation---such as +the one used in this sentence. + +\end{document} + +\end{verbatim} +\end{quote} + + Having created the input file, one then has to run it +through the \LaTeX\ program and then print it out the +resulting output file (known as a `DVI' file). + +\subsectiontitle{Blank Spaces and Carriage Returns in the Input File} +\TeX\ treats the carriage return at the end of a line +as though it were a blank space. Similarly \TeX\ treats +tab characters as blank spaces. Moreover, \TeX\ regards +a sequence of blank spaces as though it were a single +space, and similarly it will ignore blank spaces at the +beginning or end of a line in the input file. Thus, for +example, if we type +\begin{quote} +\begin{verbatim} +This is + a + silly + example of a +file with many spaces. + + + This is the beginning +of a new paragraph. +\end{verbatim} +\end{quote} +then we obtain +\begin{quotation} +\small +This is + a + silly + example of a +file with many spaces. + + + This is the beginning +of a new paragraph. +\end{quotation} + + It follows immediately from this that one will obtain +the same results whether one types one space or two spaces +after a full stop: \TeX\ does not distinguish between the +two cases. + +Any spaces which follow a control sequence will be ignored +by \TeX. + +\begin{quotation} +\footnotesize +If you really need a blank space in the final document +following whatever is produced by the control sequence, +then you must precede this blank by a +{\it backslash} \verb?\?. Thus in order to obtain the +sentence +\begin{quotation} +\TeX\ is a very powerful computer typesetting program. +\end{quotation} +we must type +\begin{quote} +\begin{verbatim} +\TeX\ is a very powerful computer typesetting program. +\end{verbatim} +\end{quote} +(Here the control sequence \verb?\TeX? is used to produce +the \TeX\ logo.) + + In general, preceding a blank space by a backslash +forces \TeX\ to include the blank space in the final +document. +\end{quotation} + + As a general rule, you should never put a blank space after +a left parenthesis or before a right parenthesis. If you were +to put a blank space in these places, then you run the risk +that \TeX\ might start a new line immediately after the left +parenthesis or before the right parenthesis, leaving the +parenthesis marooned at the beginning or end of a line. + +\subsectiontitle{Quotation Marks} +Single left and right quotation marks are produced by +\verb?`? and \verb?'? respectively. Double left and right quotation +marks are produced by \verb?``? and \verb?''? respectively. Thus +\begin{quotation} +\small +``What did you do yesterday?'' he asked. +\end{quotation} +is produced by typing +\begin{quote} +\begin{verbatim} +``What did you do yesterday?'' he asked. +\end{verbatim} +\end{quote} +You should never use the character \verb?"? to produce +quotation marks. This is because \TeX\ has no way of +knowing whether you want a left quote or a right quote if +you do this. + +\begin{quotation} +\footnotesize + You can use the control sequences \verb?\lq? and +\verb?\rq? in place of \verb?`? and \verb?'?. This +is useful if your keyboard does not have a \verb?`? +character. +\end{quotation} + +\begin{quotation} +\footnotesize +Sometimes you need two quotation marks following +one another, as in +\begin{quotation} +``I regard computer typesetting as being reasonably +`straightforward'\,'' he said. +\end{quotation} +The way to do this is to use the control sequence +\verb?\,? between the quotation marks. Thus one +would type +\begin{quote} +\begin{verbatim} +``I regard computer typesetting as being reasonably +`straightforward'\,'' he said. +\end{verbatim} +\end{quote} +However this problem arises very rarely. +\end{quotation} + +\subsectiontitle{Dashes} +\TeX\ allows you to produce dashes of various length. Typing +\verb?-? by itself produces a hyphen, as in `double-quote'. +Typing \verb?--? produces a dash suitable for denoting a +range of numbers, as in the phrase `on pages 155--159', +produced by typing +\begin{quote} +\begin{verbatim} +on pages 155--159. +\end{verbatim} +\end{quote} +Finally, typing \verb?---? produces a punctuation dash---this +is a dash such as the one in this sentence. + +\subsectiontitle{Section Headings in \LaTeX} +Section headings of various sizes are produced (in the +{\it article\/} document style) using the commands +\verb?\section?,\verb?\subsection? and \verb?\subsubsection? +commands. \LaTeX\ will number the sections and subsections +automatically. The title of the section should be surrounded +by curly brackets and placed immediately after the relevant +command. Thus if we type +\begin{quote} +\begin{verbatim} +\section{Section Headings} +We explain in this section how to obtain headings +for the various sections and subsections of our +document. + +\subsection{Headings in the `article' Document Style} +In the `article' style, the document may be divided up +into sections, subsections and subsubsections, and each +can be given a title, printed in a boldface font, +simply by issuing the appropriate command. +\end{verbatim} +\end{quote} +then the title of the section and that of the subsection +will be printed in a large boldface font, and will be +numbered accordingly. + +Other document styles (such as the {\it book\/} and +{\it letter\/} styles) have other `sectioning' +commands available (for example, the {\it book\/} +style has a \verb?\chapter? command for beginning +a new chapter). + +\begin{quotation} +\footnotesize +Sometimes one wishes to suppress the automatic numbering +provided by \LaTeX. This can be done by placing an +asterisk before the title of the section or subsection. +Thus, for example, the section numbers in the above example +could be suppressed by typing +\begin{quote} +\begin{verbatim} +\section*{Section Headings} +We explain in this section how to obtain headings +for the various sections and subsections of our +document. + +\subsection*{Headings in the `article' Document Style} +In the `article' style, the document may be divided up +into sections, subsections and subsubsections, and each +can be given a title, printed in a boldface font, +simply by issuing the appropriate command. +\end{verbatim} +\end{quote} +\end{quotation} + +\subsectiontitle{Changing Fonts} +Fonts are changed using the control sequences \verb?\rm?, +\verb?\sl?, \verb?\it?, \verb?\tt? and \verb?\bf?. +\begin{quote} +\begin{tabular}{ll} +\verb?\rm? changes to the normal ``roman'' font: & \rm Roman\\ +\verb?\sl? changes to a slanted roman font: & \sl Slanted\\ +\verb?\it? changes to an italic font: & \it Italic\\ +\verb?\tt? changes to an ``typewriter'' font: & \tt Typewriter\\ +\verb?\bf? changes to a boldface font: & \bf Boldface +\end{tabular} +\end{quote} + + It is best to use the special characters \verb?{? and +\verb?}? when changing fonts. One encloses the text whose +font is to be changed within these curly brackets and places +the font-changing control sequence immediately after the +opening bracket~\verb?{?. Thus the text +\begin{quotation} +\small +In this sentence we have {\it italicized\/} a few words, set +others in {\sl slanting type\/} or {\bf boldface type}, and +typeset others using a {\tt `typewriter' font in which all +the letters have a fixed width}. +\end{quotation} +is produced by typing +\begin{quote} +\begin{verbatim} +In this sentence we have {\it italicized\/} a few words, set +others in {\sl slanting type\/} or {\bf boldface type}, and +typeset others using a {\tt `typewriter' font in which all +the letters have a fixed width}. +\end{verbatim} +\end{quote} + +\begin{quotation} +\footnotesize +The control sequence \verb?\/? produces the so-called +{\it italic correction}. The use of this is recommended when +changing back from an {\it italic\/} or {\sl slanted\/} +font into a {\rm roman} or {\bf boldface} font, in order to +produce extra space to compensate for the way in which some +{\it italic\/} and {\sl slanted\/} letters lean into the +following blank space. However this italic correction should +not be used before a comma or a full stop. +\end{quotation} + + \LaTeX\ provides the control sequence \verb?\em? for +{\em emphasizing\/} text. This will set the emphasized +text in italic, unless the surrounding text is already +in italic, in which case the text will be set in +ordinary roman font. Thus +\begin{quote} +\begin{verbatim} +Here is some {\em emphasized text with {\em emphasized} +words embedded in the {\em emphasized} text} too. +\end{verbatim} +\end{quote} +produces +\begin{quotation} +\small +Here is some {\em emphasized text with {\em emphasized} +words embedded in the {\em emphasized} text} too. +\end{quotation} + +\subsectiontitle{Accents and other Symbols used in Text} +There are a variety of control sequences for producing accents. +For example, the control sequence \verb?\'{o}? produces an +acute accent on the letter~\verb?o?. Thus typing +\begin{quote} +\begin{verbatim} +Se\'{a}n \'{O} Cinn\'{e}ide. +\end{verbatim} +\end{quote} +produces +\begin{quotation} +\small +Se\'{a}n \'{O} Cinn\'{e}ide. +\end{quotation} +Similarly we use the control sequence \verb?\`? to +produce the grave accent in `alg\`{e}bre' and we use +\verb?\"? to produce the umlaut in `Universit\"{a}t'. +A list of the accents provided by \TeX\ is given in +Appendix~\ref{la-txtcs}. + + The control sequences \verb?\i? and \verb?\j? produce +dotless $i$ and $j$. These are required when placing an +accent on the letter. Thus \={\i} is produced by typing +\verb?\={\i}?. There are also control sequences for +ligatures and other special symbols used within text. These are +listed in Appendix~\ref{la-txtcs}. + +\subsectiontitle{Special Characters} +The characters +\begin{quote} +\begin{verbatim} +# $ % & \ ^ _ { } ~ +\end{verbatim} +\end{quote} +have special purposes within \TeX. Thus they cannot be produced +in the final document simply by typing them directly. On the +rare occasions when one needs to use the special characters +\begin{quote} +\#\ \$\ \%\ \&\ \_\ \{\ \} +\end{quote} +in the final document, they can be produced by typing the control +sequences +\begin{quote} +\begin{verbatim} +\# \$ \% \& \_ \{ \} +\end{verbatim} +\end{quote} +respectively. However, somewhat more ingenuity is required to +produce \verb?\?, \verb?^? and \verb?~?. + diff --git a/info/tcdmanual/la_txtcs.tex b/info/tcdmanual/la_txtcs.tex new file mode 100644 index 0000000000..0db497eb6d --- /dev/null +++ b/info/tcdmanual/la_txtcs.tex @@ -0,0 +1,68 @@ +\sectiontitle{Control Sequences used in Text (\LaTeX)} +\label{la-txtcs} +\appenditem{Control Sequences for Changing Fonts in Text} +\begin{quote} +\begin{tabular}{ll} +\verb?\rm? changes to the normal ``roman'' font: & \rm Roman\\ +\verb?\sl? changes to a slanted roman font: & \sl Slanted\\ +\verb?\it? changes to an italic font: & \it Italic\\ +\verb?\tt? changes to an ``typewriter'' font: & \tt Typewriter\\ +\verb?\bf? changes to a boldface font: & \bf Boldface +\end{tabular} +\end{quote} + + In \LaTeX\ the control sequence \verb?\em? {\em emphasizes\/} +text, switching from non-italic to {\it italic} and {\it from +italic to {\em roman}.} + +\iftwopage\newpage\fi +\appenditem{Control Sequences for obtaining Accents in Text} +\begin{quote} +\begin{tabular}{llll} +\verb?\'{e}? & \'{e} + & e.g., \verb?math\'{e}matique? yields `math\'{e}matique' \\ +\verb?\`{e}? & \`{e} + & e.g., \verb?alg\`{e}bre? yields `alg\`{e}bre' \\ +\verb?\^{e}? & \^{e} + & e.g., \verb?h\^{o}te? yields `h\^{o}te' \\ +\verb?\"{o}? & \"{o} + & e.g., \verb?H\"{o}lder? yields `H\"{o}lder' \\ +\verb?\~{n}? & \~{n} + & e.g., \verb?ma\~{n}ana? yields `ma\~{n}ana' \\ +\verb?\={o}? & \={o} & \\ +\verb?\.{o}? & \.{o} & \\ +\verb?\u{o}? & \u{o} & \\ +\verb?\v{c}? & \v{c} + & e.g., \verb?\v{C}ech? yields `\v{C}ech' \\ +\verb?\H{o}? & \H{o} & \\ +\verb?\t{oo}? & \t{oo} & \\ +\verb?\c{c}? & \c{c} + & e.g., \verb?gar\c{c}on? yields `gar\c{c}on' \\ +\verb?\d{o}? & \d{o} & \\ +\verb?\b{o}? & \b{o} & +\end{tabular} +\end{quote} +These accents are for use in ordinary text. They cannot be +used within mathematical formulae, since different control +sequences are used to produce accents within mathematics. + +\appenditem{Special Symbols used in Text} +\begin{tabular}{ll} +\verb?\oe, \OE? & \oe, \OE \\ +\verb?\ae, \AE? & \ae, \AE \\ +\verb?\aa, \AA? & \aa, \AA \\ +\verb?\o, \O? & \o, \O \\ +\verb?\l, \L? & \l, \L \\ +\verb?\ss? & \ss \\ +\verb+?+\verb+`+ & ?` \\ +\verb+!+\verb+`+ & !` \\ +\verb?\dag? & \dag \\ +\verb?\ddag? & \ddag \\ +\verb?\S? & \S \\ +\verb?\P? & \P \\ +\verb?\copyright? & \copyright \\ +\verb?\pounds? & \pounds \\ +\verb?\i? & \i \\ +\verb?\j? & \j +\end{tabular} + diff --git a/info/tcdmanual/lalong.tex b/info/tcdmanual/lalong.tex new file mode 100644 index 0000000000..92895ae023 --- /dev/null +++ b/info/tcdmanual/lalong.tex @@ -0,0 +1,38 @@ +\ifx\selectfont\undefined +%\documentstyle[a4,12pt]{article} +\documentstyle[12pt]{article} +\else +%\documentstyle[a4,12pt,amsbsy]{article} +\documentstyle[12pt,amsbsy]{article} +\fi +%\let\io=\includeonly +\let\include=\input +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\newif\iftwopage\twopagefalse +\begin{document} +\title{Getting Started with \LaTeX} +\author{D. R. Wilkins} +\maketitle + +\include{la_intro} +\include{la_text} +\include{la_math} +\include{la_furth} + +% APPENDICES BEGIN HERE +\appendix + +\include{la_txtcs} +\include{la_mthcs} + +\thispagestyle{empty} +\tableofcontents + +\end{document} diff --git a/info/tcdmanual/lalong.tim b/info/tcdmanual/lalong.tim new file mode 100644 index 0000000000..5d4303e2d1 --- /dev/null +++ b/info/tcdmanual/lalong.tim @@ -0,0 +1,40 @@ +\documentstyle[tcda,12pt]{article} + +\def\TGM{} +% \addtolength{\textheight}{2cm} + +\let\io=\includeonly +\typein{Enter \string\io\space to TeX part.} + +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\newif\iftwopage\twopagefalse +\begin{document} +% \title{Getting Started with \LaTeX} +% \author{D. R. Wilkins} +% \maketitle + +\include{la_intro} +\include{la_text} +\include{la_math} +\include{la_furth} + +% APPENDICES BEGIN HERE +\appendix + +\include{la_txtcs} +\include{la_mthcs} + +\include{output} + +\newpage +\thispagestyle{empty} +\tableofcontents + +\end{document} diff --git a/info/tcdmanual/lashort.tex b/info/tcdmanual/lashort.tex new file mode 100644 index 0000000000..c6ec6d98b4 --- /dev/null +++ b/info/tcdmanual/lashort.tex @@ -0,0 +1,27 @@ +%\documentstyle[a4,12pt]{article} +\documentstyle[12pt]{article} +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\newif\iftwopage\twopagefalse +\begin{document} +\title{Summary of Commonly-Used Features of \LaTeX} +\author{D. R. Wilkins} +\maketitle + +\tableofcontents + +\input la_summ + +% APPENDICES BEGIN HERE +\appendix + +\input la_txtcs +\input la_mthcs + +\end{document} diff --git a/info/tcdmanual/lashort.tim b/info/tcdmanual/lashort.tim new file mode 100644 index 0000000000..828b943d0c --- /dev/null +++ b/info/tcdmanual/lashort.tim @@ -0,0 +1,29 @@ +\def\RCS{$Header: lashort.tex,v 1.3 90/07/13 19:27:05 tim Exp $} +\newif\iftwopage\twopagetrue +\documentstyle[twofold,rcs]{article} +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\begin{document} +\title{Summary of Commonly-Used Features of \LaTeX} +\author{D. R. Wilkins} +\maketitle + +\thispagestyle{RCS} + +\tableofcontents + +\input la_summ + +% APPENDICES BEGIN HERE +\appendix + +\input la_txtcs +\input la_mthcs + +\end{document} diff --git a/info/tcdmanual/output.tex b/info/tcdmanual/output.tex new file mode 100644 index 0000000000..1531a1c88c --- /dev/null +++ b/info/tcdmanual/output.tex @@ -0,0 +1,71 @@ +\sectiontitle{Printing \LaTeX} +\label{output} + +A \TeX\ `output driver' translates a DVI file +into instructions for a printer or other output device +(such as a graphics screen). +There are drivers available +for virtual all devices. + +\TeX\ drivers generally have names +like \verb"dvixyz" or \verb"dvi2xyz", +where \verb"xyz" is the start of the printer's name. +To print the \LaTeX\ file \verb"test.tex" +it must first be ``\LaTeX-ed'' with the command +\begin{verbatim} + latex test +\end{verbatim} +and the resulting DVI file \verb"test.dvi" +then sent to the printer with a command like +\begin{verbatim} + dvixyz test +\end{verbatim} + +The following \TeX\ drivers are available +in the School of Mathematics. + +\begin{description} +\item[dvifuj] +This is the program for printing \TeX\ or \LaTeX\ files +on the Fujitsu matrix printers +in the Terminal Room (School of Mathematics Room 14) +and the Barron-O'Reilly room. +To print \verb"test.dvi" on the former, give the command +\begin{verbatim} + dvifuj test -Pwr14 +\end{verbatim} +For the latter, +\begin{verbatim} + dvifuj test -Pbor +\end{verbatim} + +\item[dvips] +This will send output to the Apple LaserWriter +in the Secretaries' Office. +It is presently reserved for staff and research students, +though it may be made available for special requests, +eg for printing CV's. +The command +\begin{verbatim} + dvips test +\end{verbatim} +will send the output from \verb"test.dvi" to the printer. +(The `ps' is \verb"dvips" stands for PostScript. +There are many PostScript printers like the LaserWriter; +\verb"dvips" will produce output for any such printer.) + +\item[dvi2tty] +This will attempt to display \TeX\ output on a dumb terminal. +It is of necessity very crude, +but can be useful as a first view. + +\item[xdvi] +This sends \TeX\ output to an X-terminal +or Unix workstation, +and gives a highly accurate representation +of the printed output. + +\item[dvielq] +This produces output for an Epson LQ printer. +\end{description} + diff --git a/info/tcdmanual/pl_furth.tex b/info/tcdmanual/pl_furth.tex new file mode 100644 index 0000000000..7d007c0b47 --- /dev/null +++ b/info/tcdmanual/pl_furth.tex @@ -0,0 +1,228 @@ +\sectiontitle{Further Features of Plain \TeX} +\label{pl-furth} +\subsectiontitle{Producing Blank Space in Plain \TeX} +To produce (horizontal) blank space within a paragraph, use +\verb?\hskip?, followed by the length of the blank space. +The length of the skip should be expressed in a unit recognized +by \TeX. These recognized units are given in the following table: +\begin{quote} +\begin{tabular}{lll} +\verb?pt? & point & (1 in = 72.27 pt) \\ +\verb?pc? & pica & (1 pc = 12 pt) \\ +\verb?in? & inch & (1 in = 25.4 mm) \\ +\verb?bp? & big point & (1 in = 72 bp) \\ +\verb?cm? & centimetre & (1 cm = 10 mm) \\ +\verb?mm? & millimetre & \\ +\verb?dd? & didot point & (1157 dd = 1238 pt) \\ +\verb?cc? & cicero & (1 cc = 12 dd) \\ +\verb?sp? & scaled point & (65536 sp = 1 pt) +\end{tabular} +\end{quote} +Thus to produce a horizontal blank space of 20 mm in the middle +of a paragraph one would type \verb?\hskip 20 mm?. (There is +however a mild quirk of \TeX\ which arises very rarely: if +the word following the horizontal skip happens to +begin with the letters `plus' then you will probably get an +error message, probably +\begin{quote} +\begin{verbatim} +! Missing number, treated as zero. +\end{verbatim} +\end{quote} +For an explanation of why this occurs, see the \TeX book. +This problem can be avoided by typing +`\verb?\hskip 20 mm \relax?'). + +To produce (vertical) blank space between paragraphs, use +\verb?\vskip?, followed by the length of the vertical skip. +Thus to obtain +\begin{quotation} +{\small This is the first paragraph of some text. It is +separated from the second paragraph by a vertical skip of +10 millimetres.} + +\vskip 10 mm + +{\small This is the second paragraph.} +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +This is the first paragraph of some text. It is +separated from the second paragraph by a vertical skip of +10 millimetres. + +\vskip 10 mm + +This is the second paragraph. +\end{verbatim} +\end{quote} + +\subsectiontitle{Blank Spaces: Fine Tuning} +We describe certain features of \TeX\ relating to blank spaces +and paragraph indentation which will improve the appearance +of the final document. Experienced users of \TeX\ will improve +the appearance of their documents if they bear these remarks in mind. + + First note that, as a general rule, you should never put +a blank space after a left parenthesis or before a right +parenthesis. If you were to put a blank space in these +places, then you run the risk that \TeX\ might start a +new line immediately after the left parenthesis or before +the right parenthesis, leaving the parenthesis marooned at +the beginning or end of a line. + + \TeX\ has its own rules for deciding the lengths of blank +spaces. For instance, \TeX\ will put an extra amount of space +after a full stop if it considers that the full stop marks the +end of a sentence. + +\begin{quotation} +\footnotesize +The rule adopted by \TeX\ is to regard a period (full stop) as +the end of a sentence if it is preceded by a lowercase letter. +If the period is preceded by an uppercase letter then +\TeX\ assumes that it is not a full stop but follows the +initials of somebody's name. +\end{quotation} + + This works very well in most cases. However +\TeX\ occasionally gets things wrong. This happens with +a number of common abbreviations (as in `Mr.\ Smith' or +in `etc.'), and, in particular, in the names of +journals given in abbreviated form (e.g., +`Proc.\ Amer.\ Math.\ Soc.'). The way to overcome this +problem is to put a backslash before the blank space in +question. Thus we should type +\begin{quote} +\begin{verbatim} +Mr.\ Smith +etc.\ and +Proc.\ Amer.\ Math.\ Soc. +\end{verbatim} +\end{quote} + + \TeX\ determines itself how to break up a paragraph into +lines, and will occasionally hyphenate long words where this +is desirable. However it is sometimes necessary to tell +\TeX\ not to break at a particular blank space. The special +character used for this purpose is \verb?~?. It represents +a blank space at which \TeX\ is not allowed to break between +lines. It is often desirable to use \verb?~? in names where +the forenames are represented by initials. Thus to obtain +`W.~R.~Hamilton' it is best to type \verb?W.~R.~Hamilton?. +It is also desirable in phrases like `Example~7' and `the +length~$l$ of the rod', obtained by typing \verb?Example~7? +and \verb?the length~$l$ of the rod?. This feature of +\TeX\ may be safely ignored by beginners, though more +experienced \TeX nical typists should gradually accustom +themselves to using it occasionally where appropriate. + + \TeX\ will automatically indent paragraphs (with the +exception of the first paragraph of a new section). One +can prevent \TeX\ from indenting a paragraph though by +beginning the paragraph with the control sequence +\verb?\noindent?. Thus one obtains +\begin{quotation} +\small + +\noindent +This is the beginning of a paragraph which is not +indented in the usual way. This has been achieved +by placing an appropriate control sequence at the +beginning of the paragraph. + +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} + +\noindent +This is the beginning of a paragraph which is not +indented in the usual way. This has been achieved +by placing an appropriate control sequence at the +beginning of the paragraph. + +\end{verbatim} +\end{quote} + +Conversely, the control sequence \verb?\indent? forces +\TeX\ to indent the paragraph. + +\def\inftyint{\int_{-\infty}^{+\infty}} +\def\intwrtx#1{\int_{-\infty}^{+\infty} #1 \,dx} +\def\intwrt#1#2{\int_{-\infty}^{+\infty} #2 \,d #1} + +\subsectiontitle{Defining your own Control Sequences in Plain \TeX} +Suppose that we are producing a paper that makes frequent +use of some mathematical expression. For example, +suppose that integrals like +$$\int_{-\infty}^{+\infty} f(x)\,dx.$$ +occur frequently throughout the text. This formula is +obtained by typing +\begin{quote} +\begin{verbatim} +$$\int_{-\infty}^{+\infty} f(x)\,dx.$$ +\end{verbatim} +\end{quote} +It would be nice if we could type \verb?\inftyint? (say) +to obtain the integral sign at the beginning. This can +be done using \verb?\def?. What we do is to place +a line with the command +\begin{quote} +\begin{verbatim} +\def\inftyint{\int_{-\infty}^{+\infty}} +\end{verbatim} +\end{quote} +near the beginning of the input file. Then we only have +to type +\begin{quote} +\begin{verbatim} +$$\inftyint f(x)\,dx.$$ +\end{verbatim} +\end{quote} +to obtain the above formula. + +We can modify this procedure slightly. Suppose that we +we defined a new control sequence \verb?\intwrtx? by +putting the line +\begin{quote} +\begin{verbatim} +\def\intwrtx#1{\int_{-\infty}^{+\infty} #1 \,dx} +\end{verbatim} +\end{quote} +at the beginning of the input file. If we then type the line +\begin{quote} +\begin{verbatim} +$$\intwrtx{f(x)}.$$ +\end{verbatim} +\end{quote} +then we obtain +$$\intwrtx{f(x)}.$$ +What has happened is that the expression in curly brackets +after \verb?\intwrtx? has been substituted in the expression +defining \verb?\intwrtx?, replacing the \verb?#1? in that +expression. + + The \verb?#1? occurring after the \verb?\intwrtx? in the +line defining this control sequence indicates to \TeX\ that +that it is to expect one expression (in curly +brackets) after \verb?\intwrtx? to substitute for \verb?#1? +in the definition of \verb?\intwrtx?. If we defined a +control sequence \verb?\intwrt? by +\begin{quote} +\begin{verbatim} +\def\intwrt#1#2{\int_{-\infty}^{+\infty} #2 \,d #1} +\end{verbatim} +\end{quote} +then it would expect two expressions to substitute in for +\verb?#1? and \verb?#2? in the definition of \verb?\intwrt?. +Thus if we then type +\begin{quote} +\begin{verbatim} +$$\intwrt{y}{f(y)}.$$ +\end{verbatim} +\end{quote} +we obtain +$$\intwrt{y}{f(y)}.$$ + diff --git a/info/tcdmanual/pl_intro.tex b/info/tcdmanual/pl_intro.tex new file mode 100644 index 0000000000..ab43265065 --- /dev/null +++ b/info/tcdmanual/pl_intro.tex @@ -0,0 +1,187 @@ +\sectiontitle{Introduction to Plain \TeX} +\label{pl-intro} +\subsectiontitle{What is Plain \TeX?} +\TeX\ is a computer program for typesetting documents. It +takes a computer file, prepared according to the rules of +\TeX, and converts it to a form that may be printed on a +high-quality printer, such as a laser writer, to produce +a printed document of a quality comparable with good +quality books and journals. Simple documents, which do +not contain mathematical formulae or tables may be produced +very easily: effectively all one has to do is to type the +text straight in (though observing certain rules relating to +quotation marks and punctuation dashes). Typesetting +mathematics is somewhat more complicated, but even here +\TeX\ is comparatively straightforward to use when one +considers the complexity of some of the formulae that it +has to produce and the large number of mathematical symbols +which it has to produce. + + There are various `dialects' of \TeX, including \LaTeX. +Plain \TeX\ (created by D.~E.~Knuth) is the basic version +of \TeX\ on which these other `dialects' are based. The +reference manual for Plain \TeX\ is ``The \TeX book'', by +D.~E.~Knuth. + +\subsectiontitle{A Typical Plain \TeX\ Input File} +In order to produce a document using \TeX, we must first +create a suitable {\it input file\/} on the computer. We +apply the \TeX\ program to the input file and then use the +printer to print out the so-called `DVI' file produced by +the \TeX\ program (after first using another program to +translate the `DVI' file into a form that the printer +can understand). Here is an example of a typical +Plain \TeX\ input file: +\begin{quote} +\begin{verbatim} + +The foundations of the rigorous study of {\it analysis} +were laid in the nineteenth century, notably by the +mathematicians Cauchy and Weierstrass. Central to the +study of this subject are the formal definitions of +{\it limits} and {\it continuity}. + +Let $D$ be a subset of $\bf R$ and let +$f \colon D \to {\bf R}$ be a real-valued function on +$D$. The function $f$ is said to be {\it continuous} on +$D$ if, for all $\epsilon > 0$ and for all $x \in D$, +there exists some $\delta > 0$ (which may depend on $x$) +such that if $y \in D$ satisfies +$$|y - x| < \delta$$ +then +$$|f(y) - f(x)| < \epsilon.$$ + +One may readily verify that if $f$ and $g$ are continuous +functions on $D$ then the functions $f+g$, $f-g$ and +$f.g$ are continuous. If in addition $g$ is everywhere +non-zero then $f/g$ is continuous. + +\bye + +\end{verbatim} +\end{quote} +When we apply \TeX\ to these paragraphs we produce the text +\begin{quotation} +\small +The foundations of the rigorous study of {\it analysis} +were laid in the nineteenth century, notably by the +mathematicians Cauchy and Weierstrass. Central to the +study of this subject are the formal definitions of +{\it limits} and {\it continuity}. + +Let $D$ be a subset of $\bf R$ and let +$f \colon D \to {\bf R}$ be a real-valued function on +$D$. The function $f$ is said to be {\it continuous} on +$D$ if, for all $\epsilon > 0$ and for all $x \in D$, +there exists some $\delta > 0$ (which may depend on $x$) +such that if $y \in D$ satisfies +$$|y - x| < \delta$$ +then +$$|f(y) - f(x)| < \epsilon.$$ + +One may readily verify that if $f$ and $g$ are continuous +functions on $D$ then the functions $f+g$, $f-g$ and +$f.g$ are continuous. If in addition $g$ is everywhere +non-zero then $f/g$ is continuous. + +\end{quotation} + + This example illustrates various features of \TeX. Note +that the line +\begin{quote} +\begin{verbatim} +\bye +\end{verbatim} +\end{quote} +is placed at the end of the input file. This is to tell \TeX +when the end of the document has been reached. +Note also that, although most characters occurring in this file +have their usual meaning, yet there are special characters such +as \verb?\?, \verb?$?, \verb?{? and \verb?}? which have special +meanings within \TeX. Note in particular that there are +sequences of characters which begin with a `backslash' +\verb?\? which are used to produce mathematical symbols and +Greek letters and to accomplish tasks such as changing fonts. +These sequences of characters are known as +{\it control sequences}. + +\subsectiontitle{Characters and Control Sequences} +We now describe in more detail some of the features of +\TeX\ illustrated in the above example. + + Most characters on the keyboard, such as letters and +numbers, have their usual meaning. However the characters +\begin{quote} +\begin{verbatim} +\ { } $ ^ _ % ~ # & +\end{verbatim} +\end{quote} +are used for special purposes within \TeX. Thus typing one of +these characters will not produce the corresponding character +in the final document. Of course these characters are very +rarely used in ordinary text, and there are methods of +producing them when they are required in the final document. + + In order to typeset a mathematical document it is +necessary to produce a considerable number of special +mathematical symbols. One also needs to be able to +change fonts. Also mathematical documents often contain +arrays of numbers or symbols (matrices) and other complicated +expressions. These are produced in \TeX\ using {\it control +sequences}. Most control sequences consist of a backslash +\verb?\? followed by a string of (upper or lower case) letters. +For example, \verb?\alpha?, \verb?\it?, \verb?\sum? and +\verb?\TeX? are control sequences. + + In the example above we used the control sequences +\verb?\it? and \verb?\bf? to change the font to {\it italic} +and {\bf boldface} respectively. Also we used the control +sequences \verb?\to?, \verb?\in?, \verb?\delta? and +\verb?\epsilon? to produce the mathematical symbols $\to$ +and $\in$ and the Greek letters $\delta$ and $\epsilon$. + +\begin{quotation} +\footnotesize +There is another variety of control sequence which consists +of a backslash followed by a {\it single} character that +is not a letter. Examples of control sequences of this sort +are \verb?\{?, \verb?\"? and \verb?\$?. +\end{quotation} + + The special characters \verb?{? and \verb?}? are used for +{\it grouping} purposes. Everything enclosed within +matching pair of such brackets is treated as a single unit. +We have applied these brackets in the example above whenever +we changed fonts. We shall see other instances where one needs +to use \verb?{? and \verb?}? in \TeX\ to group words and symbols +together (e.g., when we need to produce superscripts and +subscripts which contain more than one symbol). + + The special character \verb?$? is used when one is +changing from ordinary text to a mathematical expression +and when one is changing back to ordinary text. Thus we +used +\begin{quote} +\begin{verbatim} +for all $\epsilon > 0$ and for all $x \in D$, +\end{verbatim} +\end{quote} +to produce the phrase +\begin{quote} +\small +for all $\epsilon > 0$ and for all $x \in D$, +\end{quote} +in the example given above. Note also that we used +\verb?$$? and \verb?$$? in the example above to mark the beginning +and end respectively of a mathematical formula that is displayed +on a separate line. + +The remaining special characters +\begin{quote} +\begin{verbatim} +^ _ % ~ # & +\end{verbatim} +\end{quote} +have special purposes within \TeX\ that we shall discuss +later. + diff --git a/info/tcdmanual/pl_math.tex b/info/tcdmanual/pl_math.tex new file mode 100644 index 0000000000..c0c05894f1 --- /dev/null +++ b/info/tcdmanual/pl_math.tex @@ -0,0 +1,810 @@ +\sectiontitle{Mathematical Formulae using Plain \TeX} +\label{pl-math} +\subsectiontitle{Mathematics Mode} +In order to obtain a mathematical formula using \TeX, one must +enter {\it mathematics mode} before the formula and leave it +afterwards. Mathematical formulae can occur either embedded in text +or else displayed on a separate line. When a formula occurs within +the text of a paragraph one should place a \verb?$? sign before and +after the formula, in order to enter and leave mathematics mode. +Thus to obtain a sentence like +\begin{quotation} +\small +Let $f$ be the function defined by $f(x) = 3x + 7$, and +let $a$ be a positive real number. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $f$ be the function defined by $f(x) = 3x + 7$, and +let $a$ be a positive real number. +\end{verbatim} +\end{quote} +In particular, note that even mathematical expressions consisting +of a single character, like $f$ and $a$ in the example above, are +placed within \verb?$? signs. This is to ensure that they are set +in italic type, as is customary in mathematical typesetting. + + In order to obtain an mathematical formula or equation which +is displayed on a line by itself, one places \verb?$$? before and +after the formula. Thus to obtain +\begin{quotation} +\small +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +$$f(x)g(x) = 3x^2 + 19x +28.$$ +The converse does not hold for polynomials over the field of +real numbers. However if we consider polynomials over the +complex field then every polynomial factorizes as a product +of first degree polynomials, by the Fundamental Theorem of Algebra. +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +The product of two first degree polynomials is a quadratic +polynomial. For example, if $f(x) = 3x + 7$ and $g(x) = x + 4$ +then +$$f(x)g(x) = 3x^2 + 19x +28.$$ +The converse does not hold for polynomials over the field of +real numbers. However if we consider polynomials over the +complex field then every polynomial factorizes as a product +of first degree polynomials, by the Fundamental Theorem of Algebra. +\end{verbatim} +\end{quote} + + Numbered equations are produced using the control sequence +\verb?\eqno?. For example, if we type +\begin{quote} +\begin{verbatim} +$$f(x)g(x) = 3x^2 + 19x +28.\eqno(15)$$ +\end{verbatim} +\end{quote} +we obtain +$$f(x)g(x) = 3x^2 + 19x +28.\eqno(15)$$ +We obtain displayed equations with numbers on the left hand +side by using \verb?\leqno? in place of \verb?\eqno?. Thus +if we type +\begin{quote} +\begin{verbatim} +$$f(x)g(x) = 3x^2 + 19x +28.\leqno(15)$$ +\end{verbatim} +\end{quote} +we obtain +$$f(x)g(x) = 3x^2 + 19x +28.\leqno(15)$$ + +\subsectiontitle{Characters in Mathematics Mode} +All the characters on the keyboard have their standard meaning +in mathematics mode, with the exception of the characters +\begin{verbatim} + # $ % & ~ _ ^ \ { } ' +\end{verbatim} +Letters are set in italic type. In mathematics mode the character +\verb?'? has a special meaning: typing \verb?$f' + g''$? +produces $f' + g''$. When in mathematics mode the spaces you type +between letters and other symbols do not affect the spacing of +the final result, since \TeX\ determines the spacing of characters +in formulae by its own internal rules. Thus \verb?$x ( y + z )$? +and \verb?$x(y+z)$? both produce $x ( y + z )$. You can +also type carriage returns where necessary in your input file +(e.g., if you are typing in a complicated formula with many +Greek characters and funny symbols) and this will have no effect on +the final result if you are in mathematics mode. + +\begin{quotation} +\footnotesize +To obtain the characters +$$\# \quad \$ \quad \% \quad \& \quad \_ \quad \{ \quad \}$$ +in mathematics mode, one should type +\begin{verbatim} + \# \$ \% \& \_ \{ \} . +\end{verbatim} +To obtain $\backslash$ in mathematics mode, one may type +\verb?\backslash?. +\end{quotation} + +\subsectiontitle{Subscripts and Superscripts} +Subscripts and superscripts are obtained using the special +characters \verb?_? and \verb?^? respectively. Thus the +expression $t^3 + x_1^2 - x_2$ is obtained by typing +\verb?$t^3 + x_1^2 - x_2$?. When the subscript or superscript +consists of more than one character then the characters involved +should be enclosed in curly brackets. Thus to obtain the +expression $u_{i,j}^{12}$ one would type +{\verb?$u_{i,j}^{12}$?}. + + It is immaterial whether one specifies the subscript before the +superscript or vica versa. Thus \verb?$u_1^2$? and \verb?$u^2_1$? +both produce $u_1^2$. However \TeX\ does not like it if you type +\verb?$s_n_j$? since this could be interpreted either as +$s_{n j}$ or as $s_{n_j}$. The first of these alternatives is +obtained by typing \verb?$s_{n j}$?, the second by typing +\verb?$s_{n_j}$?. A similar remark applies to superscripts. +Incidentally, the second alternative illustrates the fact that +one can obtain subscripts (or superscripts) on subscripts +(or superscripts). However one should not go beyond this to +try to obtain triple subscripts. + +\begin{quotation} +\footnotesize +It is sometimes necessary to obtain expressions such as +$R_i{}^j{}_{kl}$ in which the exact positioning of the subscripts +and superscripts is important (e.g., in papers on general relativity +and tensor analysis). The way this is done is to include the +`empty group' \verb?{}? at the appropriate places to enable the +superscripts and subscripts to be aligned correctly. Thus to +obtain $R_i{}^j{}_{kl}$ one would type +\verb?$R_i{}^j{}_{kl}$?. +\end{quotation} + +\subsectiontitle{Greek Letters} +Greek letters are produced in mathematics mode by preceding the +name of the letter by a backslash \verb?\?. Thus the Greek letters +alpha~($\alpha$), pi~($\pi$) and chi~($\chi$) are obtained by +typing \verb?\alpha?,\verb?\pi? and \verb?\chi? respectively. +Thus the sentence +\begin{quotation} +\small +The area $A$ of a circle of radius $r$ is given by the +formula $A = \pi r^2$. +\end{quotation} +is obtained by typing +\begin{quote} +\begin{verbatim} +The area~$A$ of a circle of radius~$r$ is given by the +formula $A = \pi r^2$. +\end{verbatim} +\end{quote} +Upper case Greek letters are obtained by making the first character +of the name upper case. Thus $\Gamma$,$\Phi$ and $\Lambda$ are +obtained by typing \verb?\Gamma?,\verb?\Phi? and \verb?\Lambda?. +\begin{quotation} +\footnotesize +There is no special command for omicron: just use \verb?o?. +\end{quotation} + + Some Greek letters occur in variant forms. The variant forms +are obtained by preceding the name of the Greek letter by `var'. +The following table lists the usual form of these letters and +the variant forms:- +{\def\displayandname#1{\rlap{$\displaystyle\csname #1\endcsname$}% + \qquad {\tt \char92 #1}} +$$\vcenter{\halign{\displayandname{#}\hfil&&\qquad + \displayandname{#}\hfil\cr +epsilon&varepsilon\cr +theta&vartheta\cr +pi&varpi\cr +rho&varrho\cr +sigma&varsigma\cr +phi&varphi\cr}}$$} + +\subsectiontitle{Mathematical Symbols} +There are numerous mathematical symbols that can be used in +mathematics mode. These are obtained by typing an appropriate +control sequence. These are listed in Appendix~\ref{pl-mthcs}. +For example \verb?\neq?, \verb?\leq? and \verb?\geq? produce +$\neq$, $\leq$ and $\geq$ respectively, \verb?\infty? produces +$\infty$, \verb?\times? and \verb?\div? produce $\times$ and +$\div$, both \verb?\to? and \verb?\rightarrow? produce $\to$, +\verb?\in? produces $\in$, \verb?\cup?, \verb?\cap?, +\verb?\setminus? and \verb?\subset? produce $\cup$,$\cap$, +$\setminus$ and $\subset$ respectively. The list seems endless. + +\subsectiontitle{Changing Fonts in Mathematics Mode} +One can change fonts in mathematics mode in exactly the same +way as when typesetting ordinary text. For instance \verb?\rm? +changes to the $\rm roman$ font, \verb?\bf? changes to the +$\bf boldface$ font and \verb?\mit? changes to the +$math$ $italic$ font. The $math$ $italic$ font is automatically +used in mathematics mode unless you explicitly change the font. +In addition there is a `calligraphic' font which is obtained using +the control sequence \verb?\cal?. {\it This font can only be used +for uppercase letters.} These calligraphic letters have the form +$$\cal ABCDEFGHIJKLMNOPQRSTUVWXYZ.$$ + + The following example shows how fonts are changed in an +example involving mathematics. To obtain +\begin{quotation} +\small +Let $\bf u$,$\bf v$ and $\bf w$ be three vectors in +${\bf R}^3$. The volume~$V$ of the parallelepiped with +corners at the points $\bf 0$,$\bf u$,$\bf v$, +$\bf w$,$\bf u+v$,$\bf u+w$,$\bf v+w$ and $\bf u+v+w$ +is given by the formula +$$V = {\bf (u \times v) . w}.$$ +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +Let $\bf u$,$\bf v$ and $\bf w$ be three vectors in +${\bf R}^3$. The volume~$V$ of the parallelepiped with +corners at the points $\bf 0$,$\bf u$,$\bf v$, +$\bf w$,$\bf u+v$,$\bf u+w$,$\bf v+w$ and $\bf u+v+w$ +is given by the formula +$$V = {\bf (u \times v) . w}.$$ +\end{verbatim} +\end{quote} + +\subsectiontitle{Standard Functions and Embedded Text} +The names of certain standard functions and abbreviations are +obtained by typing a backlash \verb?\? before the name. The +complete list in \TeX\ is as follows:- + +$$\vcenter{\halign{$\backslash${\tt #}&&\quad $\backslash${\tt #}\cr +arccos&cos&csc&exp&ker&limsup&min&sinh\cr +arcsin&cosh°&gcd&lg&ln&Pr&sup\cr +arctan&cot&det&hom&lim&log&sec&tan\cr +arg&coth&dim&inf&liminf&max&sin&tanh\cr}}$$ + + Names of functions and other abbreviations not in this list can be +obtained by converting to the roman font. Thus one obtains +${\rm Aut}(V)$ by typing \verb?${\rm Aut}(V)$?. +\begin{quotation} +\footnotesize +Note that if one were to type simply \verb?$Aut(V)$? one +would obtain $Aut(V)$, because \TeX\ has treated +\verb?Aut? as the product of three quantities $A$,$u$ and $t$ and +typeset the formula accordingly. +\end{quotation} + +The recommended way to obtain ordinary text in displayed mathematical +formulae is to use \verb?\hbox?. Thus one obtains +$$M^\bot = \{ f \in V' : f(m) = 0 \hbox{ for all } m \in M \}.$$ +by typing +\begin{quote} +\begin{verbatim} +$$M^\bot = \{ f \in V' : f(m) = 0 \hbox{ for all } m \in M \}.$$ +\end{verbatim} +\end{quote} +Note the blank spaces before and after the words `for all' in the above +example. Had we typed +\begin{quote} +\begin{verbatim} +$$M^\bot = \{ f \in V' : f(m) = 0 \hbox{for all} m \in M \}.$$ +\end{verbatim} +\end{quote} +we would have obtained +$$M^\bot = \{ f \in V' : f(m) = 0 \hbox{for all} m \in M \}.$$ + +\subsectiontitle{Fractions,Roots and Ellipsis} +Fractions of the form +$${\hbox{\it numerator} \over \hbox{\it denominator}}$$ +are obtained in Plain \TeX\ using the construction +\begin{quote} +\verb?{?{\it numerator\verb? \over ?denominator}\verb?}?. +\end{quote} +For example, to obtain +\begin{quotation} +\small +The function $f$ is given by +$$f(x) = 2x + {x - 7 \over x^2 + 4}$$ +for all real numbers $x$. +\end{quotation} +one would type +\begin{quote} +\begin{verbatim} +The function $f$ is given by +$$f(x) = 2x + {x - 7 \over x^2 + 4}$$ +for all real numbers $x$. +\end{verbatim} +\end{quote} + + To obtain square roots one uses the control sequence +\verb?\sqrt?. For example, $\sqrt{x^2 + y^2}$ is produced +by typing \verb?$\sqrt{x^2 + y^2}$?. To produce roots of +higher order in Plain \TeX\ one uses the construction +\begin{quote} +\verb?\root ?$n$\verb? \of ?{\it expression} +\end{quote} +to produce $\root n \of{\hbox{\it expression}}$. Thus typing +\verb?$\root 3 \of {x + 3y}$? produces +$\root 3 \of {x + 3y}$. + +Ellipsis (three dots) is produced in mathematics mode using +the control sequences \verb?\cdots? and \verb?\ldots?. A +low ellipsis, such as $(x_1,x_2,\ldots ,x_n)$, is produced by +typing +\begin{quote} +\begin{verbatim} +$(x_1,x_2,\ldots ,x_n)$. +\end{verbatim} +\end{quote} +A centred ellipsis, such as $x_1 + x_2 + \cdots + x_n$ is produced +by typing +\begin{quote} +\begin{verbatim} +$x_1 + x_2 + \cdots + x_n$. +\end{verbatim} +\end{quote} + +\subsectiontitle{Accents in Mathematics Mode} +The control sequences \verb?\underline?, \verb?\overline?, + \verb?\hat?, \verb?\check?, \verb?\tilde?, \verb?\acute?, +\verb?\grave?, \verb?\dot?, \verb?\ddot?, \verb?\breve?, +\verb?\bar? and \verb?\vec? produce underlining, overlining, +and various accents, {\it but only in mathematics mode}. +For example, $\tilde c$ is produced by \verb?$\tilde{c}$?. +The effect of these accents on the letter $a$ is shown in +the table below: +\begin{quote} +\begin{tabular}{ll} +\verb?$\underline{a}$? & $\underline{a}$\\ +\verb?$\overline{a}$? & $\overline{a}$\\ +\verb?$\hat{a}$? & $\hat{a}$\\ +\verb?$\check{a}$? & $\check{a}$\\ +\verb?$\tilde{a}$? & $\tilde{a}$\\ +\verb?$\acute{a}$? & $\acute{a}$\\ +\verb?$\grave{a}$? & $\grave{a}$\\ +\verb?$\dot{a}$? & $\dot{a}$\\ +\verb?$\ddot{a}$? & $\ddot{a}$\\ +\verb?$\breve{a}$? & $\breve{a}$\\ +\verb?$\bar{a}$? & $\bar{a}$\\ +\verb?$\vec{a}$? & $\vec{a}$ +\end{tabular} +\end{quote} +You should bear in mind that when a character is underlined in +a mathematical manuscript then it is normally typeset in +bold face without any underlining. Underlining is used very +rarely in print. + +\begin{quotation} +\footnotesize +The control sequences such as \verb?\'? and \verb?\"?, used +to produce accents in ordinary text, may not be used in +mathematics mode. +\end{quotation} + +\subsectiontitle{Brackets and Norms} +The frequently used left delimiters include $($, $[$ and $\{$, +which are obtained by typing \verb?(?, \verb?[? and \verb?\{? +respectively. The corresponding right delimiters are of +course $)$, $]$ and $\}$, obtained by typing \verb?)?, +\verb?]? and \verb?\}?. In addition $|$ and $\|$ are used as +both left and right delimiters, and are obtained by typing +\verb?|? and \verb?\|? respectively. For example, we obtain +\begin{quotation} +\small +Let $X$ be a Banach space and let $f \colon B \to {\bf R}$ +be a bounded linear functional on $X$. The {\it norm} of +$f$, denoted by $\|f\|$, is defined by +$$\|f\| = \inf \{ K \in [0,+\infty) : + |f(x)| \leq K \|x\| \hbox{ for all } x \in X \}.$$ +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +Let $X$ be a Banach space and let $f \colon B \to {\bf R}$ +be a bounded linear functional on $X$. The {\it norm} of +$f$, denoted by $\|f\|$, is defined by +$$\|f\| = \inf \{ K \in [0,+\infty) : + |f(x)| \leq K \|x\| \hbox{ for all } x \in X \}.$$ +\end{verbatim} +\end{quote} + + Larger delimiters are sometimes required which have the +appropriate height to match the size of the subformula which +they enclose. Consider, for instance, the problem of typesetting +the following formula: +$$f(x,y,z) = 3y^2 z \left( 3 + {7x+5 \over 1 + y^2} \right).$$ +The way to type the large parentheses is to type \verb?\left(? +for the left parenthesis and \verb?\right)? for the right +parenthesis, and let \TeX\ do the rest of the work for you. +Thus the above formula was obtained by typing +\begin{quote} +\begin{verbatim} +$$f(x,y,z) = 3y^2 z \left( 3 + {7x+5 \over 1 + y^2} \right).$$ +\end{verbatim} +\end{quote} +If you type a delimiter which is preceded by \verb?\left? then +\TeX\ will search for a corresponding delimiter preceded by +\verb?\right? and calculate the size of the delimiters required +to enclose the intervening subformula. One is allowed to balance +a \verb?\left(? with a \verb?\right]? (say) if one desires: there +is no reason why the enclosing delimiters have to have the same +shape. One may also nest pairs of delimiters within one another: +by typing +\begin{quote} +\begin{verbatim} +$$\left| 4 x^3 + \left( x + {42 \over 1+x^4} \right) \right|.$$ +\end{verbatim} +\end{quote} +we obtain +$$\left| 4 x^3 + \left( x + {42 \over 1+x^4} \right) \right|.$$ + +\begin{quotation} +\footnotesize +By typing \verb?\left.? and \verb?\right.? one obtains +{\it null delimiters} which are completely invisible. Consider, +for example, the problem of typesetting +$$\left. {du \over dx} \right|_{x=0}.$$ +We wish to make the vertical bar big enough to match the +derivative preceding it. To do this, we suppose that the +derivative is enclosed by delimiters, where the left delimiter +is invisible and the right delimiter is the vertical line. +The invisible delimiter is produced using \verb?\left.? and thus +the whole formula is produced by typing +\begin{verbatim} +$$\left. {du \over dx} \right|_{x=0}.$$ +\end{verbatim} +\end{quotation} + +\newskip\plaincentering +\plaincentering=0pt plus 1000pt minus 1000pt + +\def\eqalign#1{\null\,\vcenter{\openup\jot\mathsurround=0pt + \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil + \crcr#1\crcr}}\,} +\newif\ifdtp +\def\mthdisplay{\global\dtptrue\openup\jot\mathsurround=0pt + \everycr{\noalign{\ifdtp \global\dtpfalse + \vskip-\lineskiplimit \vskip\normallineskiplimit + \else \penalty\interdisplaylinepenalty \fi}}} +\def\restindisp{\tabskip=0pt\everycr{}} % restore inside \mthdisplay +\def\displaylines#1{\mthdisplay + \halign{\hbox to\displaywidth{$\restindisp\hfil\displaystyle##\hfil$}\crcr + #1\crcr}} +\def\eqalignno#1{\mthdisplay \tabskip=\plaincentering + \halign to\displaywidth{\hfil$\restindisp\displaystyle{##}$\tabskip=0pt + &$\restindisp\displaystyle{{}##}$\hfil\tabskip=\plaincentering + &\llap{$\restindisp##$}\tabskip=0pt\crcr + #1\crcr}} +\def\leqalignno#1{\mthdisplay \tabskip=\plaincentering + \halign to\displaywidth{\hfil$\restindisp\displaystyle{##}$\tabskip=0pt + &$\restindisp\displaystyle{{}##}$\hfil\tabskip=\plaincentering + &\kern-\displaywidth\rlap{$\restindisp##$}\tabskip=\displaywidth\crcr + #1\crcr}} + +\subsectiontitle{Multiline Formulae in Plain \TeX} +Consider the problem of typesetting the formula +$$\eqalign{\cos 2\theta &= \cos^2 \theta - \sin^2 \theta \cr + &= 2 \cos^2 \theta - 1.\cr}$$ +It is necessary to ensure that the $=$ signs are aligned with one +another. The above example was obtained by typing +typing the lines +\begin{quote} +\begin{verbatim} +$$\eqalign{\cos 2\theta &= \cos^2 \theta - \sin^2 \theta \cr + &= 2 \cos^2 \theta - 1.\cr}$$ +\end{verbatim} +\end{quote} +Note the use of the special character \verb?&? as an {it alignment +tab}. When the formula is typeset, the part of the second line of +the formula beginning with an occurrence of \verb?&? will be +placed immediately beneath that part of the first line of the +formula which begins with the corresponding occurrence of \verb?&?. +Also the control sequence \verb?\cr? is placed at the end of each +line of the formula. + +Although we have placed corresponding occurrences of \verb?&? +beneath one another in the above example, it is not necessary to +do this in the input file. It was done in the above example merely +to improve the appearance (and readability) of the input file. +The more complicated example +\begin{quotation} +\small +If $h \leq {1 \over 2} |\zeta - z|$ then +$$|\zeta - z - h| \geq {1 \over 2} |\zeta - z|$$ +and hence +$$\eqalign{ +\left| {1 \over \zeta - z - h} - {1 \over \zeta - z} \right| +& = \left| +{(\zeta - z) - (\zeta - z - h) \over (\zeta - z - h)(\zeta - z)} +\right| \cr & = +\left| {h \over (\zeta - z - h)(\zeta - z)} \right| \cr + & \leq {2 |h| \over |\zeta - z|^2}.\cr}$$ +\end{quotation} +was obtained by typing +\begin{quote} +\begin{verbatim} +If $h \leq {1 \over 2} |\zeta - z|$ then +$$|\zeta - z - h| \geq {1 \over 2} |\zeta - z|$$ +and hence +$$\eqalign{ +\left| {1 \over \zeta - z - h} - {1 \over \zeta - z} \right| +& = \left| +{(\zeta - z) - (\zeta - z - h) \over (\zeta - z - h)(\zeta - z)} +\right| \cr & = +\left| {h \over (\zeta - z - h)(\zeta - z)} \right| \cr + & \leq {2 |h| \over |\zeta - z|^2}.\cr}$$ +\end{verbatim} +\end{quote} + + Numbered multiline formulae are produced using the control +sequence \verb?\eqalignno?. This works exactly like +\verb?\eqalign?, but on each line for which you want an +equation number you insert `\verb?&?{\it equation number}' +immediately before the \verb?\cr?. Thus typing +\begin{quote} +\begin{verbatim} +$$\eqalignno{\sin 2\theta &= 2\sin \theta \cos \theta,&(6)\cr + \cos 2\theta &= \cos^2 \theta - \sin^2 \theta \cr + &= 2 \cos^2 \theta - 1.&(7)\cr}$$ +\end{verbatim} +\end{quote} +produces +$$\eqalignno{\sin 2\theta &= 2\sin \theta \cos \theta,&(6)\cr + \cos 2\theta &= \cos^2 \theta - \sin^2 \theta \cr + &= 2 \cos^2 \theta - 1.&(7)\cr}$$ + + It is occasionally necessary to produce formulae such as +$$|x| = \cases{ x &if $x \geq 0$;\cr + -x &if $x < 0$.\cr}$$ +We use the control sequence \verb?\cases?. The above formula is +obtained by typing +\begin{quote} +\begin{verbatim} +$$|x| = \cases{ x &if $x \geq 0$;\cr + -x &if $x < 0$.\cr}$$ +\end{verbatim} +\end{quote} +Note the use of the alignment tab \verb?&?. Also note that the +expression to the left of the alignment tab \verb?&? is a +mathematical expression, processed in mathematics mode, whereas +the expression to the right of the alignment tab \verb?&? is +treated as ordinary text. Thus one must place \verb?$? before and +after any mathematical expression occurring to the right of the +alignment tab \verb?&?. Note also the use of \verb?\cr? at the +end of each line on the right hand side of the equation. + +\subsectiontitle{Matrices and other arrays in Plain \TeX} +Matrices and other arrays are produced in Plain \TeX\ using the +control sequences \verb?\matrix? and \verb?\pmatrix?. For example, +suppose that we wish to typeset the following passage: +\begin{quotation} +\small +The {\it characteristic polynomial} $\chi(\lambda)$ of the +$3 \times 3$~matrix +$$\left( \matrix{ a & b & c \cr + d & e & f \cr + g & h & i \cr} \right)$$ +is given by the formula +$$\chi(\lambda) = \left| \matrix{ + \lambda - a & -b & -c \cr + -d & \lambda - e & -f \cr + -g & -h & \lambda - i \cr} \right|.$$ +\end{quotation} +This passage is produced by the following input: +\begin{quote} +\begin{verbatim} +The {\it characteristic polynomial} $\chi(\lambda)$ of the +$3 \times 3$~matrix +$$\left( \matrix{ a & b & c \cr + d & e & f \cr + g & h & i \cr} \right)$$ +is given by the formula +$$\chi(\lambda) = \left| \matrix{ + \lambda - a & -b & -c \cr + -d & \lambda - e & -f \cr + -g & -h & \lambda - i \cr} \right|.$$ +\end{verbatim} +\end{quote} +First of all, note the use of \verb?\left? and \verb?\right? +to produce the large delimiters around the arrays. As we have +already seen, if we use +$$\hbox{\verb?\left(?} \qquad \ldots \qquad + \hbox{\verb?\right)?}$$ +then the size of the parentheses is chosen to match the subformula +that they enclose. Next note the use of the alignment tab +character \verb?&? to separate the entries of the matrix and +the use of \verb?\cr? at the end of each row of the matrix, exactly +as in the construction of multiline formulae described above. + +Since matrices delimited by parentheses are common, Plain +\TeX\ provides the control sequence \verb?\pmatrix? to +construct them. Thus +$$\pmatrix{\lambda - a & -b & -c \cr +-d & \lambda - e & -f \cr +-g & -h & \lambda - i \cr}.$$ +may be obtained by typing +\begin{quote} +\begin{verbatim} +$$\pmatrix{\lambda - a & -b & -c \cr +-d & \lambda - e & -f \cr +-g & -h & \lambda - i \cr}.$$ +\end{verbatim} +\end{quote} +Note that \verb?\pmatrix? behaves exactly like \verb?\matrix?, +except that there is no need to use \verb?\left(? and +\verb?\right)? to produce the parentheses around the matrix, +since these are automatically produced by \verb?\pmatrix?. + + More complicated arrays can be produced in Plain \TeX\ with +comparative ease using \verb?\halign? (see Chapter 22 of +the \TeX book). + +\subsectiontitle{Derivatives, Limits, Sums and Integrals} +The expressions +$${du \over dt} \hbox{ and } {d^2 u \over dx^2}$$ +are obtained by typing \verb?{du \over dt}? +and \verb?{d^2 u \over dx^2}? respectively. The mathematical +symbol $\partial$ is produced using \verb?\partial?. Thus to obtain +partial derivatives such as +$${\partial u \over \partial t} \hbox{ and } + {\partial^2 u \over \partial x^2}$$ +one types \verb?{\partial u \over \partial t}? and +\verb?{\partial^2 u \over \partial x^2}? respectively. + +To obtain mathematical expressions such as +$$\lim_{x \to +\infty} \hbox{, } \inf_{x > s} \hbox{ and } \sup_K$$ +in displayed equations we type \verb?\lim_{x \to +\infty}?, +\verb?\inf_{x > s}? and \verb?\sup_K? respectively. Thus to obtain +$$\lim_{x \to 0} {3x^2 +7 \over x^2 +1} = 3.$$ +we type +\begin{quote} +\begin{verbatim} +$$\lim_{x \to 0} {3x^2 +7x^3 \over x^2 +5x^4} = 3.$$ +\end{verbatim} +\end{quote} + +To obtain a summation sign such as +$$\sum_{i=1}^{2n}$$ +we type \verb?\sum_{i=1}^{2n}?. Thus +$$\sum_{k=1}^n k^2 = {1 \over 2} n (n+1).$$ +is obtained by typing +\begin{quote} +\begin{verbatim} +$$\sum_{k=1}^n k^2 = {1 \over 2} n (n+1).$$ +\end{verbatim} +\end{quote} + + We now discuss how to obtain {\it integrals} in mathematical +documents. A typical integral is the following: +$$\int_a^b f(x)\,dx.$$ +This is typeset using +\begin{quote} +\begin{verbatim} +$$\int_a^b f(x)\,dx.$$ +\end{verbatim} +\end{quote} +The integral sign $\int$ is typeset using the control sequence +\verb?\int?, and the {\it limits of integration} (in this case +$a$ and $b$) are treated as a subscript and a superscript on the +integral sign. It remains to describe the purpose of the \verb?\,? +occurring immediately before the \verb?dx?. This is the means of telling +\TeX\ to put extra space before the $d$. This is necessary to +produce the correct appearance. + + Most integrals occurring in mathematical documents begin with +an integral sign and contain one or more instances of \verb?d? +followed by another (Latin or Greek) letter, as in $dx$, $dt$, +and $d\theta$. To obtain the correct appearance one should put +extra space before the $d$, using \verb?\,?. Thus +$$\int_0^{+\infty} x^n e^{-x} \,dx = n!.$$ +$$\int \cos \theta \,d\theta = \sin \theta.$$ +$$\int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy + = \int_{\theta=0}^{2\pi} \int_{r=0}^R + f(r\cos\theta,r\sin\theta) r\,dr\,d\theta.$$ +and +$$\int_0^R {2x\,dx \over 1+x^2} = \log(1+R^2).$$ +are obtained by typing +\begin{quote} +\begin{verbatim} +$$\int_0^{+\infty} x^n e^{-x} \,dx = n!.$$ +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +$$\int \cos \theta \,d\theta = \sin \theta.$$ +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +$$\int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy + = \int_{\theta=0}^{2\pi} \int_{r=0}^R + f(r\cos\theta,r\sin\theta) r\,dr\,d\theta.$$ +\end{verbatim} +\end{quote} +and +\begin{quote} +\begin{verbatim} +$$\int_0^R {2x\,dx \over 1+x^2} = \log(1+R^2).$$ +\end{verbatim} +\end{quote} +respectively. + + In some multiple integrals (i.e., integrals containing more than +one integral sign) one finds that \TeX\ puts too much space +between the integral signs. The way to improve the appearance of +of the integral is to use the control sequence \verb?\!? to +remove a thin strip of unwanted space. Thus, for example, the +multiple integral +$$\int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy.$$ +is obtained by typing +\begin{quote} +\begin{verbatim} +$$\int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy.$$ +\end{verbatim} +\end{quote} +Had we typed +\begin{quote} +\begin{verbatim} +$$\int_0^1 \int_0^1 x^2 y^2\,dx\,dy.$$ +\end{verbatim} +\end{quote} +we would have obtained +$$\int_0^1 \int_0^1 x^2 y^2\,dx\,dy.$$ + + A particularly noteworthy example comes when we are +typesetting a multiple integral such as +$$\int \!\!\! \int_D f(x,y)\,dx\,dy.$$ +Here we use \verb?\!? three times to obtain suitable spacing +between the integral signs. We typeset this integral using +\begin{quote} +\begin{verbatim} +$$\int \!\!\! \int_D f(x,y)\,dx\,dy.$$ +\end{verbatim} +\end{quote} +Had we typed +\begin{quote} +\begin{verbatim} +$$\int \int_D f(x,y)\,dx\,dy.$$ +\end{verbatim} +\end{quote} +we would have obtained +$$\int \int_D f(x,y)\,dx\,dy.$$ + + The following (reasonably complicated) passage exhibits a +number of the features which we have been discussing: +\begin{quotation} +\small + In non-relativistic wave mechanics, the wave function +$\psi({\bf r},t)$ of a particle satisfies the +{\it Schr\"{o}dinger Wave Equation} +$$i\hbar{\partial \psi \over \partial t} + = {-\hbar^2 \over 2m} \left( + {\partial^2 \over \partial x^2} + + {\partial^2 \over \partial y^2} + + {\partial^2 \over \partial z^2} + \right) \psi + V \psi.$$ +It is customary to normalize the wave equation by +demanding that +$$\int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},0) \right|^2\,dx\,dy\,dz = 1.$$ +A simple calculation using the Schr\"{o}dinger wave +equation shows that +$${d \over dt} \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 0,$$ +and hence +$$\int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 1$$ +for all times~$t$. If we normalize the wave function in this +way then, for any (measurable) subset~$V$ of ${\bf R}^3$ and +time~$t$, +$$\int \!\!\! \int \!\!\! \int_V + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz$$ +represents the probability that the particle is to be found +within the region~$V$ at time~$t$. +\end{quotation} +One would typeset this in Plain \TeX\ by typing +\begin{quote} +\begin{verbatim} + In non-relativistic wave mechanics, the wave function +$\psi({\bf r},t)$ of a particle satisfies the +{\it Schr\"{o}dinger Wave Equation} +$$i\hbar{\partial \psi \over \partial t} + = {-\hbar^2 \over 2m} \left( + {\partial^2 \over \partial x^2} + + {\partial^2 \over \partial y^2} + + {\partial^2 \over \partial z^2} + \right) \psi + V \psi.$$ +It is customary to normalize the wave equation by +demanding that +$$\int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},0) \right|^2\,dx\,dy\,dz = 1.$$ +A simple calculation using the Schr\"{o}dinger wave +equation shows that +$${d \over dt} \int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 0,$$ +and hence +$$\int \!\!\! \int \!\!\! \int_{{\bf R}^3} + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz = 1$$ +for all times~$t$. If we normalize the wave function in this +way then, for any (measurable) subset~$V$ of ${\bf R}^3$ and +time~$t$, +$$\int \!\!\! \int \!\!\! \int_V + \left| \psi({\bf r},t) \right|^2\,dx\,dy\,dz$$ +represents the probability that the particle is to be found +within the region~$V$ at time~$t$. +\end{verbatim} +\end{quote} + diff --git a/info/tcdmanual/pl_mthcs.tex b/info/tcdmanual/pl_mthcs.tex new file mode 100644 index 0000000000..e2e8a32a75 --- /dev/null +++ b/info/tcdmanual/pl_mthcs.tex @@ -0,0 +1,219 @@ +\sectiontitle{Control Sequences used in Mathematics (Plain \TeX)} +\label{pl-mthcs} + +\subsectiontitle{Font Changes, Accents and Standard Functions} +\appenditem{Changing Fonts in Mathematical Expressions} +Fonts are changed using suitable control sequences. +\begin{quote} +\begin{tabular}{ll} +\verb?\mit? changes to the `math italic' font: & $\mit Math Italic$\\ +\verb?\rm? changes to the roman font: & $\rm Roman$\\ +\verb?\sl? changes to a slanted roman font: & $\sl Slanted$\\ +\verb?\it? changes to an italic font: & $\it Italic$\\ +\verb?\tt? changes to an ``typewriter'' font: & $\tt Typewriter$\\ +\verb?\bf? changes to a boldface font: & $\bf Boldface$\\ +\verb?\cal? changes to a calligraphic font: & $\cal CALLIGRAPHIC$ +\end{tabular} +\end{quote} +The default font for mathematics is $Math Italic$. The +$\cal CALLIGRAPHIC$ font is only available for uppercase letters. +Any change of font made within a group enclosed within curly +brackets \verb?{? and \verb?}? will only apply to text within +that group. On leaving the group, the current font is restored +to what it was before entering the group. + +\appenditem{Accents in Mathematics Mode} +Accents in mathematics mode are produced using appropriate +control sequences. The effect of these on the letter $a$ is +exhibited in the following table. +\begin{quote} +\begin{tabular}{ll} +\verb?$\underline{a}$? & $\underline{a}$\\ +\verb?$\overline{a}$? & $\overline{a}$\\ +\verb?$\hat{a}$? & $\hat{a}$\\ +\verb?$\check{a}$? & $\check{a}$\\ +\verb?$\tilde{a}$? & $\tilde{a}$\\ +\verb?$\acute{a}$? & $\acute{a}$\\ +\verb?$\grave{a}$? & $\grave{a}$\\ +\verb?$\dot{a}$? & $\dot{a}$\\ +\verb?$\ddot{a}$? & $\ddot{a}$\\ +\verb?$\breve{a}$? & $\breve{a}$\\ +\verb?$\bar{a}$? & $\bar{a}$\\ +\verb?$\vec{a}$? & $\vec{a}$ +\end{tabular} +\end{quote} +These control sequences should only be used for mathematics, +not for ordinary text. + +You should bear in mind that when a character is underlined in +a mathematical manuscript then it is normally typeset in +bold face without any underlining. Underlining is used very +rarely in print. + +\appenditem{Standard Functions} +The names of certain standard functions and abbreviations are +obtained by typing a backlash \verb?\? before the name. The +complete list in \TeX\ is as follows:- + +$$\vcenter{\halign{$\backslash${\tt #}&&\quad $\backslash${\tt #}\cr +arccos&cos&csc&exp&ker&limsup&min&sinh\cr +arcsin&cosh°&gcd&lg&ln&Pr&sup\cr +arctan&cot&det&hom&lim&log&sec&tan\cr +arg&coth&dim&inf&liminf&max&sin&tanh\cr}}$$ + + +\def\displayandname#1{\rlap{$\displaystyle\csname #1\endcsname$}% + \qquad {\tt \char92 #1}} +\def\mathlexicon#1{$$\vcenter{\halign{\displayandname{##}\hfil&&\qquad + \displayandname{##}\hfil\cr #1}}$$} + +\subsectiontitle{Control Sequences for Mathematical Symbols} +\appenditem{Lowercase Greek Letters} +\mathlexicon{alpha&iota&varrho\cr +beta&kappa&sigma\cr +gamma&lambda&varsigma\cr +delta&mu&tau\cr +epsilon&nu&upsilon\cr +varepsilon&xi&phi\cr +zeta&\omit\qquad \rlap{$o$}\qquad {\tt o}\hfil&varphi\cr +eta&pi&chi\cr +theta&varpi&psi\cr +vartheta&rho&omega\cr} + +\appenditem{Uppercase Greek Letters} +\mathlexicon{Gamma&Xi&Phi\cr +Delta&Pi&Psi\cr +Theta&Sigma&Omega\cr +Lambda&Upsilon&\omit\hfil\cr} + +\appenditem{Miscellaneous Symbols} +\mathlexicon{aleph&prime&forall\cr +hbar&emptyset&exists\cr +imath&nabla&neg\cr +jmath&surd&flat\cr +ell&top&natural\cr +wp&bot&sharp\cr +Re&|&clubsuit\cr +Im&angle&diamondsuit\cr +partial&triangle&heartsuit\cr +infty&backslash&spadesuit\cr} + +\appenditem{``Large'' Operators} +\mathlexicon{sum&bigcap&bigodot\cr +prod&bigcup&bigotimes\cr +coprod&bigsqcup&bigoplus\cr +int&bigvee&biguplus\cr +oint&bigwedge&\omit\hfil\cr} + +\appenditem{Binary Operations} +\mathlexicon{pm&cap&vee\cr +mp&cup&wedge\cr +setminus&uplus&oplus\cr +cdot&sqcap&ominus\cr +times&sqcup&otimes\cr +ast&triangleleftø\cr +star&triangleright&odot\cr +diamond&wr&dagger\cr +circ&bigcirc&ddagger\cr +bullet&bigtriangleup&amalg\cr +div&bigtriangledown&\omit\hfil\cr} + +\appenditem{Relations} +\mathlexicon{leq&geq&equiv\cr +prec&succ&sim\cr +preceq&succeq&simeq\cr +ll&gg&asymp\cr +subset&supset&approx\cr +subseteq&supseteq&cong\cr +sqsubseteq&sqsupseteq&bowtie\cr +in&ni&propto\cr +vdash&dashv&models\cr +smile&mid&doteq\cr +frown¶llel&perp\cr} + +\appenditem{Negated Relations} +\def\negdisplayandname#1{\rlap{$\displaystyle\not\csname #1\endcsname$}% +\qquad {\tt \char92 not\char92 #1}} +$$\vcenter{\halign{\negdisplayandname{#}\hfil&&\qquad + \negdisplayandname{#}\hfil\cr +\omit\rlap{$\not<$}\qquad{\tt \char92 not<}\hfil&\omit +\qquad\rlap{$\not>$}\qquad{\tt \char92 not>}\hfil&\omit +\qquad\rlap{$\not=$}\qquad{\tt \char92 not=}\hfil\cr +leq&geq&equiv\cr +prec&succ&sim\cr +preceq&succeq&simeq\cr +subset&supset&approx\cr +subseteq&supseteq&cong\cr +sqsubseteq&sqsupseteq&asymp\cr}}$$ + +\appenditem{Arrows} +\mathlexicon{leftarrow&longleftarrow&uparrow\cr +Leftarrow&Longleftarrow&Uparrow\cr +rightarrow&longrightarrow&downarrow\cr +Rightarrow&Longrightarrow&Downarrow\cr +leftrightarrow&longleftrightarrow&updownarrow\cr +Leftrightarrow&Longleftrightarrow&Updownarrow\cr +mapsto&longmapsto&nearrow\cr +hookleftarrow&hookrightarrow&searrow\cr +leftharpoonup&rightharpoonup&swarrow\cr +leftharpoondown&rightharpoondown&nwarrow\cr +rightleftharpoons&\omit\hfil&\omit\hfil\cr} + +\appenditem{Openings} +\mathlexicon{lbrack&lfloor&lciel\cr +lbrace&langle&\omit\hfil\cr} + +\appenditem{Closings} +\mathlexicon{rbrack&rfloor&rciel\cr +rbrace&rangle&\omit\hfil\cr} + +\appenditem{Alternative Names} +$$\vcenter{\halign{\displayandname{#}\hfil&\qquad +(same as {\tt \char92 #})\hfil\cr +\omit\rlap{$\not=$}\qquad + {\tt \char92 ne} or {\tt \char92 neq}\hfil¬=\cr +le&leq\cr +ge&geq\cr +\omit\rlap{$\{$}\qquad{\tt \char92 \char123}\hfil&lbrace\cr +\omit\rlap{$\}$}\qquad{\tt \char92 \char125}\hfil&lbrace\cr +to&rightarrow\cr +gets&leftarrow\cr +owns&ni\cr +land&wedge\cr +lor&vee\cr +lnot&neg\cr +vert&\omit\qquad (same as {\tt |})\hfil\cr +Vert&\omit\qquad (same as {\tt \char92 |})\hfil\cr +iff&\omit\qquad (same as {\tt \char92 Longleftrightarrow}, but with\hfil\cr +\omit\hfil&\omit\qquad\ extra space at each end)\hfil\cr +colon&\omit\qquad (same as {\tt :}, but with less space around it and\hfil\cr +\omit\hfil&\omit +\qquad\ less likelihood of a line break after it)\hfil\cr}}$$ + +\subsectiontitle{Some frequently used Control Sequences of Plain \TeX} +We list some of the control sequences of Plain \TeX\ that are +frequently used when typesetting mathematical formulae. The +list is by no means exhaustive. For information on how to +apply these control sequences, consult the appropriate +manual (e.g. `The \TeX book'). +\begin{quote} +\begin{tabular}{ll} +\verb?\over? & produces fractions \\ +\verb?\sqrt? & produces square roots \\ +\verb?\root? & produces $n$th roots \\ +\verb?\left? & produces left delimiter of required size \\ +\verb?\right? & produces right delimiter of required size \\ +\verb?\quad? & produces a `quad' of blank space \\ +\verb?\qquad? & produces two `quads' of blank space \\ +\verb?\,? & produces a thin space \\ +\verb?\!? & removes a thin space \\ +\verb?\hbox? & creates a box of text within mathematics \\ +\verb?\eqalign? & creates a multiline formula \\ +\verb?\eqalignno? & creates a numbered multiline formula \\ +\verb?\leqalignno? & creates a multiline formula numbered on the left \\ +\verb?\cases? & creates an equation that splits into cases \\ +\verb?\matrix? & produces an array \\ +\verb?\pmatrix? & produces a matrix surrounded by parentheses +\end{tabular} +\end{quote} + diff --git a/info/tcdmanual/pl_summ.tex b/info/tcdmanual/pl_summ.tex new file mode 100644 index 0000000000..f111c724e6 --- /dev/null +++ b/info/tcdmanual/pl_summ.tex @@ -0,0 +1,364 @@ +\sectiontitle{Summary of Commonly-Used Features of Plain \TeX} +\label{pl-summ} + +\sectiontitle{Rules for Ordinary Text (without mathematics)} +\subsectiontitle{Special Characters} +All characters on the keyboard have their standard meaning +in ordinary text with the exception of the +special characters +\begin{quote} +\begin{verbatim} +# $ % & ~ _ ^ \ { } ' +\end{verbatim} +\end{quote} +which have special functions within \TeX. On the rare +occasions when these special characters are required in +the final document they must be produced by an appropriate +control sequence. Thus you should type \verb?\#?, \verb?\$?, +\verb?\%?, \verb?\&?, \verb?\_?, \verb?\{? and \verb?\}? to +obtain $\#$, $\$$, $\%$, $\&$, $\_$, $\{$ and $\}$ +respectively. + +\subsectiontitle{Special Characters} +Successive paragraphs in the input file should be separated +by a completely blank line. All paragraphs will be +automatically indented by \TeX\ with the exception of the +first paragraph of a new section. (One can override the +conventions of \TeX\ by placing the control sequence +\verb?\noindent? of the control sequence \verb?\indent? +at the beginning of the paragraph.) + +\subsectiontitle{Quotation marks} +To produce single quotation marks use the characters +\verb?`? (left quote) and \verb?'? (right quote). For +double quotation marks use \verb?``? (two left quotes) +and \verb?''? (two right quotes). {\it Do not use\/} +\verb?"? (undirected double quote). Thus to obtain +\begin{quotation} +\small +``This is easy'' he said. +\end{quotation} +you should type +\begin{quote} +\begin{verbatim} +``This is easy'' he said. +\end{verbatim} +\end{quote} + +The control sequence \verb?\thinspace? can be used to +separate single quotes from double quotes where +necessary. + +\subsectiontitle{Quotation marks} +Dashes of various lengths are obtained using \verb?-?, +\verb?--? and \verb?---?. You should use \verb?-? for +hyphenation, \verb?--? when specifying ranges of numbers, +and \verb?---? to obtain a punctuation dash. Thus we obtain +\begin{quotation} +\small +The Cayley-Hamilton Theorem. +\end{quotation} +\begin{quotation} +\small +See pages 95--104. +\end{quotation} +\begin{quotation} +\small +Use three dashes to obtain a punctuation dash---like this. +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +The Cayley-Hamilton Theorem. +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +See pages 95--104. +\end{verbatim} +\end{quote} +\begin{quote} +\begin{verbatim} +Use three dashes to obtain a punctuation dash---like this. +\end{verbatim} +\end{quote} + +\subsectiontitle{Changing Fonts} +The control sequences \verb?\rm?, \verb?\sl?, \verb?\it?, \ +\verb?\tt? and \verb?\bf? change to {\rm roman}, {\sl slanted}, +{\it italic}, {\tt teletype} and {\bf boldface} fonts respectively. +Any change of font made within a group enclosed within curly +brackets \verb?{? and \verb?}? will only apply to text within +that group. On leaving the group, the current font is restored +to what it was before entering the group. Thus we can obtain +\begin{quotation} +\small +This sentence contains a word set in {\bf boldface} type +\end{quotation} +by typing +\begin{quote} +\begin{verbatim} +This sentence contains a word set in {\bf boldface} type +\end{verbatim} +\end{quote} + + The control sequence \verb?\/? produces the so-called +`italic correction'. It is sometimes desirable when changing +from a slanted font (such as {\it italic\/} or {\it slanted\/}) +back to a non-slanted font such as {\rm roman} or +{\bf boldface}, in order to produce a small amount of extra +space to compensate for the slantedness of the font, and thus +improve the appearance of the final document. However the +italic correction should not be applied before a period +(full stop) or a comma. To obtain +\begin{quotation} +\small +Here is some {\it italicized\/} text. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Here is some {\it italicized\/} text. +\end{verbatim} +\end{quote} +However it usually does not matter all that much if you forget +about this italic correction. + +\subsectiontitle{Changing Fonts} +These are produced by control sequences such as \verb?\'?, +\verb?\`? and \verb?\"?. Thus one types \verb?Se\'{a}n? +and \verb?H\"{o}lder? to obtain `Se\'{a}n' and `H\"{o}lder' +respectively. For a full list of such accents, see +Appendix~\ref{pl-txtcs}. Note however that accents within +mathematics are produced in a different fashion. + +\subsectiontitle{Producing Blank Space in Plain \TeX} +To produce (horizontal) blank space within a paragraph, use +\verb?\hskip?, followed by the length of the blank space. +The length of the skip should be expressed in a unit recognized +by \TeX. These recognized units are given in the following table: +\begin{quote} +\begin{tabular}{lll} +\verb?pt? & point & (1 in = 72.27 pt) \\ +\verb?pc? & pica & (1 pc = 12 pt) \\ +\verb?in? & inch & (1 in = 25.4 mm) \\ +\verb?bp? & big point & (1 in = 72 bp) \\ +\verb?cm? & centimetre & (1 cm = 10 mm) \\ +\verb?mm? & millimetre & \\ +\verb?dd? & didot point & (1157 dd = 1238 pt) \\ +\verb?cc? & cicero & (1 cc = 12 dd) \\ +\verb?sp? & scaled point & (65536 sp = 1 pt) +\end{tabular} +\end{quote} +Thus to produce a horizontal blank space of 20 mm in the middle +of a paragraph one would type \verb?\hskip 20 mm? (or, better +still, type `\verb?\hskip 20 mm \relax?' to avoid the +error that might occur if the following word were to begin +with the letters `plus'). + +To produce (vertical) blank space between paragraphs, use +\verb?\vskip?, followed by the length of the vertical skip. + +\subsectiontitle{Producing Blank Space in Plain \TeX} +To force \TeX\ to produce a blank space where it might not +otherwise put one, one should precede the blank space with a +\verb?\? (backslash). It is often advisable to precede +with a backslash blank spaces after certain abbreviations +such as `Dr.', `etc.', and `Math.\ Soc.' (so that one +should type \verb?Dr.\ Smith? etc.). + +If you wish to ensure that \TeX\ does not start a new line +at a particular blank space, then you can use \verb?~? in +place of the blank space. Thus if you type +\verb?I.~Newton? or \verb?Example~4? then you prevent +a line break at these places. + +\sectiontitle{Rules for obtaining Mathematical Formulae} +\subsectiontitle{Mathematics embedded in Text} +Any mathematical expressions embedded in text should be +preceded and followed by the character \verb?$?. Thus +to obtain +\begin{quotation} +\small +Let $f$ be the function defined by $f(x) = x + 7$. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $f$ be the function defined by $f(x) = x + 7$. +\end{verbatim} +\end{quote} + +\subsectiontitle{Displayed Mathematical Formulae} +Any displayed mathematical formulae should be preceded +and followed by \verb?$$?. Thus to obtain +\begin{quotation} +\small +Let $g$ be the function defined by +$$g(x,y) = xy + x + y + 2.$$ +The function $g$ is positive when both $x$ and $y$ are positive. +\end{quotation} +one should type +\begin{quote} +\begin{verbatim} +Let $g$ be the function defined by +$$g(x,y) = xy + x + y + 2.$$ +The function $g$ is positive when both $x$ and $y$ are positive. +\end{verbatim} +\end{quote} + +\subsectiontitle{Special Characters in Mathematics Mode} +All characters on the keyboard have their standard meaning +in mathematical expressions with the exception of the +special characters +\begin{quote} +\begin{verbatim} +# $ % & ~ _ ^ \ { } ' +\end{verbatim} +\end{quote} +which have special functions within \TeX. On the rare +occasions when these special characters are required in +the final document they must be produced by an appropriate +control sequence. Thus you should type \verb?\#?, \verb?\$?, +\verb?\%?, \verb?\&?, \verb?\_?, \verb?\{? and \verb?\}? to +obtain $\#$, $\$$, $\%$, $\&$, $\_$, $\{$ and $\}$ +respectively. To obtain $\backslash$ in mathematics mode, +type \verb?\backslash?. + + The character \verb?'? is used to put a superscript +prime after a character. Thus if we type \verb?$f'$? and +\verb?$g''$? we obtain $f'$ and $g''$ respectively. + +\subsectiontitle{Superscripts and Subscripts} +Superscripts and subscripts are produced using the characters +\verb?^? and \verb?_? respectively. Thus we obtain +$t^2 + x_1 - x^3_1$ by typeint \verb?$t^2 + x_1 - x^3_1$?. +If a superscript or subscript consists of more than one +character then the superscripts and subscripts should be +enclosed in curly brackets. Thus one obtains $a_{i,j}$ by +typing \verb?$a_{i,j}$?. One can obtain double subscripts: +we obtain $s_{n_j}$ by typing \verb?$s_{n_j}$?. + +\subsectiontitle{Greek Letters} +Greek letters are obtained by preceding the name of the +letter by a backslash. Thus we obtain +$\alpha, \beta, \gamma$ by typing +\verb?$\alpha, \beta, \gamma$?. See Appendix~\ref{pl-mthcs} +for a list of Greek letters. Some Greek letters have variant +forms---see Appendix~\ref{pl-mthcs}. + +\subsectiontitle{Mathematical Symbols} +Mathematical symbols such as $\div$, $\equiv$, $\otimes$, +$\sum$, $\in$, $\cup$, $\cap$ and $\to$ are obtained using +the appropriate control sequences---see Appendix~\ref{pl-mthcs}. + +\subsectiontitle{Accents in Mathematics} +These are produced using the appropriate control +sequence---see Appendix~\ref{pl-mthcs}. + +\subsectiontitle{Standard Functions} +Certain standard functions such as $\sin$ and $\log$ are +obtained by preceding the name with a backslash---see +Appendix~\ref{pl-mthcs} for a full list of these. To obtain +a function or similar expression not on this list you should +convert to the roman font (e.g., to obtain ${\rm Aut}(G)$ one +should type \verb?${\rm Aut}(G)$?). + +\subsectiontitle{Fractions} +Fractions are obtained in Plain \TeX\ using the control sequence +\verb?\over?. We type +\begin{quote} +\verb?{? {\it numerator\/} \verb?\over? {\it denominator\/} \verb?}? +\end{quote} +to obtain the required fraction. Thus to obtain +$$f(x) = { 2 x \over (1 + x^2)^2 }$$ +we type +\begin{quote} +\begin{verbatim} +$$f(x) = { 2 x \over (1 + x^2)^2 }$$ +\end{verbatim} +\end{quote} + +\subsectiontitle{Roots} +Square roots are obtained using the control sequence +\verb?\sqrt?. Thus to obtain $\sqrt{3x + 7}$ we +type \verb?$\sqrt{3x + 7}$?. To obtain an $n$th +root in Plain \TeX\ we use the construction +\begin{quote} +\verb?\root? $n$ \verb?\of {? {\it expression} \verb?}? +\end{quote} +Thus $\root 3 \of {3x + 7}$ is obtained by typing +\verb?$\root 3 \of {3x + 7}$?. + +\subsectiontitle{Ellipsis} +Ellipsis (three dots) is obtained in mathematical formulae +using the control sequences \verb?\cdots? (centred ellipsis) +and \verb?\ldots? (lowered ellipsis). Thus to obtain +$x_1 + x_2 + \cdots + x_n$ and $x_1, x_2, \ldots, x_n$ +we type \verb?$x_1 + x_2 + \cdots + x_n$? and +\verb?$x_1, x_2, \ldots, x_n$? respectively. + +\subsectiontitle{Delimiters} +To surround a subformula with delimiters large enough to enclose +the subformula we use the construction +\begin{quote} +\verb?\left(? $\ldots$ {\it subformula} $\ldots$ \verb?\right)? +\end{quote} +(where the parentheses \verb?(? $\ldots$ \verb?)? may be replaced +by any other pair of delimiters such as +\verb?[? $\ldots$ \verb?]? or \verb?\{? $\ldots$ \verb?\}?). +Thus to obtain the equation +$$f(x) = \left( 1 + { 2x \over x^2 + 1 } \right) - \sin(x)$$ +we type +\begin{quote} +\begin{verbatim} +$$f(x) = \left( 1 + { 2x \over x^2 + 1 } \right) - \sin(x)$$ +\end{verbatim} +\end{quote} + +\subsectiontitle{Embedding Text in Mathematics} +Text can be embedded in mathematics using the control sequence +\verb?\hbox?. Thus if we type +\begin{quote} +\begin{verbatim} +$$V' = \{ f \in X' : f(v) = 0 \hbox{ for all } v \in V \}$$ +\end{verbatim} +\end{quote} +we obtain +$$V' = \{ f \in X' : f(v) = 0 \hbox{ for all } v \in V \}$$ + +\subsectiontitle{Inserting and Removing Blank Space in Formulae} +The control sequence \verb?\quad? produces a `quad' +of blank space (a `quad' is approximately the width of the +letter `m'). The control sequence \verb?\qquad? produces two +quads of blank space. The control sequence \verb?\,? inserts a +thin blank space and the control sequence \verb?\!? removes a +thin space. One uses \verb?\,? and \verb?\!? to improve the +appearance of mathematical formulae. For example, if we +type +\begin{quote} +\begin{verbatim} +$$\int_0^\pi \sin x dx = 2,$$ +\end{verbatim} +\end{quote} +we obtain +$$\int_0^\pi \sin x dx = 2,$$ +whereas if we type +\begin{quote} +\begin{verbatim} +$$\int_0^\pi \sin x \,dx = 2,$$ +\end{verbatim} +\end{quote} +we obtain +$$\int_0^\pi \sin x \,dx = 2,$$ +and this equation has a more satisfactory appearance. + +\subsectiontitle{Further Features of Plain \TeX} +There are plenty of control sequences in Plain \TeX\ for +accomplishing various tasks. Among the most widely used +of these are \verb?\eqalign? (for producing multiline +formulae), \verb?\cases? (for equations which divide up +into a number of cases) \verb?\matrix? (for producing +arrays) and \verb?\pmatrix? (for producing matrices +surrounded by large parentheses). + diff --git a/info/tcdmanual/pl_text.tex b/info/tcdmanual/pl_text.tex new file mode 100644 index 0000000000..b5a31d879f --- /dev/null +++ b/info/tcdmanual/pl_text.tex @@ -0,0 +1,335 @@ +\sectiontitle{Producing Simple Documents using Plain \TeX} +\label{pl-text} +\subsectiontitle{Producing Ordinary Text using Plain \TeX} +To produce a simple document using Plain \TeX\ one should create +a \TeX\ input file. The input file should end with the +\verb?\bye? command, in order to tell \TeX\ when the end of the +file has been reached. + +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. You do not have to worry about paragraph +indentation: \TeX\ will automatically indent all paragraphs +with the exception of the first paragraph of a new section +(unless you take special action to override the conventions +adopted by \TeX) + + For example, suppose that we wish to create a document +containing the following paragraphs: +\begin{quotation} +\small +\noindent +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. + +You do not have to worry about paragraph indentation: +all paragraphs will be indented with the exception of +the first paragraph of a new section. + +One must take care to distinguish between the `left quote' +and the `right quote' on the computer terminal. Also, one +should use two `single quote' characters in succession if +one requires ``double quotes''. One should never use the +(undirected) `double quote' character on the computer +terminal, since the computer is unable to tell whether it +is a `left quote' or a `right quote'. One also has to +take care with dashes: a single dash is used for +hyphenation, whereas three dashes in succession are required +to produce a dash of the sort used for punctuation---such as +the one used in this sentence. + +\end{quotation} +To create this document using Plain \TeX\ we use the following +input file: +\begin{quote} +\begin{verbatim} + +If one merely wishes to type in ordinary text, without +complicated mathematical formulae or special effects such +as font changes, then one merely has to type it in as it +is, leaving a completely blank line between successive +paragraphs. + +You do not have to worry about paragraph indentation: +all paragraphs will be indented with the exception of +the first paragraph of a new section. + +One must take care to distinguish between the `left quote' +and the `right quote' on the computer terminal. Also, one +should use two `single quote' characters in succession if +one requires ``double quotes''. One should never use the +(undirected) `double quote' character on the computer +terminal, since the computer is unable to tell whether it +is a `left quote' or a `right quote'. One also has to +take care with dashes: a single dash is used for +hyphenation, whereas three dashes in succession are required +to produce a dash of the sort used for punctuation---such as +the one used in this sentence. + +\bye + +\end{verbatim} +\end{quote} + + Having created the input file, one then has to run it +through the \TeX\ program and then print it out the +resulting output file (known as a `DVI' file). + +\subsectiontitle{Blank Spaces and Carriage Returns in the Input File} +\TeX\ treats the carriage return at the end of a line +as though it were a blank space. Similarly \TeX\ treats +tab characters as blank spaces. Moreover, \TeX\ regards +a sequence of blank spaces as though it were a single +space, and similarly it will ignore blank spaces at the +beginning or end of a line in the input file. Thus, for +example, if we type +\begin{quote} +\begin{verbatim} +This is + a + silly + example of a +file with many spaces. + + + This is the beginning +of a new paragraph. +\end{verbatim} +\end{quote} +then we obtain +\begin{quotation} +\small +This is + a + silly + example of a +file with many spaces. + + + This is the beginning +of a new paragraph. +\end{quotation} + + It follows immediately from this that one will obtain +the same results whether one types one space or two spaces +after a full stop: \TeX\ does not distinguish between the +two cases. + +Any spaces which follow a control sequence will be ignored +by \TeX. + +\begin{quotation} +\footnotesize +If you really need a blank space in the final document +following whatever is produced by the control sequence, +then you must precede this blank by a +{\it backslash} \verb?\?. Thus in order to obtain the +sentence +\begin{quotation} +\TeX\ is a very powerful computer typesetting program. +\end{quotation} +we must type +\begin{quote} +\begin{verbatim} +\TeX\ is a very powerful computer typesetting program. +\end{verbatim} +\end{quote} +(Here the control sequence \verb?\TeX? is used to produce +the \TeX\ logo.) + + In general, preceding a blank space by a backslash +forces \TeX\ to include the blank space in the final +document. +\end{quotation} + +\subsectiontitle{Quotation Marks} +Single left and right quotation marks are produced by +\verb?`? and \verb?'? respectively. Double left and right quotation +marks are produced by \verb?``? and \verb?''? respectively. Thus +\begin{quotation} +\small +``What did you do yesterday?'' he asked. +\end{quotation} +is produced by typing +\begin{quote} +\begin{verbatim} +``What did you do yesterday?'' he asked. +\end{verbatim} +\end{quote} +You should never use the character \verb?"? to produce +quotation marks. This is because \TeX\ has no way of +knowing whether you want a left quote or a right quote if +you do this. + +\begin{quotation} +\footnotesize + You can use the control sequences \verb?\lq? and +\verb?\rq? in place of \verb?`? and \verb?'?. This +is useful if your keyboard does not have a \verb?`? +character. +\end{quotation} + +\begin{quotation} +\footnotesize +Sometimes you need two quotation marks following +one another, as in +\begin{quotation} +``I regard computer typesetting as being reasonably +`straightforward'\thinspace'' he said. +\end{quotation} +The way to do this is to use the control sequence +\verb?\thinspace? between the quotation marks. Thus one +would type +\begin{quote} +\begin{verbatim} +``I regard computer typesetting as being reasonably +`straightforward'\,'' he said. +\end{verbatim} +\end{quote} +However this problem arises very rarely. +\end{quotation} + +\def\beginsection#1\par{\bigskip{\bf #1}\nobreak + \smallskip\vskip-\parskip\noindent} + +\subsectiontitle{Section Headings in Plain \TeX} +The control sequence \verb?\beginsection? is used in +Plain \TeX\ to produce a section heading, printed in a +boldface typestyle. This control sequence should be +followed by the title of the section, and this should +then be followed by a blank line. Thus if we type +\begin{quote} +\begin{verbatim} +\beginsection +Section Headings + +In this section, we describe how to obtain section +headings, printed in a boldface font. +\end{verbatim} +\end{quote} +then we obtain +\begin{quotation} +\small +\beginsection +Section Headings + +In this section, we describe how to obtain section +headings, printed in a boldface font. +\end{quotation} + +\subsectiontitle{Dashes} +\TeX\ allows you to produce dashes of various length. Typing +\verb?-? by itself produces a hyphen, as in `double-quote'. +Typing \verb?--? produces a dash suitable for denoting a +range of numbers, as in the phrase `on pages 155--159', +produced by typing +\begin{quote} +\begin{verbatim} +on pages 155--159. +\end{verbatim} +\end{quote} +Finally, typing \verb?---? produces a punctuation dash---this +is a dash such as the one in this sentence. + +\subsectiontitle{Changing Fonts} +Fonts are changed using the control sequences \verb?\rm?, +\verb?\sl?, \verb?\it?, \verb?\tt? and \verb?\bf?. +\begin{quote} +\begin{tabular}{ll} +\verb?\rm? changes to the normal ``roman'' font: & \rm Roman\\ +\verb?\sl? changes to a slanted roman font: & \sl Slanted\\ +\verb?\it? changes to an italic font: & \it Italic\\ +\verb?\tt? changes to an ``typewriter'' font: & \tt Typewriter\\ +\verb?\bf? changes to a boldface font: & \bf Boldface +\end{tabular} +\end{quote} + + It is best to use the special characters \verb?{? and +\verb?}? when changing fonts. One encloses the text whose +font is to be changed within these curly brackets and places +the font-changing control sequence immediately after the +opening bracket~\verb?{?. Thus the text +\begin{quotation} +\small +In this sentence we have {\it italicized\/} a few words, set +others in {\sl slanting type\/} or {\bf boldface type}, and +typeset others using a {\tt `typewriter' font in which all +the letters have a fixed width}. +\end{quotation} +is produced by typing +\begin{quote} +\begin{verbatim} +In this sentence we have {\it italicized\/} a few words, set +others in {\sl slanting type\/} or {\bf boldface type}, and +typeset others using a {\tt `typewriter' font in which all +the letters have a fixed width}. +\end{verbatim} +\end{quote} + +\begin{quotation} +\footnotesize +The control sequence \verb?\/? produces the so-called +{\it italic correction}. The use of this is recommended when +changing back from an {\it italic\/} or {\sl slanted\/} +font into a {\rm roman} or {\bf boldface} font, in order to +produce extra space to compensate for the way in which some +{\it italic\/} and {\sl slanted\/} letters lean into the +following blank space. However this italic correction should +not be used before a comma or a full stop. +\end{quotation} + +\subsectiontitle{Accents and other Symbols used in Text} +There are a variety of control sequences for producing accents. +For example, the control sequence \verb?\'{o}? produces an +acute accent on the letter~\verb?o?. Thus typing +\begin{quote} +\begin{verbatim} +Se\'{a}n \'{O} Cinn\'{e}ide. +\end{verbatim} +\end{quote} +produces +\begin{quotation} +\small +Se\'{a}n \'{O} Cinn\'{e}ide. +\end{quotation} +Similarly we use the control sequence \verb?\`? to +produce the grave accent in `alg\`{e}bre' and we use +\verb?\"? to produce the umlaut in `Universit\"{a}t'. +A list of the accents provided by \TeX\ is given in +Appendix~\ref{pl-txtcs}. + + The control sequences \verb?\i? and \verb?\j? produce +dotless $i$ and $j$. These are required when placing an +accent on the letter. Thus \={\i} is produced by typing +\verb?\={\i}?. There are also control sequences for +ligatures and other special symbols used within text. These are +listed in Appendix~\ref{pl-txtcs}. + +\subsectiontitle{Special Characters} +The characters +\begin{quote} +\begin{verbatim} +# $ % & \ ^ _ { } ~ +\end{verbatim} +\end{quote} +have special purposes within \TeX. Thus they cannot be produced +in the final document simply by typing them directly. On the +rare occasions when one needs to use the special characters +\begin{quote} +\#\ \$\ \%\ \&\ \_\ \{\ \} +\end{quote} +in the final document, they can be produced by typing the control +sequences +\begin{quote} +\begin{verbatim} +\# \$ \% \& \_ \{ \} +\end{verbatim} +\end{quote} +respectively. However, somewhat more ingenuity is required to +produce \verb?\?, \verb?^? and \verb?~?. + diff --git a/info/tcdmanual/pl_txtcs.tex b/info/tcdmanual/pl_txtcs.tex new file mode 100644 index 0000000000..618a2c3b25 --- /dev/null +++ b/info/tcdmanual/pl_txtcs.tex @@ -0,0 +1,64 @@ +\sectiontitle{Control Sequences used in Text (Plain \TeX)} +\label{pl-txtcs} +\appenditem{Control Sequences for Changing Fonts in Text} +\begin{quote} +\begin{tabular}{ll} +\verb?\rm? changes to the normal ``roman'' font: & \rm Roman\\ +\verb?\sl? changes to a slanted roman font: & \sl Slanted\\ +\verb?\it? changes to an italic font: & \it Italic\\ +\verb?\tt? changes to an ``typewriter'' font: & \tt Typewriter\\ +\verb?\bf? changes to a boldface font: & \bf Boldface +\end{tabular} +\end{quote} + +\appenditem{Control Sequences for obtaining Accents in Text} +\begin{quote} +\begin{tabular}{llll} +\verb?\'{e}? & \'{e} + & e.g., \verb?math\'{e}matique? yields `math\'{e}matique' \\ +\verb?\`{e}? & \`{e} + & e.g., \verb?alg\`{e}bre? yields `alg\`{e}bre' \\ +\verb?\^{e}? & \^{e} + & e.g., \verb?h\^{o}te? yields `h\^{o}te' \\ +\verb?\"{o}? & \"{o} + & e.g., \verb?H\"{o}lder? yields `H\"{o}lder' \\ +\verb?\~{n}? & \~{n} + & e.g., \verb?ma\~{n}ana? yields `ma\~{n}ana' \\ +\verb?\={o}? & \={o} & \\ +\verb?\.{o}? & \.{o} & \\ +\verb?\u{o}? & \u{o} & \\ +\verb?\v{c}? & \v{c} + & e.g., \verb?\v{C}ech? yields `\v{C}ech' \\ +\verb?\H{o}? & \H{o} & \\ +\verb?\t{oo}? & \t{oo} & \\ +\verb?\c{c}? & \c{c} + & e.g., \verb?gar\c{c}on? yields `gar\c{c}on' \\ +\verb?\d{o}? & \d{o} & \\ +\verb?\b{o}? & \b{o} & +\end{tabular} +\end{quote} +These accents are for use in ordinary text. They cannot be +used within mathematical formulae, since different control +sequences are used to produce accents within mathematics. + +\appenditem{Special Symbols used in Text} +\begin{tabular}{ll} +\verb?\oe, \OE? & \oe, \OE \\ +\verb?\ae, \AE? & \ae, \AE \\ +\verb?\aa, \AA? & \aa, \AA \\ +\verb?\o, \O? & \o, \O \\ +\verb?\l, \L? & \l, \L \\ +\verb?\ss? & \ss \\ +\verb+?+\verb+`+ & ?` \\ +\verb+!+\verb+`+ & !` \\ +\verb?\dag? & \dag \\ +\verb?\ddag? & \ddag \\ +\verb?\S? & \S \\ +\verb?\P? & \P \\ +\verb?\copyright? & \copyright \\ +\verb?{\it \$}? & {\it \$} \\ +\verb?{\it \&}? & {\it \&} \\ +\verb?\i? & \i \\ +\verb?\j? & \j +\end{tabular} + diff --git a/info/tcdmanual/pllong.tex b/info/tcdmanual/pllong.tex new file mode 100644 index 0000000000..ece34467a1 --- /dev/null +++ b/info/tcdmanual/pllong.tex @@ -0,0 +1,29 @@ +%\documentstyle[a4,12pt]{article} +\documentstyle[12pt]{article} +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\begin{document} +\title{Getting Started with Plain \TeX} +\author{D. R. Wilkins} +\maketitle + +\tableofcontents + +\input pl_intro +\input pl_text +\input pl_math +\input pl_furth + +% APPENDICES BEGIN HERE +\appendix + +\input pl_txtcs +\input pl_mthcs + +\end{document} diff --git a/info/tcdmanual/plshort.tex b/info/tcdmanual/plshort.tex new file mode 100644 index 0000000000..d522688dde --- /dev/null +++ b/info/tcdmanual/plshort.tex @@ -0,0 +1,26 @@ +%\documentstyle[a4,12pt]{article} +\documentstyle[12pt]{article} +\newcommand{\AmSTeX}{$\cal A\kern-.1667em\lower.5ex +\hbox{$\cal M$}\kern-.125em S$-\TeX} +\newcommand{\italappenditem}[1]{\vskip 14.4pt\relax + {\parskip = 0pt\relax\hbox{\it #1}}\vskip 4.8pt\relax + \nopagebreak} +\let\sectiontitle=\section +\let\subsectiontitle=\subsection +\let\appenditem=\italappenditem +\begin{document} +\title{Summary of Commonly-Used Features of Plain \TeX} +\author{D. R. Wilkins} +\maketitle + +\tableofcontents + +\input pl_summ + +% APPENDICES BEGIN HERE +\appendix + +\input pl_txtcs +\input pl_mthcs + +\end{document} |