%This is RHfmt, R.C-H.H's first attempt at a large format file.
%It takes chunks from manmac.tex relating to font sizing
%and amends those to include poundsigns
%It also takes footnotes from AMSptt.sty
%It also contains clause-numbering macros
%It also defines today & signed etc
%Last modified 12th October 1988
%
\ifx\rhfmtisloaded\relax\endinput\else\let\rhfmtisloaded=\relax\fi

\catcode`@=11 % borrow the private macros of PLAIN (with care)

\font\tentex=cmtex10
\font\twelverm=cmr12
\font\ninerm=cmr9
\font\eightrm=cmr8
\font\sixrm=cmr6
\font\fiverm=cmr5


\font\twelvei=cmmi12
\font\ninei=cmmi9
\font\eighti=cmmi8
\font\sixi=cmmi6
\font\fivei=cmmi5
\skewchar\twelvei='177 
\skewchar\ninei='177 \skewchar\eighti='177 \skewchar\sixi='177

\font\twelvesy=cmsy10 scaled \magstep1
\font\ninesy=cmsy9
\font\eightsy=cmsy8
\font\sixsy=cmsy6
%\font\fivesy=smsy5
\skewchar\twelvesy='60
\skewchar\ninesy='60 \skewchar\eightsy='60 \skewchar\sixsy='60

\font\twelvebf=cmbx12
\font\ninebf=cmbx9
\font\eightbf=cmbx8
\font\sixbf=cmbx6
\font\fivebf=cmbx5


\font\twelvett=cmtt12
\font\ninett=cmtt9
\font\eighttt=cmtt8
%there is no cmtt6, or cmsl6

\font\twelvesl=cmsl12
\font\ninesl=cmsl9
\font\eightsl=cmsl8

\font\twelveit=cmti12
\font\nineit=cmti9
\font\eightit=cmti8
\font\sixit=cmti7 % !

% Now the poundsign fonts:
\font\tenu=cmu10 % unslanted text italic
\font\twelveu=cmu10 scaled \magstep1
\font\twelvebfit=cmbxti10 scaled \magstep1
\font\tenbfit=cmbxti10
\font\twelvetiit=cmitt10 scaled \magstep1
\font\tentiit=cmitt10

%add these:
%\font\fourteencaps=cmcsc10 scaled \magstep2
\font\twelvecaps=cmcsc10 scaled \magstep1
\font\tencaps=cmcsc10

% Now add the poundsign macros:
\def\rmpo{\leavevmode\lower.055ex\hbox{\$}\kern-.0em}
\def\itpo{\leavevmode\lower.055ex\hbox{\$}\kern-.09em}
\def\slpo{\leavevmode\lower.055ex\hbox{\$}\kern-.07em}
\def\bfpo{\leavevmode\pmb{\lower.025ex\hbox{\$}\kern-.04em}}
\def\ttpo{\leavevmode\lower.0ex\hbox{\$}\kern0em}
\def\ttkludgepo{\leavevmode\epmb{\lower.0ex\hbox{\$}\kern-.0em}}

\def\pmb#1{\setbox0=\hbox{#1}%
  \kern-.025em\copy0\kern-\wd0
  \kern.05em\copy0\kern-\wd0
  \kern-.025em\raise.0003em\box0 }

\def\epmb#1{\setbox0=\hbox{#1}% Extremely poor man's bold
  \kern-.005em\copy0\kern-\wd0
  \raise.015em\copy0\kern-\wd0
  \kern.01em\copy0\kern-\wd0
  \kern-.005em\raise.015em\box0 }

\newskip\ttglue
%This is adapted from the 10-point manmac macros:
\def\twelvepoint{\def\rm{\def\pounds{{\twelveu\rmpo}}\fam0\twelverm}%
%  \textfont0=\twelverm \scriptfont0=\eightrm \scriptscriptfont0=\sixrm
  \textfont0=\twelverm \scriptfont0=\sevenrm \scriptscriptfont0=\sixrm
  \textfont1=\twelvei \scriptfont1=\eighti \scriptscriptfont1=\sixi
  \textfont2=\twelvesy \scriptfont2=\eightsy \scriptscriptfont2=\sixsy
  \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex
%  \def\it{\def\pounds{{\itpo}}\fam\itfam\twelveit}%
  \def\it{\def\pounds{{\itpo}}\fam\itfam\twelveit}%
  \textfont\itfam=\twelveit
  \def\sl{\def\pounds{{\twelveit\slpo}}\fam\slfam\twelvesl}%
  \textfont\slfam=\twelvesl
%  \def\bf{\def\pounds{{\twelvebfit\$}}\fam\bffam\twelvebf}% %no poundsign
  \def\bf{\def\pounds{{\twelveu\bfpo}}\fam\bffam\twelvebf}% % pmb poundsign
  \textfont\bffam=\twelvebf \scriptfont\bffam=\eightbf
   \scriptscriptfont\bffam=\sixbf
  \def\tt{\def\pounds{{\tenu\ttkludgepo}}\fam\ttfam\twelvett}% ! poundsign
  \textfont\ttfam=\twelvett
  \tt \ttglue=.5em plus.25em minus.15em
  %\normalbaselineskip=15pt
  \normalbaselineskip=20pt
  \bigskipamount=20pt plus 4pt minus 4pt
  \def\caps{\def\pounds{~}\fourteencaps} % don't use the pound sign  
  \def\scaps{\def\pounds{{\twelveu\rmpo}}\twelvecaps}
%  \setbox\strutbox=\hbox{\vrule height10.5pt depth4.5pt width\z@}%
  \setbox\strutbox=\hbox{\vrule height14pt depth6pt width\z@}%

  \normalbaselines\rm}

\def\tenpoint{\def\rm{\def\pounds{{\tenu\rmpo}}\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{\def\pounds{{\itpo}}\fam\itfam\tenit}%
  \textfont\itfam=\tenit
  \def\sl{\def\pounds{{\tenit\slpo}}\fam\slfam\tensl}%
  \textfont\slfam=\tensl
  \def\bf{\def\pounds{{\tenu\bfpo}}\fam\bffam\tenbf}%
  \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\def\pounds{{\tentiit\ttpo}}\fam\ttfam\tentt}%
  \textfont\ttfam=\tentt
  \tt \ttglue=.5em plus.25em minus.15em
 \normalbaselineskip=12pt
%  \normalbaselineskip=15pt%
  \def\caps{\def\pounds{{\twelveu\rmpo}}\twelvecaps}
  \def\scaps{\def\pounds{{\tenu\rmpo}}\tencaps}
%  \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}%
  \setbox\strutbox=\hbox{\vrule height10pt depth5pt width\z@}%
  \normalbaselines\rm}

\def\ninepoint{\def\rm{\def\pounds{{\nineit\slpo}}\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{\def\pounds{{\nineit\itpo}}\fam\itfam\nineit}%
  \textfont\itfam=\nineit
  \def\sl{\def\pounds{{\nineit\slpo}}\fam\slfam\ninesl}%
  \textfont\slfam=\ninesl
  \def\bf{\def\pounds{~}\fam\bffam\ninebf}% % pound sign to be added
  \textfont\bffam=\ninebf \scriptfont\bffam=\sixbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\def\pounds{~}\fam\ttfam\ninett}% no pound sign
  \textfont\ttfam=\ninett
  \tt \ttglue=.5em plus.25em minus.15em
  \normalbaselineskip=11pt
  \setbox\strutbox=\hbox{\vrule height8pt depth3pt width\z@}%
  \normalbaselines\rm}

\def\eightpoint{\def\rm{\def\pounds{{\eightit\itpo}}\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{\def\pounds{\itpo}\fam\itfam\eightit}%
  \textfont\itfam=\eightit
  \def\sl{\def\pounds{\eightit\itpo}\fam\slfam\eightsl}%
  \textfont\slfam=\eightsl
  \def\bf{\def\pounds{~}\fam\bffam\eightbf}%
  \textfont\bffam=\eightbf \scriptfont\bffam=\sixbf
   \scriptscriptfont\bffam=\fivebf
  \def\tt{\def\pounds{~}\fam\ttfam\eighttt}%
  \textfont\ttfam=\eighttt
  \tt \ttglue=.5em plus.25em minus.15em
  \normalbaselineskip=9pt
  \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}%
  \normalbaselines\rm}

%This is where the footnote part of amstex is added:
%first, the definition of relaxnext
\def\relaxnext@{\let\next\relax}
% then the footnote macros
\newcount\footmarkcount@
\def\clearnotenumber{\footmarkcount@\z@}
\footmarkcount@\z@

% This is where AMSPPT.STY is added:
\def\footmarkform@#1{$^{#1}$}
\let\thefootnotemark\footmarkform@
\def\makefootnote@#1#2{\insert\footins
 {\interlinepenalty\interfootnotelinepenalty
% \eightpoint\splittopskip\ht\strutbox\splitmaxdepth\dp\strutbox
 \ninepoint\splittopskip\ht\strutbox\splitmaxdepth\dp\strutbox
 \floatingpenalty\@MM\leftskip\z@\rightskip\z@\spaceskip\z@\xspaceskip\z@
% \noindent{#1}\footstrut\ignorespaces#2\unskip\lower\dp\strutbox
 \fitem{#1}\footstrut\ignorespaces#2\unskip\lower\dp\strutbox
 \vbox to\dp\strutbox{}}}
\footmarkcount@\z@
\def\footnotemark{\let\@sf\empty\relaxnext@\ifhmode\edef
 \@sf{\spacefactor\the\spacefactor}\/\fi
 \def\next@{\ifx[\next\let\next\nextii@\else
  \ifx"\next\let\next\nextiii@\else
  \let\next\nextiv@\fi\fi\next}%
 \def\nextii@[##1]{\footmarkform@{##1}\@sf}%
 \def\nextiii@"##1"{{##1}\@sf}%
 \def\nextiv@{\global\advance\footmarkcount@\@ne
  \footmarkform@{\number\footmarkcount@}\@sf}%
 \futurelet\next\next@}
\def\footnotetext{\relaxnext@
 \def\next@{\ifx[\next\let\next\nextii@\else
  \ifx"\next\let\next\nextiii@\else
  \let\next\nextiv@\fi\fi\next}%
 \def\nextii@[##1]##2{\makefootnote@{\footmarkform@{##1}}{##2}}%
 \def\nextiii@"##1"##2{\makefootnote@{##1}{##2}}%
 \def\nextiv@##1{\makefootnote@{\footmarkform@{\number\footmarkcount@}}{##1}}%
 \futurelet\next\next@}
\def\footnote{\let\@sf\empty\relaxnext@\ifhmode\edef
 \@sf{\spacefactor\the\spacefactor}\/\fi
 \def\next@{\ifx[\next\let\next\nextii@\else
  \ifx"\next\let\next\nextiii@\else
  \let\next\nextiv@\fi\fi\next}%
 \def\nextii@[##1]##2{\footnotemark[##1]\footnotetext[##1]{##2}}%
 \def\nextiii@"##1"##2{\footnotemark"##1"\footnotetext"##1"{##2}}%
 \def\nextiv@##1{\footnotemark\footnotetext{##1}}%
 \futurelet\next\next@}
\def\adjustfootnotemark#1{\advance\footmarkcount@#1\relax}
%
%\count\footins=750 % footnote magnification factor (9 to 12)
%
% Adapt \hang etc (Vol.B p.355)
\newdimen\footindent \footindent=10pt % Footnotes indented
\def\fang{\hangindent\footindent}
%\def\toeindent#1{\noindent\hskip\footindent\llap{#1\enspace}\ignorespaces}
\def\fitem{\par\fang\toeindent}
%\def\toeindent#1{\noindent\hbox to \footindent{#1\hfil}}
\def\toeindent#1{\noindent\hbox to \footindent{\hfil#1\thinspace}}

% Now the automatic clause numbering:
% First the new `if's
\newif\ifgreek 
\newif\ifcard
\newif\ifclind
\newif\ifcontents

\newcount\recno % recitals
\newcount\clno \newcount\sclno % clauses and sub-clauses
\newcount\ssclno \newcount\sssclno \newcount\ssssclno % sub-sub etc
\newcount\sssssclno
\newcount\greekno \newcount\cardno

% These numbers will all be increased by one the first time they are used
\def\r@set{\recno=64 % 65 being `A'
\clno=0 \sclno=0 \ssclno=96 \sssclno=0 \ssssclno=96 \sssssclno=96 % 97 is `a'
\greekno="010A \cardno="027B 
\clearnotenumber}
\r@set


\newdimen\clindent  \newdimen\sclindent % indentation
\newdimen\ssclindent \newdimen\sssclindent \newdimen\ssssclindent
\newdimen\sssssclindent
\newdimen\expindent  \newdimen\nexpindent \newdimen\lexpindent

\clindent=25pt \sclindent=50pt \ssclindent=70pt
\sssclindent=90pt \ssssclindent=115pt \sssssclindent=145pt

\newdimen\hclindent  \newdimen\hsclindent % hanging indentation
\newdimen\hssclindent \newdimen\hsssclindent \newdimen\hssssclindent
\newdimen\hsssssclindent

\hclindent=0pt \hsclindent=\clindent \hssclindent=\sclindent
\hsssclindent=\ssclindent \hssssclindent=\sssclindent
\hsssssclindent=\ssssclindent

\parindent=0pt    \expindent=3.25in  \nexpindent=2.75in 
\lexpindent=1.75in

% I think this can go
\def\exp#1={\par
\hangindent=\expindent \hangafter=1
\leavevmode\hbox to \expindent{\hskip
\sclindent\vbox{\hsize=\lexpindent #1}\hfil}
\def\par{\endgraf\hangindent=\expindent
\hangafter=0}}

% Recitals have the same indentation as Clauses.
% Modified 12 Oct 1988
\def\rec{\sclno=0 \advance\recno by 1 
\dimen0=\the\parindent \parindent=0pt
\ifclind \hangindent=\clindent \else\hangindent=\hclindent\fi 
\hangafter=1
\medskip
\leavevmode\hbox to \clindent{(\char\the\recno)\hfil}\ignorespaces
\parindent=\the\dimen0}

\def\srec{\ssclno=96 \advance\sclno by 1
\dimen0=\the\parindent \parindent=0pt
\ifnum\prevgraf=0 \kern-\clindent\else\smallskip\fi
\ifclind \hangindent=\sclindent \else\hangindent=\hsclindent\fi
\hangafter=1
%\smallskip % I have not included any skip in subsequent subs.
\leavevmode\hbox to \sclindent{\hskip%
\clindent(\romannumeral\the\sclno)\hfil}\ignorespaces
\parindent=\the\dimen0}

\def\cl{\sclno=0 \advance\clno by 1 
\dimen0=\the\parindent \parindent=0pt % This is for odd clauses in opinions
\ifclind \hangindent=\clindent \else\hangindent=\hclindent\fi 
%\def\index#1{#1} %or, \def\index#1{\N\the\clno.#1}
%\ifcontents\N\the\clno\index\fi
\hangafter=1
\medskip
\leavevmode\hbox to \clindent{\the\clno.\hfil}\ignorespaces
\parindent=\the\dimen0}

\def\scl{\ssclno=96 \advance\sclno by 1
\dimen0=\the\parindent \parindent=0pt
\ifnum\prevgraf=0 \kern-\clindent\else\smallskip\fi
\ifclind \hangindent=\sclindent \else\hangindent=\hsclindent\fi
\hangafter=1
%\smallskip % I have not included any skip in subsequent subs.
\leavevmode\hbox to \sclindent{\hskip%
\clindent(\the\sclno)\hfil}\ignorespaces
\parindent=\the\dimen0}

\def\sscl{\sssclno=0 \advance\ssclno by 1
\dimen0=\the\parindent \parindent=0pt
\ifdim\hangindent>0pt \kern-\sclindent\fi
\ifclind \hangindent=\ssclindent \else\hangindent=\hssclindent\fi
\hangafter=1
\leavevmode\hbox to \ssclindent{\hskip%
\sclindent(\char\the\ssclno)\hfil}\ignorespaces\parindent=\the\dimen0}

\def\ssscl{\ssssclno=96 \greekno="10A \advance\sssclno by 1
\dimen0=\the\parindent \parindent=0pt
\ifdim\hangindent>0pt \kern-\ssclindent\fi
\ifclind \hangindent=\sssclindent \else\hangindent=\hsssclindent\fi
\hangafter=1
\leavevmode\hbox to \sssclindent{\hskip%
\ssclindent(\romannumeral\the\sssclno)\hfil}\ignorespaces\parindent=\the\dimen0}

\def\sssscl{\sssssclno=96 \cardno="027B 
\dimen0=\the\parindent \parindent=0pt
\advance\ssssclno by 1\advance\greekno by 1
\ifdim\hangindent>0pt \kern-\sssclindent\fi
\ifclind \hangindent=\ssssclindent \else\hangindent=\hssssclindent\fi
\hangafter=1
\leavevmode\hbox to \ssssclindent
\ifgreek{\hskip\sssclindent($\mathchar\the\greekno$)\hfil}%
\else{\hskip\sssclindent(\char\the\ssssclno\char\the\ssssclno)\hfil}\fi%
\ignorespaces\parindent=\the\dimen0}

\def\ssssscl{\advance\sssssclno by 1\advance\cardno by 1
\dimen0=\the\parindent \parindent=0pt
\ifdim\hangindent>0pt \kern-\ssssclindent\fi
\ifclind \hangindent=\sssssclindent \else\hangindent=\hsssssclindent\fi
\hangafter=1
\leavevmode\hbox to \sssssclindent
\ifcard{\hskip\ssssclindent($\mathchar\the\cardno$)\hfil}%
\else\ifgreek{\hskip\ssssclindent(\char\the\sssssclno\char
\the\sssssclno)\hfil}%
\else{\hskip\ssssclindent(\char\the\sssssclno\char\the\sssssclno
\char\the\sssssclno)\hfil}\fi\fi\ignorespaces\parindent=\the\dimen0}

%today etc
\newif\ifnocommaindate
\def\today{\ignorespaces
\ifcase\day\or{}
1st\or{}2nd\or{}3rd\or{}4th\or{}5th{}\or{}6th\or{}7th
\or{}8th\or{}9th\or{}10th\or{}11th\or{}12th\or{}13th\or{}14th
\or{}15th\or{}16th\or{}17th{}\or{}18th\or{}19th\or{}20th\or{}21st
\or{}22nd\or{}23rd\or{}24th\or{}25th\or{}26th
\or{}27th\or{}28th\or{}29th\or{}30th\or{}31st\fi
\unskip\space
\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \unskip\ifnocommaindate\space\else,\space\fi
  \number\year.}

\def\enddoc{\par\vfill\supereject\r@set\pageno=1}
\def\lincoln{\vbox{\hbox{Lincoln's Inn,}\hbox{\today}}}
\def\signed{\nobreak\vbox{\bigskip\bigskip\hskip3.0in\lincoln}}
\def\settled{\nobreak\vbox{\hskip3.5in\vbox{\hbox{Settled,}\vskip1in
\lincoln}}\enddoc}

\def\ssd#1{\vskip0.5in%\raggedbottom
\raggedright\tolerance=1000\pretolerance=500\parskip=0pt
\vbox{$\left.\vbox{\hsize2.85in{\hbox{SIGNED SEALED AND DELIVERED} by the said
#1 in the presence of---}}\right\}$}}

\def\ssdc#1{\vskip0.5in%\raggedbottom
\raggedright\tolerance=1000\pretolerance=500\parskip=0pt
\vbox{$\left.\vbox{\hsize2.85in{\hbox{THE COMMON SEAL of the said}
 #1 was\hfil\break affixed hereto in the presence of---}}\right\}$}}



\def\ssdp#1{\vskip0.5in%\raggedbottom
\raggedright\tolerance=1000\pretolerance=500\parskip=0pt
\vbox{$\left.\vbox{\hsize2.85in{\hbox{SIGNED SEALED AND DELIVERED} by the said
#1 acting by Francis Eager as aforesaid in the presence of---}}\right\}$}}

\def\noaddr{\phantom{11 Railway } \phantom{Cuttings } \phantom{Cheam } 
\phantom{London } \phantom{SW12 3DR}}

\def\ca{\def\v{\unskip\/\ {\rm v}}\begingroup\it}
\def\se{\endgroup\ }

\def\ref{\unskip\footnote} % Remove space from \se if necessary

\def\version#1{\footline={\llap{\fiverm#1}\hss\tenrm\folio\hss}}

% Amstex oldnos macros:
\def\oldnos#1{\ifmmode{\mathcode`\,="013B \fam\@ne#1}\else
  \leavevmode\hbox{$\mathcode`\,="013B \fam\@ne#1$}\fi}
%Temporary alteration;
\def\fmc{\footmarkcount@}
%
% These ``quote'' macros require attention:
\newif\ifq
\newif\ifqlap % Don't use this!
\def\beginquote{\par\begingroup\tenpoint\parskip=3pt plus 1pt minus 1pt
\advance\leftskip by \parindent\par\noindent
\ifqlap\parfillskip=0pt\fi
\ifq\llap{``}\fi\ignorespaces}
\def\endquote{\ignorespaces\ifq\rlap{''}\fi\par\endgroup\twelvepoint}

\catcode`\@=12
\def\rh{Roger C{\raise.25ex\hbox{-}}H. Horne}
\greektrue 
\cardtrue 
\clindtrue
\nocommaindatefalse
\qfalse %  No quotes in quotations
\tenpoint
\rm
\def\fmtname{RHfmt}\def\fmtversion{0.30}
\message{Version \fmtversion}
