summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/pphlp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex209/contrib/pphlp
Initial commit
Diffstat (limited to 'macros/latex209/contrib/pphlp')
-rw-r--r--macros/latex209/contrib/pphlp/helpproc.pas136
-rw-r--r--macros/latex209/contrib/pphlp/hlp.lse155
-rw-r--r--macros/latex209/contrib/pphlp/phutguide.sty337
-rw-r--r--macros/latex209/contrib/pphlp/phutguide11.sty139
-rw-r--r--macros/latex209/contrib/pphlp/pphlp.com163
-rw-r--r--macros/latex209/contrib/pphlp/pphlp.help265
-rw-r--r--macros/latex209/contrib/pphlp/pphlp.readme139
-rw-r--r--macros/latex209/contrib/pphlp/pphlp.tex315
-rw-r--r--macros/latex209/contrib/pphlp/pproc.cld4
9 files changed, 1653 insertions, 0 deletions
diff --git a/macros/latex209/contrib/pphlp/helpproc.pas b/macros/latex209/contrib/pphlp/helpproc.pas
new file mode 100644
index 0000000000..6bca81e335
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/helpproc.pas
@@ -0,0 +1,136 @@
+Program Help_processor (Input,Output) ;
+
+{
+
+
+Program description:
+
+ Help pre-processor
+
+
+Author : Krish Singh
+
+Written: 8th Oct 1991
+
+Version: 1.0
+
+Limitations: The program doesn't examine the contents of !<...|...>
+constructions, to see if there are any `...' within them. Also, it seems
+impossible to include the string !<...|...> within the file it processes - this
+makes documenting the system itself rather difficult!
+
+}
+
+LABEL
+ terminate;
+VAR
+ inchar,nextchar,outchar,dummychar :CHAR;
+ input_file,output_file,verbstring,
+ instring,outstring,boldon,boldoff: VARYING [132] OF CHAR;
+ i,istatus,il:integer;
+ infile,outfile:text;
+ bold,verbold:boolean;
+
+FUNCTION
+cli$get_value(com1:VARYING [a] OF CHAR;VAR com2:VARYING [b] OF CHAR;VAR i:integer):INTEGER;EXTERNAL;
+
+{---------------------------------------------------------------------------}
+Begin {Main program}
+
+ boldon:='E[1m';
+ boldoff:='E[0m';
+ boldon[1]:=chr(27);
+ boldoff[1]:=chr(27);
+ verbold:=true;
+
+ istatus:=cli$get_value('INFILE',input_file,il);
+ { writeln('reading from ',input_file); }
+ istatus:=cli$get_value('OUTFILE',output_file,il);
+ { writeln('and writing to ',output_file); }
+
+
+ {
+ write('Input file>');
+ readln(input_file);
+
+ write('Output file>');
+ readln(output_file);
+ }
+
+ OPEN(infile,input_file,default:='.help',history:=old);
+ reset(infile);
+ OPEN(outfile,output_file,default:=input_file,history:=new);
+ extend(outfile);
+
+ writeln (outfile,'! File produced by PPhlp/Helpproc from input file ',
+ input_file);
+
+ While not(eof(infile)) do
+ Begin
+ readln(infile,instring);
+
+ IF ((length(instring)>0) and (instring[1]='!')) then begin
+ { It might be an instruction to this program. In any case, }
+ { don't write it out to the output, as it would be ignored }
+ { by the help librarian }
+
+ IF (instring='!helpproc{stop}') then goto terminate;
+ IF (instring='!helpproc{verb_bold}') then verbold:=true;
+ IF (instring='!helpproc{verb_nobold}') then verbold:=false;
+
+ IF (instring='!begin{verbatim}') and (verbold)
+ then instring:=boldon;
+ IF (instring='!end{verbatim}') and (verbold)
+ then instring:=boldoff;
+ End
+
+ Else Begin
+ { Check the line for special characters, writing it out as }
+ { we go. }
+
+ i:=1;
+ while (i<=length(instring)) do begin
+ inchar:=instring[i];
+ If (inchar<>'''') AND (inchar<>'`') AND (inchar<>'!') then begin
+ write(outfile,inchar);
+ End
+ Else begin
+
+ IF (inchar='!') then begin
+ nextchar:='Q';
+ IF (i<>length(instring)) then nextchar:=instring[i+1];
+ IF (nextchar='<') then begin
+ while (instring[i]<>'|') AND (i<=length(instring)) do
+ begin
+ i:=i+1;
+ End;
+ i:=i+1;
+ while (instring[i]<>'>') AND (i<=length(instring))
+ do begin
+ write(outfile,instring[i]);
+ i:=i+1;
+ End;
+ End
+ Else begin
+ write(outfile,inchar);
+ End;
+ End;
+
+ IF (inchar='`') then begin
+ bold:=true;
+ write(outfile,boldon);
+ End;
+ IF (inchar='''') then begin
+ IF not(bold) then write(outfile,'''');
+ IF bold then write(outfile,boldoff);
+ bold:=false;
+ End;
+ End;
+ i:=i+1;
+ End { while (i<=length(instring)) };
+ writeln(outfile);
+ End; { if (instring[1] = '!') }
+ End;
+terminate: close(infile);close(outfile);
+End. {Main program}
+{---------------------------------------------------------------------------}
diff --git a/macros/latex209/contrib/pphlp/hlp.lse b/macros/latex209/contrib/pphlp/hlp.lse
new file mode 100644
index 0000000000..cec5b545f5
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/hlp.lse
@@ -0,0 +1,155 @@
+!======================================================================
+! @LSE-command-file{
+! filename = "hlp.lse",
+! version = "1.0",
+! date = "17 July 1992",
+! time = "17:54:02.50 ",
+! author = "Norman Gray",
+! address = "Department of Physics
+! Open University
+! Milton Keynes
+! MK7 6AA, UK",
+! e-mail = "N.O.Gray@open.ac.uk (Internet)",
+! telephone = "+44 908 652279",
+! FAX = "+44 908 653744",
+! archived = "Aston, SHSU",
+! keywords = "hlp-files, VMS, help",
+! abstract = "This file is part of the PPHLP package, which
+! allows both printed manuals and VMS help library
+! modules to be prepared from a single file.",
+! codetable = "ISO/Ascii",
+! checksum = "53005 155 537 5704",
+! docstring = "This file will tell LSE about the .hlp `language'
+! - the margins, wrap-mode, and so on. It
+! additionally defines a series of `adjustments', so
+! that the code-elision feature of LSE is more
+! effective.
+!
+! To use this file, enter LSE and read in this file,
+! and then go to the command line (by pressing ^Z).
+! Give the command DO to define the language, and
+! then the command SAVE ENVIRONMENT if you wish LSE
+! to recognise the file-type .hlp in future.
+!
+! The checksum field above contains a CRC-16
+! checksum as the first value, followed by the
+! equivalent of the standard UNIX wc (word
+! count) utility output of lines, words, and
+! characters. This is produced by Robert
+! Solovay's checksum utility."
+!}
+!======================================================================
+
+!delete language hlp
+define language hlp -
+ /capabilities=nodiagnostics -
+ /file_types=(.hlp,.help) -
+ /initial_string="%<title>%" -
+ /placeholder=( -
+ optional = ("%{", "}%"), -
+ optional_list = ("%{", "}%..."), -
+ required = ("%<", ">%"), -
+ required_list = ("%<", ">%..."), -
+ pseudocode=("[ ", " ]")) -
+ /identifier_characters= -
+ "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"-
+ /punctuation_characters=",.;:?%{}[]<>" -
+ /overview=minimum=3 -
+ /left_margin=context_dependent -
+ /right_margin=65 -
+ /wrap -
+ /tab=4
+
+!delete adjustment/lang=hlp "$(column=1)1"
+!delete adjustment/lang=hlp "$(column=1)2"
+!delete adjustment/lang=hlp "$(column=1)3"
+!delete adjustment/lang=hlp "$(column=1)4"
+!delete adjustment/lang=hlp "$(column=1)5"
+!delete adjustment/lang=hlp "$(column=1)/"
+!delete adjustment/lang=hlp "$(column=1)!helpsection"
+!delete adjustment/lang=hlp "$(column=1)!title"
+!delete adjustment/lang=hlp "$(column=1)!verbatimline"
+!delete adjustment/lang=hlp "$(column=1)!begin{verbatim}"
+!delete adjustment/lang=hlp "$(column=1)!end{verbatim}"
+!delete adjustment/lang=hlp "$(column=1)!begin{TeXtext}"
+!delete adjustment/lang=hlp "$(column=1)!begin"
+!delete adjustment/lang=hlp "$(column=1)!end"
+!delete adjustment/lang=hlp "$(column=1)!index"
+
+define adjustment/lang=hlp "$(column=1)1" /current=-10
+define adjustment/lang=hlp "$(column=1)2" /current=-8
+define adjustment/lang=hlp "$(column=1)3" /current=-6
+define adjustment/lang=hlp "$(column=1)4" /current=-4
+define adjustment/lang=hlp "$(column=1)5" /current=-2
+define adjustment/lang=hlp "$(column=1)/" /current=-1
+define adjustment/lang=hlp "$(column=1)!helpsection" -
+ /inherit=next/current=-1/nooverview
+define adjustment/lang=hlp "$(column=1)!title" /current=-1
+define adjustment/lang=hlp "$(column=1)!verbatimline" /nooverview
+define adjustment/lang=hlp "$(column=1)!begin{verbatim}" -
+ /subsequent=1/nooverview
+define adjustment/lang=hlp "$(column=1)!end{verbatim}" -
+ /subsequent=-1
+define adjustment/lang=hlp "$(column=1)!begin{TeXtext}" -
+ /nooverview ! rather than following, as TeXtext isn't ended by !end
+define adjustment/lang=hlp "$(column=1)!begin" /subsequent=1
+define adjustment/lang=hlp "$(column=1)!end" /subsequent=-1
+define adjustment/lang=hlp "$(line_end)" /inherit=minimum/nocount/unit
+define adjustment/lang=hlp "$(column=1)!index" /inherit=previous
+
+!delete placeholder "title" /language=hlp
+define placeholder "title" -
+ /language=hlp
+ "!title{%<text>%}"
+ "!pagetitle{%<text>%}"
+ "!author{%<text>%}"
+ "!authorext{%<text>%}"
+ "!userguide{%<text>%}"
+ "!maketitle"
+end define
+
+!delete token "textext" /language=hlp
+define token "textext" -
+ /language=hlp
+ "!begin{TeXtext}"
+ "! %{rtext}%..."
+ "!\end{TeXtext}"
+end define
+
+!delete token "hlptext" /language=hlp
+define token "hlptext" -
+ /language=hlp
+ "!beginhlptext"
+ "%{rtext}%..."
+ "!endhlptext
+end define
+
+!delete token "verbatim" /language=hlp
+define token "verbatim" -
+ /language=hlp
+ "!begin{verbatim}"
+ "%{rtext}%..."
+ "!end{verbatim}"
+end define
+
+!delete token "<" /language=hlp
+define token "<" -
+ /language=hlp -
+ /description="LaTeX text | hlp text"
+ "!<%{text}%|%{text}%>"
+end define
+
+!delete placeholder "text" /language=hlp
+define placeholder "text" -
+ /language=hlp -
+ /type=terminal
+ "Text"
+end define
+
+!delete placeholder "rtext" /language=hlp
+define placeholder "rtext" -
+ /language=hlp -
+ /duplication=vertical -
+ /type=terminal
+ "Running text"
+end define
diff --git a/macros/latex209/contrib/pphlp/phutguide.sty b/macros/latex209/contrib/pphlp/phutguide.sty
new file mode 100644
index 0000000000..c5b617d249
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/phutguide.sty
@@ -0,0 +1,337 @@
+%%% ======================================================================
+%%% @LaTeX-style{
+%%% filename = "phutguide.sty",
+%%% version = "1.0",
+%%% date = "19 July 1992",
+%%% time = "13:53:20.42 ",
+%%% author = "Norman Gray",
+%%% address = "Department of Physics
+%%% Open University
+%%% Milton Keynes
+%%% MK7 6AA, UK",
+%%% e-mail = "N.O.Gray@open.ac.uk (Internet)",
+%%% telephone = "+44 908 652279",
+%%% FAX = "+44 908 653744",
+%%% archived = "Aston, SHSU",
+%%% keywords = "hlp-files, VMS, help",
+%%% abstract = "This file is part of the PPHLP package, which
+%%% allows both printed manuals and VMS help library
+%%% modules to be prepared from a single file.",
+%%% codetable = "ISO/Ascii",
+%%% checksum = "01208 337 784 12102",
+%%% docstring = "This style-file supports a user guide. The
+%%% principal differences from an ordinary article
+%%% style are in the \maketitle command and the
+%%% information that goes into it, and in the
+%%% provision of an advice-box which appears
+%%% automatically at the end of the text.
+%%%
+%%% There are a number of parochialisms, marked by
+%%% the line string `% parochial'. Ach, why not call
+%%% them `customisable sections'...?
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ======================================================================
+% phutguide.sty September 1990
+% modified from acsguide.sty, May 87, written by ACS, Open University
+\typeout{Physics Userguide. Released September 1990} % parochial
+\def\phutilitarians{Norman ({\tt no\char"5F gray})} % parochial
+\def\phutilitarianext{2279} % parochial
+% Next line added by Steve Daniels 6 May 88
+\newif\ifview\viewfalse
+\def\@ptsize{1}
+\@namedef{ds@10pt}{\def\@ptsize{0}}
+\@namedef{ds@11pt}{\def\@ptsize{1}}
+\@namedef{ds@12pt}{\def\@ptsize{2}}
+\def\ds@twoside{\@twosidetrue \@mparswitchtrue}
+\def\ds@draft{\overfullrule 5pt}
+\@options
+%\input acsguide1\@ptsize.sty\relax
+\input phutguide11.sty\relax
+
+
+\def\labelenumi{\arabic{enumi}.}
+\def\theenumi{\arabic{enumi}}
+\def\labelenumii{(\alph{enumii})}
+\def\theenumii{\alph{enumii}}
+\def\p@enumii{\theenumi}
+\def\labelenumiii{\roman{enumiii}.}
+\def\theenumiii{\roman{enumiii}}
+\def\p@enumiii{\theenumi(\theenumii)}
+\def\labelenumiv{\Alph{enumiv}.}
+\def\theenumiv{\Alph{enumiv}}
+\def\p@enumiv{\p@enumiii\theenumiii}
+
+\def\labelitemi{$\bullet$}
+\def\labelitemii{\bf --}
+\def\labelitemiii{$\ast$}
+\def\labelitemiv{$\cdot$}
+
+\def\verse{\let\\=\@centercr
+ \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
+ \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
+\let\endverse\endlist
+\def\quotation{\list{}{\listparindent 1.5em
+ \itemindent\listparindent
+ \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
+\let\endquotation=\endlist
+\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
+\let\endquote=\endlist
+
+\def\descriptionlabel#1{\hspace\labelsep \bf #1}
+\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
+ \let\makelabel\descriptionlabel}}
+\let\enddescription\endlist
+
+
+\def\theequation{\arabic{equation}}
+
+
+\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
+ \else \newpage \fi \thispagestyle{plain}\c@page\z@}
+\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
+
+\arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt
+\tabbingsep \labelsep
+
+\skip\@mpfootins = \skip\footins
+\fboxsep = 3pt \fboxrule = .4pt
+
+\newcounter{part}
+\newcounter {section}
+\newcounter {subsection}[section]
+\newcounter {subsubsection}[subsection]
+\newcounter {paragraph}[subsubsection]
+\newcounter {subparagraph}[paragraph]
+
+\def\thepart{\Roman{part}} \def\thesection {\arabic{section}}
+\def\thesubsection {\thesection.\arabic{subsection}}
+\def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
+\def\theparagraph {\thesubsubsection.\arabic{paragraph}}
+\def\thesubparagraph {\theparagraph.\arabic{subparagraph}}
+
+\def\@pnumwidth{1.55em}
+\def\@tocrmarg {2.55em}
+\def\@dotsep{4.5}
+\setcounter{tocdepth}{3}
+
+\def\tableofcontents{\section*{Contents\markboth{CONTENTS}{CONTENTS}}
+ \@starttoc{toc}}
+\def\l@part#1#2{\addpenalty{\@secpenalty}
+ \addvspace{2.25em plus 1pt} \begingroup
+ \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip
+-\@pnumwidth
+ {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
+ \nobreak \endgroup}
+\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
+\@tempdima 1.5em \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
+ \endgroup}
+\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
+\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
+\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
+\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
+\def\listoffigures{\section*{List of Figures\markboth
+ {LIST OF FIGURES}{LIST OF FIGURES}}\@starttoc{lof}}
+\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
+\def\listoftables{\section*{List of Tables\markboth
+ {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}}
+\let\l@table\l@figure
+
+
+\def\thebibliography#1{\section*{References\markboth
+ {REFERENCES}{REFERENCES}}\list
+ {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \usecounter{enumi}}
+ \def\newblock{\hskip .11em plus .33em minus -.07em}
+ \sloppy
+ \sfcode`\.=1000\relax}
+\let\endthebibliography=\endlist
+
+
+\newif\if@restonecol
+\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
+\columnseprule \z@
+\columnsep 35pt\twocolumn[\section*{Index}]
+ \markboth{INDEX}{INDEX}\thispagestyle{plain}\parindent\z@
+ \parskip\z@ plus .3pt\relax\let\item\@idxitem}
+\def\@idxitem{\par\hangindent 40pt}
+\def\subitem{\par\hangindent 40pt \hspace*{20pt}}
+\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}
+\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
+\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}
+
+\def\footnoterule{\kern-3\p@ \hrule width \columnwidth \kern 2.6\p@}
+
+\long\def\@makefntext#1{\parindent 1em\noindent
+ \hbox to 1.8em{\hss$^{\@thefnmark}$}#1}
+
+
+\setcounter{topnumber}{2}
+\def\topfraction{.7}
+\setcounter{bottomnumber}{1}
+\def\bottomfraction{.3}
+\setcounter{totalnumber}{3}
+\def\textfraction{.2}
+\def\floatpagefraction{.5}
+\setcounter{dbltopnumber}{2}
+\def\dbltopfraction{.7}
+\def\dblfloatpagefraction{.5}
+
+\long\def\@makecaption#1#2{
+ \vskip 10pt
+ \setbox\@tempboxa\hbox{{\bf #1:} #2}
+ \ifdim \wd\@tempboxa >\hsize \unhbox\@tempboxa\par \else \hbox
+to\hsize{\hfil\box\@tempboxa\hfil}
+ \fi}
+
+
+\newcounter{figure}
+\def\thefigure{\@arabic\c@figure}
+\def\fps@figure{tbp}
+\def\ftype@figure{1}
+\def\ext@figure{lof}
+\def\fnum@figure{Figure \thefigure}
+\def\figure{\@float{figure}}
+\let\endfigure\end@float
+\@namedef{figure*}{\@dblfloat{figure}}
+\@namedef{endfigure*}{\end@dblfloat}
+\newcounter{table}
+\def\thetable{\@arabic\c@table}
+\def\fps@table{tbp}
+\def\ftype@table{2}
+\def\ext@table{lot}
+\def\fnum@table{Table \thetable}
+\def\table{\@float{table}}
+\let\endtable\end@float
+\@namedef{table*}{\@dblfloat{table}}
+\@namedef{endtable*}{\end@dblfloat}
+
+\gdef\@date{\thismonth}
+\def\pagetitle#1{\gdef\@pagetitle{#1}}
+\def\userguide#1{\gdef\@userguide{#1}}
+\def\authorext#1{\gdef\@authorext{#1}}
+\def\hoverline#1{\relax\ifmmode
+ \overline{\bigstrut #1}\else
+ $\overline{\hbox{\bigstrut #1}}$\relax\fi}
+\newbox\bigstrutbox
+\setbox\bigstrutbox=\hbox{\vrule height10pt depth3.5pt width0pt}
+\def\bigstrut{\relax\ifmmode\copy\bigstrutbox\else\unhcopy\bigstrutbox\fi}
+
+\def\advbox{\if@twocolumn\else\vfill
+\begin{center}
+\fbox{\parbox{300pt}{\parskip=\smallskipamount\small\sl\@advboxinfo}}
+\end{center}
+\fi}
+\def\@advboxinfo{ % default text % parochial
+This documentation is also available on-line, by typing\par
+\$ help \toptopic\par
+\ifx\@author\@empty\else For further information on this package, see
+\@author\ifx\@authorext\undefined\else\ on extension \@authorext\fi. \fi
+To gain access to physics\_utilities, give the command\par
+\$ @ science\$dsk:[physics\_utilities.util]phut\_setup}
+\long\def\advboxinfo#1{\long\gdef\@advboxinfo{#1}}
+
+\def\maketitle{\par
+ \begingroup
+ \def\thefootnote{\fnsymbol{footnote}}
+ \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
+ \if@twocolumn \twocolumn[\@maketitle]
+ \else \newpage \global\@topnum\z@ \@maketitle \fi
+ \thispagestyle{empty}\@thanks
+ \endgroup
+ \setcounter{footnote}{0}
+ \ifx\@pagetitle\undefined\let\@pagetitle=\@title\fi
+ \let\maketitle\relax
+ \let\@maketitle\relax
+ \gdef\@thanks{}\gdef\@title{}\let\thanks\relax}
+\def\@maketitle{\newpage
+ \ifx\@userguide\undefined\let\@userguide=\@empty\fi
+ \hrule\vskip 20pt\par\noindent
+ {\Large\bf Physics User Guide \@userguide} % parochial
+ \vskip 25pt\par\noindent
+ {\LARGE\bf\@title}\vskip 25pt\par
+ \hrule \par
+ \vskip 20pt}
+
+\def\abstract{\if@twocolumn
+ \section*{Abstract}
+ \else
+ \quote \sl
+ \fi}
+\def\endabstract{\if@twocolumn\else
+ \endquote
+ \flushright
+ \ifx\@author\undefined\let\@author=\@empty
+ \else\sl \@author\\ \fi
+ \sl\@date
+ \endlist
+ \vskip 5pt\hrule\vskip 15pt
+ \fi}
+
+\mark{{}{}}
+
+\def\ps@plain{
+ \def\@oddhead{}
+ \def\@oddfoot{\hfil \bf\thepage \hfil}
+ \def\@evenhead{}
+ \def\@evenfoot{\hfil \bf\thepage \hfil}}
+\if@twoside
+ \def\ps@headings{
+ \ifx\@pagetitle\undefined\let\@pagetitle=\@title\fi
+ \ifx\@userguide\undefined\let\@userguide=\@empty\fi
+ \def\@oddhead{\protect\underline{\vbox{\hsize=\textwidth\noindent
+ \bf \@date \hfill \@pagetitle}}}
+ \def\@oddfoot{\protect\hoverline{\vbox{\hsize=\textwidth\noindent
+ \bf Physics User Guide \@userguide \hfill \thepage}}}
+ % parochial
+ \def\@evenhead{\protect\underline{\vbox{\hsize=\textwidth\noindent
+ \bf \@pagetitle \hfill \@date}}}
+ \def\@evenfoot{\protect\hoverline{\vbox{\hsize=\textwidth\noindent
+ \bf \thepage \hfill Physics User Guide \@userguide}}}
+ \def\sectionmark##1{}
+ \def\subsectionmark##1{}}
+\else
+ \def\ps@headings{
+ \ifx\@date\undefined\let\@date=\thismonth\fi
+ \ifx\@userguide\undefined\let\@userguide=\@empty\fi
+ \ifx\@pagetitle\undefined\let\@pagetitle=\@title\fi
+ \def\@oddhead{\protect\underline{\vbox{\noindent
+ \bf\@date \hfill \@pagetitle}}}
+ \def\@oddfoot{\protect\hoverline{\vbox{\noindent
+ \bf Physics User Guide \@userguide \hfill \thepage}}}
+ % parochial
+ \def\@evenhead{}
+ \def\@evenfoot{}
+ \def\sectionmark##1{}
+ \def\subsectionmark##1{}}
+\fi
+\def\ps@myheadings{
+ \def\@oddhead{\hbox{}\sl\rightmark \hfil \rm\thepage}
+ \def\@oddfoot{}
+ \def\@evenhead{\rm \thepage\hfil\sl\leftmark\hbox{}}
+ \def\@evenfoot{}
+ \def\sectionmark##1{}
+ \def\subsectionmark##1{}}
+
+
+\def\today{\space\number\day\ \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\
+\number\year}
+\def\thismonth{\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\
+\number\year}
+
+
+\ps@headings \pagenumbering{arabic} \onecolumn \if@twoside\else\raggedbottom\fi
diff --git a/macros/latex209/contrib/pphlp/phutguide11.sty b/macros/latex209/contrib/pphlp/phutguide11.sty
new file mode 100644
index 0000000000..f8b8816945
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/phutguide11.sty
@@ -0,0 +1,139 @@
+%%% ======================================================================
+%%% @LaTeX-style{
+%%% filename = "phutguide11.sty",
+%%% version = "1.0",
+%%% date = "19 July 1992",
+%%% time = "14:01:43.72 ",
+%%% author = "Norman Gray",
+%%% address = "Department of Physics
+%%% Open University
+%%% Milton Keynes
+%%% MK7 6AA, UK",
+%%% e-mail = "N.O.Gray@open.ac.uk (Internet)",
+%%% telephone = "+44 908 652279",
+%%% FAX = "+44 908 653744",
+%%% archived = "Aston, SHSU",
+%%% keywords = "hlp-files, VMS, help",
+%%% abstract = "This file is part of the PPHLP package, which
+%%% allows both printed manuals and VMS help library
+%%% modules to be prepared from a single file.",
+%%% codetable = "ISO/Ascii",
+%%% checksum = "02642 139 542 6038",
+%%% docstring = "This file is the companion to phutstyle.sty.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ======================================================================
+% acsmod11.sty 27 Jan 87
+\lineskip 1pt \normallineskip 1pt
+\def\baselinestretch{1}
+
+\def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
+\abovedisplayskip 11pt plus3pt minus6pt\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt
+minus3pt}
+\def\small{\@setsize\small{12pt}\xpt\@xpt
+\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt minus3pt
+\def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
+\itemsep \parsep}}
+\def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
+\abovedisplayskip 8pt plus 2pt minus 4pt\belowdisplayskip \abovedisplayskip
+\abovedisplayshortskip \z@ plus 1pt\belowdisplayshortskip 4pt plus 2pt minus
+2pt
+\def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
+\itemsep \parsep}}
+\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
+\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
+\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
+\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
+\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
+\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
+\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
+\normalsize
+
+
+\if@twoside \oddsidemargin 54pt \evensidemargin 54pt \marginparwidth 100pt
+ \else \oddsidemargin 54pt \evensidemargin 54pt \marginparwidth 83pt
+\fi
+\marginparsep 10pt
+\topmargin 0pt
+\headheight 15pt \headsep 22pt \footheight 15pt \footskip 30pt
+
+\textheight 600pt \textwidth 360pt \columnsep 10pt \columnseprule 0pt
+
+\footnotesep 12pt
+\skip\footins 6pt plus 2pt minus 2pt
+\floatsep 12pt plus 2pt minus 2pt \textfloatsep 20pt plus 2pt minus 4pt
+\intextsep 12pt plus 2pt minus 2pt \@maxsep 20pt \dblfloatsep 12pt plus 2pt
+minus 2pt \dbltextfloatsep 20pt plus 2pt minus 4pt \@dblmaxsep 20pt
+\@fptop 0pt plus 1fil \@fpsep 8pt plus 2fil \@fpbot 0pt plus 1fil
+\@dblfptop 0pt plus 1fil \@dblfpsep 8pt plus 2fil \@dblfpbot 0pt plus 1fil
+\marginparpush 5pt
+
+\parskip 0pt plus 1pt \parindent 17pt \topsep 9pt plus 3pt minus 5pt
+\partopsep 3pt plus 1pt minus 2pt \itemsep 4.5pt plus 2pt minus 1pt
+\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301
+\@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty
+-\@lowpenalty
+
+
+\def\part{\par \addvspace{4ex} \@afterindentfalse \secdef\@part\@spart}
+\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne \refstepcounter{part}
+\addcontentsline{toc}{part}{\thepart \hspace{1em}#1}\else
+\addcontentsline{toc}{part}{#1}\fi { \parindent 0pt \raggedright
+ \ifnum \c@secnumdepth >\m@ne \Large \bf Part \thepart \par\nobreak \fi \huge
+\bf #2\markboth{}{}\par } \nobreak \vskip 3ex \@afterheading }
+\def\@spart#1{{\parindent 0pt \raggedright
+ \huge \bf
+ #1\par} \nobreak \vskip 3ex \@afterheading }
+\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus
+ -.2ex}{2.3ex plus .2ex}{\Large\bf}}
+\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus
+ -.2ex}{1.5ex plus .2ex}{\large\bf}}
+\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
+ -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
+\def\paragraph{\@startsection
+ {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
+\def\subparagraph{\@startsection
+ {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus
+ .2ex}{-1em}{\normalsize\bf}}
+
+
+\setcounter{secnumdepth}{3}
+
+\def\appendix{\par
+ \setcounter{section}{0}
+ \setcounter{subsection}{0}
+ \def\thesection{\Alph{section}}}
+
+
+\leftmargini 2.5em
+\leftmarginii 2.2em \leftmarginiii 1.87em \leftmarginiv 1.7em \leftmarginv 1em
+\leftmarginvi 1em
+\leftmargin\leftmargini
+\labelwidth\leftmargini\advance\labelwidth-\labelsep
+\labelsep .5em
+\parsep 4.5pt plus 2pt minus 1pt
+\def\@listi{\leftmargin\leftmargini}
+\def\@listii{\leftmargin\leftmarginii
+ \labelwidth\leftmarginii\advance\labelwidth-\labelsep
+ \topsep 4.5pt plus 2pt minus 1pt
+ \parsep 2pt plus 1pt minus 1pt
+ \itemsep \parsep}
+\def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
+ \topsep 2pt plus 1pt minus 1pt
+ \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
+ \itemsep \topsep}
+\def\@listiv{\leftmargin\leftmarginiv
+ \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
+\def\@listv{\leftmargin\leftmarginv
+ \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
+\def\@listvi{\leftmargin\leftmarginvi
+ \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
diff --git a/macros/latex209/contrib/pphlp/pphlp.com b/macros/latex209/contrib/pphlp/pphlp.com
new file mode 100644
index 0000000000..3272283606
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/pphlp.com
@@ -0,0 +1,163 @@
+$ !!! ======================================================================
+$ !!! @VAX-VMS-shell{
+$ !!! filename = "pphlp.com",
+$ !!! version = "1.0",
+$ !!! date = "19 July 1992",
+$ !!! time = "14:05:50.47 ",
+$ !!! author = "Norman Gray",
+$ !!! address = "Department of Physics
+$ !!! Open University
+$ !!! Milton Keynes
+$ !!! MK7 6AA, UK",
+$ !!! e-mail = "N.O.Gray@open.ac.uk (Internet)",
+$ !!! telephone = "+44 908 652279",
+$ !!! FAX = "+44 908 653744",
+$ !!! archived = "Aston, SHSU",
+$ !!! keywords = "hlp-files, VMS, help",
+$ !!! abstract = "This file is part of the PPHLP package, which
+$ !!! allows both printed manuals and VMS help library
+$ !!! modules to be prepared from a single file.",
+$ !!! codetable = "ISO/Ascii",
+$ !!! checksum = "22288 163 899 6257",
+$ !!! docstring = "This is the DCL com-file which drives the PPhlp
+$ !!! package. It does so by parsing the command line
+$ !!! and the input file specifications, and preparing a
+$ !!! file pphlpdefs.tex, which is read in during the
+$ !!! next stage, when this file LaTeX's the principal
+$ !!! file, pphlp.tex. It finally renames the files
+$ !!! pphlp.dvi and pphlp.lis to match the name of the
+$ !!! original .hlp file.
+$ !!!
+$ !!! The checksum field above contains a CRC-16
+$ !!! checksum as the first value, followed by the
+$ !!! equivalent of the standard UNIX wc (word
+$ !!! count) utility output of lines, words, and
+$ !!! characters. This is produced by Robert
+$ !!! Solovay's checksum utility."
+$ !!! }
+$ !!! ======================================================================
+$!+ This procedure will prettyprint an |.hlp| file by \LaTeX ing the file
+$! |pphlp.tex|.
+$!
+$! The only parameter is the name of the file to be set---the routine first
+$! searches for a file with extension |.help|, then for |.hlp|.
+$!
+$! Information is passed to |pphlp.tex| via the file |pphlpdefs.tex|, which
+$! supplies the documentstyle, and has the following definitions:
+$!
+$! \medskip
+$! \begin{tabular}{lp{4in}}
+$! |\pphlpstyleoptions & The style options to be used.\\
+$! |\pphlpname| & The full file name, including version number.\\
+$! |\pphlphead| & The bare file name, without directory and extension. \\
+$! |\pphlpextra| & Any extra information which might be of use. This isn't
+$! currently used. \\
+$! |\pphlppreamble|& Commands to go in the preamble.
+$! \end{tabular}
+$!
+$! When this com file is invoked, extra documentstyle options may be provided
+$! by prefixing them on the command line with a hyphen, so that
+$! \begin{center}\tt
+$! pphlp -acsfigs,twocolumn helpfile
+$! \end{center}
+$! would set the file |helpfile.hlp| with the |[twoside,acsfigs,twocolumn]|
+$! options.
+$!
+$! Also, commands may be inserted into the preamble, by prefixing them with a
+$! plus sign, so that
+$! \begin{center}\tt
+$! pphlp +\makeindex helpfile
+$! \end{center}
+$! would insert the |\makeindex| command into the preamble.
+$!
+$! Finally, extra qualifiers may be added to the LaTeX command.
+$! \medskip
+$!\-
+$
+$ source_dir := phut:[util.local.pphlp]
+$
+$ param = 0
+$! docopts = "twoside"
+$ docopts = ""
+$ preamble = ""
+$ quals = ""
+$ fname_p = ""
+$ parse_loop:
+$ param = param + 1
+$ if p'param .eqs. "" then goto finished_parse
+$ ch1 = f$extract (0,1,p'param)
+$ if ch1 .eqs. "-"
+$ then
+$ if docopts .eqs. ""
+$ then
+$ docopts = f$edit (f$extract (1,99,p'param), "lowercase")
+$ else
+$ docopts = docopts + "," + -
+ f$edit (f$extract (1,99,p'param), "lowercase")
+$ endif
+$ else
+$ if ch1 .eqs. "+"
+$ then
+$ preamble = preamble + -
+ f$edit (f$extract (1,99,p'param), "lowercase") + " "
+$ else
+$ if ch1 .eqs. "/"
+$ then
+$ quals = quals + p'param
+$ else
+$ fname_p = p'param
+$ endif
+$ endif
+$ endif
+$ goto parse_loop
+$
+$ finished_parse:
+$
+$ if fname_p .eqs. "" then inquire fname_p "Which file? "
+$
+$ fname = f$search (f$parse (fname_p,".help")) ! check it exists, and fill in version number
+$ if fname .eqs. ""
+$ then
+$ fname = f$search (f$parse (fname_p,".hlp"))
+$ if fname .eqs. ""
+$ then
+$ write sys$output f$fao ("File !AS not found.", -
+ f$parse (fname_p,".hlp",,,"syntax_only")) ! doesn't check dir'y exists
+$ exit
+$ endif
+$ endif
+$
+$ outfilename = f$parse (fname,,,"name") ! just filename
+$
+$
+$ open/write argfile pphlpdefs.tex
+$ write argfile "{\catcode`\$=11 \catcode`\_=11" ! so we can read in ...
+$ if docopts .nes. "" then -
+ write argfile f$fao ("\gdef\pphlpstyleoptions{!AS}", docopts)
+$ write argfile f$fao ("\gdef\pphlpname{!AS}", -
+ f$edit (fname, "lowercase")) ! full file name
+$ write argfile f$fao ("\gdef\pphlphead{!AS}", -
+ f$edit (outfilename, "lowercase")) ! file name
+$ write argfile f$fao ("\gdef\pphlpextra{last revised !AS}", -
+ f$file(fname,"cdt")) ! file creation date
+$ if preamble .nes. "" then -
+ write argfile f$fao ("\gdef\pphlppreamble{!AS}", preamble)
+$ write argfile "}"
+$ close argfile
+$
+$ define/user sys$input sys$command
+$ on error then continue
+$ latex 'source_dir'pphlp 'quals' ! which reads in |prettydefs.tex|
+$ rename/nolog pphlp.dvi,.lis 'outfilename
+$ delete/noconfirm/nolog pphlpdefs.tex;*
+$! +Only the |.dvi| and |.lis| files are renamed---the |.aux| is left as it
+$! is. If there are cross-references within the prettyprinted file, then the
+$! |.aux| file containing them must be called |pphlp.aux| if \LaTeX\ is to
+$! find it. \-
+$
+$ write sys$output ""
+$ write sys$output "Output written on ",f$parse(outfilename,".DVI")
+$ write sys$output "Transcript written on ",f$parse(outfilename,".LIS")
+$ write sys$output ""
+$
+$ EXIT
diff --git a/macros/latex209/contrib/pphlp/pphlp.help b/macros/latex209/contrib/pphlp/pphlp.help
new file mode 100644
index 0000000000..065d891d69
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/pphlp.help
@@ -0,0 +1,265 @@
+!iffalse
+!!! ======================================================================
+!!! @Digital-HELP-Text{
+!!! filename = "pphlp.help",
+!!! version = "1.0",
+!!! date = "19 July 1992",
+!!! time = "14:08:28.91 ",
+!!! author = "Norman Gray",
+!!! address = "Department of Physics
+!!! Open University
+!!! Milton Keynes
+!!! MK7 6AA, UK",
+!!! e-mail = "N.O.Gray@open.ac.uk (Internet)",
+!!! telephone = "+44 908 652279",
+!!! FAX = "+44 908 653744",
+!!! archived = "Aston, SHSU",
+!!! keywords = "hlp-files, VMS, help",
+!!! abstract = "This file is part of the PPHLP package, which
+!!! allows both printed manuals and VMS help library
+!!! modules to be prepared from a single file.",
+!!! codetable = "ISO/Ascii",
+!!! checksum = "04228 265 1410 10242",
+!!! docstring = "This is the main documentation for the PPhlp
+!!! package. It may be turned into a file suitable
+!!! for the help librarian by processing through
+!!! helpproc.pas, or into a printable .dvi file by
+!!! processing through pphlp.com.
+!!!
+!!! The checksum field above contains a CRC-16
+!!! checksum as the first value, followed by the
+!!! equivalent of the standard UNIX wc (word
+!!! count) utility output of lines, words, and
+!!! characters. This is produced by Robert
+!!! Solovay's checksum utility."
+!!! }
+!!! ======================================================================
+!fi
+!title{PPHLP: A documentation tool}
+!pagetitle{Pphlp}
+!author{Norman Gray}
+!authorext{2279}
+!userguide{Util5}
+!maketitle
+!begin{TeXtext}
+! \begin{abstract}
+! PPhlp is a tool for producing both
+! printed documentation using \LaTeX, and a help library usable
+! through the VMS `help' command, from a single file.
+! \end{abstract}
+!\end{TeXtext}
+!helpsection
+1 PPhlp
+This utility takes an appropriately formatted `.hlp' file and
+!<\LaTeX|LaTeX>'s it, to produce formatted documentation. It takes
+advantage of the fact that the librarian, which turns `.hlp'
+files into help libraries, ignores any line which has an
+exclamation mark in the first column. When you are writing
+documentation for this utility, you can regard the exclamation
+mark as an escape character, just like the backslash character.
+
+When you are writing documentation, you should remember that you
+are working under two sets of constraints: everything that
+appears in a line which does not start with an exclamation will
+appear as-is in the help library; at the same time, everything
+should be valid !<\LaTeX{}|LaTeX>. Most of the features in this
+utility are designed to reconcile these conflicting demands.
+!helpsection
+2 HLP_file_format
+This is documented fully in the librarian manual, but the
+essential format is:
+!begin{enumerate}!let*\item
+* Any line with an exclamation mark in column 1 is ignored;
+* Any line with a digit in column 1 is taken to be a help library
+ level, and is followed by a key.
+* The key should be composed of letters, digits, the dollar sign,
+ underscore and hyphen.
+* Because the material between the keys is indented on-screen,
+ you should limit the lines in the help file to about 60--70
+ characters.
+!end{enumerate}
+!helpsection
+2 PPhlp_control_sequences
+The following control sequences are usable in pphlp file.
+!begin{description} !activate+ !def+ {!par!begingroup!makeother!!!vitem}
+!def!vitem#1 {!endgroup!item[!tt #1]}
++ !helpsection
+ Put this command before each line which consists of a help level number
+ and heading, or before a qualifier line.
++ !verbatimline
+ Put this command before a line which is to be set verbatim. It takes an
+ optional argument, which is the number of verbatim lines to be set.
++ !settab
+ When making tables, it is sometimes useful to define a different
+ character, say `-', to be the alignment tab character.
+ For example
+!verbatimline[5]
+ !begin{center}!settab: !begin{tabular}{ll}
+ first column : second column
+ !\
+ ...
+ !end{tabular}!end{center}
++ !activate
+ Make a character active, for example in the line
+!verbatimline[3]
+ !begin{itemize}!activate* !let*!item
+ * Here is the first item in the list
+ ...
+ which would help make an itemised list of starred items.
++ !makeother
+ Give a character the catcode `other'. Takes an optional argument with
+ an alternative catcode.
++ !beginhlptext...!endhlptext
+ The text between these control sequences is not included
+ in the !<!LaTeX|LaTeX> version of the documentation.
+!beginhlptext
++ ! <LaTeX-text|hlp-text>
+!endhlptext
+!item[!tt!!<!LaTeX-text|hlp-text>]
+ Put only the first alternate text in the !<!LaTeX|LaTeX> file. If you use
+ this, you'll have to also use Krish's preprocessor
+ (`pproc') to strip the first alternate from the `.hlp' file
+ before it can be put into a help library. Do not split
+ this construction over two or more lines.
+!end{description}
+
+A new environment has been defined, and the verbatim environment
+slightly changed.
+!begin{description}!activate+ !def+ #1:{!item[!tt!{#1!}]}
++ TeXtext:
+ Blocks of text which are to be omitted from the library
+ should have exclamation marks at the beginning of each
+ line. Longer sections should additionally be surrounded by the
+ TeXtext environment, in which exclamation marks are
+ ignored, to avoid spacing problems. Note that the
+ environment should be ended by `\end{TeXtext}', rather
+ than `!end{TeXtext}'. The control sequence `\!' will
+ produce an exclamation mark in this environment.
++ verbatim:
+ The verbatim environment has been changed, so that it
+ must be ended by the string `!end{verbatim}', rather than
+ `\end{verbatim}'.
+!end{description}
+
+The following characters are also made active:
+!begin{description}!activate+ !def+ #1{!item[!tt #1]}
+!makeother!` !makeother!*
++ `
+ In-line strings which are to be set verbatim should be
+ placed between `...' (and you should avoid using left
+ quotes in other contexts).
++ *
+ Words or phrases to be emphasised should go between
+ *...*.
+!end{description}
+
+Other changes from standard !<!LaTeX|LaTeX> are:
+!begin{description}!activate+ !def+ #1:{!item[#1]}
++ `$' and `@' characters:
+ These have been given catcode *other*, that is, they can
+ be used in text as normal characters. This means that
+ maths mode must be begun and ended with `!(...!)'
++ The underscore:
+ This has been made active, and will produce an ordinary
+ underscore in text, and a subscript in maths mode.
+!end{description}
+
+Finally, remember that !<!TeX|TeX>'s `!endinput' command may be
+used in a help file to indicate that no more of the file should
+be read. All the text after this point will be seen only by the
+help librarian.
+!helpsection
+2 Preprocessor
+In most cases, enough formatting material may be included within
+an `.hlp' file that it can be used either for input to `pphlp' or
+given to the help librarian. Sometimes, however, the formatting
+within the file is involved enough that some preprocessing is
+required. Specifically, this will be necessary if you use the
+`!<...|...>' construction.
+
+A program exists to do this preprocessing, called `pproc', which
+is set up by the command
+
+!verbatimline
+ $ set command biocom:helpproc
+
+The format of the command is
+
+!verbatimline
+ $ pproc <input-file> <output-file>
+
+It is a useful convention to reserve the `.hlp' suffix for file
+which are directly suitable for the help librarian, and to give
+the `.help' suffix to files which must be run through the
+preprocessor.
+
+The processor recognises the following constructs.
+!begin{description}!activate+ !def+{!begingroup!makeother!! !vitem}
+!def!vitem #1 :{!endgroup!item[!tt #1]}
+!makeother!`
++ !<...|...> :
+ The preprocessor leaves only the second alternative in
+ the file.
++ `...' :
+ Text within quotes is surrounded by escape sequences
+ which will embolden it within the help file.
+!end{description}
+!helpsection
+2 Calling_pphlp
+The `pphlp' processor is set up by defining the symbol
+
+!verbatimline
+ $ pphlp :== @ phut:[util.local.pphlp]pphlp
+
+and has the format
+
+!verbatimline[2]
+ $ pphlp [-stylefile ...] [+\preamblecommands ...] -
+ [/extraqualifiers] hlp-file
+
+where you may give a list of additional style files prefixed by
+hyphens, and a list of !<!LaTeX|LaTeX> commands (with backslash
+as the escape character) prefixed with a plus sign, which are to
+be inserted in the preamble. If the extension is missing from
+the `hlp-file', then the procedure first searches for a file
+with the extension `.help', then for one with the extension
+`.hlp'.
+
+For example, given the file `doc.help' and style files
+`acs_specials.sty' and `doc-sty.sty', the following command will
+format the help file in batch mode (note that the qualifier must
+be separated from the filename).
+
+!verbatimline
+ $ pphlp -acs_specials -doc-sty +\makeindex doc /batch
+!helpsection
+2 Other_LaTeX_facilities
+Other !<!LaTeX|LaTex> facilities such as cross referencing,
+compiling tables of contents, and floating figures and tables are
+perfectly usable within this system.
+
+The indexing program *MakeIndex* can be used with `pphlp', with a
+minor alteration. That program uses the exclamation mark as a
+sub-entry delimiter, but this causes problems with `pphlp' as
+that character is the escape. Accordingly, if you want to use
+*MakeIndex*, then you should use it with a style file which
+alters its behaviour so that the `>' character (say) is the
+sub-entry delimiter. That is, you should create a file
+(`pphlp.isty', say) with the contents
+
+!verbatimline[2]
+ level '>'
+ keyword "!indexentry"
+
+invoke `pphlp' with the command
+
+!verbatimline
+ $ pphlp +\makeindex doc-file
+
+and invoke *MakeIndex* with the command
+
+!verbatimline
+ $ makeindex -s pphlp.isty pphlp.idx
+
+(note that the index file is called `pphlp.idx', rather than
+`doc-file.idx').
diff --git a/macros/latex209/contrib/pphlp/pphlp.readme b/macros/latex209/contrib/pphlp/pphlp.readme
new file mode 100644
index 0000000000..6a9efebc97
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/pphlp.readme
@@ -0,0 +1,139 @@
+PPhlp
+-----
+This is a system for producing both VMS help libraries and printed documentation
+from a single file, which has LaTeX commands embedded within it. Although it is
+therefore fairly specific to VMS, the format of help library modules is simple,
+and the system could probably be translated fairly easily to take advantage of
+another format with a similar heirarchical structure.
+
+The system is not dissimilar to the GNU texinfo format.
+
+
+Brief Description
+-----------------
+Help library modules contain plain text, which is given a structure by lines
+which consist of a level number in column 1, followed by a heading. After
+they've been inserted into a help library, and help is requested on a particular
+topic, the help system will display all the level 1 text for that topic,
+followed by all the level 2 headings. After you select a level 2 heading, you
+will see all the level 2 text, and the level 3 headings, and so on. This is
+analogous to the successive levels of section, subsection, paragraph,... of a
+paper document.
+
+The help system will not display any lines which have an exclamation mark `!' in
+column 1, and we can take advantage of this to embed LaTeX commands in the text.
+
+For example, here is the start of the help file for PPhlp (all the lines should
+be taken to start in column 1):
+
+ !title{PPHLP: A documentation tool}
+ !pagetitle{Pphlp}
+ !author{Norman Gray}
+ !authorext{2279}
+ !userguide{Util5}
+ !maketitle
+ !begin{TeXtext}
+ ! \begin{abstract}
+ ! PPhlp is a tool for producing both
+ ! printed documentation using \LaTeX, and a help library usable
+ ! through the VMS `help' command, from a single file.
+ ! \end{abstract}
+ !\end{TeXtext}
+ !helpsection
+ 1 PPhlp
+ This utility takes an appropriately formatted `.hlp' file and
+ ...
+ !helpsection
+ 2 HLP_file_format
+ This is documented fully in the librarian manual, but
+ ...
+
+You can see most of the extensions to and changes from LaTeX in this section.
+The escape character in PPhlp files is `!', rather than `\'. `!maketitle' uses
+the fields filled in before it to produce a title page. `!helpsection', which
+is followed on the next line by a number and a text string, produces a section,
+subsection, paragraph (and so on) heading, depending on the value of the number:
+the title is composed of the rest of the line, with any underscores changed to
+spaces. Any text between quotes is set verbatim.
+
+As it stands, this file would be perfectly acceptable to the help librarian, and
+could be inserted into a help library with the command
+
+ $ libr/help <library-name> <module-name>
+
+In certain circumstances, the PPhlp file needs some preprocessing, and the
+package includes a program designed to do this.
+
+For more information, read the help file.
+
+
+Files
+-----
+The package consists of the following files:
+
+ PPHLP.README This file.
+ PPHLP.TEX The file which is actually LaTeXed, by ...
+ PPHLP.COM DCL com-file, which acts as a `front-end' to the
+ package.
+ PPHLP.HELP A help file. It can either be turned into an
+ .hlp file by processing it with helpproc
+ (below), or into a .dvi file by invoking the
+ com-file.
+ HELPPROC.PAS A preprocessor, which strips out some
+ constructions.
+ PPROC.CLD A .cld file for the preprocessor.
+ HLP.LSE An LSE file which defines the language `hlp',
+ and adds adjustments designed for the `folding
+ editor' capacities of LSE, by allowing elision
+ of the help text as you write it.
+ PHUTGUIDE.STY The documentstyle in which the help documents
+ PHUTGUIDE11.STY are set.
+
+[HELPPROC.PAS was written by Krish Singh, and PHUTGUIDE.STY is a modification of
+a manuals style written by the Open University's computer service]
+
+
+Setting it up
+-------------
+To use the system, edit the line
+
+ $ source_dir := phut:[util.local.pphlp]
+
+in pphlp.com, so that it refers to wherever you've put the files. Then define a
+command
+
+ $ pphlp :== @ <wherever-the-source-files-are>pphlp
+
+and put the two style files wherever it is that TeX expects to find them. To
+make the preprocessor, compile and link helpproc.pas, edit the `image' line in
+pproc.cld to point to the newly linked image, and add the command `pproc' to
+your command tables with
+
+ $ set command pproc
+
+To use hlp.lse, enter LSE, read this file into a buffer, and give the command
+`do'. You can make the resulting definitions permanent by giving the command
+`save environment' within LSE.
+
+Format the help file by giving the command
+
+ $ pphlp pphlp.help ! .help is the default file type
+
+This will produce a .dvi file which can be printed normally. Alternatively, you
+can give the command
+
+ $ pproc pphlp.help ! .help is the default, again
+
+which will produce an .hlp file which can be inserted into a help library.
+
+I hope it's useful - have fun.
+
+Norman
+
+===============================================================================
+Norman Gray N.O.Gray@open.ac.uk (Internet)
+Department of Physics
+Open University
+Milton Keynes, MK7 6AA +44 908 652279
+UK +44 908 653744 (fax)
+===============================================================================
diff --git a/macros/latex209/contrib/pphlp/pphlp.tex b/macros/latex209/contrib/pphlp/pphlp.tex
new file mode 100644
index 0000000000..3f99cb1c01
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/pphlp.tex
@@ -0,0 +1,315 @@
+%%% ======================================================================
+%%% @TeX-file{
+%%% filename = "pphlp.tex",
+%%% version = "1.0",
+%%% date = "19 July 1992",
+%%% time = "14:12:45.12 ",
+%%% author = "Norman Gray",
+%%% address = "Department of Physics
+%%% Open University
+%%% Milton Keynes
+%%% MK7 6AA, UK",
+%%% e-mail = "N.O.Gray@open.ac.uk (Internet)",
+%%% telephone = "+44 908 652279",
+%%% FAX = "+44 908 653744",
+%%% archived = "Aston, SHSU",
+%%% keywords = "hlp-files, VMS, help",
+%%% abstract = "This file is part of the PPHLP package, which
+%%% allows both printed manuals and VMS help library
+%%% modules to be prepared from a single file.",
+%%% codetable = "ISO/Ascii",
+%%% checksum = "29376 315 1629 13208",
+%%% docstring = "This is the core of the PPhlp package, and is
+%%% driven by the com-file pphlp.com, which LaTeX's
+%%% this file after customising it through the
+%%% definitions in pphlpdefs.tex, which this file
+%%% \input's.
+%%%
+%%% The checksum field above contains a CRC-16
+%%% checksum as the first value, followed by the
+%%% equivalent of the standard UNIX wc (word
+%%% count) utility output of lines, words, and
+%%% characters. This is produced by Robert
+%%% Solovay's checksum utility."
+%%% }
+%%% ======================================================================
+% + This \LaTeX\ file will set VMS |.hlp| files. \LaTeX\ commands are
+% `hidden' in the file by turning the VMS comment character `!' into an
+% escape character. Since it's an escape, you can't use `!' as an
+% exclamation point---if you want that character in your help text, use `!!'
+% instead.
+%
+% For convenience, the characters |$| and |@| have been made letters. The
+% character |_| has been made active, producing a |\tt| underscore in text,
+% or a subscript in maths mode (which must be surrounded by |\(..\)| since
+% the dollar has been taken away), and advantage is taken of this catcode to
+% |\let| it equal to |\space| when it appears in helpsection headings.
+%
+% The following control sequences and active characters are defined:
+% \begin{description}
+% \item[\verb-\helpsection-]
+% Put this command before each line which consists of a help level number
+% and heading, or before a qualifier line.
+% \item[\verb-\verbatimline-]
+% Put this command before a line which is to be set verbatim. It takes an
+% optional argument, which is the number of verbatim lines to be set.
+% \item[\verb-\settab-]
+% When making tables, it is sometimes useful to define a different
+% character, say `-', to be the alignment tab character.
+% \item[\verb-\activate-]
+% Make a character active, for example in the line
+% |!begin{itemize}\activate* \let*\item|, which would help make an
+% itemised list of starred items.
+% \item[\verb-\makeother-]
+% Give a character the catcode `other'. Takes an optional argument with
+% an alternative catcode.
+% \item[\lq]
+% In-line strings which are to be set verbatim should be placed between
+% `\dots' (and you should avoid using left quotes in other contexts).
+% \item[*]
+% Words or phrases to be emphasised should go between |*...*|.
+% \item[{\tt !<{\it \LaTeX{} text}|{\it hlp text}>}]
+% Put only the first alternate text in the \LaTeX{} file. If you use
+% this, you'll have to also use Krish's preprocessor ({\tt
+% run tools:helpproc}) to strip the first alternate from the .hlp file
+% before it can be put into a help library.
+% \item[\verb-\beginhlptext...\endhlptext-]
+% The text between these control sequences is not included in the \LaTeX
+% version of the documentation.
+% \item[\verb-{TeXtext}- environment]
+% Blocks of text which are to be omitted from the library should have
+% !~marks at the beginning of each line. They should additionally be
+% surrounded by the \verb-{TeXtext}- environment, in which !~marks are
+% ignored, to avoid spacing problems. Note that the environment should
+% be ended by |\end{TeXtext}|, rather than |!end{TeXtext}|. The control
+% sequence |\!| will produce an exclamation mark in this environment.
+% \end{description}
+% \-
+% * \def\commratio{0.5}
+
+
+\input pphlpdefs
+\ifx\pphlpstyleoptions\undefined
+ \documentstyle{phutguide}
+\else
+ % any extra styles should be added AFTER \pphlpstyleoptions
+ \expandafter\expandafter\expandafter
+ \documentstyle\expandafter[\pphlpstyleoptions]{phutguide}
+\fi
+
+% \percentnextline
+\def\dospecials{\do\\\do\{\do\}\do\&\do\#\do\^\do\%\do\~\do\!\do\*}
+
+\catcode`!=0 % ! in col. 1 is the .hlp comment character
+\chardef!!="21 % `!!' gives exclamation mark
+\catcode`\@=11
+\catcode`\$=11
+
+\def\Uncatcode{\@noligs \let\do\@makeother \dospecials}
+
+\def\activate#1{\catcode`#1=\active} % make argument character active
+\def\makeother{\@ifnextchar[{\@@makeother}{\@makeother}}
+\def\@@makeother[#1]#2{\catcode`#2=#1}
+\def\c@c#1{\message % debugging - print catcode
+ {catcode \string #1 is \ifcase\catcode`#1 escape\or begingroup\or
+ endgroup\or math\or align\or endline\or parameter\or superscript\or
+ subscript\or ignored\or space\or letter\or other\or active\or
+ comment\or invalid\fi}}
+
+% make underscore a subscript only in math mode
+\def\underscore{\ifmmode _ \else {\tt\char "5F}\fi}
+\activate\_ \let_\underscore
+
+\def\paragraph{\@startsection % Not all styles have these defined, so\dots
+ {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{1ex plus .2ex }{\normalsize\bf}}
+\def\subparagraph{\@startsection
+ {subparagraph}{5}{\parindent}{3.25ex plus 1ex minus
+ .2ex}{1ex}{\(\Diamond\)\sl}}
+
+
+% + The macro |\helpsection| begins a group, and calls |\gethelpsectionparams|
+% to get the parameters from the next line. The latter sets the counter
+% |\helpsectiondepth| to be the first parameter, or increments and negates it,
+% if the first parameter is the character /, denoting a qualifier line. Then we
+% call |\dohelpsection|, which uses a |\ifcase| statement to set the section
+% heading.
+%
+% In the default case, level~1 headings are ignored, levels 2, 3 and~4 are set
+% as |\section|, |\subsection| and |\subsubsection|, and level 5 is simply
+% bulleted. This is because there will be only a single level~1 heading in most
+% files. If this is not the case, then the command |\multilevelone| should be
+% given, which sets level~1 headings as |\section|s.
+% \-
+
+\let\helpleveli\@gobble
+\let\helplevelii\section
+\let\helpleveliii\subsection
+\let\helpleveliv\subsubsection
+\let\helplevelv\subparagraph
+\def\multilevelone{% Don't ignore level one headings
+ \let\helpleveli\section
+ \let\helplevelii\subsection
+ \let\helpleveliii\subsubsection
+ \let\helpleveliv\paragraph
+ \let\helplevelv\subparagraph}
+
+\newcount\helpsectiondepth
+% We mustn't do the following within a group, or else things like
+% |@currentlabel| don't make it out.
+\def\helpsection{%
+ \let_\space % so |_|'s in section headings turn to space
+ \activate\^^M % so we can read the arguments --- undo these at the end
+ \gethelpsectionparams}
+
+{\catcode`\^^M=\active%
+\gdef\gethelpsectionparams^^M#1#2^^M{%
+ \if/#1 %
+ \ifnum\helpsectiondepth > 0 %
+ \global\helpsectiondepth=-\helpsectiondepth %
+ \global\advance\helpsectiondepth by -1 %
+ \fi %
+ \else %
+ \global\helpsectiondepth=#1 %
+ \fi %
+ \dohelpsection{#2}}%
+%
+\gdef\dohelpsection#1{%
+ \ifnum\helpsectiondepth < 0 %
+ \@tempcnta=-\helpsectiondepth \def\arg{\tt /#1}%
+ \else %
+ \@tempcnta\helpsectiondepth \def\arg{#1}%
+ \fi %
+ \ifcase\@tempcnta \or %
+ \helpleveli {\arg} %
+ \xdef\toptopic{\arg} % Top-level help topic for use in |\advbox|
+ \or %
+ \helplevelii {\arg} \or %
+ \helpleveliii{\arg} \or %
+ \helpleveliv {\arg} \or %
+ \helplevelv {\arg} %
+ \else %
+ \errhelp{See Norman if you need more}%
+ \errmessage{There is currently a maximum of five levels of help}%
+ \fi %
+ \let_\underscore
+ \catcode`\^^M=5 % ... again
+ % Undo the redefinition of |_| here, rather than at the end of
+ % |\gethelpsectionparams| so that the active underscore means
+ % |\space| in the argument to the |\helplevel| commands
+ }}
+
+% + We want to be able to select alternate texts depending on whether
+% we're producing a \LaTeX\ file or a help library.
+%
+% For occasional words, use the construction \verb-!<LaTeX text|hlp text>-,
+% in which case the text should be run through Krish's preprocessor before
+% being put into the help library. For this latter reason, it should always be
+% |!<| rather than |\<|, although they are equivalent to \LaTeX.
+%
+% To miss out larger chunks of help library text is easy---we just
+% surround the text with |\iffalse...\fi|, suitably disguised. It's
+% unfortunate that this doesn't look exactly like a \LaTeX\
+% environment, but life's like that\dots.
+%
+% Putting text in the \LaTeX\ document, whilst keeping it from the
+% library seems easy---you just prefix the lines with exclamation
+% marks---but there's a subtlety in that we must then have at least
+% one blank space after the `!', which is then interpreted as a
+% control space, and lines blank apart from the `!' are not
+% interpreted as new paragraphs. Solve both these latter problems by
+% making `! ignored within the |{TeXtext}| environment. Note that
+% this means that the environment {\em must\/} be ended with
+% |\end{TeXtext}|, rather than |!end|.
+% \-
+
+\let\beginhlptext\iffalse
+\let\endhlptext\fi
+
+\def\TeXtext{\catcode`\!=9}
+\let\endTeXtext\relax
+
+\def\<#1|#2>{#1}
+
+% + A couple of macros for verbatim text. In-line strings should go between
+% |`...'|, and complete lines of verbatim material should be preceded by a
+% |\verbatimline| command. The |!begin{verbatim}| environment may be used, but
+% it must be ended by the string |!end{verbatim}|. This means that the `
+% character should be made active---do this inside a group so we can make other
+% catcode changes later in this file.
+%
+% Finally, make `!' an escape character, rather than ignored, in the \TeX text
+% environment, so that `!!' will give an exclamation mark there.
+% \-
+\activate' \let'\rq
+{\obeyspaces\global\let =\ } % make active space equal to |\ |
+%\def\hyspace{\discretionary{\char32\relax}{\char32\relax}{\char32\relax}} % make spaces hyphen-like
+%{\activate` \gdef`{\begingroup \catcode"20=12 \Uncatcode \let'\endgroup \tt}}
+{\activate`
+\obeyspaces\activate\.\activate\_%
+% allow spaces, dots and underscores to break verbatim text
+\gdef`{\begingroup\Uncatcode\let'\endgroup%
+\activate\_\def_{\discretionary{\char"5F\relax}{}{\char"5F\relax}}%
+\activate\.\def.{\discretionary{\char"2E\relax}{}{\char"2E\relax}}%
+\obeyspaces\def {\discretionary{\char32\relax}{\char32\relax}{\char32\relax}}%
+\tt}}
+
+\newcount\@verbatimlinecount
+{\activate\^^M
+\gdef\verbatimline{\ifvmode \noindent \else \par \fi % If previous line is
+ % blank, |\noindent| means we enter horizontal mode with
+ % previous parskip. Otherwise, |\par| forces us into
+ % vertical mode, and we enter horizontal mode later, with
+ % parskip zero.
+ \begingroup \parskip=0pt \activate\^^M%
+ \@ifnextchar[{\@verbatimline}{\@verbatimline[1]}}%
+\gdef\@verbatimline[#1]^^M{\@verbatimlinecount=#1 \obeyspaces\Uncatcode %
+ \def\@tempa{TeXtext}\ifx\@tempa\@currenvir\catcode"21=0\fi % re-escape ! in \TeX{}text
+ \tt\do@verbatimline}%
+\gdef\do@verbatimline#1^^M{#1\par\noindent % following text on new line
+ % (new paragraph with parskip zero)
+ \advance\@verbatimlinecount by -1 %
+ \ifnum\@verbatimlinecount=0 %
+ \def\next{\endgroup}%
+ \else %
+ \def\next{\do@verbatimline}%
+ \fi\next}}
+
+\begingroup \catcode `|=0 \catcode `[= 1 % This is nicked from
+ % |latex.tex|---make |\begin{verbatim}| end with
+ % |!end{verbatim}|
+\catcode`]=2 \catcode `\{=12 \catcode `\}=12
+\catcode`\!=12 |gdef|@xverbatim#1!end{verbatim}[#1|end[verbatim]]
+|gdef|@sxverbatim#1!end{verbatim*}[#1|end[verbatim*]]
+|endgroup
+
+% likewise---make verbatim environment within \TeX text have ! as escape
+\def\verbatim{\@verbatim \frenchspacing\@vobeyspaces
+ \ifx\@tempa\@currenvir \catcode"21=0\fi \@xverbatim}
+\@namedef{verbatim*}{\@verbatim \ifx\@tempa\@currenvir \catcode"21=0\fi
+ \@sxverbatim}
+
+% bits and bobs
+
+\def\settab#1{\catcode`#1=4} % set the tab character for setting tables
+
+\chardef\star`* % |*...*| emphasises things
+\activate* \def\emphasise#1*{{\em #1\/}}
+\def*{\ifmmode\star\else\emphasise\fi}
+
+\escapechar=`\! % so we're free to recatcode backslash
+
+\activate` % make it active again
+
+\parskip=\medskipamount
+\parindent=0pt
+
+\let\helpproc\@gobble % instruction to Krish's preprocessor
+
+\@ifundefined{pphlppreamble}{}{\pphlppreamble}
+
+% %%%%%%%%%%%%%%% Now read in the file %%%%%%%%%%%%%%%%%%%
+!begin{document}
+
+!input{!pphlpname}
+!advbox
+!end{document}
diff --git a/macros/latex209/contrib/pphlp/pproc.cld b/macros/latex209/contrib/pphlp/pproc.cld
new file mode 100644
index 0000000000..4ddc06737f
--- /dev/null
+++ b/macros/latex209/contrib/pphlp/pproc.cld
@@ -0,0 +1,4 @@
+define verb pproc
+image tools:helpproc
+ parameter p1,label=infile,value(required)
+ parameter p2,label=outfile,value(default=".hlp")