% Macros for IUCr journals (borrowed from those for The TeXbook)

\catcode`@=11                                % allow @ for internal macros
\newif\ifw@b\w@bfalse

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Font assignments                                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------
% Computer modern fonts still accessible through calls to \cmrten etc
%----------------------------------------------------------------------------

\font\cmbtwelve=cmbx10 at 12pt
\font\cmbten=cmbx10
\font\cmbeight=cmbx8
\font\cmbfive=cmbx5
\font\cmmibtwelve=cmmib10 at 12pt
\font\cmmibten=cmmib10
\font\cmmibnine=cmmib9
\font\cmmibeight=cmmib8
\font\cmmibseven=cmmib7
\font\cmmibsix=cmmib6
\font\cmmibfive=cmmib5
\font\cmmibfour=cmmib5
\font\cmrtwelve=cmr10 at 12pt
\font\cmrten=cmr10
\font\cmrnine=cmr9
\font\cmreight=cmr8
\font\cmrseven=cmr7
\font\cmrsix=cmr6
\font\cmrfive=cmr5
\font\cmsltwelve=cmsl12
\font\cmslten=cmsl10
\font\cmslnine=cmsl9
\font\cmsleight=cmsl8
\font\cmslseven=cmsl8 at 7pt
\font\cmslsix=cmsl8 at 6pt
\font\cmslfive=cmsl8 at 5pt
\font\cmmitwelve=cmmi10 at 12pt
\font\cmmiten=cmmi10
\font\cmminine=cmmi9
\font\cmmieight=cmmi8
\font\cmmiseven=cmmi7
\font\cmmisix=cmmi6
\font\cmmifive=cmmi5

\ifproof
%----------------------------------------------------------------------------
% PostScript fonts for generation of galleys
%----------------------------------------------------------------------------

% roman

\font\twelverm=ptmr at 12pt
\font\tenrm=ptmr at 10 pt
\font\ninerm=ptmr at 9 pt
\font\eightrm=ptmr at 8 pt
\font\sevenrm=ptmr at 7 pt
\font\sixrm=ptmr at 6 pt
\font\fiverm=ptmr at 5 pt

% text italic

\font\twelveit=ptmri at 12 pt
\font\tenit=ptmri at 10 pt
\font\nineit=ptmri at 9 pt
\font\eightit=ptmri at 8 pt
\font\sevenit=ptmri at 7 pt

% bold

\font\twelvebf=ptmb at 12 pt
\font\tenbf=ptmb at 10 pt
\font\ninebf=ptmb at 9 pt
\font\eightbf=ptmb at 8 pt
\font\sevenbf=ptmb at 7 pt
\font\sixbf=ptmb at 6 pt
\font\fivebf=ptmb at 5 pt

% bold italic

\font\twelvebi=ptmbi at 12 pt
\font\tenbi=ptmbi at 10 pt
\font\ninebi=ptmbi at 9 pt
\font\eightbi=ptmbi at 8 pt
\font\sevenbi=ptmbi at 7 pt
\font\sixbi=ptmbi at 6 pt
\font\fivebi=ptmbi at 5 pt

% caps-and-small-caps

%\font\twelvecsc=ptmb at 10 pt
\font\twelvecsc=ptmrc7t at 12 pt
\font\tencsc=ptmrc7t at 10 pt
\font\ninecsc=ptmrc7t at 9 pt
\font\eightcsc=ptmrc7t at 8 pt
\font\sevencsc=ptmrc7t at 7 pt
%%%%%\font\tencsc=ptmr at 10 pt
%%%%%\font\ninecsc=ptmr at 9 pt
%%%%%\font\eightcsc=ptmr at 8 pt
%%%%%\font\sevencsc=ptmr at 7 pt

% math italic: beware!

\font\twelvei=ptmri  at 12 pt            % instead of cmmi10
\font\teni=ptmri                         % instead of cmmi10
\font\ninei=ptmri at 9 pt                % instead of cmmi9
\font\eighti=ptmri at 8 pt               % instead of cmmi8
\font\seveni=ptmri at 7 pt
\font\sixi=ptmri at 6 pt                 % instead of cmmi6
\font\fivei=ptmri at 5 pt
\skewchar\ninei='177 \skewchar\eighti='177 \skewchar\sixi='177

% symbol fonts (still the Computer Modern set)

\font\twelvesy=cmsy10 at 12pt
\font\tensy=cmsy10
\font\ninesy=cmsy9
\font\eightsy=cmsy8
\font\sevensy=cmsy7
\font\sixsy=cmsy6
\font\fivesy=cmsy5
\skewchar\ninesy='60 \skewchar\eightsy='60 \skewchar\sixsy='60

% fraktur

%\font\fraktur=eufm10
%\def\frak#1{\ifmmode\hbox{\fraktur #1}\else\fraktur #1\fi}
\font\twelvefrak=eufm10 at 12pt
\font\tenfrak=eufm10
\font\eightfrak=eufm8
\font\sevenfrak=eufm7
\font\sixfrak=eufm6
\font\fivefrak=eufm5

% openface (blackboard bold)
% 2002-07-19: old version had msym10 but this was not accessible on the
% system: it's an old AMS font now replaced by msbm10

\font\twelvebb=msbm10 at 12pt
\font\tenbb=msbm10
\font\ninebb=msbm10 at 9pt
\font\eightbb=msbm10 at 8pt
\font\sevenbb=msbm10 at 7pt
\font\sixbb=msbm10 at 6pt
\font\fivebb=msbm10 at 5pt
%\skewchar\ninebb='60 \skewchar\eightbb='60 \skewchar\sixbb='60


% monospaced fonts (notionally one point size down; Courier looks big)

\font\twelvett=pcrr at 11 pt
\font\tentt=pcrr at 9 pt
\font\ninett=pcrr at 8 pt
\font\eighttt=pcrr at 7 pt
\font\seventt=pcrr at 6 pt
\font\sixtt=pcrr at 6 pt
\font\fivett=pcrr at 5 pt

\hyphenchar\tentt=-1                         % inhibit hyphenation
\hyphenchar\ninett=-1
\hyphenchar\eighttt=-1
\hyphenchar\seventt=-1

% slanted fonts

\font\twelvesl=pcrro at 11 pt
\font\tensl=pcrro at 9 pt
\font\ninesl=pcrro at 8 pt
\font\eightsl=pcrro at 7 pt
\font\sevensl=pcrro at 6pt

% script fonts

\font\twelvez=pzcmi at 12 pt
\font\tenz=pzcmi at 10 pt
\font\ninez=pzcmi at 9 pt
\font\eightz=pzcmi at 8 pt
\font\sevenz=pzcmi at 7pt
\font\sixz=pzcmi at 6pt
\font\fivez=pzcmi at 5pt

% sanserif fonts

\font\twelvef=phvr at 12 pt
\font\tenf=phvr at 10 pt
\font\ninef=phvr at 9 pt
\font\eightf=phvr at 8 pt
\font\sevenf=phvr at 7pt
\font\sixf=phvr at 6pt
\font\fivef=phvr at 5pt

\font\twelvefb=phvb at 12 pt
\font\tenfb=phvb at 10 pt
\font\ninefb=phvb at 9 pt
\font\eightfb=phvb at 8 pt
\font\sevenfb=phvb at 7pt
\font\fivefb=phvb at 5pt

\else
%----------------------------------------------------------------------------
% Computer Modern fonts (limited set) in preprint
%----------------------------------------------------------------------------

% roman

\font\twelverm=cmr10
\font\tenrm=cmr10
\font\ninerm=cmr10
\font\eightrm=cmr10
\font\sevenrm=cmr7
\font\sixrm=cmr7
\font\fiverm=cmr7

% text italic

\font\twelveit=cmti10 at 12pt
\font\tenit=cmti10
\font\nineit=cmti10
\font\eightit=cmti10
\font\sevenit=cmti7

% bold

\font\twelvebf=cmbx10
\font\tenbf=cmbx10
\font\ninebf=cmbx10
\font\eightbf=cmbx10
\font\sevenbf=cmbx7
\font\sixbf=cmbx7
\font\fivebf=cmbx7

% bold italic

\font\twelvebi=cmbxti10
\font\tenbi=cmbxti10
\font\ninebi=cmbxti10
\font\eightbi=cmbxti10
\font\sevenbi=cmbxti7
\font\sixbi=cmbxti7
\font\fivebi=cmbxti7

% caps-and-small-caps

\font\tencsc=cmcsc10
\font\ninecsc=cmcsc10
\font\eightcsc=cmcsc10
\font\sevencsc=cmcsc10

% math italic

\font\twelvei=cmmi10 at 12pt
\font\teni=cmmi10
\font\ninei=cmmi10
\font\eighti=cmmi10
\font\seveni=cmmi7
\font\sixi=cmmi7
\font\fivei=cmmi7
\skewchar\ninei='177 \skewchar\eighti='177 \skewchar\sixi='177

% symbol fonts (still the Computer Modern set)

\font\twelvesy=cmsy10 at 12pt
\font\tensy=cmsy10
\font\ninesy=cmsy10
\font\eightsy=cmsy10
\font\sixsy=cmsy7
\skewchar\ninesy='60 \skewchar\eightsy='60 \skewchar\sixsy='60

% monospaced fonts

\font\twelvett=cmtt12
\font\tentt=cmtt10
\font\ninett=cmtt10
\font\eighttt=cmtt10
\font\seventt=cmtt8

\hyphenchar\tentt=-1                         % inhibit hyphenation
\hyphenchar\ninett=-1
\hyphenchar\eighttt=-1
\hyphenchar\seventt=-1

% slanted fonts

\font\twelvesl=cmsl10 at 12pt
\font\tensl=cmsl10
\font\ninesl=cmsl10
\font\eightsl=cmsl10
\font\sevensl=cmsl8

% script fonts

\font\twelvez=pzcmi at 12 pt
\font\tenz=pzcmi at 10 pt
\font\ninez=pzcmi at 9 pt
\font\eightz=pzcmi at 8 pt
\font\sevenz=pzcmi at 7pt
\font\fivez=pzcmi at 5pt

% openface (blackboard bold)
% 2002-07-19: old version had msym10 but this was not accessible on the
% system: it's an old AMS font now replaced by msbm10

\font\twelvebb=msbm10 at 12pt
\font\tenbb=msbm10
\font\ninebb=msbm10 at 9pt
\font\eightbb=msbm10 at 8pt
\font\sevenbb=msbm10 at 7pt
\font\sixbb=msbm10 at 6pt
\font\fivebb=msbm10 at 5pt
%\skewchar\ninebb='60 \skewchar\eightbb='60 \skewchar\sixbb='60

% monospaced fonts (notionally one point size down; Courier looks big)

\font\twelvett=cmtt12
\font\tentt=cmtt10
\font\ninett=cmtt10 at 9 pt
\font\eighttt=cmtt8
\font\seventt=cmtt8 at 7pt
\font\sixtt=cmtt8 at 6pt
\font\fivett=cmtt8 at 5pt

% sanserif fonts

\font\twelvef=phvr at 12 pt
\font\tenf=phvr at 10 pt
\font\ninef=phvr at 9 pt
\font\eightf=phvr at 8 pt
\font\sevenf=phvr at 7pt
\font\sixf=phvr at 6pt
\font\fivef=phvr at 5pt

\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Timestamp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\timestamp{\number\day\space \ifcase\month\or
  Jan\or Feb\or Mar\or Apr\or May\or Jun\or
  Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi
  \space\number\year}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Poor man's bold (useful for math symbols with no corresponding bold font) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pmb#1{\setbox0=\hbox{#1}%
  \kern-.025em\copy0\kern-\wd0
  \kern.05em\copy0\kern-\wd0
  \kern-.025em\raise.0433em\box0 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Math symbol control names                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newfam\lgkfam  % to allow lower-case greek characters to be found in math mode
\newfam\ugkfam  % to allow upper-case greek characters to be found in math mode
\newfam\bgkfam  % to allow lower-case bold greek characters ... in math mode
\newfam\accfam  % to allow math accents (not sloping!) in math mode
\newfam\bifam   % to allow bold italic in math mode
\newfam\zfam    % to allow script (Zapf Chancery) in math mode
\newfam\ffam    % to allow sanserif (Helvetica) in math mode
\newfam\Bgkfam  % to allow uppercase bold greek characters ... in math mode
\mathcode`\,="683B
\mathcode`\.="083A
\mathcode`\/="083D
\mathcode`\<="383C
\mathcode`\>="383E
\mathchardef\alpha="080B
\mathchardef\bfalpha="0A0B
\mathchardef\beta="080C
\mathchardef\bfbeta="0A0C
\mathchardef\gamma="080D
\mathchardef\bfgamma="0A0D
\mathchardef\delta="080E
\mathchardef\bfdelta="0A0E
\mathchardef\epsilon="080F
\mathchardef\bfepsilon="0A0F
\mathchardef\zeta="0810
\mathchardef\bfzeta="0A10
\mathchardef\eta="0811
\mathchardef\bfeta="0A11
\mathchardef\theta="0812
\mathchardef\bftheta="0A12
\mathchardef\iota="0813
\mathchardef\bfiota="0A13
\mathchardef\kappa="0814
\mathchardef\bfkappa="0A14
\mathchardef\lambda="0815
\mathchardef\bflambda="0A15
\mathchardef\mu="0816
\mathchardef\bfmu="0A16
\mathchardef\nu="0817
\mathchardef\bfnu="0A17
\mathchardef\xi="0818
\mathchardef\bfxi="0A18
\mathchardef\pi="0819
\mathchardef\bfpi="0A19
\mathchardef\rho="081A
\mathchardef\bfrho="0A1A
\mathchardef\sigma="081B
\mathchardef\bfsigma="0A1B
\mathchardef\tau="081C
\mathchardef\bftau="0A1C
\mathchardef\upsilon="081D
\mathchardef\bfupsilon="0A1D
\mathchardef\phi="081E
\mathchardef\bfphi="0A1E
\mathchardef\chi="081F
\mathchardef\bfchi="0A1F
\mathchardef\psi="0820
\mathchardef\bfpsi="0A20
\mathchardef\omega="0821
\mathchardef\bfomega="0A21
\mathchardef\varepsilon="0822
\mathchardef\bfvarepsilon="0A22
\mathchardef\vartheta="0823
\mathchardef\bfvartheta="0A23
\mathchardef\varpi="0824
\mathchardef\bfvarpi="0A24
\mathchardef\varrho="0825
\mathchardef\bfvarrho="0A25
\mathchardef\varsigma="0826
\mathchardef\bfvarsigma="0A26
\mathchardef\varphi="0827
\mathchardef\bfvarphi="0A27
\ifw@b \mathchardef\Gamma="0900 \else \mathchardef\Gamma="0B00 \fi
\ifw@b\mathchardef\Delta="0901\else\mathchardef\Delta="0B01\fi
\ifw@b\mathchardef\Theta="0902\else\mathchardef\Theta="0B02\fi
\ifw@b\mathchardef\Lambda="0903\else\mathchardef\Lambda="0B03\fi
\ifw@b\mathchardef\Chi="0958\else\mathchardef\Chi="0B58\fi
\ifw@b\mathchardef\Xi="0904\else\mathchardef\Xi="0B04\fi
\ifw@b\mathchardef\Pi="0905\else\mathchardef\Pi="0B05\fi
\ifw@b\mathchardef\Sigma="0906\else\mathchardef\Sigma="0B06\fi
\ifw@b\mathchardef\Upsilon="0907\else\mathchardef\Upsilon="0B07\fi
\ifw@b\mathchardef\Phi="0908\else\mathchardef\Phi="0B08\fi
\ifw@b\mathchardef\Psi="0909\else\mathchardef\Psi="0B09\fi
\ifw@b\mathchardef\Omega="090A\else\mathchardef\Omega="0B0A\fi
\mathchardef\imath="087B
\mathchardef\jmath="087C
\mathchardef\ell="0860
\mathchardef\wp="087D
\mathchardef\partial="0840
\mathchardef\flat="085B
\mathchardef\natural="085C
\mathchardef\sharp="085D
\mathchardef\triangleleft="282F
\mathchardef\triangleright="282E
\mathchardef\star="283F
\mathchardef\smile="385E
\mathchardef\frown="385F
\mathchardef\leftharpoonup="3828
\mathchardef\leftharpoondown="3829
\mathchardef\rightharpoonup="382A
\mathchardef\rightharpoondown="382B
\mathchardef\lhook="382C  \def\hookrightarrow{\lhook\joinrel\rightarrow}
\mathchardef\rhook="382D  \def\hookleftarrow{\leftarrow\joinrel\rhook}
\def\bowtie{\mathrel\triangleright\joinrel\mathrel\triangleleft}
\mathchardef\ldotp="683A
  \def\ldots{\mathinner{\ldotp\ldotp\ldotp}}
  \def\acute{\mathaccent"0B13 }
  \def\grave{\mathaccent"0B12 }
  \def\ddot{\mathaccent"0B7F }
  \def\tilde{\mathaccent"0B7E }
  \def\bar{\mathaccent"0B16 }
  \def\breve{\mathaccent"0B15 }
  \def\check{\mathaccent"0B14 }
  \def\vec{\mathaccent"087E }
  \def\hat{\mathaccent"0B5E }
  \def\dot{\mathaccent"0B5F }
  \def\omicron{\hbox{\it o}}
%added by SK: 3B2 definitions
  \def\lt{<}
  \def\gt{>}
  \def\semi{;}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other math constructs                                                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\sqr#1#2{{\vcenter{\vbox{\hrule height.#2pt
  \hbox{\vrule width.#2pt height#1pt \kern#1pt
    \vrule width.#2pt}
  \hrule height.#2pt}}}}
\def\square{\mathchoice\sqr54\sqr54\sqr{3.1}3\sqr{2.5}3}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Control names for other characters                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifproof
\chardef\l="F8
\chardef\L="E8
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Type size modes: 12pt, 10pt, 9pt, 8pt, 7pt                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newskip\ttglue
\def\webfonts{\w@btrue\def\rm{\fam0\twelverm}%
  \textfont0=\twelverm \scriptfont0=\eightrm \scriptscriptfont0=\fiverm
  \textfont1=\twelvei \scriptfont1=\eighti \scriptscriptfont1=\fivei
  \textfont2=\twelvesy \scriptfont2=\eightsy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \def\it{\fam\itfam\twelveit}%
  \textfont\itfam=\twelveit \scriptfont\itfam=\eighti \scriptscriptfont\itfam=\sixi
  \def\sf{\fam\slfam\twelvef}%
  \textfont\slfam=\twelvef \scriptfont\slfam=\eightf \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\twelvebf}%
  \textfont\bffam=\twelvebf \scriptfont\bffam=\eightbf
   \scriptscriptfont\bffam=\sixbf
  \def\tt{\fam\ttfam\twelvett}%
  \textfont\ttfam=\twelvett \scriptfont\ttfam=\eighttt
  \scriptscriptfont\ttfam=\sixtt
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmitwelve \scriptfont8=\cmmieight \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmsltwelve}%
  \textfont9=\cmsltwelve \scriptfont9=\cmsleight \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibtwelve\scriptfont10=\cmmibeight\scriptscriptfont10=\cmmibfive
  \textfont11=\cmrtwelve \scriptfont11=\cmreight \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\twelvebi}%
  \textfont\bifam=\twelvebi \scriptfont\bifam=\eightbi
   \scriptscriptfont\bifam=\fivebi
  \def\scr{\fam\zfam\twelvez}%
  \textfont\zfam=\twelvez \scriptfont\zfam=\eightz \scriptscriptfont\zfam=\sixz
  \def\bb{\fam\ffam\twelvebb}%
  \textfont\ffam=\twelvebb \scriptfont\ffam=\eightbb
   \scriptscriptfont\ffam=\fivebb
  \textfont15=\cmbtwelve\scriptfont15=\cmbeight\scriptscriptfont15=\cmbfive
  \ifproof\normalbaselineskip=14pt\else\normalbaselineskip=16pt\fi
  \let\sc=\twelvecsc
  \let\big=\twelvebig
  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \normalbaselines\rm}

\def\twelvepoint{\def\rm{\fam0\twelverm}%
  \textfont0=\twelverm \scriptfont0=\eightrm \scriptscriptfont0=\fiverm
  \textfont1=\twelvei \scriptfont1=\eighti \scriptscriptfont1=\fivei
  \textfont2=\twelvesy \scriptfont2=\eightsy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \def\it{\fam\itfam\twelveit}%
  \textfont\itfam=\twelveit \scriptfont\itfam=\eighti
  \def\sf{\fam\slfam\twelvef}%
  \textfont\slfam=\twelvef \scriptfont\slfam=\eightf \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\twelvebf}%
  \textfont\bffam=\twelvebf \scriptfont\bffam=\eightbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\twelvett}%
  \textfont\ttfam=\twelvett
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmitwelve \scriptfont8=\cmmieight \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmsltwelve}%
  \textfont9=\cmsltwelve \scriptfont9=\cmsleight \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibtwelve\scriptfont10=\cmmibeight\scriptscriptfont10=\cmmibfive
  \textfont11=\cmrtwelve \scriptfont11=\cmreight \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\twelvebi}%
  \textfont\bifam=\twelvebi \scriptfont\bifam=\eightbi
   \scriptscriptfont\bifam=\fivebi
  \def\bb{\fam\ffam\twelvebb}%
  \textfont\ffam=\twelvebb \scriptfont\ffam=\eightbb
   \scriptscriptfont\ffam=\fivebb
  \ifproof\normalbaselineskip=14pt\else\normalbaselineskip=16pt\fi
  \let\sc=\twelvecsc
  \let\big=\twelvebig
  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \normalbaselines\rm}

\def\tenpoint{\def\rm{\fam0\tenrm}%
 % Font family 0: roman (upright) font
  \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm
 % Font family 1: math italic font
  \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
 % Font family 2: math symbol font
  \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
 % Font family 3: math extended symbol font
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
 % Font family 4: math italic font (again)
  \def\it{\fam\itfam\tenit}%
  \textfont\itfam=\tenit\scriptfont\itfam=\seveni\scriptscriptfont\itfam=\fivei
 % Font family 5: sanserif font (replacing slanted font of plain TeX)
  % \def\sl{\fam\slfam\tensl}%
  % \textfont\slfam=\tensl
  \def\sf{\fam\slfam\tenf}%
  \textfont\slfam=\tenf\scriptfont\slfam=\sevenf\scriptscriptfont\slfam=\fivef
 % Font family 6: bold font
  \def\bf{\fam\bffam\tenbf}%
  \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
   \scriptscriptfont\bffam=\fivebf
 % Font family 7: monospaced font
  \def\tt{\fam\ttfam\tentt}%
  \textfont\ttfam=\tentt \scriptfont\ttfam=\seventt
  \scriptscriptfont\ttfam=\fivett
  \tt \ttglue=.5em plus.25em minus.15em
 % Font family 8: cmmi10 (for lowercase Greek chars; also \fam\lgkfam)
  \textfont8=\cmmiten \scriptfont8=\cmmiseven \scriptscriptfont8=\cmmifive
 % Font family 9: cmsl10 (for uppercase Greek chars; also \fam\ugkfam)
  \def\sl{\fam9\cmslten}%
  \textfont9=\cmslten \scriptfont9=\cmslseven \scriptscriptfont9=\cmslfive
 % Font family 10: cmmib10 (for bold lc Greek chars; also \fam\bgkfam)
  \textfont10=\cmmibten\scriptfont10=\cmmibseven\scriptscriptfont10=\cmmibfive
 % Font family 11: cmmr10 (for some math accents; also \fam\accfam)
  \textfont11=\cmrten \scriptfont11=\cmrseven \scriptscriptfont11=\cmrfive
 % Font family 12: bold italic
  \def\bi{\fam\bifam\tenbi}%
  \textfont\bifam=\tenbi \scriptfont\bifam=\sevenbi
   \scriptscriptfont\bifam=\fivebi
 % Font family 13: script (also \fam\zfam)
  \def\scr{\fam\zfam\tenz}%
  \textfont\zfam=\tenz \scriptfont\zfam=\sevenz
   \scriptscriptfont\zfam=\fivez
 % Font family 14: blackboard bold (openface)
  \def\bb{\fam\ffam\tenbb}%
  \textfont\ffam=\tenbb \scriptfont\ffam=\sevenbb
   \scriptscriptfont\ffam=\fivebb
 % Font family 16: cmb10 for bold uc Gk (also \fam\Bgkfam)
  \textfont15=\cmbten %\scriptfont\ffam=\sevenbb
   \ifproof\normalbaselineskip=11pt\else\normalbaselineskip=16pt\fi
  \let\sc=\tencsc
  \let\big=\tenbig
  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \normalbaselines\rm}

% \specialfonts is a different packaging of font families up to the
% maximum of 15. Sanserif is replaced by fraktur, for which \frak
% is defined. These are based on \tenpoint; but if we know that we're in
% the web environment, choose the web-based (12-pt) fonts instead
\def\specialfonts{%
\let\sf\relax % forget any definition of sanserif elsewhere
\let\scr\relax % forget any definition of script elsewhere
\let\bb\relax % forget any definition of blackboard bold elsewhere
\ifw@b%
\def\rm{\fam0\twelverm}%
  \textfont0=\twelverm\scriptfont0=\eightrm\scriptscriptfont0=\sixrm
  \textfont1=\twelvei\scriptfont1=\eighti\scriptscriptfont1=\sixi
  \textfont2=\twelvesy\scriptfont2=\eightsy\scriptscriptfont2=\sixsy
  \textfont3=\tenex\scriptfont3=\tenex\scriptscriptfont3=\tenex
  \def\it{\fam\itfam\twelveit}%
  \textfont\itfam=\twelveit\scriptfont\itfam=\eighti
   \scriptscriptfont\itfam=\sixi
  \def\frak{\fam\slfam\twelvefrak}%
  \textfont\slfam=\twelvefrak\scriptfont\slfam=\eightfrak
   \scriptscriptfont\slfam=\sixfrak
  \def\bf{\fam\bffam\twelvebf}%
  \textfont\bffam=\twelvebf\scriptfont\bffam=\eightbf
   \scriptscriptfont\bffam=\sixbf
  \def\tt{\fam\ttfam\twelvett}%
  \textfont\ttfam=\twelvett\scriptfont\ttfam=\eighttt
  \scriptscriptfont\ttfam=\sixtt \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmitwelve\scriptfont8=\cmmieight\scriptscriptfont8=\cmmisix
  \def\sl{\fam9\cmsltwelve}%
  \textfont9=\cmsltwelve\scriptfont9=\cmsleight\scriptscriptfont9=\cmslsix
  \textfont10=\cmmibtwelve\scriptfont10=\cmmibeight
   \scriptscriptfont10=\cmmibsix
  \textfont11=\cmrtwelve\scriptfont11=\cmreight\scriptscriptfont11=\cmrsix
  \def\bi{\fam\bifam\twelvebi}%
  \textfont\bifam=\twelvebi\scriptfont\bifam=\eightbi
   \scriptscriptfont\bifam=\sixbi
% \def\scr{\fam\zfam\twelvez}%
% \textfont\zfam=\twelvez\scriptfont\zfam=\eightz\scriptscriptfont\zfam=\sixz
% \def\bb{\fam\ffam\twelvebb}%
% \textfont\ffam=\twelvebb\scriptfont\ffam=\eightbb
   \scriptscriptfont\ffam=\sixbb
  \textfont15=\cmbtwelve %\scriptfont\ffam=\sevenbb
   \ifproof\normalbaselineskip=11pt\else\normalbaselineskip=16pt\fi
  \let\sc=\tencsc
  \let\big=\tenbig
  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \normalbaselines\rm%
\else%
\def\rm{\fam0\tenrm}%
  \textfont0=\tenrm\scriptfont0=\sevenrm\scriptscriptfont0=\fiverm
  \textfont1=\teni\scriptfont1=\seveni\scriptscriptfont1=\fivei
  \textfont2=\tensy\scriptfont2=\sevensy\scriptscriptfont2=\fivesy
  \textfont3=\tenex\scriptfont3=\tenex\scriptscriptfont3=\tenex
  \def\it{\fam\itfam\tenit}%
  \textfont\itfam=\tenit\scriptfont\itfam=\seveni\scriptscriptfont\itfam=\fivei
  \def\frak{\fam\slfam\tenfrak}%
  \textfont\slfam=\tenfrak\scriptfont\slfam=\sevenfrak
   \scriptscriptfont\slfam=\fivefrak
  \def\bf{\fam\bffam\tenbf}%
  \textfont\bffam=\tenbf\scriptfont\bffam=\sevenbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\tentt}%
  \textfont\ttfam=\tentt\scriptfont\ttfam=\seventt
  \scriptscriptfont\ttfam=\fivett \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmiten \scriptfont8=\cmmiseven \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmslten}%
  \textfont9=\cmslten\scriptfont9=\cmslseven\scriptscriptfont9=\cmslfive
  \textfont10=\cmmibten\scriptfont10=\cmmibseven\scriptscriptfont10=\cmmibfive
  \textfont11=\cmrten\scriptfont11=\cmrseven\scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\tenbi}%
  \textfont\bifam=\tenbi\scriptfont\bifam=\sevenbi
   \scriptscriptfont\bifam=\fivebi
% \def\scr{\fam\zfam\tenz}%
% \textfont\zfam=\tenz \scriptfont\zfam=\sevenz \scriptscriptfont\zfam=\fivez
% \def\bb{\fam\ffam\tenbb}%
% \textfont\ffam=\tenbb\scriptfont\ffam=\sevenbb\scriptscriptfont\ffam=\fivebb
  \textfont15=\cmbten %\scriptfont\ffam=\sevenbb
   \ifproof\normalbaselineskip=11pt\else\normalbaselineskip=16pt\fi
  \let\sc=\tencsc
  \let\big=\tenbig
  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \normalbaselines\rm%
\fi}


\def\ninepoint{\def\rm{\fam0\ninerm}%
  \textfont0=\ninerm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  \textfont1=\ninei \scriptfont1=\sixi \scriptscriptfont1=\fivei
  \textfont2=\ninesy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \def\it{\fam\itfam\nineit}%
  \textfont\itfam=\nineit \scriptfont\itfam=\sixi
  \def\sf{\fam\slfam\ninef}%
  \textfont\slfam=\ninef
  \textfont\slfam=\ninef \scriptfont\slfam=\sixf \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\ninebf}%
  \textfont\bffam=\ninebf \scriptfont\bffam=\sixbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\ninett}%
  \textfont\ttfam=\ninett
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmminine \scriptfont8=\cmmisix \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmslnine}%
  \textfont9=\cmslnine \scriptfont9=\cmslsix \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibnine\scriptfont10=\cmmibsix\scriptscriptfont10=\cmmibfive
  \textfont11=\cmrnine \scriptfont11=\cmrsix \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\ninebi}%
  \textfont\bifam=\ninebi \scriptfont\bifam=\sixbi
   \scriptscriptfont\bifam=\fivebi
  \def\bb{\fam\ffam\ninebb}%
  \textfont\ffam=\ninebb \scriptfont\ffam=\sixbb
   \scriptscriptfont\ffam=\fivebb
  \ifproof\normalbaselineskip=10pt\else\normalbaselineskip=16pt\fi
  \let\sc=\ninecsc
  \let\big=\ninebig
  \setbox\strutbox=\hbox{\vrule height8pt depth3pt width\z@}%
  \normalbaselines\rm}

\def\neweightpoint{\def\rm{\fam0\eightrm}%
  \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
  \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \font\eightrm=cmr8%had to add these by hand to get over some
  \font\eightit=cmti8%conflicts
  \font\eightbf=cmbx8
  \font\eightbi=cmbxti10 at 8pt
  \font\eightcsc=cmcsc8
  \font\eighti=cmmi8
  \font\eightsy=cmsy8
  \font\eighttt=cmtt8
  \hyphenchar\eighttt=-1
  \font\eightsl=cmsl8
  \def\it{\fam\itfam\eightit}%
  \textfont\itfam=\eightit
  \def\sf{\fam\slfam\eightf}%
  \textfont\slfam=\eightf \scriptfont\slfam=\sixf \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\eightbf}%
  \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\eighttt}%
  \textfont\ttfam=\eighttt
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmieight \scriptfont8=\cmmisix \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmsleight}%
  \textfont9=\cmsleight \scriptfont9=\cmslsix \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibeight\scriptfont10=\cmmibsix\scriptscriptfont10=\cmmibfive
  \textfont11=\cmreight \scriptfont11=\cmrsix \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\eightbi}%
  \textfont\bifam=\eightbi \scriptfont\bifam=\sixbi
   \scriptscriptfont\bifam=\fivebi
  \def\bb{\fam\ffam\eightbb}%
  \textfont\ffam=\eightbb \scriptfont\ffam=\sixbb
   \scriptscriptfont\ffam=\fivebb
  \ifproof\normalbaselineskip=9pt\else\normalbaselineskip=10pt\fi
  \let\sc=\eightcsc
  \let\big=\eightbig
  \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}%
  \normalbaselines\rm}

\def\eightpoint{\def\rm{\fam0\eightrm}%
  \textfont0=\eightrm \scriptfont0=\sixrm \scriptscriptfont0=\fiverm
  \textfont1=\eighti \scriptfont1=\sixi \scriptscriptfont1=\fivei
  \textfont2=\eightsy \scriptfont2=\sixsy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \def\it{\fam\itfam\eightit}%
  \textfont\itfam=\eightit
  \def\sf{\fam\slfam\eightf}%
  \textfont\slfam=\eightf \scriptfont\slfam=\sixf \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\eightbf}%
  \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\eighttt}%
  \textfont\ttfam=\eighttt
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmieight \scriptfont8=\cmmisix \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmsleight}%
  \textfont9=\cmsleight \scriptfont9=\cmslsix \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibeight\scriptfont10=\cmmibsix\scriptscriptfont10=\cmmibfive
  \textfont11=\cmreight \scriptfont11=\cmrsix \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\eightbi}%
  \textfont\bifam=\eightbi \scriptfont\bifam=\sixbi
   \scriptscriptfont\bifam=\fivebi
  \def\bb{\fam\ffam\eightbb}%
  \textfont\ffam=\eightbb \scriptfont\ffam=\sixbb
   \scriptscriptfont\ffam=\fivebb
  \ifproof\normalbaselineskip=9pt\else\normalbaselineskip=16pt\fi
  \let\sc=\eightcsc
  \let\big=\eightbig
  \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}%
  \normalbaselines\rm}

\def\sevenpoint{\def\rm{\fam0\sevenrm}%
  \textfont0=\sevenrm \scriptfont0=\fiverm \scriptscriptfont0=\fiverm
  \textfont1=\seveni \scriptfont1=\fivei \scriptscriptfont1=\fivei
  \textfont2=\sevensy \scriptfont2=\fivesy \scriptscriptfont2=\fivesy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
  \def\it{\fam\itfam\sevenit}%
  \textfont\itfam=\sevenit
  \def\sf{\fam\slfam\sevenf}%
  \textfont\slfam=\sevenf \scriptfont\slfam=\fivef \scriptscriptfont\slfam=\fivef
  \def\bf{\fam\bffam\sevenbf}%
  \textfont\bffam=\sevenbf \scriptfont\bffam=\fivebf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\fam\ttfam\seventt}%
  \textfont\ttfam=\seventt
  \tt \ttglue=.5em plus.25em minus.15em
  \textfont8=\cmmiseven \scriptfont8=\cmmifive \scriptscriptfont8=\cmmifive
  \def\sl{\fam9\cmslseven}%
  \textfont9=\cmslseven \scriptfont9=\cmslfive \scriptscriptfont9=\cmslfive
  \textfont10=\cmmibseven\scriptfont10=\cmmibfive\scriptscriptfont10=\cmmibfive
  \textfont11=\cmrseven \scriptfont11=\cmrfive \scriptscriptfont11=\cmrfive
  \def\bi{\fam\bifam\sevenbi}%
  \textfont\bifam=\sevenbi \scriptfont\bifam=\fivebi
   \scriptscriptfont\bifam=\fivebi
  \def\bb{\fam\ffam\sevenbb}%
  \textfont\ffam=\sevenbb \scriptfont\ffam=\fivebb
   \scriptscriptfont\ffam=\fivebb
  \ifproof\normalbaselineskip=8pt\else\normalbaselineskip=16pt\fi
  \let\sc=\sevencsc
  \let\big=\sevenbig
  \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}%
  \normalbaselines\rm}

\def\twelvebig#1{{\hbox{$\left#1\vbox to10.5pt{}\right.\n@space$}}}
\def\tenmath{\tenpoint\fam-1 } % use after $ in ninepoint sections
\def\tenbig#1{{\hbox{$\left#1\vbox to8.5pt{}\right.\n@space$}}}
\def\ninebig#1{{\hbox{$\textfont0=\tenrm\textfont2=\tensy
  \left#1\vbox to7.25pt{}\right.\n@space$}}}
\def\eightbig#1{{\hbox{$\textfont0=\ninerm\textfont2=\ninesy
  \left#1\vbox to6.5pt{}\right.\n@space$}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page layout and output routines                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page layout

\newdimen\pagewidth \newdimen\pageheight \newdimen\ruleht
\ifproof
\hsize=19true pc  \vsize=22cm  \maxdepth=2.2pt  \parindent=1em
\else
\hsize=35true pc  \vsize=650pt  \maxdepth=2.2pt  \parindent=1em \voffset -0.3in
\fi
\pagewidth=\hsize \pageheight=\vsize \ruleht=.5pt

%\newinsert\footins
\def\footnote#1{\edef\@sf{\spacefactor\the\spacefactor}#1\@sf
      \insert\footins\bgroup\eightpoint
      \interlinepenalty100 \let\par=\endgraf
        \leftskip=\z@skip \rightskip=\z@skip
        \splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000
        %\smallskip\textindent{#1}\bgroup\strut\aftergroup\@foot\let\next}
        \smallskip{#1\hskip 4pt}\bgroup\aftergroup\@foot\let\next}
\skip\footins=12pt plus 2pt minus 4pt % space added when footnote is present
\dimen\footins=30pc % maximum footnotes per page
\def\cfootnote#1{\edef\@sf{\spacefactor\the\spacefactor}#1\@sf
      \insert\footins\bgroup\eightpoint
      \interlinepenalty100 \let\par=\endgraf
        \leftskip=0pt plus 1 fil \rightskip=0pt plus 1 fil
        \splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000
        %\smallskip\textindent{#1}\bgroup\strut\aftergroup\@foot\let\next}
        {#1\hskip 4 pt}\bgroup\aftergroup\@foot\let\next}
%% \skip\footins=12pt plus 2pt minus 4pt % space added when footnote is present
%% \dimen\footins=30pc % maximum footnotes per page

\newinsert\margin
\dimen\margin=\maxdimen
%\count\margin=0 \skip\margin=0pt % marginal inserts take up no space

\ruleht=.5pt
\def\iuchead{}     % dummy macro for replacement by running headline
\def\onepageout#1{\shipout\vbox{ % here we define one page of output
    \offinterlineskip % butt the boxes together
    \vbox to 3pc{ % this part goes on top of the 44pc pages
        \ifproof\iuchead\else\iuchead\hfill\the\pageno\hfill\fi
      \vfill} % this completes the \vbox to 3pc
    \vbox to \pageheight{

        \rlap{\kern31pc\vbox to\z@{\kern4pt\box\margin \vss}}
      #1 % now insert the main information
      \ifvoid\footins\else % footnote info is present
        \vskip\skip\footins
        \footnoterule
        \unvbox\footins\fi
      \boxmaxdepth=\maxdepth
      } % this completes the \vbox to \pageheight
    }
  \advancepageno}

\def\footnoterule{\moveright 82pt \vbox{\hrule width 64pt}\strut}

\output{\onepageout{\unvbox255}}

\newbox\partialpage
\def\begindoublecolumns{\begingroup
% Added to preserve contents of \partialpage when multiple \begin...\enddouble..
% are present (BM)                          |-----------------|
%                                           v                 v
  \output={\global\setbox\partialpage=\vbox{\unvbox\partialpage\unvbox255}}\eject
  \output={\doublecolumnout}
   \ifproof
      \hsize=9true pc
   \else
      \ifwider
         \hsize=20true pc
      \else
         \hsize=17true pc
      \fi
   \fi
    \vsize=1250pt}
\def\enddoublecolumns{\output={\balancecolumns}\eject
  \endgroup \pagegoal=\vsize}

\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth
  \dimen@= 625pt \advance\dimen@ by-\ht\partialpage
  \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
  \onepageout\pagesofar
  \unvbox255 \penalty\outputpenalty}
\def\pagesofar{\unvbox\partialpage
  \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0
  \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
  \divide\dimen@ by2 \splittopskip=\topskip
  {\vbadness=10000 \loop \global\setbox3=\copy0
    \global\setbox1=\vsplit3 to\dimen@
    \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}
  \setbox0=\vbox to\dimen@{\unvbox1}
 % \setbox2=\vbox to\dimen@{\unvbox3}
   \setbox2=\vbox to\dimen@{\dimen2=\dp3 \unvbox3 \kern-\dimen2 \vfil}
  \pagesofar}

%BM Now some of the contents of iucr.sty
%\def\pagewidth{19pc}
%\def\pageheight{8.8 in}
%\parindent10pt
%\baselineskip=11pt
%\tolerance=750


\ifproof\nopagenumbers\fi

\def\AA{%                             % redefine angstrom for PostScript
  \ifmmode\mathaccent'027A%
  \else\accent'027A%
  \fi%
}
\ifproof
  %\def\h#1{{\accent'316 #1}}          % hook (ogonek) accent
  % Comes out better for most letters as:
  \def\h#1{{\leavevmode\setbox0=\hbox{#1}\hbox to \wd0
    {\rlap{\kern.09em{\char'316}}#1}}}
  \def\dd{\leavevmode\setbox0=\hbox{d}\hbox to \wd0
    {\rlap{\kern.2em{\char'026}}d}}
                                      % Croatian barred d
  \def\DD{\leavevmode\setbox0=\hbox{\char'026}\hbox
    {\lower.3ex\hbox{\char'026}\kern-\wd0D}}
                                      % Croatian barred D
  \else
  \let\h=\c                           % hook not in cm fonts; equate to cedilla
  \def\dd{\leavevmode\setbox0=\hbox{d}\hbox to \wd0
    {\rlap{\kern.25em\raise.7ex\hbox{{\char'055}}}d}}
                                      % Croatian barred d
  \def\DD{\leavevmode\setbox0=\hbox{\char'055}\hbox
    {\raise.4ex\hbox{\char'055}\kern-\wd0D}}
                                      % Croatian barred D
\fi

\tenpoint                                    % default type size

\def\blankline{\par $\phantom{)}$\par}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for different types of chemical bonds                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%single bond
%\def\sb{\raise.2ex\hbox{$-$}}
\def\sb{---}
% Note 2001-11-20 (BM): in 3B2 Techniset have been coding for a bond in
% math context as e.g. <fd>\rm N\char208C</fd> because 3B2 does not properly
% handle \hbox in math mode. Better is <fd>\rm N\!-\!C</fd>

%double bond
\def\db{\hbox{---\kern-1em\raise.4ex\hbox{---}}}

%triple bond
%\def\tb{\hbox{\raise.2ex\hbox{$\equiv$}}}
\def\tb{\hbox{\raise.1ex\hbox{---}\kern-1em\raise.5ex\hbox{---}\kern-1em\lower.33ex\hbox{---}}}

%quadruple bond
\def\qb{\hbox{\lower.45ex\hbox{---}\kern-1em\lower.03ex\hbox{---}\kern-1em\raise.39ex\hbox{---}\kern-1em\raise.8ex\hbox{---}}}
\def\qbond{\hbox{\lower.45ex\hbox{---}\kern-1em\lower.03ex\hbox{---}\kern-1em\raise.39ex\hbox{---}\kern-1em\raise.8ex\hbox{---}}}

%delocalized double bond
%\def\ddb{\hbox{\raise-.1ex\hbox{$-$}\kern-.83em\raise1ex\hbox{...}}}
\def\ddb{\hbox{---\kern-1em\raise.9ex\hbox{.\kern.07em .\kern.07em.\kern0.05em}\kern0.1em}}

%delocalized triple bond
%\def\dtb\{hbox{\raise-.1ex\hbox{$-$}\kern-,8em\raise.3ex\hbox{$-$}\kern-.8em\raise1.1%5ex\hbox{...}}}
\def\dtb{\hbox{\raise.1ex\hbox{---}\kern-1em\lower.3ex\hbox{---}\kern-1em\raise1ex\hbox{.\kern.07em .\kern.07em.\kern0.05em}\kern0.1em}}


%dotted bond
%\def\dotbond\{hbox{\raise.6ex\hbox{...}\kern0.1em}
\def\dotbond{\hbox{\raise.6ex\hbox{.\kern.07em .\kern.07em.\kern0.1em}}}

%left angle double bond (<)
\def\leftangledb{\hbox{\raise.2ex\hbox{$<$}}}

%right angle double bond (>)
\def\rightangledb{\hbox{\raise.2ex\hbox{$>$}}}

%left angle triple bond
\def\leftangletb{\hbox{\kern.2em\raise.15ex\hbox{--}\kern-.6em\raise.2ex\hbox{$<$}}}

%right angle triple bond
\def\rightangletb{\hbox{\kern.2em\raise.15ex\hbox{--}\kern-.6em\raise.2ex\hbox{$>$}}}


%bridging bonds

\def\bridge#1#2{\hbox{#1\kern-#2\kern-.28em\raise1.7ex\hbox{\vrule height .5ex}\raise2.25ex\hbox{\vrule height 0pt width #2 depth 0.4pt} \kern-0.28em\raise1.7ex\hbox{\vrule height .5ex}\kern.35em}}

\def\bridgeb#1#2{\hbox{#1\kern-#2\kern-.28em\raise1.5ex\hbox{\vrule height .5ex}\raise2.05ex\hbox{\vrule height 0pt width #2 depth 0.4pt} \kern-0.28em\raise1.5ex\hbox{\vrule height .5ex}\kern.35em}}

\def\bridgea#1#2{\hbox{#1\kern-#2\kern-1mm\raise1.7ex\hbox{\vrule height .5ex}\raise2.25ex\hbox{\vrule height 0pt width #2 depth 0.4pt} \kern-1mm\kern-.5mm\raise1.7ex\hbox{\vrule height .5ex}\kern1mm}}

  % Use: \bridge{formula to be bridged}{length of bridge in any units}

    % e.g. \bridge{C\dbC(O)N(Ph)N\dbC}{25mm}

% bridge for use in titles
\def\bfbridge#1#2{\bf {\hbox{#1\kern-#2\kern-.30em\raise1.7ex\hbox{\vrule height .5ex width 1.2pt}\raise2.25ex\hbox{\vrule height 0pt width #2 depth 1.2pt} \kern-0.40em\raise1.7ex\hbox{\vrule height .5ex width 1.2pt}\kern.35em}}}

\def\bbCNSSN{\hbox{CNSSN\kern-3.0em\raise1.7ex\hbox{\vrule height .5ex} \kern-0.32em\raise2.25ex\hbox{\vrule height 0pt width 2.7em depth 0.4pt} \kern-0.28em\raise1.7ex\hbox{\vrule height .5ex}\kern.35em}}

\def\bbCNSNS{\hbox{CNSNS\kern-3.1em\raise1.7ex\hbox{\vrule height .5ex} \kern-0.33em\raise2.25ex\hbox{\vrule height 0pt width 2.6em depth 0.4pt} \kern-0.3em\raise1.7ex\hbox{\vrule height .5ex}\kern.35em}}

%%%%%%%%%%%% macro for new chemical text part of experimental %%%%%%%%%%%%%%
% Moved to actacif_1.tex
% \long\def\chemtext#1{\normalpars\baselineskip=10pt{\ninepoint\parindent=1em{\begingroup\vskip6pt\par\noindent#1\par\vskip4pt
%  \endgroup}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%                    MACROS FOR Ueq AND Beq EXPRESSIONS
% Moved into actacif files
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% upright sigma (temporary)
\def\upSigma{\textstyle\Sigma
\textfont\ugkfam=\cmrten }

\def\upGreek#1{$\textstyle#1
\textfont\ugkfam=\cmrten$}

%%%%%%%%%%%%%%%%%%%%%%%%%% fonts for up-right greek %%%%%%%%%%%%%%%%%%%%%%%%

\font\upgktwelve=psyr at 12pt
\font\upgkten=psyr at 10pt
\font\upgknine=psyr at 9pt
\font\upgkeight=psyr at 8pt
\font\upgkseven=psyr at 7pt

%%%%%%%%%%%%%%%%%%%%%%%%%% greek characters for sgml tex %%%%%%%%%%%%%%%%%%%

\mathchardef\boldalpha="0A0B
\mathchardef\boldbeta="0A0C
\mathchardef\boldgamma="0A0D
\mathchardef\bolddelta="0A0E
\mathchardef\boldepsilon="0A0F
\mathchardef\boldzeta="0A10
\mathchardef\boldeta="0A11
\mathchardef\boldtheta="0A12
\mathchardef\boldiota="0A13
\mathchardef\boldkappa="0A14
\mathchardef\boldlambda="0A15
\mathchardef\boldmu="0A16
\mathchardef\boldnu="0A17
\mathchardef\boldxi="0A18
\mathchardef\boldpi="0A19
\mathchardef\boldrho="0A1A
\mathchardef\boldsigma="0A1B
\mathchardef\boldtau="0A1C
\mathchardef\boldupsilon="0A1D
\mathchardef\boldphi="0A1E
\mathchardef\boldchi="0A1F
\mathchardef\boldpsi="0A20
\mathchardef\boldomega="0A21
\mathchardef\boldvarepsilon="0A22
\mathchardef\boldvartheta="0A23
\mathchardef\boldvarpi="0A24
\mathchardef\boldvarrho="0A25
\mathchardef\boldvarsigma="0A26
\mathchardef\boldvarphi="0A27
\ifw@b\mathchardef\boldGamma="0F00\else\mathchardef\boldGamma="0A00\fi
\ifw@b\mathchardef\boldDelta="0F01\else\mathchardef\boldDelta="0A01\fi
\ifw@b\mathchardef\boldTheta="0F02\else\mathchardef\boldTheta="0A02\fi
\ifw@b\mathchardef\boldLambda="0F03\else\mathchardef\boldLambda="0A03\fi
\ifw@b\mathchardef\boldXi="0F04\else\mathchardef\boldXi="0A04\fi
\ifw@b\mathchardef\boldPi="0F05\else\mathchardef\boldPi="0A05\fi
\ifw@b\mathchardef\boldSigma="0F06\else\mathchardef\boldSigma="0A06\fi
\ifw@b\mathchardef\boldUpsilon="0F07\else\mathchardef\boldUpsilon="0A07\fi
\ifw@b\mathchardef\boldPhi="0F08\else\mathchardef\boldPhi="0A08\fi
\ifw@b\mathchardef\boldPsi="0F09\else\mathchardef\boldPsi="0A09\fi
\ifw@b\mathchardef\boldOmega="0F0A\else\mathchardef\boldOmega="0A0A\fi

%%%%%%%%%%%%%%%%%%%%%%%%%% other special math symbols %%%%%%%%%%%%%%%%%%%%%%
% These are based on the extra definitions in the IUCr 3b2 math definitions set
% but sometimes use different dimensions because different fonts are used

\mathchardef\blt="363C
\mathchardef\bgt="363E
\def\boldlt{\ifmmode\blt\else$\blt$\fi}      % Bold <
\def\boldgt{\ifmmode\bgt\else$\bgt$\fi}      % Bold >

\def\hbar{{\hbox{$h$}\kern-0.45em\raise0.7ex\hbox{-}\kern0.2em}}
\def\kbar{{\hbox{$k$}\kern-0.45em\raise0.7ex\hbox{-}\kern0.2em}}
\def\backslash{{\char92}}
\def\lesssim{\raise.4ex\hbox{$<$}\lower.8ex\hbox{$\mkern-14mu\sim\,$}}
\def\gtrsim{\raise.3ex\hbox{$>$}\lower.8ex\hbox{$\mkern-14mu\sim\,$}}
\def\fallingdotseq{= \kern-9pt\raise1ex\hbox{.}\kern1.6pt\lower.1ex\hbox{.}\kern2pt}
\def\boldnabla{%
\setbox0=\hbox{$\nabla$}%
  \kern-.015em\raise.02em\copy0\kern-\wd0
  \kern.03em\copy0\kern-\wd0
  \kern-.015em\lower.02em\box0
}
% CIF \\times is translated to TeX \times, but may occur in math mode or not
% The {} within the (re)definition of \times seems to be needed to coerce it
% into the correct mode if encountered within an \eqalign{ ..&\times ..\cr}
% construction
\let\Mtimes\times
\def\times{{}\ifmmode\Mtimes\else$\Mtimes$\fi}

\def\micron{\font\symbol=psyr {\symbol m}}
\def\micron{\ifmmode%
    \hbox{\font\symbol=psyr {\symbol m}}%
  \else%
    \font\symbol=psyr {\symbol m}\fi}
\let\micro\micron

\def\gtrless{\kern2pt\hbox{\raise0.44ex\hbox{\gt}\hskip-.56em\raise-0.44ex\hbox{\lt}}\kern2pt}

% added as to use LaTeX command in TeX
\def\LaTeX{L\kern-.35em\raise.4ex\hbox{\sevenrm A}\kern-.15em\TeX}
\let\vint\int     % a Techniset-ism

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
