% loeb sisse täheteaduse sümbolid

\font\astrokiri=cmastro10
\font\astroindeks=cmastro7
\font\astroallindeks=cmastro5

% eri suurusega kirjad
\def\Suuredkirjad{
   \font\hhiigel=cmdunh10 scaled 3583
   \font\hiigel=cmr17 scaled \magstep3
   \font\suur=cmr17 scaled \magstep1
   \font\suurrasvane=cmbx12 scaled \magstep3
   \font\rasvane=cmbx12 scaled \magstep2
   \font\kald=cmsl12 scaled \magstep2
   \font\kursiiv=cmti10 scaled \magstep3
   \font\pisikursiiv=cmti10 scaled \magstep2
   \font\pisike=cmr12 scaled \magstep1
   \font\kiri=cmr17
   \font\paks=cmcsc10 scaled \magstep3
   \font\latehhivigur=lasy10 scaled \magstep3
   \font\matemaatika=cmmi12 scaled \magstep2
   \font\indeks=cmmi10 scaled 1315
   \font\allindeks=cmmi8
   \font\vigur=cmsy10 scaled \magstep3
   \font\indeksvigur=cmsy10 scaled 1315
   \font\allvigur=cmsy8

   \font\qsodiaak=astrosym scaled \magstep1
   \font\qastrokiri=cmastro10 scaled \magstep3
   \font\qastroindeks=cmastro10 scaled \magstep1
   \font\qastroallindeks=cmastro7 scaled \magstep1
 }

\def\suuredkirjad{
   \font\hhiigel=cmdunh10 scaled 2986
   \font\hiigel=cmr17 scaled \magstep2
   \font\suur=cmr17
   \font\suurrasvane=cmbx12 scaled \magstep2
   \font\rasvane=cmbx12 scaled \magstep1
   \font\kald=cmsl12 scaled \magstep1
   \font\kursiiv=cmti10 scaled \magstep2
   \font\pisikursiiv=cmti10 scaled \magstep1
   \font\pisike=cmr12
   \font\kiri=cmr12 scaled \magstep1
   \font\paks=cmcsc10 scaled \magstep2
   \font\latehhivigur=lasy10 scaled \magstep2
   \font\matemaatika=cmmi12 scaled \magstep1
   \font\indeks=cmmi10 scaled\magstephalf
   \font\allindeks=cmmi7
   \font\vigur=cmsy10 scaled \magstep2
   \font\indeksvigur=cmsy10 scaled \magstephalf
   \font\allvigur=cmsy7

   \font\qsodiaak=astrosym
   \font\qastrokiri=cmastro10 scaled \magstep2
   \font\qastroindeks=cmastro10
   \font\qastroallindeks=cmastro7
 }

\def\tavakirjad{
   \font\hhiigel=cmdunh10 scaled \magstep5
   \font\hiigel=cmr17 scaled \magstep1
   \font\suur=cmr12 scaled \magstep1
   \font\suurrasvane=cmbx12 scaled \magstep1
   \font\rasvane=cmbx12
   \font\kald=cmsl12
   \font\kursiiv=cmti10 scaled \magstep1
   \font\pisikursiiv=cmti10
   \font\pisike=cmr10
   \font\kiri=cmr12
   \font\paks=cmcsc10 scaled \magstep1
   \font\latehhivigur=lasy10 scaled \magstep1
   \font\matemaatika=cmmi12 \font\indeks=cmmi8 scaled\magstephalf
   \font\allindeks=cmmi6
   \font\vigur=cmsy10 scaled \magstep1
   \font\indeksvigur=cmsy8 scaled \magstephalf \font\allvigur=cmsy6

   \font\qsodiaak=astrosym scaled 833
   \font\qastrokiri=cmastro10 scaled \magstep1
   \font\qastroindeks=cmastro8
   \font\qastroallindeks=cmastro6
}

\def\pisikirjad{
   \font\hhiigel=cmdunh10 scaled \magstep4
   \font\hiigel=cmr17
   \font\suur=cmr12
   \font\suurrasvane=cmbx12
   \font\rasvane=cmbx10
   \font\kald=cmsl10
   \font\kursiiv=cmti10
   \font\pisikursiiv=cmti8
   \font\pisike=cmr8
   \font\kiri=cmr10
   \font\paks=cmcsc10
   \font\latehhivigur=lasy10
   \font\matemaatika=cmmi10 \font\indeks=cmmi7
   \font\allindeks=cmmi5
   \font\vigur=cmsy10
   \font\indeksvigur=cmsy7 \font\allvigur=cmsy5

   \font\qsodiaak=astrosym scaled 694
   \font\qastrokiri=cmastro10
   \font\qastroindeks=cmastro7
   \font\qastroallindeks=cmastro5
}

% Define a new family; but since we need its family number to be < 8
% (in order to use \mathchardef -- see p. 155 of The TeXbook), we'll need
% to do some rearranging.  So put \sl into family 8 (note that this may mean
% that we can't use it in subscripts any more) and \astro where \sl was
% (family 5).  Plain TeX's definitions from p. 351.
%  Family    Plain TeX:    Now:
%    0         \rm         \rm
%    1         \mit        \mit (math italic)
%    2         \sy         \sy  (math symbols)
%    3         \ex         \ex  (math extension)
%    4         \it         \it
%    5         \sl         \astro
%    6         \bf         \bf
%    7         \tt         \tt
%    8        (none)       \sl
   \newfam\astrofam
   \let\astrofam=\slfam
   \let\slfam=\allocationnumber % last number allocated (pp. 346-7)
   \textfont\slfam=\tensl
%  \scriptfont\slfam=\sevensl       % we don't have this font
%  \scriptscriptfont\slfam=\fivesl  % or this one
   \def\sl{\fam\slfam\tensl}
\def\astrokirjad{
% Set up astro's math family now.
   \textfont\astrofam=\astrokiri
   \scriptfont\astrofam=\astroindeks
   \scriptscriptfont\astrofam=\astroallindeks
   \def\astro{\fam\astrofam\astrokiri}
% And make sure that \sl still works
}

% suurmatemaatika on täpselt sama, mis tavamatemaatikagi, ainult, et kirjad
% on nüüd suuremad

\def\suurmatemaatika{
   \textfont0=\kiri \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
            % põhitekst
   \textfont1=\matemaatika \scriptfont1=\indeks \scriptscriptfont1=\allindeks
            % matemaatika kirjad
   \textfont2=\vigur \scriptfont2=\indeksvigur \scriptscriptfont2=\allvigur
            % matemaatika sümbolid
   }

\def\tavamatemaatika{
   \textfont0=\kiri \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
            % põhitekst
   \textfont1=\matemaatika \scriptfont1=\indeks \scriptscriptfont1=\allindeks
            % matemaatika kirjad
   \textfont2=\vigur \scriptfont2=\indeksvigur \scriptscriptfont2=\allvigur
            % matemaatika sümbolid
   }

\def\pisimatemaatika{
   \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
            % põhitekst
   \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
            % matemaatika kirjad
   \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
            % matemaatika sümbolid
   }

\def\suursuurus{
   \def\vahe{\vskip 24mm plus 10mm minus 5mm }
   \def\vvahe{\vskip 12mm plus 5 mm minus 2.5mm}
   \def\vvvahe{\vskip 6mm plus 2.5mm minus 1.25mm}
   \suuredkirjad
   \suurmatemaatika
   \standarddefinitsioonid
   \kiri
}

\def\standarddefinitsioonid{
   \astrokirjad
   }

\def\tavasuurus{
   \def\vahe{\vskip 20mm plus 10mm minus 5mm }
   \def\vvahe{\vskip 10mm plus 5 mm minus 2.5mm}
   \def\vvvahe{\vskip 5mm plus 2.5mm minus 1.25mm}
   \tavakirjad
   \tavamatemaatika
   \standarddefinitsioonid
   \kiri
 }

\def\pisisuurus{
   \def\vahe{\vskip 10mm plus 3mm minus 2mm }
   \def\vvahe{\vskip 5mm plus 1 mm minus 1mm}
   \def\vvvahe{\vskip 2.5mm plus 0.7mm minus 0.5mm}
   \pisikirjad
   \pisimatemaatika
   \standarddefinitsioonid
   \kiri
}

\def\kakspoolreavahe{\def\reavahe{\baselineskip=5.2ex plus 0.2ex minus 0.2ex} \reavahe}
\def\topeltreavahe{\def\reavahe{\baselineskip=4.5ex plus 0.2ex minus 0.2ex} \reavahe}
\def\poolteistreavahe{\def\reavahe{\baselineskip=3.5ex plus 0.17ex minus 0.17ex} \reavahe}
\def\tavareavahe{ \def\reavahe{\baselineskip=2.5ex plus 0.14ex minus
   0.14ex} \reavahe}

\def\osa#1{\vfil \eject {\noindent \narrower{\suur #1}
   \vvvahe \global\def\_osanimi{#1} }}

\def\punkt#1{\vvvahe \goodbreak {\noindent \narrower{\paks #1} \vskip 0mm}}

\def\alapunkt#1{\vvvahe \goodbreak {\noindent \narrower{\kursiiv #1
\hfil} \vskip 0mm}}

\def\pealkiri#1{ \vvahe \goodbreak {\noindent \narrower{\suur #1} \vvvahe}}

\newcount\alumisenr \alumisenr=0
\newdimen\jpserv        % parema serv joonise laius

\def\joonealune#1{{\baselineskip=8pt \global\advance\alumisenr by 1
 \footnote{$^{\the\alumisenr}$}{\pisike #1 }}}

\def\luuletus{\obeylines \parindent 2cm}

\def\punktiir{\leaders\hbox to 1em{\hss.\hss}\hfil}

\def\allkiri#1{ \rightline{\hbox to 70mm{ \hfil #1 \hfil}}}

\def\Perereisid{\tabskip 20mm \rasvane \tabel{}{
PEREREISID      & tel:\rv
 \rv
Pepleri 10-34   & 27 - 430$\,$098 \rv
 \rv
TARTU           & 27 - 420$\,$339 \rv
}}

\def\PEREREISID{ \centerline{ \hhiigel P E R E R E I S I D}}

\def\Perereiside_aadress{ \vfill \hrule \vskip -5mm \kiri
\vtabel{}{
Pepleri 10 - 34  & tel: (372) - 7 - 430 098 \rv
Tartu 2400 &         faks: (372) - 7 - 420 339 \rv
EESTI        &       pere@kiirtee.ee \rv
} \eject}

\def\***{\vvvahe \nobreak \centerline{* ~~~~~~~ * ~~~~~~~ *} \goodbreak
\vvvahe}

% täheteaduse märgid:
% Finally, define symbols in the astro fonts.  First hex digit = 0 for
% "ordinary" symbol; second = 5 for family 5; third and fourth = ASCII
% code for location of symbol in the font.  But \circ is family 2.
\mathchardef\Sol="0553      % Sun symbol, "S"
\mathchardef\Mercurius="0531  % Mercury symbol, "1"
\mathchardef\Venus="0532    % Venus symbol, "2"
\mathchardef\Terra="0533    % Earth symbol, "3"
\mathchardef\Mars="0534     % Mars symbol, "4"
\mathchardef\Jupiter="0535  % Jupiter symbol, "5"
\mathchardef\Saturn="0536   % Saturn symbol, "6"
\mathchardef\Uranus="0537   % Uranus symbol, "7"
\mathchardef\Neptun="0538  % Neptune symbol, "8"
\mathchardef\Pluto="0539    % Pluo symbol, "9"
\mathchardef\Luna="054D     % Moon symbol, "M"
\mathchardef\TS="054E  % ascending node (dragon's head), "N"
\mathchardef\VS="0544 % descending node (dragon's tail), "D"
\mathchardef\KP="0556       % vernal equinox (Aries), "V"
\mathchardef\SP="054C       % autumnal equinox (Libra), "L"
\mathchardef\ring="250E     % circle, replacing the one in \sy

\def\Aries{{\qsodiaak\char211}}
\def\Taurus{{\qsodiaak\char212}}
\def\Gemini{{\qsodiaak\char213}}
\def\Cancer{{\qsodiaak\char214}}
\def\Leo{{\qsodiaak\char215}}
\def\Virgo{{\qsodiaak\char216}}
\def\Libra{{\qsodiaak\char217}}
\def\Scorpio{{\qsodiaak\char218}}
\def\Sagittarius{{\qsodiaak\char219}}
\def\Capricornius{{\qsodiaak\char220}}
\def\Aquarius{{\qsodiaak\char221}}
\def\Pisces{{\qsodiaak\char222}}

\def\tabel#1#2{ \goodbreak \vvvahe \centerline{ #1} \nobreak $$\vbox{
\def\rv{ \cr} \halign{& \hfil ## \hfil \cr #2}}$$ \goodbreak}

\def\vtabel#1#2{ \goodbreak \vvvahe $$\vbox{#1}$$ \nobreak $$\vbox{
\def\rv{ \cr} \halign{& ## \hfil \cr #2}}$$ \goodbreak}

\def\joonis#1#2{ \midinsert \vbox{ $${#1}$$ \narrower{ \parindent 5mm
\kursiiv #2} \vvvahe} \endinsert}

\def\servajoonis#1#2#3{ \jpserv=#2 \advance\jpserv 10mm
   \midinsert \line{\vbox{ \rightskip \jpserv
   \kursiiv #3} \hfill
   \hskip -#2 \hskip -10mm \epsfxsize=#2 #1} \endinsert }

\def\uusLK{ \vfill \eject}

\def\nummerda{ \footline{ \hss \folio \hss}}

\def\CanonBJ{\vsize=227mm \voffset=0mm \hsize=160mm \hoffset=4mm}
 % Canon BJ-10 vastav lehe kujundus
% Piiluprogrammis: Paberi pikkus 210, laius 296, vasak serv 18 ja
 % ülaserv 27mm

\def\HPDeskJet{\vsize=227mm \voffset -22mm \hsize=160mm \hoffset 0mm }
 % HP DeskJet 500

\def\Star{\vsize=227mm \voffset -25.4mm \hsize=160mm \hoffset 0mm}
 % Star LC-10

\def\rv{\hfil \break}

\def\joonitud#1{ \underbar{#1}}

\def\_{\kern0mm\joonitud{ }}

\def\<{$<$} \def\>{$>$}

\def\faksikujundus{ \tavasuurus \poolteistreavahe \tabskip 5mm
\font\faksikiri=cmss12 \faksikiri}

\def\kilekujundus{ \Suuredkirjad \kiri \reavahe}


% ----------- veergude värk ----------------

\newcount\columnsperpage
\newdimen\intercolumnskip
\newdimen\kogulaius
\newbox\columna
\newbox\columnb
\newbox\columnc
% make \bye not \outer so that the \def\bye in the \else clause below
% can be scanned without complaint.
\def\bye{\par\vfill\supereject\end}
\def\ncolumns{\the\columnsperpage}

\def\kaks_veergu{\columnsperpage=2 \mitmeveerulisus
   \message{[\ncolumns\space
      veerg\if 1\ncolumns\else u\fi\space leheküljel]}
   }

\def\mitmeveerulisus{\if 1\ncolumns
      \kogulaius=160mm
   \else
      \def\makefootline{\baselineskip24pt\hsize\kogulaius\line{\the\footline}}
      \def\makeheadline{\vbox to0pt{\vskip-22.5pt \hsize\kogulaius
         \line{\vbox to8.5pt{}\the\headline}\vss}\nointerlineskip}
      \if 2\ncolumns
         \kogulaius=175mm
         \hsize 85mm
         \vsize 238mm
         \hoffset -1mm
         \voffset -3mm
         \intercolumnskip=5mm
         \let\maxcolumn=b
         \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
   \else \if 3\ncolumns
      \let\maxcolumn=c
   \else
      \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
      \errmessage{Illegal number of columns per page}
   \fi\fi

   \def\abc{a}
   \output={%
         % This next line is useful when designing the layout.
         %\immediate\write16{Column \folio\abc\space starts with \firstmark}
         \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
         \else\if a\abc
         \global\setbox\columna\columnbox \global\def\abc{b}
         %% in case we never use \columnb (two-column mode)
         \global\setbox\columnb\hbox to -\intercolumnskip{}
         \else
         \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
   \def\multicolumnformat{\shipout\vbox{\makeheadline
         \hbox{\box\columna\hskip\intercolumnskip
         \box\columnb\hskip\intercolumnskip\columnbox}
         \makefootline}\advancepageno}
   \def\columnbox{\leftline{\pagebody}}

   \def\bye{\par\vfill\supereject
      \if a\abc \else\null\vfill\eject\fi
      \if a\abc \else\null\vfill\eject\fi
      \end}
   \fi

   \outer\def\newcolumn{\vfill\eject}
   }

% ----------- ja tavakujundus ---------------

\tavasuurus \poolteistreavahe \tabskip 5mm \nopagenumbers \columnsperpage=1


