%
% Removing the ` % ' from the beginning of the third line leads to a 1.2
% magnification of the output (same margins of course).
% \magnification=1200

\input bobmacro   % This loads the macrofile `bobmacro.tex' which contains
                  % some useful definitions, like the `\titl  \endtitl'
                  % which follows. ` % ' tells tex to ignore the rest of 
                  % the line, enabling one to make comments. If the file
                  % you want to load is not in your current directory,
                  % use:`\input tex$sub:[examples]bobmacro.tex' for example.

\titl \centerline{EXAMPLE OF A MANUSCRIPT WITH A TWO-LINE TITLE}
      \centerline{PREPARED FOR \TeX$^1$} \endtitl

\centerline{William H. Press\footnote\dag{Revised for \TeX82
      by Bob Jantzen}}
\centerline{Harvard-Smithsonian Center for Astrophysics}
\Received           % See bobmacro.tex

\vfill    % This expands the vertical space here to push my title footnote
          % to the bottom of the page.  The command `\footnote' squeezes in
          % after that though.

$^1$Not supported in part by any finding agency known to
man or beast, except possibly Harvard University, one of our finest
old institutions.

\par\eject   % Normally an explicit page end is marked by `\par\vfill\eject'
             % which ends the last paragraph, fills up the remainder of the
             % page with blank space and ends the page, but if more than one
             % `\vfill' occurs on a page, they each fill up their share of
             % the remaining space, so in this example, our title footnote
             % would not be pushed to the bottom of the page.

\ABSTRACT             % see bobmacro.tex
We here give a detailed example of a manuscript prepared for submission
to {\it The Astrophysical Journal} using the \TeX\ language and a standard
file containing macro definitions.
\blankline            % see bobmacro.tex
{\it Subject headings:} stars: Hollywood -- data: irreproducible

\par\vfill\eject

\sect \centerline{I. INTRODUCTION} \endsect   % see bobmacro.tex

This is the introduction.  We can use it to try out a few bells and
whistles.  First notice that it doesn't make any difference whether
I indent the paragragh.  \TeX\ does so anyway.

     A new paragragh is signaled by two returns in a row, or by an
explicit marking such as occurs here:\par
     So, this will be the third paragragh.  \it I have just changed
to italic type.  \rm Now back to roman.  \sl Now to slanted roman.
\bf Now to boldface.  \rm If I want to change only {\it temporily},
that can be done too.  Underlining, if desired \textunderline{can be done
like this}, but this doesn't always work. Later on you will understand
why.  For those of you who actually prefer typewriters, {\tt there is even
a way to do that}.

\subsect \centerline{a.\qquad Subsection Heading} \endsubsect % see bobmacro.tex

      This is a subsection. It has no real purpose, but I suppose
I could use it to explain some things. Many features of \TeX\ can only
be used in ``math mode", i.e. typed between dollar signs.  This includes
come common things like superscripts:word$^{superword}$;
subscripts: $word_{subword}$ all between dollar signs, as you see.
But do notice that in math mode, \TeX\ switches into italics.  If you
don't want this, you have to type word$^{\hbox{superword}}$.

\doublespace
My next paragragh ought to come out in double space.  This uses a
command that is not universal, but rather is defined in my macro file
`bobmacro.tex', the one included by the command  ``$\backslash$input 
bobmacro" at the beginning of this input file.  Incidentally, if you have 
typed something in lower case, or mixed lower and upper, \uppercase{and you
really intended it to be in all caps}, then you can correct it
easily as shown.  Similarly \lowercase{FOR SOMETHING TYPED IN ALL CAPS}
which should have been in lowercase.

\singlespace
\blankline
Notice that the change to singlespace comes between two paragraphs, and
that it would have produced only a single space between them.  To get
the double space, I have to have the extra ``blankline".
This is the final paragraph in the subsection, indeed in the whole
introduction.  As befits an introduction, I have no mathematics in
the introduction, although I might have (in line in the text) some
$\alpha$'s, $\beta$'s and $\gamma$'s, 
and a $\leq$ (note use of math mode); and perhaps a \$ \ or two (\$ \$).
Also note that in \S II. below we will have more math.
Don't ever do this, but actually I can get away with \alpha\  as well as
$\alpha$, but only because I have a fancy definition in my macro file.

\sect \centerline{II. MATHEMATICS} \endsect

     Well, now we come to the really fun part, namely the setting of
mathematics.  It is incredibly easy.  Just remember that you are either
in horizontal mode (for typing text like right now), or (between \$ 's)
in math mode (for typing in-line formulae
like $F=(\int f(x) dx)^{\xi}$, or between \$ \$ 's) in math
display mode, which produces set off equations like $$ \Phi = {a+b \over
c+d}.$$  Notice that I don't actually set off the equation in the input
equation in the input file, although there is nothing wrong with doing so:
$${numerator \over denominator}=easy$$
Be careful to use a backslash before sin, cos, exp and similar:
$$\sin (x) \qquad and \ not \qquad sin (x)$$
(where $\backslash$qquad is, as you can see, a biggish space; and 
backslash-space is a smallish space -- in math mode all plain spaces are 
ignored!).

Equation numbers are equally easy: just have an eqno command
before the closing \$ \$ 's,
$$E=mc^{2} \eqno(14b)$$.      % Notice where the period ends up.
                              % Instead `\ .' should have preceded `\eqno'

Now for some fancier examples:

We might need sums,
$$\sum_{n=1}^{n=\infty}(a+b)! = {\partial f \over \partial x} \eqno(15)$$
or integrals,
$$\int_{0}^{1}x^{\alpha -1}(1-x)^{\beta - 1} dx$$
or matrices,
$$  A= \pmatrix{1&0&0\cr 0&x+1&y\cr 0&0&1\cr} $$
or absolute value bars (known as ``verticals"),
$$ |x| = \left|{e^{-x^2}}\over \sin (x) + 
                0.5 \cos (x)\right| \quad.$$
Notice how I can just continue typing the formula on as many lines
as it happens to take.  Spaces within \$ \$ 's never  matter, so I can
indent subsequent lines for readibility.

Other large ``enclosers" are similar:
$$ \left( {a+b\over c+d} \right) \qquad \left[ {e+f \over g+h}\right]
     \qquad \left\{ {i+j \over k+l} \right\} $$
(Braces are special since you aren't allowed to type the actual
character $\{$ except as a group delimiter in the input file.)

    Alignment can be complicated, but most situations can be handled
using the eqalign command,
$$\eqalign{
      a_1+b_1w+c_1w^2 &=  \alpha + \beta \cr
      b_2x+c_2x^2   &= 0.  \cr } \eqno(30)$$
Here I have lined up the ampersand-equals in the input file, but there
is no reason to do this other than clarity.  It is the ampersand which
causes \TeX\ to line things up (along with, of course, the eqalign command
itself), not the spacing of the input file.
Another example is,
$$\eqalignno{
     X&=a+b&(31)\cr
     Y+Z+W&=c&(32)\cr }$$
i.e., use eqalignno when you want equation numbers on each line, and
$$\eqalignno{
    f(x)&=(x-1)(x+1)\cr
   &=x^2-1&(33)\cr}$$
which shows how a lefthand side and/or an equation number can be absent.
\blankline\indent
     This is as good a place as any to list all the special symbols
(that I know and consider useful at this time, but check
the {\TeX}book for the rest) and the commands 
for them.  Be sure to remember that most special symbols only work
in math mode, between \$ 's!

\halign{ \lft{$\backslash$#}\quad & \lft{$#$}\qquad
         & \lft{$\backslash $#}\quad & \lft{$#$}\qquad
         & \lft{$\backslash $#}\quad & \lft{$#$}\qquad
         & \lft{$\backslash $#}\quad & \lft{$#$}\qquad \cr
alpha&\alpha&beta&\beta&gamma&\gamma&delta&\delta\cr
epsilon&\epsilon&zeta&\zeta&eta&\eta&theta&\theta\cr
iota&\iota&kappa&\kappa&lambda&\lambda&mu&\mu\cr
nu&\nu&xi&\xi&?&o&pi&\pi\cr
rho&\rho&sigma&\sigma&tau&\tau&upsilon&\upsilon\cr
phi&\phi&chi&\chi&psi&\psi&omega&\omega\cr
varepsilon&\varepsilon&vartheta&\vartheta&varpi&\varpi&varrho&\varrho\cr
varsigma&\varsigma&varphi&\varphi&{}&{}&ell&\ell\cr
Gamma&\Gamma&Delta&\Delta&Theta&\Theta&Lambda&\Lambda\cr
Xi&\Xi&Pi&\Pi&Sigma&\Sigma&Upsilon&\Upsilon\cr
Phi&\Phi&Psi&\Psi&Omega&\Omega&cdots&\cdots\cr
Gammait&\Gammait&Deltait&\Deltait&Thetait&\Thetait&Lambdait&\Lambdait\cr
Xiit&\Xiit&Piit&\Piit&Sigmait&\Sigmait&Upsilonit&\Upsilonit\cr
Phiit&\Phiit&Psiit&\Psiit&Omegait&\Omegait&ldots&\ldots\cr
Ascr&\Ascr&Bscr&\Bscr&...etc...&{}&Zscr&\Zscr\cr
pm&\pm&mp&\mp&times&\times&div&\div\cr
backslash&\backslash&cdot&\cdot&oplus&\oplus&ominus&\ominus\cr
otimes&\otimes&oslash&\oslash&odot&\odot&ast&\ast\cr
circ&\circ&bullet&\bullet&uparrow&\uparrow&downarrow&\downarrow\cr
vert&\vert&|&\|&ll&\ll&gg&\gg\cr
simeq&\simeq&approx&\approx&langle&\langle&rangle&\rangle\cr
sum&\sum&int&\int&oint&\oint&prod&\prod\cr
infty&\infty&prime&\prime&partial&\partial&nabla&\nabla\cr
S&\hbox{\S}&dagger&\dagger&ddagger&\ddagger&P&\hbox{\P}\cr
\$&\$&sim&\sim&leftarrow&\leftarrow&rightarrow&\rightarrow\cr
equiv&\equiv&leq&\leq&geq&\geq&$\#$&\#\cr
forall&\forall&exists&\exists&\%&\%& \& & \& \cr
heartsuit&\heartsuit&Re&\Re&bot&\bot&flat&\flat\cr
emptyset&\emptyset&cup&\cup&star&\star&...etc...&{}\cr}


\blankline\indent
     Of course, the symbols ?,/,+,!,=,`,',",and `` can be
typed directly from the keyboard as indicated (except that `` is
actually two sequential single accent graves), but $<$ and $>$ must
be in math mode or you will get < and > respectively.
Also note: -, --, ---,
ff, fi, fl, ffi, ffl, \ss , \ae , \AE , \oe , \OE , \o , \O , \aa , \AA.
There are more of these in the {\TeX}book.
I can't find anything for the semidirect product.  Shucks.

Whew, that was a lot of symbol typing.\footnote*{
We have been using PLAIN \TeX\ and a couple of macros from
the file bobmacro.tex which contains the definitions of a few
useful commands. Notice that the `$\backslash$footnote' macro provided by
plain.tex is not very satisfactory. See page 416 of the {\TeX}book.}

\REFERENCES
\ref Aardvark, J.M. and Blather, R.P. 1982, {\it Proc. Roy. Soc.
Madagascar}, {\bf 234}, 492.  (Also translated in {\it Sov. Phys. Uspekhi},
{\bf 34}, 879.
\ref Null, N.N. and None, N. 1972, {\it Ap. J.}, {\bf 186}, 24.

% The ampersand can be used to make comments which will be ignored by \TeX.
% This remark will never appear in your \TeX\ output.
% If you want bigger print, try putting \magnification=1200 at the beginning.
% This magnifies the fonts by a factor of 1.2.
% And also \oneandahalfspace after that if you want a little more space
%    between lines.  Or even \doublespace.

\sect APPENDIX\endsect

For those people who insist on doing a lot of index juggling, the command
``$\backslash$null" which stands for an empty box (namely 
$\backslash$hbox$\{\}$) is very useful because it ends the previous symbol and
any subscripts or superscripts which follow then are placed at the normal
levels instead of climbing up or down if the previous symbol sticks up or down
too far.  It also allows alignment of up and down indices necessary for
raising and lowering indices with a metric
$$\eqalign{  &\Gamma^{\alpha}\null_{\beta\gamma}\quad \hbox{instead of}
    \quad \Gamma^{\alpha}_{\beta\gamma}\cr
   &\undersim{\tilde{R}}\null^{\alpha}\null_{\beta\gamma}\null^{\delta}
   \quad \hbox{instead of}\quad \undersim{\tilde R}^{\alpha}_{\beta\gamma}\null
    ^{\delta}\quad.\cr}$$
If there had not been a $\backslash$null in the last symbol a ``double 
subscript" error would have resulted so this command allows you to get around
the ``no double subscript" rule.  If a subscript shoud not be shrunk in size,
$\backslash$hbox can be used to prevent the shrinking
$$\nabla_{\hbox{$e_a$}}\thinspace e_b=\Gamma^c\null_{ab}e_c\quad.$$

\bye



.
