From 55d997436b968afc1acdef29eef301d33b71a0b3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 5 Mar 2022 16:44:12 +0000 Subject: hint doc to separate dirs; update runtime git-svn-id: svn://tug.org/texlive/trunk@62433 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/Makefile.in | 4 +- Build/source/texk/web2c/hitexdir/am/hitex.am | 3 +- Build/source/texk/web2c/hitexdir/doc/Makefile | 16 + Build/source/texk/web2c/hitexdir/doc/hiformat.hnt | Bin 0 -> 1113686 bytes Build/source/texk/web2c/hitexdir/doc/hiformat.pdf | Bin 0 -> 1255342 bytes Build/source/texk/web2c/hitexdir/doc/hint.ist | 17 + Build/source/texk/web2c/hitexdir/doc/hint.sty | 1513 ++++++++++++++++++++ Build/source/texk/web2c/hitexdir/doc/hitexman.hnt | Bin 0 -> 541115 bytes Build/source/texk/web2c/hitexdir/doc/hitexman.pdf | Bin 0 -> 233860 bytes Build/source/texk/web2c/hitexdir/doc/hitexman.tex | 819 +++++++++++ Build/source/texk/web2c/hitexdir/hiformat.hnt | Bin 1113686 -> 0 bytes Build/source/texk/web2c/hitexdir/hiformat.pdf | Bin 1255342 -> 0 bytes Build/source/texk/web2c/hitexdir/hint.ist | 16 - Build/source/texk/web2c/hitexdir/hint.sty | 1447 ------------------- Build/source/texk/web2c/hitexdir/hishrink.man | 201 --- Build/source/texk/web2c/hitexdir/histretch.man | 239 ---- Build/source/texk/web2c/hitexdir/hitex.man | 384 ----- Build/source/texk/web2c/hitexdir/hitexman.hnt | Bin 541115 -> 0 bytes Build/source/texk/web2c/hitexdir/hitexman.pdf | Bin 233860 -> 0 bytes Build/source/texk/web2c/hitexdir/hitexman.tex | 819 ----------- Build/source/texk/web2c/hitexdir/man/hishrink.man | 201 +++ Build/source/texk/web2c/hitexdir/man/histretch.man | 239 ++++ Build/source/texk/web2c/hitexdir/man/hitex.man | 384 +++++ Build/source/texk/web2c/hitexdir/verbatim.tex | 48 - 24 files changed, 3194 insertions(+), 3156 deletions(-) create mode 100644 Build/source/texk/web2c/hitexdir/doc/Makefile create mode 100644 Build/source/texk/web2c/hitexdir/doc/hiformat.hnt create mode 100644 Build/source/texk/web2c/hitexdir/doc/hiformat.pdf create mode 100644 Build/source/texk/web2c/hitexdir/doc/hint.ist create mode 100644 Build/source/texk/web2c/hitexdir/doc/hint.sty create mode 100644 Build/source/texk/web2c/hitexdir/doc/hitexman.hnt create mode 100644 Build/source/texk/web2c/hitexdir/doc/hitexman.pdf create mode 100644 Build/source/texk/web2c/hitexdir/doc/hitexman.tex delete mode 100644 Build/source/texk/web2c/hitexdir/hiformat.hnt delete mode 100644 Build/source/texk/web2c/hitexdir/hiformat.pdf delete mode 100644 Build/source/texk/web2c/hitexdir/hint.ist delete mode 100644 Build/source/texk/web2c/hitexdir/hint.sty delete mode 100644 Build/source/texk/web2c/hitexdir/hishrink.man delete mode 100644 Build/source/texk/web2c/hitexdir/histretch.man delete mode 100644 Build/source/texk/web2c/hitexdir/hitex.man delete mode 100644 Build/source/texk/web2c/hitexdir/hitexman.hnt delete mode 100644 Build/source/texk/web2c/hitexdir/hitexman.pdf delete mode 100644 Build/source/texk/web2c/hitexdir/hitexman.tex create mode 100644 Build/source/texk/web2c/hitexdir/man/hishrink.man create mode 100644 Build/source/texk/web2c/hitexdir/man/histretch.man create mode 100644 Build/source/texk/web2c/hitexdir/man/hitex.man delete mode 100644 Build/source/texk/web2c/hitexdir/verbatim.tex (limited to 'Build') diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index 1da44142e91..411d457bcd1 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -4647,7 +4647,9 @@ euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test euptexdir/ # At the moment, these are the only man pages handled in the # conglomerated web2c/Makefile[.am]. (All the others are in man/.) # If that changes, have to set at top level and use +=. -@HITEX_TRUE@man1_MANS = hitexdir/hishrink.man hitexdir/histretch.man hitexdir/hitex.man +@HITEX_TRUE@man1_MANS = hitexdir/man/hishrink.man hitexdir/man/histretch.man \ +@HITEX_TRUE@ hitexdir/man/hitex.man + hitex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) -I$(srcdir)/libmd5 \ -DINIT -DSTAT # -DDEBUG drops into an interactive debugging session. diff --git a/Build/source/texk/web2c/hitexdir/am/hitex.am b/Build/source/texk/web2c/hitexdir/am/hitex.am index df3ce77ad10..94070a15861 100644 --- a/Build/source/texk/web2c/hitexdir/am/hitex.am +++ b/Build/source/texk/web2c/hitexdir/am/hitex.am @@ -14,7 +14,8 @@ hiall: hitex hishrink histretch # At the moment, these are the only man pages handled in the # conglomerated web2c/Makefile[.am]. (All the others are in man/.) # If that changes, have to set at top level and use +=. -man1_MANS = hitexdir/hishrink.man hitexdir/histretch.man hitexdir/hitex.man +man1_MANS = hitexdir/man/hishrink.man hitexdir/man/histretch.man \ + hitexdir/man/hitex.man endif HITEX ## Debugging for the parser as usual. diff --git a/Build/source/texk/web2c/hitexdir/doc/Makefile b/Build/source/texk/web2c/hitexdir/doc/Makefile new file mode 100644 index 00000000000..e2257dabe04 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/doc/Makefile @@ -0,0 +1,16 @@ +# $Id$ +# Standalone Makefile for hitex/doc. Public domain. +# This is not run as part of the build, just a convenience used by hand +# from the Build/source/... directory. + +INSTALL_DATA = cp -pf + +texmf_dist = ../../../../../../Master/texmf-dist +hitex_makeindex_dir = $(texmf_dist)/makeindex/hitex/hint.ist +hitex_doc_dir = $(texmf_dist)/doc/hitex/base +# +install: + $(INSTALL_DATA) hint.ist $(hitex_makeindex_dir) + for f in hiformat.hnt hiformat.pdf hint.sty \ + hitexman.hnt hitexman.pdf hitexman.tex; do \ + $(INSTALL_DATA) $$f $(hitex_doc_dir) || exit 1; done diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt new file mode 100644 index 00000000000..b445a94576f Binary files /dev/null and b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt differ diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf new file mode 100644 index 00000000000..41ed4630fc7 Binary files /dev/null and b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf differ diff --git a/Build/source/texk/web2c/hitexdir/doc/hint.ist b/Build/source/texk/web2c/hitexdir/doc/hint.ist new file mode 100644 index 00000000000..29716216028 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/doc/hint.ist @@ -0,0 +1,17 @@ +% Public domain makeindex style for hint. + +% quote '+' + +actual '+' +encap ':' +preamble "\\beginindex\n" +postamble "\\endindex\n" +headings_flag 1 +heading_prefix "\\indexheading " +symhead_positive "{Symbols}" +numhead_positive "{Numbers}" + +delim_0 "\\quad " +delim_1 "\\quad " +delim_2 "\\quad " + diff --git a/Build/source/texk/web2c/hitexdir/doc/hint.sty b/Build/source/texk/web2c/hitexdir/doc/hint.sty new file mode 100644 index 00000000000..1fa9d7232f2 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/doc/hint.sty @@ -0,0 +1,1513 @@ +% Copyright 2017-2022 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen +% +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the "Software"), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be +% included in all copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +% THE SOFTWARE. +% +% Except as contained in this notice, the name of the copyright holders shall +% not be used in advertising or otherwise to promote the sale, use or other +% dealings in this Software without prior written authorization from the +% copyright holders. + +\input idxmac.tex +\let\displayverbatimfont=\tt + +% V E R B A T I M . T E X +% +% THIS SET OF MACROs IS TAKEN FROM D.E.K.'s TeXBook +% AND PROVIDES AN EASY WAY OF TYPESETTING TEXTS VERBATIM: +% +% 1. \verbatim +% causes the text to be set verbatim using \tt font; +% 2. if the text uses up all the alphabet, \doubleverbatim macro +% can be used instead; this is similar to the previous one but +% a pair of characters is now used as a delimiter; +% 3. in case of emergency \tripleverbatim macro may be of help... +% +%--------------------------------------------- +\def\uncatcodespecials % see D.E.K., pp. 344 and 380 + {\def\do##1{\catcode`##1=12}\dospecials}% +%--------------------------------------------- +{\catcode`\^^I=\active \gdef^^I{\ \ \ \ }% TAB character is replaced by + % 4 spaces; it is better than + % nothing, but it does not mimic + % true tabbing satisfactorily---maybe + % some nice day... + \catcode`\`=\active\gdef`{\relax\lq}}% this line inhibits Spanish + % ligatures ?` and !` of \tt font +\def\setupverbatim % see D.E.K., p. 381 + {\tt % + \spaceskip=0pt \xspaceskip=0pt % just in case... + \catcode`\^^I=\active % + \catcode`\`=\active % + \def\par{\leavevmode\endgraf}% this causes that empty lines aren't + % skipped + \obeylines \uncatcodespecials \obeyspaces}% +{\obeyspaces \global\let =\ }% this causes that leading blanks aren't + % skipped; cf. also def's of \space, \endgraf, + % \lq, \obeyspaces, and \obeylines, + % D.E.K., pp. 351--352 +%--------------------------------------------- +% see D.E.K., p. 382 +\def\doverbatim#1{\def\next##1#1{##1\endgroup}\next}% +\def\verbatim{\begingroup\setupverbatim\doverbatim}% +%---------- +\def\dodoubleverbatim#1#2{\def\next##1#1#2{##1\endgroup}\next}% +\def\doubleverbatim{\begingroup\setupverbatim\dodoubleverbatim}% +%---------- +\def\dotripleverbatim#1#2#3{\def\next##1#1#2#3{##1\endgroup}\next}% +\def\tripleverbatim{\begingroup\setupverbatim\dotripleverbatim}% +%--------------------------------------------- + + + +%% +%% special treatment for @ +%% + +\def\makeatletter{\catcode`\@=11\relax} +\def\makeatother{\catcode`\@=12\relax} +\makeatletter + +%% +%% Conditionals +%% + +\newif\ifhint +\newif\ifbook +\newif\ifpdf + +% HINT +\ifx\HINTversion\undefined + \hintfalse +\else + \hinttrue +\fi + +% PDF +\ifx\pdfliteral\undefined % postscript und ps2pdf + \pdffalse +\else + \pdftrue +\fi + +% Book +\ifx\book\undefined + \ifhint\bookfalse + \else\ifpdf\bookfalse % This might change + \else\bookfalse + \fi\fi +\else +\booktrue +\hintfalse +\pdffalse +\fi + +\message{Book: \ifbook true \else false \fi} +\message{PDF: \ifpdf true \else false \fi} +\message{HINT: \ifhint true \else false \fi} + +%% +%% Additional fonts +%% + +\font\tenss=cmss10 % used for the HINT name +\font\tenssbx=cmssbx10 % used for the bold HINT name +\font\largess=cmss12 scaled\magstep1 % used for large HINT name +\font\largessbx=cmssbx10 scaled\magstep2 % used for large bold HINT name +\font\manual=manfnt % font used for the METAFONT logo, etc. +\let\sf\tenss +\def\bf{\let\sf\tenssbx\fam\bffam\tenbf} + + +%% Large Font for sections +%\font\largebf=cmb14 scaled\magstep0 +%\font\largebf=cmb12 scaled\magstep1 +\font\largebf=cmbx12 scaled\magstep1 +%\font\largebf=cmbx8 scaled\magstep3 +%\font\largeit=cmti14 scaled\magstep0 +\font\largeit=cmti12 scaled\magstep1 +%\font\largett=cmtt14 scaled\magstep0 +\font\largett=cmtt12 scaled\magstep1 +%\font\largerm=cmr14 scaled\magstep0 +\font\largerm=cmr12 scaled\magstep1 +% for mathbolditalic +%\font\tenmib=cmmib10 scaled\magstep0 +\font\tenmib=cmmib10 scaled\magstep0 +\font\largemib=cmmib10 scaled\magstep1 + +%% Small Fonts for Figure and Table descriptions +\font\figbf=cmbx9 scaled\magstep0 +\font\figit=cmti9 scaled\magstep0 +\font\figmit=cmmi9 scaled\magstep0 +\font\figsy=cmsy9 scaled\magstep0 +\font\figtt=cmtt9 scaled\magstep0 +\font\figrm=cmr9 scaled\magstep0 +% for mathbolditalic +\font\figmib=cmmib9 scaled\magstep0 + +\def\largebold{\let\bf\largebf\let\sf\largessbx\bf} + +\def\large{\def\rm{\fam0\largerm}\let\bf\largebold\let\it\largeit\let\tt\largett\let\mib\largemib\let\sf\largess% +\textfont0=\largerm\textfont1=\largeit +\setbox\strutbox=\hbox{\vrule height9.5pt depth5.0pt width\z@}\rm} + +\def\small{\def\rm{\fam0\figrm}\let\bf\figbf\let\it\figit\let\tt\figtt\let\mib\figmib% +\textfont0=\figrm\textfont1=\figmit\textfont2=\figsy% +\setbox\strutbox=\hbox{\vrule height9.0pt depth4.5pt width\z@}\rm} + +\let\tiny\eightrm +\let\mib\tenmib + + +%% +%% Logos +%% + +%\def\Pascal/{{\mc P\kern-.05emascal\spacefactor1000}} +\def\CEE{{\mc C\spacefactor1000}} +\def\Pascal{\leavevmode\hbox{\mc P\kern-.05emascal}} +\def\PDF{\leavevmode\hbox{\mc PDF}} +\def\WEB{\leavevmode\hbox{\tt WEB\spacefactor1000}} +\def\GNU{\leavevmode\hbox{\mc GNU}} +\def\Prote{{\tenrm P\kern-0.1em R\kern-0.15em\raise.11ex\hbox{o}% + \kern-0.22em T\kern-0.05em E}} +\def\eTeX{$\varepsilon$-\TeX} +\def\HINT{\leavevmode\hbox{\sf HINT\spacefactor1000}} +\def\cweb{\leavevmode\hbox{\tt cweb}} +\def\web2w{\leavevmode\hbox{\tt web2w}} +\def\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc A}\kern-.15em\TeX}% +\def\MF{{\manual META}\-{\manual FONT}}% +\def\TL{\TeX~Live} +\def\kpse{\leavevmode\hbox{\tt kpathsearch\spacefactor1000}} +\def\TUB{{\sl TUGboat\/}} +\def\TUG{\TeX\ \UG} +\def\tug{\acro{TUG}} +\def\UG{Users Group} +\ifacro +\sanitizecommand{\TeX}{TeX} +\sanitizecommand{\eTeX}{eTeX} +\sanitizecommand{\Prote}{PRoTE} +\fi +%% +%% Special controlsequences +%% + +\def\abs#1{\left|#1\right|} +\def\<#1>{$\langle\,$#1$\,\rangle$} +\def\registered{{\ooalign{\hfil\raise.07ex\hbox{\sevenrm R}\hfil\crcr\Orb}}} +\def\hair{\kern.05em\relax} % teeny tiny space +\def\center#1{\bigskip\line{\hfil#1\hfil}\bigbreak} +\chardef\VB=`\| % vertical bar character in a string +\def\^{\ifmmode\mathchar"222 \else\char`^ \fi}%from webmac.tex: pointer or hat +\ifhint +\def\_{{\tt\UL}} % make underline an ordinary character for better searching +\fi + +% Bibtex needs this +\def\mbox#1{\leavevmode\hbox{#1}} + +% URLs +{\gdef\urldot{.}\catcode`.=13 + \gdef\urlslash{/}\catcode`/=13 + \gdef\urlspecials{\def.{\urldot\penalty 0}\def/{\urlslash\penalty 0}} +} +\def\url{\bgroup\hskip 1cm plus 5cm\penalty -100\hskip -1cm plus -5cm\tt + \catcode`_=12\catcode`\~=12\catcode`.=13\catcode`/=13\urlspecials} +\def\endurl{\egroup} + + +% for the index +\def\see#1#2{\hskip 0pt plus 100pt\penalty 0\hskip 0 pt plus -100pt{\it see\/} #1} + +% typewriter type for strings +\def\.#1{\leavevmode\hbox{\tt + \let\\=\BS % backslash in a string + \let\{=\LB % left brace in a string + \let\}=\RB % right brace in a string + \let\~=\TL % tilde in a string + \let\ =\SP % space in a string + \let\_=\UL % underline in a string + \let\&=\AM % ampersand in a string + \let\^=\CF % circumflex in a string + \let\|=\VB % vertical bar in a string + #1\kern.05em}} + +%{\rm\gdef\strutdepth{\dp\strutbox}} + + +%% +%% Environments +%% + +% Quotations (form the standard) +\def\beginquote{\bgroup\narrower\noindent\sl} +\def\endquote{\egroup} + +% Enumerate +\newcount\enum +%other styles use \medskip instead of \par +\def\enumerate{\par\bgroup\advance\leftskip by\parindent\enum=0% + \def\item{\advance\enum by 1\par\enumdest\smallskip\noindent\hbox to 0pt{\hss\the\enum.~}\ignorespaces}} +\def\endenumerate{\medskip\egroup\noindent} + +%Itemize +\def\itemize{\par\bgroup\advance\leftskip by\parindent\relax% + \def\item{\par\smallskip\noindent\llap{$\bullet$\enspace}\ignorespaces}} +\def\enditemize{\medskip\egroup\noindent} + +%Float +\long\def\float#1{\midinsert\parindent 0pt\relax#1\endinsert} +%\def\float#1{\midinsert +%\hsize\pagewidth +%\parindent 0pt\vbox{\hbox{\kern-\marginwidth\vbox{#1}}}\endinsert} + +%% +%% Redefining cwebmac.tex macros +%% + +%defining how to output terminals and nonterminals +\def\ts#1{\ifmmode\hbox{\sc #1}\else{\sc #1}\fi}% terminal symbol +\def\nts#1{{\sl #1\/}}% nonterminal symbol +% redefining the box around verbatim code +\def\vb#1{\hbox{\strut\.{#1}}} +% regular expressions and actions +\newbox\rebox +\def\re#1{\leavevmode\setbox\rebox\hbox{#1\hfill}\ifdim\wd\rebox<7em\wd\rebox=7em\fi\box\rebox\quad} +\def\ac{\global\ind=10\hangindent=\ind em\relax} +\def\eac{\global\ind=3\hangindent=\ind em\relax} +% yskip is usually a smallskip = 3pt pus 1pt minus 1pt +% I give it some extra stretchability +%\def\yskip{\vskip 3pt plus 3pt minus 1pt} +\let\yskip\smallbreak + +% redefine \5 for an optional break without the 2.5em reduced indentation +%\def\5{\hskip 0pt plus 2.5em\penalty-1\hskip 0pt plus -2.5em\kern0.5em\ignorespaces}% optional break +%redefine \5 to give some shrinkability +% from hitex and hint style: +%\def\5{\hfil\penalty-1\hskip 0pt minus 6pt\hfilneg\kern2.5em\copy\bakk\ignorespaces}% optional break +\def\5{\hfil\penalty10\hfilneg\hskip 0pt minus 6pt\kern2.5em\copy\bakk\ignorespaces}% optional break +\def\J{}% dont show @& in the tex output +\def\Y{\par\yskip} + +% start sections +\def\stsec{\rightskip=0pt % get out of C mode (cf. \B) + \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 % +} + +% the box for the points to operator "->" in C +\setbox\MGbox=\hbox{$\rightarrow$} + +% how to display NULL +\def\NULL{\tt NULL} + +%other styles make this a \par +\def\note#1#2.{} +%\Y\noindent{\hfill% +% \baselineskip10pt\tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}} + +%other styles make this minus 10pt +\def\B{\rightskip=0pt plus 100pt minus 0pt % go into C mode + \sfcode`;=3000 + \pretolerance 10000 + \hyphenpenalty 1000 % so strings can be broken (discretionary \ is inserted) + \exhyphenpenalty 1000 + \codedest + \global\ind=2 \1\ \unskip + \vadjust{\vtop to 0pt{\vss\hbox to \hsize{\hfill\tiny(\secstar)}\kern 0pt}}} + +% formating of C comments +\def\C#1{\5\hfill$/\ast\,${\cmntfont #1}$\,\ast/$} + +% section begin +\def\M#1{\MN{#1}\ifon\stsec\smallskip +%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +\noindent\ignorespaces}% beginning of section + +\def\N#1#2#3.{\MN{#1}\ifon\stsec\smallskip +%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +\noindent{\bf#3\quad}\ignorespaces}% beginning of section + +\def\MN#1{\smallskip + {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% + \gdef\thecode{#1}% common code for \M, \N + \ontrue} + +% Used in section text +\def\U{\rightnote{Used in}} % xref for use of a section +\def\Us{\rightnote{Used in}} % xref for uses of a section +% replacing \note in \U and \Us by \rightnote +%\def\rightnote#1#2.{\vskip-\baselineskip\vtop to 0pt{\vss\hbox to \hsize{\hfill +% \tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}\kern 0pt}} +%\def\rightnote#1#2.{\vskip-\baselineskip\hbox to \hsize{\hfill +% \tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}} +%\def\rightnote#1#2.{\penalty1000\discretionary{}{\hbox{}}{\kern 2em}\penalty1000\hfill +% \hbox{\tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}} +\def\rightnote#1#2.{% + \penalty1000\discretionary{}{\hbox{}}{\kern 4em}\penalty1000\hfill + \hskip -4em plus 4em\hbox{\tiny #1~\codenote#2.}.} + +\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name + \XX$\langle\,${\let\I=\ne#2\kern.5em\coderef{#1}$\,\rangle$\XX}} + + +% how to display hex numbers +\def\hex{\hbox{$^{\scriptstyle\#}$\tt\aftergroup}} % CWEB style + +\def\(#1){} % this is used to make section names sort themselves better + + +%% +%% Dimensions to achive the desired layout +%% + + +% the other variables are defined in cwebmac.tex +\newdimen\headheight +\newdimen\footheight +\newdimen\leftmargin +\newdimen\rightmargin +\newdimen\topmargin +\newdimen\bottommargin +\newdimen\marginwidth + +\parskip 0pt plus .8pt + +\leftmargin=22mm +\rightmargin=22mm +\topmargin=15mm +\bottommargin=27mm +\marginwidth=0pt % we do not have notes in the margin + +\headheight=12pt % Text in Head +\advance\headheight+13pt % Abstand 1pt, Linie 0.47pt und Abstand zum Text 11.53pt +\footheight=0pt % Text in Footer + +\pagewidth=6.69in +\advance\pagewidth-\leftmargin % left margin/offset +\advance\pagewidth-\rightmargin % left margin/offset + +% 6.69in = 169.926 +% - 2*22mm = 125.926mm +% +% 9.61in = 244.094 +% - 15mm -27 mm = 202.094 +% (12+13)pt = 8.786 mm +% -8.786 = 193.308 mm + +\fullpageheight=9.61in +\advance\fullpageheight-\topmargin% topmargin +\advance\fullpageheight-\bottommargin% bottommargin + +\pageheight=\fullpageheight +\advance\pageheight-\headheight +\advance\pageheight-\footheight + +\def\setpage{\hsize\pagewidth\advance\hsize-\marginwidth\vsize\pageheight} % use after changing page size + +\setpage + +% setting the papersize for postscript and pdf + +\ifbook + %\overfullrule=0pt + \pdfpageheight=9.61in + \pdfpagewidth=6.69in + \pdfhorigin=\leftmargin + \pdfvorigin=\topmargin + \pdfcompresslevel=9 + \pdfdecimaldigits=4 + \pdfpkresolution=1200 + \pdfimageresolution=1200 +\else\ifpdf + \pdfpageheight=9.61in + \pdfpagewidth=6.69in + \pdfhorigin=\leftmargin + \pdfvorigin=\topmargin + \pdfcompresslevel=9 + \pdfdecimaldigits=4 + \pdfpkresolution=1200 + \pdfimageresolution=1200 +\else + \special{papersize=6.69in,9.61in}% postscript und ps2pdf +\fi\fi + + + +%% +%% Page layout +%% + +\long\def\leftmark#1#2{#1} +\long\def\subsectionmark#1#2{#2} +\long\def\rightmark#1#2{\if0#1\else\expandafter\subsectionmark\botmark\fi} + +\def\lheader{\mainfont\strut +\thepageno\hfill\expandafter\leftmark\firstmark} % top line on left-hand pages + +\def\rheader{\mainfont\strut +\expandafter\rightmark\firstmark\hfill\thepageno} % top line on right-hand pages + +\let\page=\pagebody +%\raggedbottom +\normalbottom +%\def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes +\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi + \shipout\vbox{ + \vbox to\fullpageheight{\pagelabel + \iftitle\global\titlefalse + \else\hbox{\vbox to \headheight{ + \hbox to \pagewidth{\ifodd\pageno #3\else#2\fi} + \vskip 1pt\relax + \nointerlineskip + \hrule height .47pt +% \hbox{\hrule}%fill\psfig{file=image/topline.eps}\hfil}% + \vfil}}% + \fi + \nointerlineskip + \hbox{\kern\marginwidth\vbox to \pageheight{#1}}}} % parameter #1 is the page itself + \global\advance\pageno by1} + +\def\nomarginoutput#1#2#3{% + \ifodd\pageno\hoffset=\pageshift\fi + \shipout\vbox to\fullpageheight{\pagelabel\nointerlineskip + \iftitle\global\titlefalse + \hbox{\vbox to \headheight{\vfil}} + \else + \hbox{\vbox to \headheight{\nointerlineskip + \hbox to \pagewidth{\ifodd\pageno#3\else#2\fi}% + \vskip 1 pt + \nointerlineskip + \hrule height .47pt +% \hbox{\psfig{silent=,bbllx=0pt,bblly=0pt,bburx=368pt,bbury=2pt,file=image/topline.eps}\hfil}% + \vfil}}% + \fi\nointerlineskip #1 % parameter #1 is the page itself +% \vss +% \hbox to \pagewidth{\ifodd\pageno\else#2\fi}% +% \nointerlineskip +% \hbox{\psfig{file=image/topline.eps}\hfil}% +}% +\global\advance\pageno by1} + +%% switch to global nomargin +\let\normaloutput\nomarginoutput +\def\sectionbox#1{\hbox{#1}} +\marginwidth=0mm +\setpage + + +%% +%% Frontmatter and mainmatter +%% +\pageno=1 +\def\thepageno{\romannumeral\pageno} +\def\frontmatter{\pageno=4\def\thepageno{\romannumeral\pageno}} +\def\mainmatter{ +\mark{{\sectionname}{\subsectionname}} +%\message{Mark {\sectionname}{\subsectionname}} +\vfil\break\ifodd\pageno\pageno=1\else\pageno=0\fi +\def\thepageno{\the\pageno}% +\sectioncount=0 +\mark{{0}{0}}% +%\hbox{Mark empty empty}% +\gdef\sectionname{} +\gdef\subsectionname{} +\gdef\codetitle{} +\gdef\subcodetitle{} +} + + + + +%% +%% Sections +%% + +\newcount\sectioncount +\sectioncount=0 +\newcount\subsectioncount +\subsectioncount=0 +\newcount\subsubsectioncount +\subsubsectioncount=0 + +\newskip\abovesecskip +\newskip\belowsecskip +\newskip\abovesubsecskip +\newskip\belowsubsecskip + +%\abovesecskip= 6ex plus 1ex minus .2ex %space above the section +%\belowsecskip=3.7ex plus .2ex% space after section +\abovesecskip= 0.15\vsize plus 5ex minus 1ex %space above the section +\belowsecskip=10pt plus 2pt% space after section +\abovesubsecskip=9pt plus 4pt minus 2pt%space above the section +\belowsubsecskip=3pt plus 1pt minus 0.5pt% space after section + + +\newif\ifappendix +\appendixfalse + +\mark{{0}{0}}\vskip 0pt minus 100pt +%\hbox{Mark empty empty}% +\def\thesection{\the\sectioncount} +\def\topsection{\the\sectioncount} + +%\def\sectionbox#1{\hskip-\marginwidth\hbox to \marginwidth{#1\hfil}} + +\def\heading#1#2{% +\def\secno{{\noindent\large\bf\strut{#1}#2}}% +\par\ifhmode\unskip\fi% end paragraph and remove vertical space +\penalty-500 +\vskip 0pt plus 72pt%allow some empty space at the bottom +\penalty-500 +\vskip 0pt plus -72pt% room for stetching and a page break +\hbox{}\vskip\abovesecskip% space above the section +%%\titletrue % omits page header for section +%\hbox{Mark null null}% +\mark{{0}{0}}% +\secno% The section title +\mark{{\sectionname}{\sectionname}}% +%\message{Mark heading {\sectionname}{\subsectionname}} +\nobreak\vskip\belowsecskip% space after section +\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +\ignorespaces} + + + +\newcount\plaincount +\def\plainsection#1{% +\mark{{\sectionname}{\subsectionname}}% +%\message{Mark plain {\sectionname}{\subsectionname}} +\subsubsectioncount=0\subsectioncount=0% +\advance\plaincount by 1\relax +\def\thesection{} +\sectionpage% +\gdef\sectionname{#1}% +\gdef\subsectionname{#1}% +\gdef\codetitle{#1}% +\gdef\subcodetitle{#1}% +\tocsection{0}{}{#1} +\heading{}{#1}% +} + + +\gdef\sectionname{} +\gdef\subsectionname{} +\gdef\codetitle{}% +\gdef\subcodetitle{} + +\def\sectionpage{% +\vfil\break +\ifodd\pageno\else +\hbox{}% +\titletrue +\fi +\vfil\break +} + + +\def\section#1{% +\mark{{\sectionname}{\subsectionname}}% +%\message{Mark section {\sectionname}{\subsectionname}} +\subsubsectioncount=0\subsectioncount=0% +\advance\sectioncount by 1%updating counts +\let\thesection\topsection +\sectionpage% +\gdef\sectionname{\topsection\quad#1}% +\gdef\subsectionname{\thesection\quad#1}% +\gdef\codetitle{#1}% +\gdef\subcodetitle{#1}% +\ifnum\sectioncount=1\ifappendix\tocsection{0}{}{Appendix}\heading{}{Appendix}\fi\fi +\tocsection{0}{\thesection}{#1}% +\heading{\thesection~}{#1}% +} + + +\def\subsection#1{% +\subsubsectioncount=0\advance\subsectioncount by 1%updating counts +\def\thesection{\topsection.\the\subsectioncount} +\def\secno{{\noindent\bf\strut\sectionbox{\thesection~}#1}}% +\par\ifhmode\unskip\fi% end paragraph and remove vertical space +\tocsection{1}{\thesection}{#1}% +\penalty-200 +\vskip 0pt plus 36pt% allow some empty space at the bottom +\penalty-200 +\vskip 0pt plus -36pt% room for stetching and a page break +\gdef\subsectionname{\thesection\quad#1}% +\mark{{\sectionname}{\subsectionname}}% +%\message{Mark subsection {\sectionname}{\subsectionname}} +\vskip\abovesubsecskip% space above the subsection +\secno% The subsection title +\gdef\subcodetitle{#1}% +%\mark{{\sectionname}{\subsectionname}}% +%\hbox{Mark {\sectionname}{\subsectionname}}% +\nobreak\vskip\belowsubsecskip% space after subsection +\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +\ignorespaces} + + +\def\subsubsection#1{% +%\mark{{\sectionname}{\subsectionname}}% +%\hbox{Mark {\sectionname}{\subsectionname}}% + \advance\subsubsectioncount by 1%updating counts +\def\thesection{\topsection.\the\subsectioncount.\the\subsubsectioncount} +\def\secno{{\noindent\it\strut\sectionbox{\thesection~}#1}}% +\par\ifhmode\unskip\fi% end paragraph and remove vertical space +\tocsection{2}{\thesection}{#1}% +\penalty-200 +\vskip 0pt plus 36pt% allow some empty space at the bottom +\penalty-200 +\vskip 0pt plus -36pt% room for stetching and a page break +\vskip\abovesubsecskip% space above the subsection +\secno% The subsubsection title +\nobreak\vskip\belowsubsecskip% space after subsection +%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +%\noindent +\ignorespaces} + +%% +%% Appendix +%% + +\def\Alphanum#1{% + \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or + K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or + Y\or Z\else\number#1\fi} + +\def\appendix{% +\mark{{\sectionname}{\subsectionname}}% +%\message{Mark appendix {\sectionname}{\subsectionname}} +\sectioncount=0 +\subsectioncount=0 +\gdef\thesection{\Alphanum\sectioncount}% +\gdef\topsection{\Alphanum\sectioncount}% +\appendixtrue +} + +%% +%% Crossreference of Identifiers and Sections +%% +\iftrue %% No Crossreference of identifiers + \def\inx{\def\lr{L}} % this tells whether the left or right column is next +\else +\def\inx{% + \hsize=\pagewidth + \def\page{\box255 } \normalbottom + \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi + \global\setbox\sbox=\page \global\pagesavedtrue} + \pagesavedfalse + \plainsection{Crossreference of Identifiers}% we are beginning the index + \mark{{0}{0}}% +%\hbox{Mark empty empty}% + \eject % eject the page-so-far and predecessors + \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box + \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height + \hsize=.5\pagewidth \advance\hsize by -10pt + % column width for the index (20pt between cols) + \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines + \def\lr{L} % this tells whether the left or right column is next + \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R} + \else\nomarginoutput{\vbox to\pageheight{\box\sbox\vss + \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader + \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse + \mark{{Crossreference of Identifiers}{Crossreference of Identifiers}}% + \fi} + \parfillskip 0pt plus 1fil + \let\topsecno=\nullsec + \message{Crossreference of Identifiers:} + \parskip 0pt plus .5pt + \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em + \ifbook##2\else\ifpdf\pdfnote##2.\else##2\fi\fi.} % index entry + \def\[##1]{$\underline{##1}$} % underlined index item + \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar + \hyphenpenalty 10000 \parindent0pt + \small + \readindex +} +\fi + +\def\fin{% + \if L\lr\mark{{}{}}\fi + \vfill\eject % complete the current column. + \mark{{}{}} + \if R\lr\null\vfill\eject\fi % if necessarry add a right column + \setpage + \def\page{\box255 } \normalbottom + \output={\nomarginoutput\page\lheader\rheader} +} +\ifbook +\let\crosssections=\relax +\else +\def\crosssections{ + \plainsection{Crossreference of Code}% this is done when we are ending the index + \parindent 0pt + \parfillskip 0pt plus 1fil + \let\topsecno=\nullsec + \message{Crossreference of Code:} + \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\tiny##1~\ifbook##2\else + \ifpdf{\pdfnote##2.}\else + \ifhint\codenote##2.\else##2.\fi\fi\fi}} + \def\Q{\note{Cited in section}} % crossref for mention of a section + \def\Qs{\note{Cited in sections}} % crossref for mentions of a section + \def\U{\note{Used in}} % crossref for use of a section + \def\Us{\note{Used in}} % crossref for uses of a section + \def\I{\par\hangindent 2em}\let\*=* + \def\X##1:##2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name + \XX$\langle\,${\let\I=\ne##2}$\,\rangle$\XX\quad{\tiny Defined in~\codenote##1.}} + \readsections +} +\fi + + + +%% +%% Table of Content +%% + +% we separate the identification of a section used in links +%from the identification on paper, because plain sections dont +%have the latter. +\newcount\toccount +\toccount=0 + +\def\tocsection#1#2#3{% depth sectionnumber sectiontitle +\global\advance\toccount by 1% +\newdest{SC.\the\toccount}% +\ifhint + \immediate\write\cont{\noexpand\ZZ {#1}{#2}{#3}% write to contents file + {\noexpand\thepageno}{\the\toccount}} +\else +\edef\next{\write\cont{\noexpand\ZZ {#1}{#2}{#3}% write to contents file + {\noexpand\thepageno}{\the\toccount}}}\next % \tocline{depth}{sec}{title}{page}{toccount} +\fi +} + +\output{ + \ifhint + \shipout\box255\relax% otherwise I loose open, write, or close commands + \else + \setbox0=\page % the first page is garbage + \fi +% \openout\cont=\contentsfile +% \write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter + \global\output{\normaloutput\page\lheader\rheader}} + + +\newbox\tocbox +\def\maketoc{% + \typeout{Reading table of contents} + \setbox\tocbox\vbox{% + \let\ZZ=\tocline + \ifbook\else\ifpdf\startpdf\fi\fi + \readcontents\relax + } + \typeout{Writing \contentsfile} + \immediate\openout\cont=\contentsfile\relax + \immediate\write\cont{\catcode `\noexpand\@=11\relax} +} + +\def\tableofcontent{\plainsection{Contents}\ifhint\HINTdest name {HINT.home}\fi +\unvbox\tocbox +} + + +\def\tocline#1#2#3#4#5{% depth sectionnumber sectiontitle page toccount +\ifnum#1=0 \smallskip\vskip 0pt plus 12pt\penalty -100\vskip 0pt plus -12pt\fi +\noindent +\line{% +\ifnum#1=0% + \hbox to 2em{\bf#2\hfill}{\bf#3~}\hfill + \hbox to 2em{\hss\bf\tocref{#1}{#3}{#4}{#5}}% +\else \ifnum#1=1% + \kern 2em\hbox to 3em{\rm#2\hfill}{\rm#3~}\leaders\hbox to .5em{.\hfil}\hfill + \hbox to 2em{\hss\tocref{#1}{#3}{#4}{#5}}% +\else + \kern 2em\hbox to 5em{\rm#2\hfill}{\it#3~}\leaders\hbox to .5em{.\hfil}\hfill + \hbox to 2em{\hss\tocref{#1}{#3}{#4}{#5}}\fi\fi +}} + + + +%% +%% Figures and Tables +%% + +\def\fig#1{\global\advance\figcount by 1% +\ifvmode\noindent\fi +\def\captype{Fig}% +\capskip=1em% +\vbox{\nointerlineskip\figdest +\hbox{\noindent#1\hskip -2pt\hskip 0pt plus 2pt minus 2pt}% +\medskip +\rlap{\small\unhbox\capbox}% +}} + +\def\tab#1{% +\ifvmode\noindent\fi +\def\captype{Tab}% +\capskip=0pt% +\vbox{#1\medskip\rlap{\small\unhbox\capbox}}} + +\def\table#1#2{\global\advance\tabcount by 1% +\ifvmode\noindent\fi +\def\captype{Tab}% +\capskip=0pt% +\vbox{\offinterlineskip\tabdest + \halign{\large\strut + \vrule##&&\quad\hfil##\hfil\quad\vrule\cr + \noalign{\hrule}#2\noalign{\hrule}}% + \medskip + \tabcaption{#1}% + \rlap{\small\unhbox\capbox}% + }% +} + +\def\captype{} +\newdimen\capskip +\capskip=1em +\newbox\capbox +\setbox\capbox\hbox{} +\newcount\figcount +\figcount=0 +\newcount\tabcount +\tabcount=0 + +\def\nextfigcaption#1{\small\strut\it\hskip\capskip\figindex{\captype}{\the\figcount}{#1}\captype.~\the\figcount:} + +\def\caption#1{\global\setbox\capbox\hbox{\nextfigcaption{#1} #1}} + +\def\nexttabcaption#1{\small\strut\it\hskip\capskip\tabindex{\captype}{\the\tabcount}{#1}\captype.~\the\tabcount:} +\def\tabcaption#1{\global\setbox\capbox\hbox{\nexttabcaption{#1} #1}} + + +%\long\def\leftfig#1#2#3{% +%\ifvmode\noindent\fi +%\def\captype{Fig}% +%\capskip=1em% +%\vbox{% +% \tabskip=0pt\halign to \hsize{% +% \vtop{\vskip 0pt\parskip=0pt\hsize=62.5mm\relax +% ##}\tabskip=5mm plus 2pt minus 2pt& +% \vtop{\vskip 0pt\parskip=0pt\hsize=62.5mm\relax##}\tabskip=0pt\cr +% #1&\capskip=0pt\nextfigcaption{#2} #3\cr}\medbreak}} + +\long\def\leftright#1#2#3#4{% +\ifvmode\noindent\else\par\noindent\fi +\vbox{\nointerlineskip + \advance\hsize by -\leftskip\advance\hsize by -\rightskip% + \leftskip=0pt\rightskip=0pt% + \hbox to \hsize{\strut + \raise\ht\strutbox + \vtop{\vskip 0pt\parskip=0pt\hsize=#1\hsize\advance\hsize by -2.5mm\relax + \noindent\strut\ignorespaces#3\vfill}\hfil + \raise\ht\strutbox + \vtop{\vskip 0pt\parskip=0pt\hsize=#2\hsize\advance\hsize by -2.5mm\relax + \noindent\strut\ignorespaces#4\vfill}}}} + + +\long\def\leftfig#1#2#3{% +\def\captype{Fig}% +\capskip=0pt% +\leftright{0.5}{0.5}{#1\kern -2pt\hskip 2pt plus 2pt minus 2pt}{\nextfigcaption{#2}\strut #3}} + + +\def\subindex#1{% + \par\ifhmode\unskip\fi% end paragraph and remove vertical space + \vskip\abovesubsecskip% space above the subsection + \vskip 0pt plus 72pt% allow some empty space at the bottom + \penalty-200\vskip 0pt plus -72pt % room for stetching and a page break + \noindent{\bf\strut#1}% + \nobreak\vskip\belowsubsecskip% space after subsection + \everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph + \ignorespaces +} + +\newwrite\@figfile +\newwrite\@tabfile + +\def\makefigindex{% + \immediate\openout\@figfile=\jobname.fig\relax + \def\figindex{\@bsphack\begingroup\@sanitize\@wrfigindex\@figfile}% + \immediate\openout\@tabfile=\jobname.tab\relax + \def\tabindex{\@bsphack\begingroup\@sanitize\@wrfigindex\@tabfile}% + \typeout{Writing index files \jobname.fig \jobname.tab} +} + +\newdimen\iboxsize +\def\thefigindex{% + + \immediate\closeout\@figfile\relax + \immediate\closeout\@tabfile\relax + %\small\baselineskip=11pt + \plainsection{List of Figures and Tables} + \makeatletter + \iboxsize=3.7em\relax + \subindex{Figures} + \def\indexentry##1##2##3##4{% captype, fig/tab count, caption, page + \noindent + \line{\hbox to \iboxsize{% + \rm##1.~##2:\hfil}{\rm ##3}\ \leaders\hbox to .5em{.\hfil}% + \hfill\hbox to 1.4em{\hss + \ifbook##4\else + \ifpdf + \pagelnk{##4}% + \else\ifhint\figlink{##2} + \else##4\fi\fi\fi + }}\par + }% + \input\jobname.fig\relax + \iboxsize=3.9em\relax + \subindex{Tables} + \def\indexentry##1##2##3##4{% captype, fig/tab count, caption, page + \noindent + \line{\hbox to \iboxsize{% + \rm##1.~##2:\hfil}{\rm ##3}\ \leaders\hbox to .5em{.\hfil}% + \hfill\hbox to 1.4em{\hss + \ifbook##4\else + \ifpdf + \pagelnk{##4}% + \else\ifhint\tablink{##2} + \else##4\fi\fi\fi + }}\par + }% + \input\jobname.tab\relax + \makefigindex +} + + +\def\@wrfigindex#1#2#3#4{% file, captype, fig/tab count, caption + \xdef\gtempa{\write#1{\string\indexentry{#2}{#3}{#4}{\noexpand\thepageno}}}\endgroup\gtempa + \if@nobreak\ifvmode\@nobreak\fi\fi\@esphack} + +%% +%% Format Definitions +%% + +%\newbox\codebox +\newwrite\@getfile +\newwrite\@putfile +\newwrite\@redfile +\newwrite\@wrtfile + +\def\makecode{% + \immediate\openout\@getfile=\jobname.get\relax + \immediate\openout\@putfile=\jobname.put\relax + \immediate\openout\@redfile=\jobname.red\relax + \immediate\openout\@wrtfile=\jobname.wrt\relax + \typeout{Writing index files \jobname.get \jobname.put \jobname.red \jobname.wrt} +} + +\def\thecodeindex{% + \immediate\closeout\@getfile\relax + \immediate\closeout\@putfile\relax + \immediate\closeout\@redfile\relax + \immediate\closeout\@wrtfile\relax + \def\indexentry##1##2##3##4{% codecount, depth, pagenumber, section + \ifnum##2=0 \smallskip\vskip 0pt plus 12pt\penalty -100\vskip 0pt plus -12pt\fi + \noindent + \line{% + \ifnum##2=0##4\hfill + \else\qquad\rm##4\ \leaders\hbox to .5em{.\hfil}\hfill + \hbox to 1.4em{\hss\pagelnk{##3}} + \fi + }\par + }% + \section{Format Definitions} + \makeatletter + \subsection{Reading the Long Format}\label{codeindex} + \input\jobname.red.srt\relax + \subsection{Writing the Long Format} + \input\jobname.wrt.srt\relax + \subsection{Reading the Short Format} + \input\jobname.get.srt\relax + \subsection{Writing the Short Format} + \input\jobname.put.srt\relax +} + + +\newcount\codecount +\codecount=0 + +\ifhint +\def\@wrcodeindex#1#2#3#4{% file, depth, pagenumber, [sub]sectionname + \global\advance\indexcount by 1\indexdest + \xdef\gtempa{\write#1{\string\indexentry{#3}{#2}{\the\indexcount}{#4}}}\endgroup\gtempa\@esphack +} +\else +\def\@wrcodeindex#1#2#3#4{% file, depth, pagenumber, [sub]sectionname + \xdef\gtempa{\write#1{\string\indexentry{#3}{#2}{\noexpand\thepageno}{#4}}}\endgroup\gtempa\@esphack +} +\fi + +\def\getindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@getfile}% +\def\putindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@putfile}% +\def\redindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@redfile}% +\def\wrtindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@wrtfile}% + + +\def\codelabel#1#2#3{ + \getindex{#1}{#2}{#3}% + \putindex{#1}{#2}{#3}% + \redindex{#1}{#2}{#3}% + \wrtindex{#1}{#2}{#3}} +\def\getsymbol{$\cdots\Longrightarrow$} +\def\putsymbol{$\Longrightarrow\cdots$} +\def\redsymbol{$-{}-{}-{}\Longrightarrow$} +\def\wrtsymbol{$\Longrightarrow{}-{}-{}-$} +\def\getcode{\codesection{\getsymbol}{Reading the short format}\getindex{1}{\the\codecount}{\subcodetitle}} +\def\putcode{\codesection{\putsymbol}{Writing the short format}\putindex{1}{\the\codecount}{\subcodetitle}} +\def\writecode{\codesection{\wrtsymbol}{Writing the long format}\wrtindex{1}{\the\codecount}{\subcodetitle}} +\def\readcode{\codesection{\redsymbol}{Reading the long format}\redindex{1}{\the\codecount}{\subcodetitle}} +\newdimen\coderule +\def\codesection#1#2{% + \par\ifhmode\unskip\fi% end paragraph and remove vertical space + \penalty-200 + \vskip 0pt plus 72pt% allow some empty space at the bottom + \penalty-200 + \vskip 0pt plus -72pt% room for stetching and a page break +\vskip\abovesubsecskip% space above the subsection +%\line{\setbox0=\hbox{#1}% +%\coderule=\hsize\advance\coderule by -\wd0\advance\coderule by -2em% +%$\vcenter{\hrule width \coderule}$\hss\box0} +\line{{\it #2\/}:\hfill#1} +\nobreak\vskip\belowsubsecskip\nobreak% space after subsection +%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph +%\noindent +\ignorespaces} + +\def\hascode{\global\advance\codecount by 1% +\codelabel{0}{\the\codecount}{\codetitle}}% + + +%% +%% Makeindex and the Index +%% + +\newwrite\@indexfile + +% new jobname for index file +\def\makeindex{ + \immediate\openout\@indexfile=\jobname.inx% + \def\index{\@bsphack\begingroup\@sanitize\@wrindex\@indexfile}% + \typeout{Writing index file \jobname.inx }% +} + +\def\@idxitem{\par\hangindent 40pt} + +\newif\ifnextindex +\nextindexfalse + +\def\beginindex{% +\ifhint\relax\else + \def\page{\box255} \normalbottom + \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi + \global\setbox\sbox=\page \global\pagesavedtrue} + \pagesavedfalse \eject % eject the page-so-far and predecessors + \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box + \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height + \hsize=.5\pagewidth \advance\hsize by -10pt + % column width for the index (20pt between cols) + \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines + \def\lr{L} % this tells whether the left or right column is next + \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R} + \else\nomarginoutput{\vbox to\pageheight{\box\sbox\vss + \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader + \global\nextindextrue + \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi} +\fi +\message{Index:} +\mark{{0}{0}} +\noindent\par +\begingroup + \rightskip 0pt plus 12pt + \parskip 0pt plus .5pt + \hyphenpenalty 10000 \parindent0pt + \small\baselineskip=11pt +\def\item{\par\hangindent 40pt\relax\ifnextindex\mark{{Index}{Index}}\fi}% +\def\subitem{\par\hangindent 40pt\hskip 20pt\relax}% +\def\subsubitem{\par\hangindent 40pt\hskip 30pt\relax}% +\def\indexspace{\par\vskip 12pt plus 6pt minus 4pt\vskip 12pt\goodbreak\vskip -12pt\relax}% +\def\indexheading##1{{\tenbf ##1}\nobreak\vskip 3pt\relax} +} +\def\endindex{% +\endgroup + \vfill\eject % complete the current column. +\ifhint\relax\else + \if R\lr\null\vfill\eject\fi % if necessarry add a right column +\fi +} + + +%% +%% Label page, section, toccount, figure, table, code, enum +%% +\newcount\cdcount +\cdcount=0 + +\newdimen\labelskip +\def\label#1{% writes \labeldef{name}{{page}{section}{toccount}{figure}{table}{code}{enum}} to aux + \ifhint + \global\advance\indexcount by 1\indexdest + \begingroup\@readauxfile + \edef\next{\@writeaux{\string\labeldef{#1}{{\the\indexcount}% + {\thesection}{\the\toccount}{\the\figcount}{\the\tabcount}{\the\cdcount}{\the\enum}}}\endgroup}% + \else + \begingroup\@readauxfile + \edef\next{\@writeaux{\string\labeldef{#1}{{\noexpand\thepageno}% + {\thesection}{\the\toccount}{\the\figcount}{\the\tabcount}{\the\cdcount}{\the\enum}}}\endgroup}% + \fi + \ifvmode %make \removelastskip work after \label + \labelskip=\lastskip + \vskip-\labelskip + \next + \vskip\labelskip + \else + \next + \fi +} + + +\def\m@kelabel#1{label@#1}% this makes the controlseqence from the name + +\def\labeldef#1#2{% #1 is name #2 is page section subsection figure table code +\expandafter\gdef\csname\m@kelabel{#1}\endcsname{#2}}% + +\def\@setref#1#2#3{% + \ifx#1\relax + \message{Undefined reference: #3} + \else + \expandafter#2#1% + \fi} + +\def\@iofvii#1#2#3#4#5#6#7{#1} +\def\@iiofvii#1#2#3#4#5#6#7{#2} +\def\@iiiofvii#1#2#3#4#5#6#7{#3} +\def\@ivofvii#1#2#3#4#5#6#7{#4} +\def\@vofvii#1#2#3#4#5#6#7{#5} +\def\@viofvii#1#2#3#4#5#6#7{#6} +\def\@viiofvii#1#2#3#4#5#6#7{#7} + + +\def\pageref#1{\@readauxfile + \pagelnk{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iofvii{#1}}} +\def\secref#1{\@readauxfile + \sectionlink + {\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iiofvii{#1}}% + {\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iiiofvii{#1}}% +} +\def\figref#1{\@readauxfile +\figlink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@ivofvii{#1}}} +\def\tabref#1{\@readauxfile +\tablink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@vofvii{#1}}} +\def\cdref#1{\@readauxfile +\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@viofvii{#1}} +\def\enumref#1{\@readauxfile +\enumlink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@viiofvii{#1}}} + +%% +%% Links and Destinations +%% + +\ifbook + \def\pdflinkcolor{0 0 0} % the RGB values for hyperlink color + \def\linkcolor{\Black} + \def\pdflink#1#2{#1} + \def\pdfnote#1.{#1} + \message{No PDF Links} +\else + \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color + \def\linkcolor{\Blue} + \message{PDF Links are blue} +\fi + +\def\@esphack{\relax\ifhmode\spacefactor\@savsf + {}\ifdim \@savsk >\z@ \ignorespaces + \fi \fi} + +% +% Code destinations: by number +% + +%The number is set be \M and \N and stored as \secno +%The destination is set in \B where we go into C mode +\def\codedest{% +\ifbook\else +\ifhint\HINTdest num \thecode top\relax +\else\ifpdf\pdfdest num \thecode fith\relax +\else\relax +\fi\fi\fi +} +\def\coderef#1{% used in \X +\ifbook${}_{#1}$\else +\ifhint\HINTstartlink goto num #1 \hbox{${}_{#1}$}\HINTendlink +\else\ifpdf{\eightrm\pdfnote#1.} +\else${}_{#1}$\fi\fi\fi +} + +\def\codenote#1.{% replaces \pdfnote + \setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA} +% define the following like for pdf +\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}% + \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={} + \toksC={}\let\space\empty}\makenote}\maketoks}} +\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} +\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}% + \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}} +\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|% + \ifnum\countB>`9 \countB=0 \fi + \ifnum\countB<`0 + \ifnum0=\countC\else\makenote\fi + \ifx\first.\let\next=\maketoksdone\else + \let\next=\maketoks + \addtokens\toksB{\the\toksD} + \ifx\first,\addtokens\toksB{\space}\fi + \fi + \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks + \fi + \next +} +\def\makenote{\addtokens\toksB + {\noexpand\codelink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0} +\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} + +\def\codelink#1#2{ +\ifbook#1\else +\ifhint\HINTstartlink goto num #1 #1\HINTendlink +\else\ifpdf\pdflink{#1}{#2}% +\else#1% +\fi\fi\fi} + +% +% new destinations and links: by name +% + +\def\newdest#1{% used to make a new destination +%\message{New destination #1}% +\ifbook +\else\ifpdf + \pdfdest name {#1} fith%\message{Defining pdf label #1}% +\else\ifhint + \HINTdest name {#1}%\message{Defining HINT label #1}% +\fi\fi\fi} + +\def\newlink#1#2{% + \ifbook #2\else + \ifpdf + \pdfstartlink goto name {#1}\linkcolor#2\Black\pdfendlink + \else\ifhint + \HINTstartlink goto name {#1}#2\HINTendlink + \else + #2% + \fi\fi\fi +} + + +%SC.-\the\plaincount for plain sections +%SC.\thesection for regular sections, with subsections and letters for the appendix + +\def\tocref#1#2#3#4{% depth, title, page, label used in tocline + \ifbook#3\else + \ifpdf + \pdfstartlink goto name {SC.#4}\relax \linkcolor#3\Black\pdfendlink + \ifnum#1=0\pdfoutline goto name {SC.#4} {#2}\fi + \else\ifhint + \HINTstartlink goto name {SC.#4}\relax $\rightarrow$\HINTendlink + \HINToutline goto name {SC.#4} depth #1 {#2}% + \else + #3% + \fi\fi\fi +}% + +% +% Page references from the index +% + +% \index{keyword} -> \@wrindex{file}{keyword} writes the nectessary information +% makeindex produces the index and pages are enclosed in \hyperref{pagenumber} +% Problems: +% pagenumbers may be roman numerals in the frontmatter +% hyperpage has to cope with 6 different formats +% \hyperpage{50} a single page number +% \hyperpage{51, 52} two numbers +% \hyperpage{53--59} a page range +% \hyperpage{xi} a roman numeral +% \hyperpage{xi, xii} two numbers +% \hyperpage{xi--xx} a page range + + +% Writing the index file: in HINT replacing the page number by the index count +\newcount\indexcount +\def\theindexcount{\the\indexcount} + +\ifhint + \def\@wrindex#1#2{% file, keyword + \global\advance\indexcount by 1\indexdest + \immediate\write#1{\string + \indexentry{#2:hyperpage}{\the\indexcount}}\endgroup + \if@nobreak \ifvmode\@nobreak\fi\fi\@esphack} + \else + \def\@wrindex#1#2{% + \xdef\gtempa{\write#1{\string + \indexentry{#2:hyperpage}{\noexpand\thepageno}}}\endgroup\gtempa + \if@nobreak \ifvmode\@nobreak\fi\fi\@esphack} +\fi + + +% for HINT and PDF we used hyperrange and hypercomma to split the +% arguments into index/page numbers and then use pagelink +\ifbook + \def\hyperpage#1{#1}\else +\ifhint + \def\hyperpage#1{\hyperrange#1----+\relax} +\else\ifpdf + \def\hyperpage#1{\hyperrange#1----+\relax} +\else + \def\hyperpage#1{#1} +\fi\fi\fi + +%\def\indexlink#1{#1} + +\def\hyperrange#1--#2--#3+{% + \ifx\empty#2\empty% + \hypercomma#1, ,+% + \else\ifhint + \pagelnk{#1}--\pagelink{#2}{$\leftarrow$}% + \else + \pagelnk{#1}--\pagelnk{#2}% + \fi\fi} + +\def\hypercomma#1, #2,#3+{% + \ifx\empty#2\empty% + \pagelnk{#1}% + \else\ifhint% + \pagelink{#1}{$\longrightarrow$}% + \else + \pagelnk{#1}% +% I omit the second page number \ifpdf, \pagelnk{#2}\fi + \fi\fi +} + + +% +% Labels +% + +% section references from \secref use \sectionlink +% for plainsections, we display the label name because there +%is no section number. + +\def\sectionlink#1#2{% \message{Sectionlink #1 : #2}% + \ifbook#1\else + \ifpdf + \pdfstartlink goto name {SC.#2} \linkcolor#1\Black\pdfendlink + \else\ifhint + \HINTstartlink goto name {SC.#2}#1\HINTendlink + \else + #1% + \fi\fi\fi +} + + +% page references from \label and \pageref use \pagelink as before +\def\indexdest{\newdest{page.\the\indexcount}} +\def\pagelnk#1{% + \ifhint + \pagelink{#1}{$\rightarrow$}% + \else + \pagelink{#1}{#1}% + \fi +} +\def\pagelink#1#2{\newlink{page.#1}{#2}} +% For hint the destination is generated with each \index and \label +% Because of the roman numerals, for pdf files +% the pdf destination is generated in the header using \pagelabel + + +\ifbook\let\pagelabel=\relax\else +\ifpdf +\def\pagelabel{%\message{pagelabel=\thepageno} +\pdfdest name {page.\thepageno} fitv\relax} +\else +\let\pagelabel=\relax +\fi\fi + +% references to Figures, Tables, Enumerations +\def\figdest{\newdest{FI.\the\figcount}} +\def\figlink#1{\newlink{FI.#1}{#1}} +\def\tabdest{\newdest{TA.\the\tabcount}} +\def\tablink#1{\newlink{TA.#1}{#1}} +\def\enumdest{\newdest{EN.\the\enum}} +\def\enumlink#1{\newlink{EN.#1}{#1}} + +% +% References to the bibliography +% +\def\citedest#1{\newdest{CI.#1}} +\def\citelink#1{%\message{Citelink #1}% + \newlink{CI.#1}{#1}} + +\def\bblhook{%defined before reading the .bbl file + \def\biblabelprint##1{% + \citedest{##1}% + \noindent + \hbox to \biblabelwidth{% + \biblabelprecontents + \biblabelcontents{##1}% + \biblabelpostcontents + }% + \kern\biblabelextraspace + }% +} +\def\@onecitation#1\@@{%called for each citation + \if@notfirstcitation + \printbetweencitations + \fi + % + \expandafter \ifx \csname\@citelabel{#1}\endcsname \relax + \if@citewarning + \message{\@linenumber Undefined citation `#1'.}% + \fi + % Give it a dummy definition: + \expandafter\gdef\csname\@citelabel{#1}\endcsname{% + {\tt + \escapechar = -1 + \nobreak\hskip0pt + \expandafter\string\csname#1\endcsname + \nobreak\hskip0pt + }% + }% + \fi + % Now produce the text, whether it was undefined or not. + \citelink{\csname\@citelabel{#1}\endcsname}% + \@notfirstcitationtrue +}% +%% +%% Images +%% + +\ifbook +\def\includefig#1{\leavevmode\hbox{\immediate\pdfximage{image/#1.pdf}\pdfrefximage\pdflastximage}} +\else\ifpdf +\def\includefig#1{\leavevmode\hbox{\immediate\pdfximage{image/#1.pdf}\pdfrefximage\pdflastximage}} +\else\ifhint + \def\includefig#1{\image=image/#1.png\relax} +\else + \input epsf.tex + \def\includefig#1{\epsfbox{image/#1.eps}}% this is a \leavevmode\hbox{...} +\fi\fi\fi + +\ifhint\eject\fi% hitex will remove empty pages that were introduced by cwebmac +\makeatother diff --git a/Build/source/texk/web2c/hitexdir/doc/hitexman.hnt b/Build/source/texk/web2c/hitexdir/doc/hitexman.hnt new file mode 100644 index 00000000000..34a13f4ba8c Binary files /dev/null and b/Build/source/texk/web2c/hitexdir/doc/hitexman.hnt differ diff --git a/Build/source/texk/web2c/hitexdir/doc/hitexman.pdf b/Build/source/texk/web2c/hitexdir/doc/hitexman.pdf new file mode 100644 index 00000000000..2acd7fc9517 Binary files /dev/null and b/Build/source/texk/web2c/hitexdir/doc/hitexman.pdf differ diff --git a/Build/source/texk/web2c/hitexdir/doc/hitexman.tex b/Build/source/texk/web2c/hitexdir/doc/hitexman.tex new file mode 100644 index 00000000000..7758bca0baa --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/doc/hitexman.tex @@ -0,0 +1,819 @@ +% This file is part of HINT +% Copyright 2017-2022 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen +% +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the "Software"), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be +% included in all copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +% THE SOFTWARE. +% +% Except as contained in this notice, the name of the copyright holders shall +% not be used in advertising or otherwise to promote the sale, use or other +% dealings in this Software without prior written authorization from the +% copyright holders. + +\input cwebmac +\input btxmac.tex +\input hint.sty + +\makeindex +\maketoc + +\titletrue +%\pageno=-2 + +\def\setrevision$#1: #2 ${\gdef\lastrevision{#2}} +\setrevision$Revision: 2705 $ +\def\setdate$#1(#2) ${\gdef\lastdate{#2}} +\setdate$Date: 2022-03-04 16:48:46 +0100 (Fri, 04 Mar 2022) $ + + +\null + +\font\largetitlefont=cmssbx10 scaled\magstep4 +\font\Largetitlefont=cmssbx10 at 40pt +\font\hugetitlefont=cmssbx10 at 48pt +\font\smalltitlefontit=cmbxti10 scaled\magstep3 +\font\smalltitlefont=cmssbx10 scaled\magstep3 + +\hbox{} +\vskip 0pt plus 1fill +{ + \baselineskip=1cm\parindent=0pt + \largetitlefont\raggedright Hi\TeX\par + \vskip 10pt plus 0.1fill + \leftline{\smalltitlefont User Manual} + \vskip-3pt + \vskip 10pt plus 0.5fill + \hskip 0pt plus 2fill \it F\"ur Beatriz\hskip 0pt plus 0.5fill\hbox{} + \vskip 10pt plus 3fill + \leftline{\smalltitlefont Version 1.1 (Draft)} + \bigskip + \raggedright\baselineskip=12pt + \bf MARTIN RUCKERT \ \it Munich University of Applied Sciences\par + \bigskip +} +\eject + +\titletrue +\begingroup +\figrm +\parindent=0pt + +{\raggedright\advance\rightskip 3.5pc +The author has taken care in the preparation of this document, +but makes no expressed or implied warranty of any kind and assumes no +responsibility for errors or omissions. No liability is assumed for +incidental or consequential damages in connection with or arising out +of the use of the information or programs contained herein. +\bigskip +{\def\:{\discretionary{}{}{}} +Internet page {\tt http:\://hint.\:userweb.\:mwn.\:de/\:hint/hitex.html} +may contain current information, downloadable software, +and news.} + +\vfill +Copyright $\copyright$ 2022 by Martin Ruckert +\smallskip +All rights reserved. +\smallskip +This publication is protected by copyright, and permission must be +obtained prior to any prohibited reproduction, storage in +a~retrieval system, or transmission in any form or by any means, electronic, +mechanical, photocopying, recording, or likewise. +To obtain permission to use material from this work, please submit a written +request to Martin Ruckert, +Hochschule M\"unchen, +Fakult\"at f\"ur Informatik und Mathematik, +Lothstrasse 64, +80335 M\"unchen, +Germany. +\medskip +{\tt ruckert\:@cs.hm.edu} +\medskip +Revision: \lastrevision,\quad Date: \lastdate\par +} +\eject +\endgroup + +\frontmatter +\pageno=3% + +\tableofcontent + +\mainmatter + +\def\rs{\hskip 2pt plus 3pt minus 2pt\penalty0\relax} +\def\rule#1:#2.{\par{\hangindent32pt\hangafter1\parindent0pt\rightskip 0pt plus 60pt#1{\bf:}\quad% + \hskip 0pt plus 60pt\penalty-300\hskip 0pt plus -60pt#2{\bf.}\par}} +\def\sym#1{\rs$<${\it #1\/}$>$\rs} +\def\OR{\rs${}\vert{}$\rs} +\def\opt#1{\rs$[{}$#1${}]$\rs} +\def\ctl#1{{\tt\BS #1}} + +\section{Hi\TeX\ primitives} + +While currently Hi\TeX\ is the only \TeX\ engine that supports output in the \HINT\ file +format, this might not be so forever. To avoid unnecessary complications for +package writers, it is strongly suggested that all such \TeX\ engines implement +the same primitives according to the same specification. The following is the first +draft of this specification. All the primitives use {\tt HINT} as a prefix to +avoid name conflicts. The prefix {\tt HINT}, as opposed to e.g. {\tt HiTeX}, +was chosen to stress the idea that these primitives are specific for the +output format---not for the \TeX\ engine. + +Because this is the first specification that will reach a wider user base, +it is reasonable to expect changes to occur in the future. Therefore it is +recommended that these primitives should not be used directly in a +\TeX\ document; instead they should be encapsulated in suitable +macros so that the consequences of any change to the primitives will +be local to these macros. + +\subsection{Syntax Description} +In the following, we describe the syntax of primitive control sequences which were +added to \TeX. + +\itemize +\item We use a {\tt typewriter font}\index{typewriter font} +for text that occurs \index{verbatim}verbatim in the \TeX\ document. +\item We use \sym{italics} enclosed in pointed brackets to denote symbols\index{symbol+\sym{symbol}}. +\item We use rules\index{rule} to define the meaning of symbols. +A rule starts with the symbol +to be explained, followed by a colon ``{\bf :}'', and then the text that this symbol +stands for. A rule ends with a period ``{\bf .}''. +\item Optional\index{optional+\opt{optional}} parts of the rule's text +are enclosed in \opt{square brackets}. +\item Alternatives\index{alternative} are separated by a vertical bar ``\OR''\index{\OR}. +\item Some symbols refer to text that is defined as part of standard \TeX. These are explained here by an example: + +\medskip +\rule\sym{integer}: \index{integer+\sym{integer}} + an integer as in \ctl{penalty}\sym{integer}. +\rule\sym{normal dimension}:\index{normal dimension+\sym{normal dimension}} + a dimension as in \ctl{hrule} \.{width} \sym{normal dimension}. +\rule\sym{dimension}:\index{dimension+\sym{dimension}} + a dimension as in \ctl{vskip} \.{0pt} \.{plus} \sym{dimension}. +\rule\sym{name}:\index{dimension+\sym{dimension}} + a name as in \ctl{input} \sym{name}. +\rule\sym{vertical list}:\index{vertical list+\sym{vertical list}} + a token list with matching braces as in + \ctl{vbox}\.{\LB}\sym{vertical list}\.{\RB}. +\rule\sym{horizontal list}:\index{horizontal list+\sym{horizontal list}} + a token list with matching braces as in + \ctl{hbox}\.{\LB}\sym{horizontal list}\.{\RB}. +\rule\sym{general text}:\index{general text+\sym{general text}} + a token list with matching braces as in + \ctl{write}\.{\LB}\sym{general text}\.{\RB}. +\medskip +\enditemize + +\subsection{Version and Revision} +The control sequences \ctl{HINTversion}\index{HINTversion+\ctl{HINTversion}} +and \ctl{HINTsubversion}\index{HINTsubversion+\ctl{HINTsubversion}} are +used to determine the version and subversion numbers of the HINT output format +that is generated by Hi\TeX. It can be used as part of the output as +in \verbatim|\the\HINTversion|. +The most important use, however, is testing whether the current \TeX\ engine +will in fact produce \HINT\ output. +As an example the file {\tt ifhint.tex}\index{ifhint.tex+{\tt ifhint.tex}} +contains the following code: + + +\verbatim/ +\newif\ifhint +\expandafter\ifx\ctlname HINTversion\endcsname\relax + \hintfalse\else\hinttrue\fi/ + + +\subsection{Images} +The primitive \ctl{HINTimage}\index{HINTimage+\ctl{HINTimage}} +includes an image\index{image} in a document. +The syntax is as follows: + +\medskip +\ctl{HINTimage} \opt{\.{=}} \sym{name} +\opt{\sym{width}} \opt{\sym{height}} +\medskip + +The optional equal sign can be added to make the code look nicer. +The \sym{name} specifies the image file. +The width specification determines the width of the image. If omitted, +Hi\TeX\ tries to determine the image's width from the image file. +The same holds for the height specification. + +\medskip +\rule \sym{width}\index{width+\sym{width}}:\.{width} \sym{normal dimension}. +\rule \sym{height}\index{height+\sym{height}}:\.{height} \sym{normal dimension}. +\medskip + +Note that a \sym{normal dimension} that is computed from \ctl{hsize} +or \ctl{vsize} retains this dependency when processed by Hi\TeX. +This allows an image to adapt to the size of the viewing area. +Scaling in the \HINT\ viewer will, however, never change the +aspect ratio of an image. So it may become smaller or larger, +but it will never be distorted. +For this reason, Hi\TeX\ will inspect the image file to determine the +aspect ratio\index{aspect ratio} of the stored image. +The width and height values as given in the \TeX\ file serve +as the maximum values for the actual width and height. When rendering, +the image will become as large as possible within the given bounds. +If \TeX\ does not specify neither width nor height, the image file +must specify the absolute width and height of the image. +It is considered an error if valid settings for the image's width and height +can not be obtained. + +\subsection{Links, Labels, and Outlines} +A link\index{link} in a \HINT\ document refers to another location in the same document. +It can be used to navigate to that location. +A link is defined using the primitives +\ctl{HINTstartlink}\index{HINTstartlink+\ctl{HINTstartlink}} +and \ctl{HINTendlink}\index{HINTendlink+\ctl{HINTendlink}}. +Neither of them can be used in vertical mode. +The text between the start and the end of the link +constitutes the visible part of the link. Depending on the user interface, clicking +or tapping or otherwise activating the link (e.g. pronouncing) +will navigate to the destination of the link. +The user interface might provide a visual clue to make the user aware of the +available links but it also may choose to leave the visual clues to the author +of the document (e.g. using a special image or a special font). + +The syntax is +\ctl{HINTstartlink} \sym{destination} +and +\ctl{HINTendlink} +with + +\medskip +\rule \sym{destination}\index{destination+\sym{destination}}:\.{goto} \sym{label}. +\rule \sym{label}\index{label+\sym{label}}: + \.{name} \.{\LB}\sym{general text}\.{\RB} \OR\ \.{num} \sym{integer}. +\medskip + +As you can see, the link refers to its destination using a label +which is either a name or a number. +The destination can be defined by using the +\ctl{HINTdest}\index{HINTdest+\ctl{HINTdest}} primitive. +Forward and backward links are allowed; the definition of a label can either +precede or follow the use of the label. If at the end of the document a label +is undefined, a warning is given, and the label will reference the beginning of the +document. + +The syntax is +\ctl{HINTdest} \sym{label} \opt{\sym{placement}} +with + +\medskip +\rule\sym{placement}\index{placement+\sym{placement}}: +\.{top}\index{top+{\tt top}} \OR\ \.{bot}\index{bot+{\tt bot}}. +\medskip + +The optional placement argument specifies how to build the page +containing the destination location. \.{top} demands +a page starting with the destination location. This is useful +if the destination is for example the start of a section or chapter heading. +Similarly \.{bot} asks for a page that ends with the destination location. +The most common case is to omit the placement argument. In this case, the +viewer will build a ``good'' page that includes the given destination. +In case of a section heading, for example, it will most probably start the +page with the section heading because section headings are usually preceded +by a negative penalty that will convince the page builder that this is a good +place to break the page. But if the section heading is immediately preceded +by a chapter heading, the negative penalty found there will probably +persuade the page builder to start with the chapter heading instead. + +There is a special label that has the form +\.{name} \.{\LB}\.{HINT.home}\.{\RB}\index{HINT.home+{\tt HINT.home}}. +It is used to mark the ``home page''\index{home page} of the document. User interfaces +are encouraged to offer a button or keyboard shortcut to navigate to the +document location labeled this way. The page should be a convenient +starting point to explore the document. The typical place for this label +would be the documents table of content. + +The labels that identify destinations in a document can also be used +to define document outlines. A document outline\index{outline} is a document summary +given as a hierarchical list of headings where each of them +refers to a specific location in the document. + +The syntax is +\ctl{HINToutline}\index{HINToutline+\ctl{HINToutline}} +\sym{destination} \opt{\sym{depth}} \.{\LB}\sym{horizontal list}\.{\RB}. + +\medskip +\rule \sym{depth}\index{depth+\sym{depth}}: \.{depth} \sym{integer}. +\medskip + +The user interface can format the \sym{horizontal list} much like +a \ctl{hbox} would do and displays it to the user. When the user selects +this text, the document will be repositioned to show the destination location +in the same way as with a link. In order to support also simpler +user interfaces, the current \HINT\ backend also extracts the characters +(and spaces) from the horizontal list (in top-left to bottom-right order) +and makes this character string available to the user interface. + + +The order in which outline items are defined is important because +this is the order in which they will be presented to the reader of the +document. The optional depth argument allows to structure +the list of outline items as a hierarchy. Outline items with a higher depth value are considered to be sub-items of items earlier in the list with lower +depth values. If no depth value is given, the depth value is set to zero. +It is not necessary to define depth values strictly consecutive. + + +\subsection{Page Templates and Streams}\index{page template}\index{stream} + +To produce the final page, \TeX\ uses a special piece of program +called the output routine\index{output routine}. Because a \HINT\ +file is pure data, it can not contain output routines. Instead it +uses page templates to assemble pages from the main text, footnotes, +floating illustrations, and other material. I start here by +describing how \HINT's page templates work and the special syntax used +to specify them in a \TeX\ file that is about to be processed with +Hi\TeX. For those interested in how the design decision was made and +how page templates relate to \TeX's page building mechanism, a +separate section follows at the end. + +The syntax of a page template specification is: +\ctl{HINTsetpage}\index{HINTsetpage+\ctl{HINTsetpage}} +\sym{integer} \opt{\.{=}} \sym{name} +\opt{\sym{priority}} \opt{\sym{width}} \opt{\sym{height}} +\.{\LB}\sym{vertical list} \sym{stream definition list}\.{\RB} + + +The \sym{integer} specifies the page templates number in the range 1 +to 255. The number 0 is reserved for the build in page template of +the \HINT\ file format, which is used if no other page template has +been defined. The page template 0 can not be redefined. +The \sym{name} associates a name with the page template. The name can +be displayed by the \HINT\ viewer to help the user selecting a +suitable page template. + +After the name follows an optional priority; it is used to select the +``best page template'' if multiple templates are available. The +default value is~1. The build-in template has priority~0. + +\medskip +\rule\sym{priority}\index{priority+\sym{priority}}: {\tt priority} \sym{integer}. +\medskip + + +After that follows an optional width and height of the full page +including the margins. After subtracting \ctl{hsize} from the width +and \ctl{vsize} from the height, the remainder is used for the margins +around the displayed text. For example giving the width as +1.2\ctl{hsize} will leave 0.1\ctl{hsize} for the margins on both sides. +In this case the margins will grow together with the available width +of the display. If the width is computed by adding 20pt +to \ctl{hsize}, the margin will be 10pt on both sides. In this case +the margin will not grow with the size of the display, but it will +grow with the magnification factor. Of course both methods can be +used together. The default is \ctl{hsize} for the width and \ctl{vsize} +for the height so there are no margins. + +The following \sym{vertical list} defines the page itself. It should assign suitable values +to \ctl{topskip} and \ctl{maxdepth} because the values valid at the end of the vertical list +are stored in the page template and are used in the page building process. +The vertical list usually also specifies the insertion of content streams using a \sym{stream insert point}. + +\medskip +\rule\sym{stream insert point}\index{stream insert point+\sym{stream insert point}}: + \ctl{HINTstream} \sym{integer}. +\medskip + +Here the \sym{integer} must be in the range 0 to 254. The value 255 is invalid; +the value 0 indicates the main body of text (what \TeX's page builder would normally put into +box 255 before calling the output routine). +Otherwise, the \sym{integer} is TeX's insertion number, that is the number of \TeX's box +containing the insertions. As usual, this box is filled using \TeX's \ctl{insert} primitive. +So after plain \TeX\ has defined \ctl{footins}, +the footnotes for the current page can be inserted after the main body of text in the \sym{vertical list} +by saying \ctl{HINTstream}\.0 followed by \ctl{HINTstream}\ctl{footins}. +Of course you might want to have a footnote rule and a small skip to separate the +footnotes ---if there are any---from the main text. This can be achieved by a suitable +\sym{stream definition} in the \sym{stream definition list}. + +\medskip +\rule\sym{stream definition list}\index{stream definition list+\sym{stream definition list}}: + \OR\ \sym{stream definition list} \sym{stream definition}. +\rule\sym{stream definition}\index{stream definition+\sym{stream definition}}: + \ctl{HINTsetstream} \sym{integer} \opt{\.{=}} +\opt{{\tt preferred} \sym{integer}} +\opt{\.{next} \sym{integer}} +\opt{\.{ratio} \sym{integer}} \.{\LB}\sym{vertical list}\.{\RB}. +\medskip + + +The first \sym{integer} is the streams insertion number $i$, +and it must match the \sym{integer} +previously used in the \sym{stream insert point}. +Then follows the optional specification of a preferred stream with insertion number $p$, +a next stream with insertion number $n$, and a split ratio $r$. +If $r>0$, the contributions to stream $i$ are split between +stream $p$ and $n$ in the ratio $r/1000$ for $p$ and $1-r/1000$ for $n$ +before contributing streams $p$ and $r$ to the page. +Else if $p\ge0$ any insertion to stream $i$ is moved to stream $p$ as long as possible, +and if $n\ge0$ we move an insert to stream $n$ if there is ``no room left'' in $p$ nor in $i$. +How much ``room'' is available for the insertions is specified inside the vertical list +that follows. +Here \ctl{dimen}$i$ should be set to the maximum total height of the insertions in class $i$ per page. +\ctl{count}$i$ should be set to the magnification factor $f$, +such that inserting a box of height $h$ will contribute $h*f/1000$ to the main page; +and \ctl{skip}$i$ should be set to the extra space needed if an insertion in class $i$ is present. + +This extra space is usually taken up by material that is inserted before and after the insertions, +such as for example the footnote rule. This material can be defined by a +\sym{before list} and an \sym{after list}. + +\medskip\index{HINTbefore+\ctl{HINTbefore}}\index{HINTafter+\ctl{HINTafter}} +\rule \sym{before list}\index{before list+\sym{before list}}: + \ctl{HINTbefore} \opt{\.{=}} \.{\LB}\sym{vertical list}\.{\RB}. +\rule \sym{after list}\index{after list+\sym{after list}}: + \ctl{HINTafter} \opt{\.{=}} \.{\LB}\sym{vertical list}\.{\RB}. +\medskip + +If you are interested in the design decision that motivate the definitions that have +be given in this section, you should read section~\secref{build}. + +\section{Other Primitives} +When I started the \HINT\ project in 2017, +I tried to keep the project as small as possible to increase the +chances that I would be able to complete it. So one design decision +was to keep things simple---or to quote Albert Einstein: ``Make things +as simple as possible, but not simpler''. The other imperative was: +keep things out of the viewer if possible because I do not know +how much processing power or battery power is available. +As a consequence, I focused on Donald Knuth' original \TeX, +disregarding all later extensions like \eTeX\ or \LaTeX, and I +decided that the \TeX\ interpreter would not need to run in the +viewer. + +By now, the state of the \HINT\ project is far beyond of what +I had expected then, and the processing power of even low-cost +mobile devices is far better than expected especially when programming the +graphics card directly using OpenEGL. + +But the line breaking routine, which is running in the viewer, and the +HINT file format, which specifies all the parameters for the +line breaking algorithm, covers just the line breaking of +Donald Knuth's original \TeX. Therefore the viewer will +also do just that, and Hi\TeX\ can not produce files +doing more than that. Of course that might not be so +for ever. +Similarly, the decision to keep the TeX interpreter +out of the HINT viewer implies that \HINT\ files do +not contain token lists. This means that there are +no output routines and no marks. +To replace them, the \HINT\ file format includes +page templates. I have described the technical +means to specify page templates above and try to explain +the rationale behind it below, but \HINT's page templates +are at the time of this writing a largely untested area. + +Since I consider the support for \LaTeX\ to be crucial for +the success of the \HINT\ project, quite a few primitives +have been added to Hi\TeX\ that go beyond \TeX's original +specification. + +First, the primitives of \eTeX\ have been +added with the exception of those primitives that deal with +line breaking, with right to left reading, and with marks. +Here is a list of \eTeX\ primitives that are missing in Hi\TeX: +\itemize +\item\ctl{TeXXeTstate} (current reading direction) +\item\ctl{beginL}, \ctl{endL} (switching reading direction) +\item\ctl{beginR}, \ctl{endR} (switching reading direction) +\item\ctl{predisplaydirection} (reading direction) +\item\ctl{lastlinefit} (line breaking) +\item\ctl{marks} (multiple marks) +\item\ctl{botmarks}, \ctl{splitbotmarks} (multiple marks) +\item\ctl{firstmarks}, \ctl{splitfirstmarks} (multiple marks) +\item\ctl{topmarks} (multiple marks) +\enditemize + +Second, the primitives required to support +\LaTeX\ were added using Thierry Larondes implementation of \Prote. + +\itemize +\item\ctl{Proteversion}, \ctl{Proterevision} (version information) +\item\ctl{resettimer}, \ctl{elapsedtime} (timing information) +\item\ctl{creationdate}, \ctl{filemoddate}, \ctl{filesize}, + \ctl{filedump}, \ctl{mdfivesum} (file information) +\item\ctl{shellescape} (Currently only a dummy implementation.) +\item\ctl{setrandomseed}, \ctl{randomseed}, + \ctl{normaldeviate}, \ctl{uniformdeviate} (random numbers) +\item\ctl{expanddepth}, \ctl{expanded} (programming) +\item\ctl{ifincsname}, \ctl{ifprimitive} \ctl{primitive} (programming) +\item\ctl{savepos}, \ctl{lastxpos}, \ctl{lastypos}, \ctl{pageheight}, + \ctl{pagewidth} (Only dummy implementations since this information + is not available to Hi\TeX\ at runtime.) +\item\ctl{strcmp} (comparing strings) +\enditemize + + + +\section{Replacing \TeX's Page Builder}\label{build} + +\TeX\ uses an output\index{output routine} routine to finalize the page. +The output outline takes the material which the page builder had accumulated in {\tt box255} +and attaches headers, footers, and floating material +like figures, tables, and footnotes. The latter material is specified by insert nodes +while headers and footers are often constructed using mark nodes. +Running an output routine requires the full power of the \TeX\ engine and is not +part of the \HINT\ viewer. Therefore, \HINT\ replaces output routines by page templates\index{template}. +\TeX\ can use different output routines for different parts of a book---for example +the index might use a different output routine than the main body of text. + +\TeX\ uses insertions to describe floating content that is not necessarily displayed +where it is specified. Three examples may illustrate this: +\itemize +\item Footnotes\footnote*{Like this one.} are specified in the middle of the text but are displayed at the +bottom of the page. Several +footnotes\index{footnote} on the same page are collected and displayed together. The +page layout may specify a short rule to separate footnotes from the +main text, and if there are many short footnotes, it may use two columns +to display them. In extreme cases, the page layout may demand a long +footnote to be split and continued on the next page. + +\item Illustrations\index{illustration} may be displayed exactly where specified if there is enough +room on the page, but may move to the top of the page, the bottom of the page, +the top of next page, or a separate page at the end of the chapter. + +\item Margin notes\index{margin note} are displayed in the margin on the same page starting at the top +of the margin. +\enditemize + +\HINT\ uses page templates and content streams to achieve similar effects. +But before I describe the page building\index{page building} mechanisms of \HINT, +let me summarize \TeX's page builder. + +\subsection{\TeX's page building mechanism} +\TeX's page builder ignores leading glue\index{glue}, kern\index{kern}, +and penalty\index{penalty} nodes until the first +box\index{box node} or rule\index{rule node} node is encountered; +whatsit\index{whatsit node} nodes do not really contribute anything to +a page; mark\index{mark node} nodes are recorded for later use. Once +the first box, rule, or insert\index{insert node} arrives, \TeX\ makes +copies of all parameters that influence the page building process and +uses these copies. These parameters are the \.{page\_goal} and the +\.{page\_max\_depth}. Further, the variables {\tt page\_total}, {\tt page\_shrink}, +{\tt page\_stretch}, {\tt page\_depth}, and {\tt in\-sert\_pe\-nal\-ties} are +initialized to zero. The top skip\index{top skip} adjustment is made +when the first box or rule arrives---possibly after an insert. +Now the page builder accumulates material: normal material goes +into {\tt box255}\index{box 255} and will change {\tt page\_total}, {\tt page\_shrink}, +{\tt page\_stretch}, and {\tt page\_depth}. The latter is adjusted so that +is does not exceed {\tt page\_max\_depth}. + +The handling of inserts\index{insert node} is more complex. +\TeX\ creates an insert class using {\tt newinsert}. This reserves a number $i$ +and four registers: {\tt box\hair$i$} for the inserted material, +{\tt count\hair$i$} for the magnification factor $f$, {\tt dimen\hair$i$} +for the maximum size per page $d$, and {\tt skip\hair$i$} for the +extra space needed on a page if there are any insertions of class $i$. + +For example plain \TeX\ allocates $n=254$ for footnotes\index{footnote} and sets +{\tt count254} to~$1000$, {\tt dimen254} to 8in, and {\tt skip254} to {\tt \BS big\-skip\-amount}. + +An insertion node will specify the insertion class $i$, some vertical material, +its natural height plus depth $x$, a {\tt split\-\_top\-\_skip}, a {\tt split\-\_max\_depth}, +and a {\tt floa\-ting\-\_pe\-nal\-ty}. + + +Now assume that an insert node with subtype 254 arrives at the page builder. +If this is the first such insert, \TeX\ will decrease the {\tt page\_goal} +by the width of {\tt skip254} and adds its stretchability and shrinkability +to the total stretchability and shrinkability of the page. Later, +the output routine will add some space and the footnote rule to fill just that +much space and add just that much shrinkability and stretchability to the page. +Then \TeX\ will normally add the vertical material in the insert node to +{\tt box254} and decrease the {\tt page\_goal} by $x\times f/1000$. + +Special processing is required if \TeX\ detects that there is not enough space on +the current page to accommodate the complete insertion. +If already a previous insert did not fit on the page, simply the {\tt floating\_penalty} +as given in the insert node is added to the total {\tt insert\_penalties}. +Otherwise \TeX\ will test that the total natural height plus depth of {\tt box254} +including $x$ does not exceed the maximum size $d$ and that the +${\tt page\_total} + {\tt page\_depth} + x\times f/1000 - {\tt page\_shrink} \le {\tt page\_goal}$. +If one of these tests fails, the current insertion +is split in such a way as to make the size of the remaining insertions just pass the tests +just stated. + +Whenever a glue node, or penalty node, or a kern node that is followed by glue arrives +at the page builder, it rates the current position as a possible end of the page based on +the shrinkability of the page and the difference between {\tt page\_total} and {\tt page\_goal}. +As the page fills, the page breaks tend to become better and better until the +page starts to get overfull and the page breaks get worse and worse until +they reach the point where they become {\tt awful\_bad}. At that point, +the page builder returns to the best page break found so far and fires up the +output routine. + + +\subsection{\HINT\ Page Templates} +Let's look at the problems that show up when implementing a replacement for \TeX's +page building mechanism. + +\enumerate +\item +An insertion node can not always specify its height $x$ because insertions may contain paragraphs that need +to be broken in lines and the height of a paragraph depends in some non obvious way on +its width. + +\item +Before the viewer can compute the height $x$, it needs to know the width of the insertion. Just imagine +displaying footnotes in two columns or setting notes in the margin. Knowing the width, it +can pack the vertical material and derive its height and depth. + +\item +\TeX's plain format provides an insert macro that checks whether there is still space +on the current page, and if so, it creates a contribution to the main text body, otherwise it +creates a {\tt topinsert}. Such a decision needs to be postponed to the \HINT\ viewer. + +\item +\HINT\ has no output routines that would specify something like the space and the rule preceding the footnote. + +\item +\TeX's output routines have the ability to inspect the content of the boxes, +split them, and distribute the content over the page. +For example, the output routine for an index set in two column format might +expect a box containing index entries up to a height of $2\times\.{vsize}$. +It will split this box in the middle and display the top part in the left +column and the bottom part in the right column. With this approach, the +last page will show two partly filled columns of about equal size. + +\item +\HINT\ has no mark nodes that could be used to create page headers or footers. +Marks, like output routines, contain token lists and need the full \TeX\ interpreter +for processing them. Hence, \HINT\ does not support mark nodes. +\endenumerate + + +Instead of output routines, \HINT\ uses page templates. +Page templates are basically vertical boxes with \sym{stream insert points} marking the +positions where the content of the box registers, filled by the page builder, +should appear. +To output the page, the viewer traverses the page template, +replaces the placeholders by the appropriate box content, and +sets the glue. + +It is only natural to treat the page's main body, +inserts, and marks using the same mechanism. We call this +mechanism a content stream\index{stream}. +Content streams are identified by a stream number in the range 0 to 254; +the number 255 is used to indicate an invalid stream number. +The stream number 0 is reserved for the main content stream; it is always defined. + +\medskip +{\small \advance \leftskip by 30pt \advance \rightskip by 30pt +It is planed to implement a replacement for \TeX's mark nodes using +different types of streams: +\itemize +\item normal streams correspond to \TeX's inserts and accumulate content on the page, +\item first\index{first stream} streams correspond to \TeX's first marks and will contain only the first insertion of the page, +\item last\index{last stream} streams correspond to \TeX's bottom marks and will contain only the last insertion of the page, and +\item top\index{top stream} streams correspond to \TeX's top marks. Top streams are not yet implemented. +\enditemize +\medskip +} + +Nodes from the content section are considered contributions to stream~0 except +for insert nodes which will specify the stream number explicitly. +If the stream is not defined or is not used in the current page template, its content is simply ignored. + +The page builder needs a mechanism to redirect contributions from one content +stream to another content stream based on the availability of space. +Hence a \HINT\ content stream can optionally specify a preferred stream number, +where content should go if there is still space available, a next stream number, +where content should go if the present stream has no more space available, and +a split ratio if the content is to be split between these two streams before +filling in the template. + +Various stream parameters govern the treatment of contributions to the stream +and the page building process. + +\itemize +\item The magnification factor $f$: Inserting a box of height $h$ to this stream will contribute $h\times f/1000$ +to the height of the page under construction. For example, a stream +that uses a two column format will have an $f$ value of 500; a stream +that specifies notes that will be displayed in the page margin will +have an $f$ value of zero. + +\item The height $h$: The extended dimension $h$ gives the maximum height this +stream is allowed to occupy on the current page. +To continue the previous example, a stream that will be split into two columns +will have $h=2\cdot\.{vsize}$ , and a stream that specifies +notes that will be displayed in the page margin will have +$h=1\cdot\.{vsize}$. You can restrict the amount of space occupied by +footnotes to the bottom quarter by setting the corresponding $h$ value +to $h=0.25\cdot\.{vsize}$. + +\item The depth $d$: The dimension $d$ gives the maximum depth this +stream is allowed to have after formatting. + +\item The width $w$: The extended dimension $w$ gives the width of this stream +when formatting its content. For example margin notes +should have the width of the margin less some surrounding space. + +\item The ``before'' list $b$: If there are any contributions to this +stream on the current page, the material in list $b$ +is inserted {\it before\/} the material from the stream itself. For +example, the short line that separates the footnotes from the main +page will go, together with some surrounding space, into the list~$b$. + +\item The top skip glue $g$: This glue is inserted between the material +from list $b$ and the first box of the stream, reduced +by the height of the first box. Hence it specifies the distance between +the material in $b$ and the first baseline of the stream content. + +\item The ``after'' list $a$: The list $a$ is treated like list $b$ but +its material is placed {\it after\/} the material from the stream itself. + +\item The ``preferred'' stream number $p$: If $p\ne 255$, it is the number of +the {\it preferred\/} stream. If stream $p$ has still +enough room to accommodate the current contribution, move the +contribution to stream $p$, otherwise keep it. For example, you can +move an illustration to the main content stream, provided there is +still enough space for it on the current page, by setting $p=0$. + +\item The ``next'' stream number $n$: If $n\ne 255$, it is the number of the +{\it next\/} stream. If a contribution can not be +accommodated in stream $p$ nor in the current stream, treat it as an +insertion to stream $n$. For example, you can move contributions to +the next column after the first column is full, or move illustrations +to a separate page at the end of the chapter. + +\item The split ratio\index{split ratio} $r$: If $r$ is positive, both $p$ and $n$ must +be valid stream numbers and contents is not immediately moved to stream $p$ or $n$ as described before. +Instead the content is kept in the stream itself until the current page is complete. +Then, before inserting the streams into the page template, the content of +this stream is formatted as a vertical box, the vertical box is +split into a top fraction and a bottom fraction in the ratio $r/1000$ +for the top and $(1000-r)/1000$ for the bottom, and finally the top +fraction is moved to stream $p$ and the bottom fraction to stream +$n$. You can use this feature for example to implement footnotes +arranged in two columns of about equal size. By collecting all the +footnotes in one stream and then splitting the footnotes with $r=500$ +before placing them on the page into a right and left column. Even +three or more columns can be implemented by cascades of streams using +this mechanism. +\enditemize + +\HINT\ allows multiple page templates but Hi\TeX\ currently does not implement +restricting them to individual page ranges and the viewer selects +the page template with the highest priority. To support different output media, the page +templates are named and a suitable user interface may offer the user a selection +of possible page layouts. In this way, the page layout remains in the hands of the +book designer, and the user has still the opportunity to pick a layout that best fits +the display device. + +The build-in page template with number 0 is always defined and has priority 0. +It will display just the main content stream. It puts a small margin +of $\.{hsize}/8 -4.5\hbox{pt}$ all around it. +Given a letter size page, 8.5 inch wide, this formula yields a margin of 1 inch, +matching \TeX's plain format. The margin will be positive as long as +the page is wider than $1/2$ inch. For narrower pages, there will be no +margin at all. In general, the \HINT\ viewer will never set {\tt hsize} larger +than the width of the page and {\tt vsize} larger than its height. + +%8.5 in should give 1 inch margin 2/17 +%612pt should give 72pt margin +%72pt = 612/8-4.5pt +%This would give a positive margin starting at 36pt or 1/2 inch + + +%\appendix + +%\plainsection{References} + +%{\baselineskip=11pt +%\def\bfblrm{\small\rm}% +%\def\bblem{\small\it}% +%\bibliography{../hint} +%\bibliographystyle{plain} +%} + +\plainsection{Index} +{ +\def\_{{\tt \UL}} % underline in a string +\catcode`\_=\active \let_=\_ % underline is a letter +\input hitexman.ind +} + +\write\cont{} % ensure that the contents file isn't empty +% \write\cont{\catcode `\noexpand\@=12\relax} % \makeatother +\closeout\cont% the contents information has been fully gathered + +\inx +\fin +\end diff --git a/Build/source/texk/web2c/hitexdir/hiformat.hnt b/Build/source/texk/web2c/hitexdir/hiformat.hnt deleted file mode 100644 index b445a94576f..00000000000 Binary files a/Build/source/texk/web2c/hitexdir/hiformat.hnt and /dev/null differ diff --git a/Build/source/texk/web2c/hitexdir/hiformat.pdf b/Build/source/texk/web2c/hitexdir/hiformat.pdf deleted file mode 100644 index 41ed4630fc7..00000000000 Binary files a/Build/source/texk/web2c/hitexdir/hiformat.pdf and /dev/null differ diff --git a/Build/source/texk/web2c/hitexdir/hint.ist b/Build/source/texk/web2c/hitexdir/hint.ist deleted file mode 100644 index 5510d18027e..00000000000 --- a/Build/source/texk/web2c/hitexdir/hint.ist +++ /dev/null @@ -1,16 +0,0 @@ - -% quote '+' - -actual '+' -encap ':' -preamble "\\beginindex\n" -postamble "\\endindex\n" -headings_flag 1 -heading_prefix "\\indexheading " -symhead_positive "{Symbols}" -numhead_positive "{Numbers}" - -delim_0 "\\quad " -delim_1 "\\quad " -delim_2 "\\quad " - diff --git a/Build/source/texk/web2c/hitexdir/hint.sty b/Build/source/texk/web2c/hitexdir/hint.sty deleted file mode 100644 index 1db02723dcc..00000000000 --- a/Build/source/texk/web2c/hitexdir/hint.sty +++ /dev/null @@ -1,1447 +0,0 @@ -\input idxmac.tex -\let\displayverbatimfont=\tt -\input verbatim.tex - -%% -%% special treatment for @ -%% - -\def\makeatletter{\catcode`\@=11\relax} -\def\makeatother{\catcode`\@=12\relax} -\makeatletter - -%% -%% Conditionals -%% - -\newif\ifhint -\newif\ifbook -\newif\ifpdf - -% HINT -\ifx\HINTversion\undefined - \hintfalse -\else - \hinttrue -\fi - -% PDF -\ifx\pdfliteral\undefined % postscript und ps2pdf - \pdffalse -\else - \pdftrue -\fi - -% Book -\ifx\book\undefined - \ifhint\bookfalse - \else\ifpdf\bookfalse % This might change - \else\bookfalse - \fi\fi -\else -\booktrue -\hintfalse -\pdffalse -\fi - -\message{Book: \ifbook true \else false \fi} -\message{PDF: \ifpdf true \else false \fi} -\message{HINT: \ifhint true \else false \fi} - -%% -%% Additional fonts -%% - -\font\tenss=cmss10 % used for the HINT name -\font\tenssbx=cmssbx10 % used for the bold HINT name -\font\largess=cmss12 scaled\magstep1 % used for large HINT name -\font\largessbx=cmssbx10 scaled\magstep2 % used for large bold HINT name -\font\manual=manfnt % font used for the METAFONT logo, etc. -\let\sf\tenss -\def\bf{\let\sf\tenssbx\fam\bffam\tenbf} - - -%% Large Font for sections -%\font\largebf=cmb14 scaled\magstep0 -%\font\largebf=cmb12 scaled\magstep1 -\font\largebf=cmbx12 scaled\magstep1 -%\font\largebf=cmbx8 scaled\magstep3 -%\font\largeit=cmti14 scaled\magstep0 -\font\largeit=cmti12 scaled\magstep1 -%\font\largett=cmtt14 scaled\magstep0 -\font\largett=cmtt12 scaled\magstep1 -%\font\largerm=cmr14 scaled\magstep0 -\font\largerm=cmr12 scaled\magstep1 -% for mathbolditalic -%\font\tenmib=cmmib10 scaled\magstep0 -\font\tenmib=cmmib10 scaled\magstep0 -\font\largemib=cmmib10 scaled\magstep1 - -%% Small Fonts for Figure and Table descriptions -\font\figbf=cmbx9 scaled\magstep0 -\font\figit=cmti9 scaled\magstep0 -\font\figmit=cmmi9 scaled\magstep0 -\font\figsy=cmsy9 scaled\magstep0 -\font\figtt=cmtt9 scaled\magstep0 -\font\figrm=cmr9 scaled\magstep0 -% for mathbolditalic -\font\figmib=cmmib9 scaled\magstep0 - -\def\largebold{\let\bf\largebf\let\sf\largessbx\bf} - -\def\large{\def\rm{\fam0\largerm}\let\bf\largebold\let\it\largeit\let\tt\largett\let\mib\largemib\let\sf\largess% -\textfont0=\largerm\textfont1=\largeit -\setbox\strutbox=\hbox{\vrule height9.5pt depth5.0pt width\z@}\rm} - -\def\small{\def\rm{\fam0\figrm}\let\bf\figbf\let\it\figit\let\tt\figtt\let\mib\figmib% -\textfont0=\figrm\textfont1=\figmit\textfont2=\figsy% -\setbox\strutbox=\hbox{\vrule height9.0pt depth4.5pt width\z@}\rm} - -\let\tiny\eightrm -\let\mib\tenmib - - -%% -%% Logos -%% - -%\def\Pascal/{{\mc P\kern-.05emascal\spacefactor1000}} -\def\CEE{{\mc C\spacefactor1000}} -\def\Pascal{\leavevmode\hbox{\mc P\kern-.05emascal}} -\def\PDF{\leavevmode\hbox{\mc PDF}} -\def\WEB{\leavevmode\hbox{\tt WEB\spacefactor1000}} -\def\GNU{\leavevmode\hbox{\mc GNU}} -\def\Prote{{\tenrm P\kern-0.1em R\kern-0.15em\raise.11ex\hbox{o}% - \kern-0.22em T\kern-0.05em E}} -\def\eTeX{$\varepsilon$-\TeX} -\def\HINT{\leavevmode\hbox{\sf HINT\spacefactor1000}} -\def\cweb{\leavevmode\hbox{\tt cweb}} -\def\web2w{\leavevmode\hbox{\tt web2w}} -\def\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc A}\kern-.15em\TeX}% -\def\MF{{\manual META}\-{\manual FONT}}% -\def\TL{\TeX~Live} -\def\kpse{\leavevmode\hbox{\tt kpathsearch\spacefactor1000}} -\def\TUB{{\sl TUGboat\/}} -\def\TUG{\TeX\ \UG} -\def\tug{\acro{TUG}} -\def\UG{Users Group} -\ifacro -\sanitizecommand{\TeX}{TeX} -\sanitizecommand{\eTeX}{eTeX} -\sanitizecommand{\Prote}{PRoTE} -\fi -%% -%% Special controlsequences -%% - -\def\abs#1{\left|#1\right|} -\def\<#1>{$\langle\,$#1$\,\rangle$} -\def\registered{{\ooalign{\hfil\raise.07ex\hbox{\sevenrm R}\hfil\crcr\Orb}}} -\def\hair{\kern.05em\relax} % teeny tiny space -\def\center#1{\bigskip\line{\hfil#1\hfil}\bigbreak} -\chardef\VB=`\| % vertical bar character in a string -\def\^{\ifmmode\mathchar"222 \else\char`^ \fi}%from webmac.tex: pointer or hat -\ifhint -\def\_{{\tt\UL}} % make underline an ordinary character for better searching -\fi - -% Bibtex needs this -\def\mbox#1{\leavevmode\hbox{#1}} - -% URLs -{\gdef\urldot{.}\catcode`.=13 - \gdef\urlslash{/}\catcode`/=13 - \gdef\urlspecials{\def.{\urldot\penalty 0}\def/{\urlslash\penalty 0}} -} -\def\url{\bgroup\hskip 1cm plus 5cm\penalty -100\hskip -1cm plus -5cm\tt - \catcode`_=12\catcode`\~=12\catcode`.=13\catcode`/=13\urlspecials} -\def\endurl{\egroup} - - -% for the index -\def\see#1#2{\hskip 0pt plus 100pt\penalty 0\hskip 0 pt plus -100pt{\it see\/} #1} - -% typewriter type for strings -\def\.#1{\leavevmode\hbox{\tt - \let\\=\BS % backslash in a string - \let\{=\LB % left brace in a string - \let\}=\RB % right brace in a string - \let\~=\TL % tilde in a string - \let\ =\SP % space in a string - \let\_=\UL % underline in a string - \let\&=\AM % ampersand in a string - \let\^=\CF % circumflex in a string - \let\|=\VB % vertical bar in a string - #1\kern.05em}} - -%{\rm\gdef\strutdepth{\dp\strutbox}} - - -%% -%% Environments -%% - -% Quotations (form the standard) -\def\beginquote{\bgroup\narrower\noindent\sl} -\def\endquote{\egroup} - -% Enumerate -\newcount\enum -%other styles use \medskip instead of \par -\def\enumerate{\par\bgroup\advance\leftskip by\parindent\enum=0% - \def\item{\advance\enum by 1\par\enumdest\smallskip\noindent\hbox to 0pt{\hss\the\enum.~}\ignorespaces}} -\def\endenumerate{\medskip\egroup\noindent} - -%Itemize -\def\itemize{\par\bgroup\advance\leftskip by\parindent\relax% - \def\item{\par\smallskip\noindent\llap{$\bullet$\enspace}\ignorespaces}} -\def\enditemize{\medskip\egroup\noindent} - -%Float -\long\def\float#1{\midinsert\parindent 0pt\relax#1\endinsert} -%\def\float#1{\midinsert -%\hsize\pagewidth -%\parindent 0pt\vbox{\hbox{\kern-\marginwidth\vbox{#1}}}\endinsert} - -%% -%% Redefining cwebmac.tex macros -%% - -%defining how to output terminals and nonterminals -\def\ts#1{\ifmmode\hbox{\sc #1}\else{\sc #1}\fi}% terminal symbol -\def\nts#1{{\sl #1\/}}% nonterminal symbol -% redefining the box around verbatim code -\def\vb#1{\hbox{\strut\.{#1}}} -% regular expressions and actions -\newbox\rebox -\def\re#1{\leavevmode\setbox\rebox\hbox{#1\hfill}\ifdim\wd\rebox<7em\wd\rebox=7em\fi\box\rebox\quad} -\def\ac{\global\ind=10\hangindent=\ind em\relax} -\def\eac{\global\ind=3\hangindent=\ind em\relax} -% yskip is usually a smallskip = 3pt pus 1pt minus 1pt -% I give it some extra stretchability -%\def\yskip{\vskip 3pt plus 3pt minus 1pt} -\let\yskip\smallbreak - -% redefine \5 for an optional break without the 2.5em reduced indentation -%\def\5{\hskip 0pt plus 2.5em\penalty-1\hskip 0pt plus -2.5em\kern0.5em\ignorespaces}% optional break -%redefine \5 to give some shrinkability -% form hitex and hint style: -%\def\5{\hfil\penalty-1\hskip 0pt minus 6pt\hfilneg\kern2.5em\copy\bakk\ignorespaces}% optional break -\def\5{\hfil\penalty10\hfilneg\hskip 0pt minus 6pt\kern2.5em\copy\bakk\ignorespaces}% optional break -\def\J{}% dont show @& in the tex output -\def\Y{\par\yskip} - -% start sections -\def\stsec{\rightskip=0pt % get out of C mode (cf. \B) - \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 % -} - -% the box for the points to operator "->" in C -\setbox\MGbox=\hbox{$\rightarrow$} - -% how to display NULL -\def\NULL{\tt NULL} - -%other styles make this a \par -\def\note#1#2.{} -%\Y\noindent{\hfill% -% \baselineskip10pt\tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}} - -%other styles make this minus 10pt -\def\B{\rightskip=0pt plus 100pt minus 0pt % go into C mode - \sfcode`;=3000 - \pretolerance 10000 - \hyphenpenalty 1000 % so strings can be broken (discretionary \ is inserted) - \exhyphenpenalty 1000 - \codedest - \global\ind=2 \1\ \unskip - \vadjust{\vtop to 0pt{\vss\hbox to \hsize{\hfill\tiny(\secstar)}\kern 0pt}}} - -% formating of C comments -\def\C#1{\5\hfill$/\ast\,${\cmntfont #1}$\,\ast/$} - -% section begin -\def\M#1{\MN{#1}\ifon\stsec\smallskip -%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -\noindent\ignorespaces}% beginning of section - -\def\N#1#2#3.{\MN{#1}\ifon\stsec\smallskip -%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -\noindent{\bf#3\quad}\ignorespaces}% beginning of section - -\def\MN#1{\smallskip - {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% - \gdef\thecode{#1}% common code for \M, \N - \ontrue} - -% Used in section text -\def\U{\rightnote{Used in}} % xref for use of a section -\def\Us{\rightnote{Used in}} % xref for uses of a section -% replacing \note in \U and \Us by \rightnote -%\def\rightnote#1#2.{\vskip-\baselineskip\vtop to 0pt{\vss\hbox to \hsize{\hfill -% \tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}\kern 0pt}} -%\def\rightnote#1#2.{\vskip-\baselineskip\hbox to \hsize{\hfill -% \tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}} -%\def\rightnote#1#2.{\penalty1000\discretionary{}{\hbox{}}{\kern 2em}\penalty1000\hfill -% \hbox{\tiny#1~\ifacro{\pdfnote#2.}\else#2\fi.}} -\def\rightnote#1#2.{% - \penalty1000\discretionary{}{\hbox{}}{\kern 4em}\penalty1000\hfill - \hskip -4em plus 4em\hbox{\tiny #1~\codenote#2.}.} - -\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name - \XX$\langle\,${\let\I=\ne#2\kern.5em\coderef{#1}$\,\rangle$\XX}} - - -% how to display hex numbers -\def\hex{\hbox{$^{\scriptstyle\#}$\tt\aftergroup}} % CWEB style - -\def\(#1){} % this is used to make section names sort themselves better - - -%% -%% Dimensions to achive the desired layout -%% - - -% the other variables are defined in cwebmac.tex -\newdimen\headheight -\newdimen\footheight -\newdimen\leftmargin -\newdimen\rightmargin -\newdimen\topmargin -\newdimen\bottommargin -\newdimen\marginwidth - -\parskip 0pt plus .8pt - -\leftmargin=22mm -\rightmargin=22mm -\topmargin=15mm -\bottommargin=27mm -\marginwidth=0pt % we do not have notes in the margin - -\headheight=12pt % Text in Head -\advance\headheight+13pt % Abstand 1pt, Linie 0.47pt und Abstand zum Text 11.53pt -\footheight=0pt % Text in Footer - -\pagewidth=6.69in -\advance\pagewidth-\leftmargin % left margin/offset -\advance\pagewidth-\rightmargin % left margin/offset - -% 6.69in = 169.926 -% - 2*22mm = 125.926mm -% -% 9.61in = 244.094 -% - 15mm -27 mm = 202.094 -% (12+13)pt = 8.786 mm -% -8.786 = 193.308 mm - -\fullpageheight=9.61in -\advance\fullpageheight-\topmargin% topmargin -\advance\fullpageheight-\bottommargin% bottommargin - -\pageheight=\fullpageheight -\advance\pageheight-\headheight -\advance\pageheight-\footheight - -\def\setpage{\hsize\pagewidth\advance\hsize-\marginwidth\vsize\pageheight} % use after changing page size - -\setpage - -% setting the papersize for postscript and pdf - -\ifbook - %\overfullrule=0pt - \pdfpageheight=9.61in - \pdfpagewidth=6.69in - \pdfhorigin=\leftmargin - \pdfvorigin=\topmargin - \pdfcompresslevel=9 - \pdfdecimaldigits=4 - \pdfpkresolution=1200 - \pdfimageresolution=1200 -\else\ifpdf - \pdfpageheight=9.61in - \pdfpagewidth=6.69in - \pdfhorigin=\leftmargin - \pdfvorigin=\topmargin - \pdfcompresslevel=9 - \pdfdecimaldigits=4 - \pdfpkresolution=1200 - \pdfimageresolution=1200 -\else - \special{papersize=6.69in,9.61in}% postscript und ps2pdf -\fi\fi - - - -%% -%% Page layout -%% - -\long\def\leftmark#1#2{#1} -\long\def\subsectionmark#1#2{#2} -\long\def\rightmark#1#2{\if0#1\else\expandafter\subsectionmark\botmark\fi} - -\def\lheader{\mainfont\strut -\thepageno\hfill\expandafter\leftmark\firstmark} % top line on left-hand pages - -\def\rheader{\mainfont\strut -\expandafter\rightmark\firstmark\hfill\thepageno} % top line on right-hand pages - -\let\page=\pagebody -%\raggedbottom -\normalbottom -%\def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes -\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi - \shipout\vbox{ - \vbox to\fullpageheight{\pagelabel - \iftitle\global\titlefalse - \else\hbox{\vbox to \headheight{ - \hbox to \pagewidth{\ifodd\pageno #3\else#2\fi} - \vskip 1pt\relax - \nointerlineskip - \hrule height .47pt -% \hbox{\hrule}%fill\psfig{file=image/topline.eps}\hfil}% - \vfil}}% - \fi - \nointerlineskip - \hbox{\kern\marginwidth\vbox to \pageheight{#1}}}} % parameter #1 is the page itself - \global\advance\pageno by1} - -\def\nomarginoutput#1#2#3{% - \ifodd\pageno\hoffset=\pageshift\fi - \shipout\vbox to\fullpageheight{\pagelabel\nointerlineskip - \iftitle\global\titlefalse - \hbox{\vbox to \headheight{\vfil}} - \else - \hbox{\vbox to \headheight{\nointerlineskip - \hbox to \pagewidth{\ifodd\pageno#3\else#2\fi}% - \vskip 1 pt - \nointerlineskip - \hrule height .47pt -% \hbox{\psfig{silent=,bbllx=0pt,bblly=0pt,bburx=368pt,bbury=2pt,file=image/topline.eps}\hfil}% - \vfil}}% - \fi\nointerlineskip #1 % parameter #1 is the page itself -% \vss -% \hbox to \pagewidth{\ifodd\pageno\else#2\fi}% -% \nointerlineskip -% \hbox{\psfig{file=image/topline.eps}\hfil}% -}% -\global\advance\pageno by1} - -%% switch to global nomargin -\let\normaloutput\nomarginoutput -\def\sectionbox#1{\hbox{#1}} -\marginwidth=0mm -\setpage - - -%% -%% Frontmatter and mainmatter -%% -\pageno=1 -\def\thepageno{\romannumeral\pageno} -\def\frontmatter{\pageno=4\def\thepageno{\romannumeral\pageno}} -\def\mainmatter{ -\mark{{\sectionname}{\subsectionname}} -%\message{Mark {\sectionname}{\subsectionname}} -\vfil\break\ifodd\pageno\pageno=1\else\pageno=0\fi -\def\thepageno{\the\pageno}% -\sectioncount=0 -\mark{{0}{0}}% -%\hbox{Mark empty empty}% -\gdef\sectionname{} -\gdef\subsectionname{} -\gdef\codetitle{} -\gdef\subcodetitle{} -} - - - - -%% -%% Sections -%% - -\newcount\sectioncount -\sectioncount=0 -\newcount\subsectioncount -\subsectioncount=0 -\newcount\subsubsectioncount -\subsubsectioncount=0 - -\newskip\abovesecskip -\newskip\belowsecskip -\newskip\abovesubsecskip -\newskip\belowsubsecskip - -%\abovesecskip= 6ex plus 1ex minus .2ex %space above the section -%\belowsecskip=3.7ex plus .2ex% space after section -\abovesecskip= 0.15\vsize plus 5ex minus 1ex %space above the section -\belowsecskip=10pt plus 2pt% space after section -\abovesubsecskip=9pt plus 4pt minus 2pt%space above the section -\belowsubsecskip=3pt plus 1pt minus 0.5pt% space after section - - -\newif\ifappendix -\appendixfalse - -\mark{{0}{0}}\vskip 0pt minus 100pt -%\hbox{Mark empty empty}% -\def\thesection{\the\sectioncount} -\def\topsection{\the\sectioncount} - -%\def\sectionbox#1{\hskip-\marginwidth\hbox to \marginwidth{#1\hfil}} - -\def\heading#1#2{% -\def\secno{{\noindent\large\bf\strut{#1}#2}}% -\par\ifhmode\unskip\fi% end paragraph and remove vertical space -\penalty-500 -\vskip 0pt plus 72pt%allow some empty space at the bottom -\penalty-500 -\vskip 0pt plus -72pt% room for stetching and a page break -\hbox{}\vskip\abovesecskip% space above the section -%%\titletrue % omits page header for section -%\hbox{Mark null null}% -\mark{{0}{0}}% -\secno% The section title -\mark{{\sectionname}{\sectionname}}% -%\message{Mark heading {\sectionname}{\subsectionname}} -\nobreak\vskip\belowsecskip% space after section -\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -\ignorespaces} - - - -\newcount\plaincount -\def\plainsection#1{% -\mark{{\sectionname}{\subsectionname}}% -%\message{Mark plain {\sectionname}{\subsectionname}} -\subsubsectioncount=0\subsectioncount=0% -\advance\plaincount by 1\relax -\def\thesection{} -\sectionpage% -\gdef\sectionname{#1}% -\gdef\subsectionname{#1}% -\gdef\codetitle{#1}% -\gdef\subcodetitle{#1}% -\tocsection{0}{}{#1} -\heading{}{#1}% -} - - -\gdef\sectionname{} -\gdef\subsectionname{} -\gdef\codetitle{}% -\gdef\subcodetitle{} - -\def\sectionpage{% -\vfil\break -\ifodd\pageno\else -\hbox{}% -\titletrue -\fi -\vfil\break -} - - -\def\section#1{% -\mark{{\sectionname}{\subsectionname}}% -%\message{Mark section {\sectionname}{\subsectionname}} -\subsubsectioncount=0\subsectioncount=0% -\advance\sectioncount by 1%updating counts -\let\thesection\topsection -\sectionpage% -\gdef\sectionname{\topsection\quad#1}% -\gdef\subsectionname{\thesection\quad#1}% -\gdef\codetitle{#1}% -\gdef\subcodetitle{#1}% -\ifnum\sectioncount=1\ifappendix\tocsection{0}{}{Appendix}\heading{}{Appendix}\fi\fi -\tocsection{0}{\thesection}{#1}% -\heading{\thesection~}{#1}% -} - - -\def\subsection#1{% -\subsubsectioncount=0\advance\subsectioncount by 1%updating counts -\def\thesection{\topsection.\the\subsectioncount} -\def\secno{{\noindent\bf\strut\sectionbox{\thesection~}#1}}% -\par\ifhmode\unskip\fi% end paragraph and remove vertical space -\tocsection{1}{\thesection}{#1}% -\penalty-200 -\vskip 0pt plus 36pt% allow some empty space at the bottom -\penalty-200 -\vskip 0pt plus -36pt% room for stetching and a page break -\gdef\subsectionname{\thesection\quad#1}% -\mark{{\sectionname}{\subsectionname}}% -%\message{Mark subsection {\sectionname}{\subsectionname}} -\vskip\abovesubsecskip% space above the subsection -\secno% The subsection title -\gdef\subcodetitle{#1}% -%\mark{{\sectionname}{\subsectionname}}% -%\hbox{Mark {\sectionname}{\subsectionname}}% -\nobreak\vskip\belowsubsecskip% space after subsection -\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -\ignorespaces} - - -\def\subsubsection#1{% -%\mark{{\sectionname}{\subsectionname}}% -%\hbox{Mark {\sectionname}{\subsectionname}}% - \advance\subsubsectioncount by 1%updating counts -\def\thesection{\topsection.\the\subsectioncount.\the\subsubsectioncount} -\def\secno{{\noindent\it\strut\sectionbox{\thesection~}#1}}% -\par\ifhmode\unskip\fi% end paragraph and remove vertical space -\tocsection{2}{\thesection}{#1}% -\penalty-200 -\vskip 0pt plus 36pt% allow some empty space at the bottom -\penalty-200 -\vskip 0pt plus -36pt% room for stetching and a page break -\vskip\abovesubsecskip% space above the subsection -\secno% The subsubsection title -\nobreak\vskip\belowsubsecskip% space after subsection -%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -%\noindent -\ignorespaces} - -%% -%% Appendix -%% - -\def\Alphanum#1{% - \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or - K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or - Y\or Z\else\number#1\fi} - -\def\appendix{% -\mark{{\sectionname}{\subsectionname}}% -%\message{Mark appendix {\sectionname}{\subsectionname}} -\sectioncount=0 -\subsectioncount=0 -\gdef\thesection{\Alphanum\sectioncount}% -\gdef\topsection{\Alphanum\sectioncount}% -\appendixtrue -} - -%% -%% Crossreference of Identifiers and Sections -%% -\iftrue %% No Crossreference of identifiers - \def\inx{\def\lr{L}} % this tells whether the left or right column is next -\else -\def\inx{% - \hsize=\pagewidth - \def\page{\box255 } \normalbottom - \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi - \global\setbox\sbox=\page \global\pagesavedtrue} - \pagesavedfalse - \plainsection{Crossreference of Identifiers}% we are beginning the index - \mark{{0}{0}}% -%\hbox{Mark empty empty}% - \eject % eject the page-so-far and predecessors - \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box - \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height - \hsize=.5\pagewidth \advance\hsize by -10pt - % column width for the index (20pt between cols) - \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines - \def\lr{L} % this tells whether the left or right column is next - \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R} - \else\nomarginoutput{\vbox to\pageheight{\box\sbox\vss - \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader - \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse - \mark{{Crossreference of Identifiers}{Crossreference of Identifiers}}% - \fi} - \parfillskip 0pt plus 1fil - \let\topsecno=\nullsec - \message{Crossreference of Identifiers:} - \parskip 0pt plus .5pt - \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em - \ifbook##2\else\ifpdf\pdfnote##2.\else##2\fi\fi.} % index entry - \def\[##1]{$\underline{##1}$} % underlined index item - \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar - \hyphenpenalty 10000 \parindent0pt - \small - \readindex -} -\fi - -\def\fin{% - \if L\lr\mark{{}{}}\fi - \vfill\eject % complete the current column. - \mark{{}{}} - \if R\lr\null\vfill\eject\fi % if necessarry add a right column - \setpage - \def\page{\box255 } \normalbottom - \output={\nomarginoutput\page\lheader\rheader} -} -\ifbook -\let\crosssections=\relax -\else -\def\crosssections{ - \plainsection{Crossreference of Code}% this is done when we are ending the index - \parindent 0pt - \parfillskip 0pt plus 1fil - \let\topsecno=\nullsec - \message{Crossreference of Code:} - \def\note##1##2.{\hfil\penalty-1\hfilneg\quad{\tiny##1~\ifbook##2\else - \ifpdf{\pdfnote##2.}\else - \ifhint\codenote##2.\else##2.\fi\fi\fi}} - \def\Q{\note{Cited in section}} % crossref for mention of a section - \def\Qs{\note{Cited in sections}} % crossref for mentions of a section - \def\U{\note{Used in}} % crossref for use of a section - \def\Us{\note{Used in}} % crossref for uses of a section - \def\I{\par\hangindent 2em}\let\*=* - \def\X##1:##2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name - \XX$\langle\,${\let\I=\ne##2}$\,\rangle$\XX\quad{\tiny Defined in~\codenote##1.}} - \readsections -} -\fi - - - -%% -%% Table of Content -%% - -% we separate the identification of a section used in links -%from the identification on paper, because plain sections dont -%have the latter. -\newcount\toccount -\toccount=0 - -\def\tocsection#1#2#3{% depth sectionnumber sectiontitle -\global\advance\toccount by 1% -\newdest{SC.\the\toccount}% -\ifhint - \immediate\write\cont{\noexpand\ZZ {#1}{#2}{#3}% write to contents file - {\noexpand\thepageno}{\the\toccount}} -\else -\edef\next{\write\cont{\noexpand\ZZ {#1}{#2}{#3}% write to contents file - {\noexpand\thepageno}{\the\toccount}}}\next % \tocline{depth}{sec}{title}{page}{toccount} -\fi -} - -\output{ - \ifhint - \shipout\box255\relax% otherwise I loose open, write, or close commands - \else - \setbox0=\page % the first page is garbage - \fi -% \openout\cont=\contentsfile -% \write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter - \global\output{\normaloutput\page\lheader\rheader}} - - -\newbox\tocbox -\def\maketoc{% - \typeout{Reading table of contents} - \setbox\tocbox\vbox{% - \let\ZZ=\tocline - \ifbook\else\ifpdf\startpdf\fi\fi - \readcontents\relax - } - \typeout{Writing \contentsfile} - \immediate\openout\cont=\contentsfile\relax - \immediate\write\cont{\catcode `\noexpand\@=11\relax} -} - -\def\tableofcontent{\plainsection{Contents}\ifhint\HINTdest name {HINT.home}\fi -\unvbox\tocbox -} - - -\def\tocline#1#2#3#4#5{% depth sectionnumber sectiontitle page toccount -\ifnum#1=0 \smallskip\vskip 0pt plus 12pt\penalty -100\vskip 0pt plus -12pt\fi -\noindent -\line{% -\ifnum#1=0% - \hbox to 2em{\bf#2\hfill}{\bf#3~}\hfill - \hbox to 2em{\hss\bf\tocref{#1}{#3}{#4}{#5}}% -\else \ifnum#1=1% - \kern 2em\hbox to 3em{\rm#2\hfill}{\rm#3~}\leaders\hbox to .5em{.\hfil}\hfill - \hbox to 2em{\hss\tocref{#1}{#3}{#4}{#5}}% -\else - \kern 2em\hbox to 5em{\rm#2\hfill}{\it#3~}\leaders\hbox to .5em{.\hfil}\hfill - \hbox to 2em{\hss\tocref{#1}{#3}{#4}{#5}}\fi\fi -}} - - - -%% -%% Figures and Tables -%% - -\def\fig#1{\global\advance\figcount by 1% -\ifvmode\noindent\fi -\def\captype{Fig}% -\capskip=1em% -\vbox{\nointerlineskip\figdest -\hbox{\noindent#1\hskip -2pt\hskip 0pt plus 2pt minus 2pt}% -\medskip -\rlap{\small\unhbox\capbox}% -}} - -\def\tab#1{% -\ifvmode\noindent\fi -\def\captype{Tab}% -\capskip=0pt% -\vbox{#1\medskip\rlap{\small\unhbox\capbox}}} - -\def\table#1#2{\global\advance\tabcount by 1% -\ifvmode\noindent\fi -\def\captype{Tab}% -\capskip=0pt% -\vbox{\offinterlineskip\tabdest - \halign{\large\strut - \vrule##&&\quad\hfil##\hfil\quad\vrule\cr - \noalign{\hrule}#2\noalign{\hrule}}% - \medskip - \tabcaption{#1}% - \rlap{\small\unhbox\capbox}% - }% -} - -\def\captype{} -\newdimen\capskip -\capskip=1em -\newbox\capbox -\setbox\capbox\hbox{} -\newcount\figcount -\figcount=0 -\newcount\tabcount -\tabcount=0 - -\def\nextfigcaption#1{\small\strut\it\hskip\capskip\figindex{\captype}{\the\figcount}{#1}\captype.~\the\figcount:} - -\def\caption#1{\global\setbox\capbox\hbox{\nextfigcaption{#1} #1}} - -\def\nexttabcaption#1{\small\strut\it\hskip\capskip\tabindex{\captype}{\the\tabcount}{#1}\captype.~\the\tabcount:} -\def\tabcaption#1{\global\setbox\capbox\hbox{\nexttabcaption{#1} #1}} - - -%\long\def\leftfig#1#2#3{% -%\ifvmode\noindent\fi -%\def\captype{Fig}% -%\capskip=1em% -%\vbox{% -% \tabskip=0pt\halign to \hsize{% -% \vtop{\vskip 0pt\parskip=0pt\hsize=62.5mm\relax -% ##}\tabskip=5mm plus 2pt minus 2pt& -% \vtop{\vskip 0pt\parskip=0pt\hsize=62.5mm\relax##}\tabskip=0pt\cr -% #1&\capskip=0pt\nextfigcaption{#2} #3\cr}\medbreak}} - -\long\def\leftright#1#2#3#4{% -\ifvmode\noindent\else\par\noindent\fi -\vbox{\nointerlineskip - \advance\hsize by -\leftskip\advance\hsize by -\rightskip% - \leftskip=0pt\rightskip=0pt% - \hbox to \hsize{\strut - \raise\ht\strutbox - \vtop{\vskip 0pt\parskip=0pt\hsize=#1\hsize\advance\hsize by -2.5mm\relax - \noindent\strut\ignorespaces#3\vfill}\hfil - \raise\ht\strutbox - \vtop{\vskip 0pt\parskip=0pt\hsize=#2\hsize\advance\hsize by -2.5mm\relax - \noindent\strut\ignorespaces#4\vfill}}}} - - -\long\def\leftfig#1#2#3{% -\def\captype{Fig}% -\capskip=0pt% -\leftright{0.5}{0.5}{#1\kern -2pt\hskip 2pt plus 2pt minus 2pt}{\nextfigcaption{#2}\strut #3}} - - -\def\subindex#1{% - \par\ifhmode\unskip\fi% end paragraph and remove vertical space - \vskip\abovesubsecskip% space above the subsection - \vskip 0pt plus 72pt% allow some empty space at the bottom - \penalty-200\vskip 0pt plus -72pt % room for stetching and a page break - \noindent{\bf\strut#1}% - \nobreak\vskip\belowsubsecskip% space after subsection - \everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph - \ignorespaces -} - -\newwrite\@figfile -\newwrite\@tabfile - -\def\makefigindex{% - \immediate\openout\@figfile=\jobname.fig\relax - \def\figindex{\@bsphack\begingroup\@sanitize\@wrfigindex\@figfile}% - \immediate\openout\@tabfile=\jobname.tab\relax - \def\tabindex{\@bsphack\begingroup\@sanitize\@wrfigindex\@tabfile}% - \typeout{Writing index files \jobname.fig \jobname.tab} -} - -\newdimen\iboxsize -\def\thefigindex{% - - \immediate\closeout\@figfile\relax - \immediate\closeout\@tabfile\relax - %\small\baselineskip=11pt - \plainsection{List of Figures and Tables} - \makeatletter - \iboxsize=3.7em\relax - \subindex{Figures} - \def\indexentry##1##2##3##4{% captype, fig/tab count, caption, page - \noindent - \line{\hbox to \iboxsize{% - \rm##1.~##2:\hfil}{\rm ##3}\ \leaders\hbox to .5em{.\hfil}% - \hfill\hbox to 1.4em{\hss - \ifbook##4\else - \ifpdf - \pagelnk{##4}% - \else\ifhint\figlink{##2} - \else##4\fi\fi\fi - }}\par - }% - \input\jobname.fig\relax - \iboxsize=3.9em\relax - \subindex{Tables} - \def\indexentry##1##2##3##4{% captype, fig/tab count, caption, page - \noindent - \line{\hbox to \iboxsize{% - \rm##1.~##2:\hfil}{\rm ##3}\ \leaders\hbox to .5em{.\hfil}% - \hfill\hbox to 1.4em{\hss - \ifbook##4\else - \ifpdf - \pagelnk{##4}% - \else\ifhint\tablink{##2} - \else##4\fi\fi\fi - }}\par - }% - \input\jobname.tab\relax - \makefigindex -} - - -\def\@wrfigindex#1#2#3#4{% file, captype, fig/tab count, caption - \xdef\gtempa{\write#1{\string\indexentry{#2}{#3}{#4}{\noexpand\thepageno}}}\endgroup\gtempa - \if@nobreak\ifvmode\@nobreak\fi\fi\@esphack} - -%% -%% Format Definitions -%% - -%\newbox\codebox -\newwrite\@getfile -\newwrite\@putfile -\newwrite\@redfile -\newwrite\@wrtfile - -\def\makecode{% - \immediate\openout\@getfile=\jobname.get\relax - \immediate\openout\@putfile=\jobname.put\relax - \immediate\openout\@redfile=\jobname.red\relax - \immediate\openout\@wrtfile=\jobname.wrt\relax - \typeout{Writing index files \jobname.get \jobname.put \jobname.red \jobname.wrt} -} - -\def\thecodeindex{% - \immediate\closeout\@getfile\relax - \immediate\closeout\@putfile\relax - \immediate\closeout\@redfile\relax - \immediate\closeout\@wrtfile\relax - \def\indexentry##1##2##3##4{% codecount, depth, pagenumber, section - \ifnum##2=0 \smallskip\vskip 0pt plus 12pt\penalty -100\vskip 0pt plus -12pt\fi - \noindent - \line{% - \ifnum##2=0##4\hfill - \else\qquad\rm##4\ \leaders\hbox to .5em{.\hfil}\hfill - \hbox to 1.4em{\hss\pagelnk{##3}} - \fi - }\par - }% - \section{Format Definitions} - \makeatletter - \subsection{Reading the Long Format}\label{codeindex} - \input\jobname.red.srt\relax - \subsection{Writing the Long Format} - \input\jobname.wrt.srt\relax - \subsection{Reading the Short Format} - \input\jobname.get.srt\relax - \subsection{Writing the Short Format} - \input\jobname.put.srt\relax -} - - -\newcount\codecount -\codecount=0 - -\ifhint -\def\@wrcodeindex#1#2#3#4{% file, depth, pagenumber, [sub]sectionname - \global\advance\indexcount by 1\indexdest - \xdef\gtempa{\write#1{\string\indexentry{#3}{#2}{\the\indexcount}{#4}}}\endgroup\gtempa\@esphack -} -\else -\def\@wrcodeindex#1#2#3#4{% file, depth, pagenumber, [sub]sectionname - \xdef\gtempa{\write#1{\string\indexentry{#3}{#2}{\noexpand\thepageno}{#4}}}\endgroup\gtempa\@esphack -} -\fi - -\def\getindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@getfile}% -\def\putindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@putfile}% -\def\redindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@redfile}% -\def\wrtindex{\@bsphack\begingroup\@sanitize\@wrcodeindex\@wrtfile}% - - -\def\codelabel#1#2#3{ - \getindex{#1}{#2}{#3}% - \putindex{#1}{#2}{#3}% - \redindex{#1}{#2}{#3}% - \wrtindex{#1}{#2}{#3}} -\def\getsymbol{$\cdots\Longrightarrow$} -\def\putsymbol{$\Longrightarrow\cdots$} -\def\redsymbol{$-{}-{}-{}\Longrightarrow$} -\def\wrtsymbol{$\Longrightarrow{}-{}-{}-$} -\def\getcode{\codesection{\getsymbol}{Reading the short format}\getindex{1}{\the\codecount}{\subcodetitle}} -\def\putcode{\codesection{\putsymbol}{Writing the short format}\putindex{1}{\the\codecount}{\subcodetitle}} -\def\writecode{\codesection{\wrtsymbol}{Writing the long format}\wrtindex{1}{\the\codecount}{\subcodetitle}} -\def\readcode{\codesection{\redsymbol}{Reading the long format}\redindex{1}{\the\codecount}{\subcodetitle}} -\newdimen\coderule -\def\codesection#1#2{% - \par\ifhmode\unskip\fi% end paragraph and remove vertical space - \penalty-200 - \vskip 0pt plus 72pt% allow some empty space at the bottom - \penalty-200 - \vskip 0pt plus -72pt% room for stetching and a page break -\vskip\abovesubsecskip% space above the subsection -%\line{\setbox0=\hbox{#1}% -%\coderule=\hsize\advance\coderule by -\wd0\advance\coderule by -2em% -%$\vcenter{\hrule width \coderule}$\hss\box0} -\line{{\it #2\/}:\hfill#1} -\nobreak\vskip\belowsubsecskip\nobreak% space after subsection -%\everypar{{\setbox0=\lastbox}\everypar{}}% no indentation in the next paragraph -%\noindent -\ignorespaces} - -\def\hascode{\global\advance\codecount by 1% -\codelabel{0}{\the\codecount}{\codetitle}}% - - -%% -%% Makeindex and the Index -%% - -\newwrite\@indexfile - -% new jobname for index file -\def\makeindex{ - \immediate\openout\@indexfile=\jobname.inx% - \def\index{\@bsphack\begingroup\@sanitize\@wrindex\@indexfile}% - \typeout{Writing index file \jobname.inx }% -} - -\def\@idxitem{\par\hangindent 40pt} - -\newif\ifnextindex -\nextindexfalse - -\def\beginindex{% -\ifhint\relax\else - \def\page{\box255} \normalbottom - \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi - \global\setbox\sbox=\page \global\pagesavedtrue} - \pagesavedfalse \eject % eject the page-so-far and predecessors - \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box - \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height - \hsize=.5\pagewidth \advance\hsize by -10pt - % column width for the index (20pt between cols) - \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines - \def\lr{L} % this tells whether the left or right column is next - \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R} - \else\nomarginoutput{\vbox to\pageheight{\box\sbox\vss - \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader - \global\nextindextrue - \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi} -\fi -\message{Index:} -\mark{{0}{0}} -\noindent\par -\begingroup - \rightskip 0pt plus 12pt - \parskip 0pt plus .5pt - \hyphenpenalty 10000 \parindent0pt - \small\baselineskip=11pt -\def\item{\par\hangindent 40pt\relax\ifnextindex\mark{{Index}{Index}}\fi}% -\def\subitem{\par\hangindent 40pt\hskip 20pt\relax}% -\def\subsubitem{\par\hangindent 40pt\hskip 30pt\relax}% -\def\indexspace{\par\vskip 12pt plus 6pt minus 4pt\vskip 12pt\goodbreak\vskip -12pt\relax}% -\def\indexheading##1{{\tenbf ##1}\nobreak\vskip 3pt\relax} -} -\def\endindex{% -\endgroup - \vfill\eject % complete the current column. -\ifhint\relax\else - \if R\lr\null\vfill\eject\fi % if necessarry add a right column -\fi -} - - -%% -%% Label page, section, toccount, figure, table, code, enum -%% -\newcount\cdcount -\cdcount=0 - -\newdimen\labelskip -\def\label#1{% writes \labeldef{name}{{page}{section}{toccount}{figure}{table}{code}{enum}} to aux - \ifhint - \global\advance\indexcount by 1\indexdest - \begingroup\@readauxfile - \edef\next{\@writeaux{\string\labeldef{#1}{{\the\indexcount}% - {\thesection}{\the\toccount}{\the\figcount}{\the\tabcount}{\the\cdcount}{\the\enum}}}\endgroup}% - \else - \begingroup\@readauxfile - \edef\next{\@writeaux{\string\labeldef{#1}{{\noexpand\thepageno}% - {\thesection}{\the\toccount}{\the\figcount}{\the\tabcount}{\the\cdcount}{\the\enum}}}\endgroup}% - \fi - \ifvmode %make \removelastskip work after \label - \labelskip=\lastskip - \vskip-\labelskip - \next - \vskip\labelskip - \else - \next - \fi -} - - -\def\m@kelabel#1{label@#1}% this makes the controlseqence from the name - -\def\labeldef#1#2{% #1 is name #2 is page section subsection figure table code -\expandafter\gdef\csname\m@kelabel{#1}\endcsname{#2}}% - -\def\@setref#1#2#3{% - \ifx#1\relax - \message{Undefined reference: #3} - \else - \expandafter#2#1% - \fi} - -\def\@iofvii#1#2#3#4#5#6#7{#1} -\def\@iiofvii#1#2#3#4#5#6#7{#2} -\def\@iiiofvii#1#2#3#4#5#6#7{#3} -\def\@ivofvii#1#2#3#4#5#6#7{#4} -\def\@vofvii#1#2#3#4#5#6#7{#5} -\def\@viofvii#1#2#3#4#5#6#7{#6} -\def\@viiofvii#1#2#3#4#5#6#7{#7} - - -\def\pageref#1{\@readauxfile - \pagelnk{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iofvii{#1}}} -\def\secref#1{\@readauxfile - \sectionlink - {\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iiofvii{#1}}% - {\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@iiiofvii{#1}}% -} -\def\figref#1{\@readauxfile -\figlink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@ivofvii{#1}}} -\def\tabref#1{\@readauxfile -\tablink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@vofvii{#1}}} -\def\cdref#1{\@readauxfile -\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@viofvii{#1}} -\def\enumref#1{\@readauxfile -\enumlink{\expandafter\@setref\csname\m@kelabel{#1}\endcsname\@viiofvii{#1}}} - -%% -%% Links and Destinations -%% - -\ifbook - \def\pdflinkcolor{0 0 0} % the RGB values for hyperlink color - \def\linkcolor{\Black} - \def\pdflink#1#2{#1} - \def\pdfnote#1.{#1} - \message{No PDF Links} -\else - \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color - \def\linkcolor{\Blue} - \message{PDF Links are blue} -\fi - -\def\@esphack{\relax\ifhmode\spacefactor\@savsf - {}\ifdim \@savsk >\z@ \ignorespaces - \fi \fi} - -% -% Code destinations: by number -% - -%The number is set be \M and \N and stored as \secno -%The destination is set in \B where we go into C mode -\def\codedest{% -\ifbook\else -\ifhint\HINTdest num \thecode top\relax -\else\ifpdf\pdfdest num \thecode fith\relax -\else\relax -\fi\fi\fi -} -\def\coderef#1{% used in \X -\ifbook${}_{#1}$\else -\ifhint\HINTstartlink goto num #1 \hbox{${}_{#1}$}\HINTendlink -\else\ifpdf{\eightrm\pdfnote#1.} -\else${}_{#1}$\fi\fi\fi -} - -\def\codenote#1.{% replaces \pdfnote - \setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA} -% define the following like for pdf -\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}% - \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={} - \toksC={}\let\space\empty}\makenote}\maketoks}} -\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} -\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}% - \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}} -\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|% - \ifnum\countB>`9 \countB=0 \fi - \ifnum\countB<`0 - \ifnum0=\countC\else\makenote\fi - \ifx\first.\let\next=\maketoksdone\else - \let\next=\maketoks - \addtokens\toksB{\the\toksD} - \ifx\first,\addtokens\toksB{\space}\fi - \fi - \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks - \fi - \next -} -\def\makenote{\addtokens\toksB - {\noexpand\codelink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0} -\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} - -\def\codelink#1#2{ -\ifbook#1\else -\ifhint\HINTstartlink goto num #1 #1\HINTendlink -\else\ifpdf\pdflink{#1}{#2}% -\else#1% -\fi\fi\fi} - -% -% new destinations and links: by name -% - -\def\newdest#1{% used to make a new destination -%\message{New destination #1}% -\ifbook -\else\ifpdf - \pdfdest name {#1} fith%\message{Defining pdf label #1}% -\else\ifhint - \HINTdest name {#1}%\message{Defining HINT label #1}% -\fi\fi\fi} - -\def\newlink#1#2{% - \ifbook #2\else - \ifpdf - \pdfstartlink goto name {#1}\linkcolor#2\Black\pdfendlink - \else\ifhint - \HINTstartlink goto name {#1}#2\HINTendlink - \else - #2% - \fi\fi\fi -} - - -%SC.-\the\plaincount for plain sections -%SC.\thesection for regular sections, with subsections and letters for the appendix - -\def\tocref#1#2#3#4{% depth, title, page, label used in tocline - \ifbook#3\else - \ifpdf - \pdfstartlink goto name {SC.#4}\relax \linkcolor#3\Black\pdfendlink - \ifnum#1=0\pdfoutline goto name {SC.#4} {#2}\fi - \else\ifhint - \HINTstartlink goto name {SC.#4}\relax $\rightarrow$\HINTendlink - \HINToutline goto name {SC.#4} depth #1 {#2}% - \else - #3% - \fi\fi\fi -}% - -% -% Page references from the index -% - -% \index{keyword} -> \@wrindex{file}{keyword} writes the nectessary information -% makeindex produces the index and pages are enclosed in \hyperref{pagenumber} -% Problems: -% pagenumbers may be roman numerals in the frontmatter -% hyperpage has to cope with 6 different formats -% \hyperpage{50} a single page number -% \hyperpage{51, 52} two numbers -% \hyperpage{53--59} a page range -% \hyperpage{xi} a roman numeral -% \hyperpage{xi, xii} two numbers -% \hyperpage{xi--xx} a page range - - -% Writing the index file: in HINT replacing the page number by the index count -\newcount\indexcount -\def\theindexcount{\the\indexcount} - -\ifhint - \def\@wrindex#1#2{% file, keyword - \global\advance\indexcount by 1\indexdest - \immediate\write#1{\string - \indexentry{#2:hyperpage}{\the\indexcount}}\endgroup - \if@nobreak \ifvmode\@nobreak\fi\fi\@esphack} - \else - \def\@wrindex#1#2{% - \xdef\gtempa{\write#1{\string - \indexentry{#2:hyperpage}{\noexpand\thepageno}}}\endgroup\gtempa - \if@nobreak \ifvmode\@nobreak\fi\fi\@esphack} -\fi - - -% for HINT and PDF we used hyperrange and hypercomma to split the -% arguments into index/page numbers and then use pagelink -\ifbook - \def\hyperpage#1{#1}\else -\ifhint - \def\hyperpage#1{\hyperrange#1----+\relax} -\else\ifpdf - \def\hyperpage#1{\hyperrange#1----+\relax} -\else - \def\hyperpage#1{#1} -\fi\fi\fi - -%\def\indexlink#1{#1} - -\def\hyperrange#1--#2--#3+{% - \ifx\empty#2\empty% - \hypercomma#1, ,+% - \else\ifhint - \pagelnk{#1}--\pagelink{#2}{$\leftarrow$}% - \else - \pagelnk{#1}--\pagelnk{#2}% - \fi\fi} - -\def\hypercomma#1, #2,#3+{% - \ifx\empty#2\empty% - \pagelnk{#1}% - \else\ifhint% - \pagelink{#1}{$\longrightarrow$}% - \else - \pagelnk{#1}% -% I omit the second page number \ifpdf, \pagelnk{#2}\fi - \fi\fi -} - - -% -% Labels -% - -% section references from \secref use \sectionlink -% for plainsections, we display the label name because there -%is no section number. - -\def\sectionlink#1#2{% \message{Sectionlink #1 : #2}% - \ifbook#1\else - \ifpdf - \pdfstartlink goto name {SC.#2} \linkcolor#1\Black\pdfendlink - \else\ifhint - \HINTstartlink goto name {SC.#2}#1\HINTendlink - \else - #1% - \fi\fi\fi -} - - -% page references from \label and \pageref use \pagelink as before -\def\indexdest{\newdest{page.\the\indexcount}} -\def\pagelnk#1{% - \ifhint - \pagelink{#1}{$\rightarrow$}% - \else - \pagelink{#1}{#1}% - \fi -} -\def\pagelink#1#2{\newlink{page.#1}{#2}} -% For hint the destination is generated with each \index and \label -% Because of the roman numerals, for pdf files -% the pdf destination is generated in the header using \pagelabel - - -\ifbook\let\pagelabel=\relax\else -\ifpdf -\def\pagelabel{%\message{pagelabel=\thepageno} -\pdfdest name {page.\thepageno} fitv\relax} -\else -\let\pagelabel=\relax -\fi\fi - -% references to Figures, Tables, Enumerations -\def\figdest{\newdest{FI.\the\figcount}} -\def\figlink#1{\newlink{FI.#1}{#1}} -\def\tabdest{\newdest{TA.\the\tabcount}} -\def\tablink#1{\newlink{TA.#1}{#1}} -\def\enumdest{\newdest{EN.\the\enum}} -\def\enumlink#1{\newlink{EN.#1}{#1}} - -% -% References to the bibliography -% -\def\citedest#1{\newdest{CI.#1}} -\def\citelink#1{%\message{Citelink #1}% - \newlink{CI.#1}{#1}} - -\def\bblhook{%defined before reading the .bbl file - \def\biblabelprint##1{% - \citedest{##1}% - \noindent - \hbox to \biblabelwidth{% - \biblabelprecontents - \biblabelcontents{##1}% - \biblabelpostcontents - }% - \kern\biblabelextraspace - }% -} -\def\@onecitation#1\@@{%called for each citation - \if@notfirstcitation - \printbetweencitations - \fi - % - \expandafter \ifx \csname\@citelabel{#1}\endcsname \relax - \if@citewarning - \message{\@linenumber Undefined citation `#1'.}% - \fi - % Give it a dummy definition: - \expandafter\gdef\csname\@citelabel{#1}\endcsname{% - {\tt - \escapechar = -1 - \nobreak\hskip0pt - \expandafter\string\csname#1\endcsname - \nobreak\hskip0pt - }% - }% - \fi - % Now produce the text, whether it was undefined or not. - \citelink{\csname\@citelabel{#1}\endcsname}% - \@notfirstcitationtrue -}% -%% -%% Images -%% - -\ifbook -\def\includefig#1{\leavevmode\hbox{\immediate\pdfximage{image/#1.pdf}\pdfrefximage\pdflastximage}} -\else\ifpdf -\def\includefig#1{\leavevmode\hbox{\immediate\pdfximage{image/#1.pdf}\pdfrefximage\pdflastximage}} -\else\ifhint - \def\includefig#1{\image=image/#1.png\relax} -\else - \input epsf.tex - \def\includefig#1{\epsfbox{image/#1.eps}}% this is a \leavevmode\hbox{...} -\fi\fi\fi - -\ifhint\eject\fi% hitex will remove empty pages that were introduced by cwebmac -\makeatother - - - - - - - diff --git a/Build/source/texk/web2c/hitexdir/hishrink.man b/Build/source/texk/web2c/hitexdir/hishrink.man deleted file mode 100644 index bf29ca9f440..00000000000 --- a/Build/source/texk/web2c/hitexdir/hishrink.man +++ /dev/null @@ -1,201 +0,0 @@ -.TH HISHRINK 1 "11 November 2021" "Version 1.3" -.\"===================================================================== -.if n .ds MF Metafont -.if t .ds MF Metafont -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP -.if n .ds TX TeX -.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP -.el .ds OX TeX -.\" BX definition must follow TX so BX can use TX -.if t .ds BX \fRB\s-2IB\s0\fP\*(TX -.if n .ds BX BibTeX -.\" LX definition must follow TX so LX can use TX -.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX -.if n .ds LX LaTeX -.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX -.if n .ds AX AmSTeX -.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX -.if n .ds AY AmSLaTeX -.if n .ds WB Web -.if t .ds WB W\s-2EB\s0 -.\"===================================================================== -.SH NAME -hishrink\- translating ASCII HINT files to binary files -.SH SYNOPSIS -.B hishrink -.RI [ options ] -.RI [ file ] -.\"===================================================================== -.SH DESCRIPTION -Shrinking converts an ASCII HINT file, usually with the extension -.BR .hint , -into a binary HINT file, with the extension -.BR .hnt . -.PP -The ASCII based HINT file format - also called `long' format - is optimized -for readability. It can be edited using a text editor. Hence it allows -simple modifications that would be difficult to achieve when using the binary -format. It is also convenient when debugging. -.PP -The binary HINT file format - also called `short' format - is optimized -for displaying HINT files. It can be parsed equally well in forward -and backward direction to enable fast forward or backward navigation in the file. -.PP -The binary HINT file format is designed for on-screen reading of documents. -Using a HINT viewer to display a HINT file, its content will dynamically -adapt to the available display area. For complete information on the -HINT file format and programs to view HINT files, see -.BR https://hint.userweb.mwn.de . -.\"===================================================================== -.SH OPTIONS -This version of -.B hishrink -understands the following command line options: -.TP -.B -a -Use only the localized names for auxiliary files as explained in the -.B FILES -section below. - -If you know that the auxiliary files can be found using the localized names, -for example after creating them with -.B histretch -using the -.B -a -option, you can use -.B hishrink -with the -.B -a -option to limit the search for the auxiliar files. -If you are unsure, you should use neither the -.B -a -nor the -.B -g -option. -.B hishrink -will then search for auxiliar files first using the localized path names -and then using the path names as given. -.TP -.B -c -Enable the use of compression for the HINT file. Compressed files are -smaller but require decompression when viewing. Use only for large -files if the file size matters. -.TP -.BI -d \ bitmask -Sets HINT file debugging flags according to the -.IR bitmask . -Use the -.B --help -option for details. -.TP -.B -g -Do not use the localized names for auxiliary files as explained in the -.B FILES -section below. - -You may use this option if you know that all auxiliar files -are at the locations described by the path names stored in the HINT file. -If you are unsure, you should use neither the -.B -g -nor the -.B -a -option. -.B hishrink -will then search for auxiliar files first using the localized path names -and then using the path names as given. -.TP -.B --help -Print help message and exit. -.TP -.B -l -Redirect standard error to a log file. The name of the log file is derived from -the name of the input file replacing the extension -.B .hint -by the extension -.BR .log . -.TP -.BI -o \ name -Use -.I name -for the output file instead of deriving it from the name of the input file. -Append the extension -.B .hnt -if the -.I name -does not already has that extension. -.TP -.B --version -Print version information and exit. -.\"===================================================================== -.SH FILES -Binary HINT files must contain all resources necessary to display the file, -for example font and image files. These files are called auxiliary files. -ASCII HINT files contain only the path names of these files. - -When creating a binary HINT file from an ASCII HINT file, it is -necessary to find these files, read them, and include them in the binary output file. -When creating an ASCII HINT file from a binary HINT file, it is -convenient if these files can be extracted and written to the file system. -To avoid clobbering arbitrary directories with files when extracting auxiliary -files, it is possible to map the path names as stored in the HINT file -to -.B localized -path names before writing or reading auxiliar files. - -When computing a localized path name from a given path name, -a distinction is made between global resources, -like fonts, that are referenced by an absolute path name, and local -resources, for example an image, that are referenced by a relative -path name. The directory that starts the localized path name of the former -has the extension -.B .abs -and for the latter the extension -.BR .rel -is used. -To keep auxiliary files in these subdirectories even if their path -contains links to a parent directory, parent links -.RB ` .. ' -are replaced by -.RB ` __ ' -links to subdirectories. - -For example, -given an input file -.BR paper.hint, -the global resources are stored in the -.B paper.abs -directory and local resources are stored in -.BR paper.rel . -An absolute path like -.B /usr/share/fonts/ -will then map to the localized path -.BR paper.abs/usr/share/fonts/ -and a relative path like -.B ../image/img1.jpg -will then map to the localized path -.BR paper.rel/__/image/img1.jpg . -.\"===================================================================== -.SH NOTES -This manual page is not meant to be exhaustive. The complete -documentation can be found in the -.IR "HINT: The file format" . -This document is available as a book or in electronic form from the -HINT project home page at -.BR https://hint.userweb.mwn.de . -There you find additional software, most importantly viewers for HINT files, -and further information. -.\"===================================================================== -.SH AVAILABILITY -.B hishrink -should compile on a large variety of machine architectures -and operating systems. -It is part of the \*(TX Live distribution. -.PP -.\"===================================================================== -.SH "SEE ALSO" -.BR histretch (1), -.BR hitex (1), -.\"===================================================================== -.SH AUTHORS -Martin Ruckert -.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/histretch.man b/Build/source/texk/web2c/hitexdir/histretch.man deleted file mode 100644 index cbc385f5f01..00000000000 --- a/Build/source/texk/web2c/hitexdir/histretch.man +++ /dev/null @@ -1,239 +0,0 @@ -.TH HISTRETCH 1 "11 November 2021" "Version 1.3" -.\"===================================================================== -.if n .ds MF Metafont -.if t .ds MF Metafont -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP -.if n .ds TX TeX -.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP -.el .ds OX TeX -.\" BX definition must follow TX so BX can use TX -.if t .ds BX \fRB\s-2IB\s0\fP\*(TX -.if n .ds BX BibTeX -.\" LX definition must follow TX so LX can use TX -.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX -.if n .ds LX LaTeX -.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX -.if n .ds AX AmSTeX -.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX -.if n .ds AY AmSLaTeX -.if n .ds WB Web -.if t .ds WB W\s-2EB\s0 -.\"===================================================================== -.SH NAME -histretch \- translating binary HINT files to ASCII files -.SH SYNOPSIS -.B histretch -.RI [ options ] -.RI [ file ] -.\"===================================================================== -.SH DESCRIPTION -Stretching converts a binary HINT file, usually with the extension -.BR .hnt , -into an ASCII based HINT file, with the extension -.BR .hint . -.PP -The binary HINT file format - also called `short' format - is optimized -for displaying HINT files. It can be parsed equally well in forward -and backward direction to enable fast forward or backward navigation in the file. -.PP -The ASCII based HINT file format - also called `long' format - is optimized -for readability. It can be edited using a text editor. Hence it allows -simple modifications that would be difficult to achieve when using the binary -format. It is also convenient when debugging. -.PP -The binary HINT file format is designed for on-screen reading of documents. -Using a HINT viewer to display a HINT file, its content will dynamically -adapt to the available display area. For complete information on the -HINT file format and programs to view HINT files, see -.BR https://hint.userweb.mwn.de . -.\"===================================================================== -.SH OPTIONS -This version of -.B histretch -understands the following command line options: -.TP -.B -a -Write auxiliar files to disk using the localized path names as explained in the -.B FILES -section below. - -Use this option if you are stretching a HINT file that you later want -to shrink back to its binary format unless you know that you have -already all the auxiliary files contained in it. -.TP -.BI -d \ bitmask -Sets HINT file debugging flags according to the -.IR bitmask . -See the -.B --help -option for details. -.TP -.B -f -Force the replacement of existing auxiliary files. -Use this option together with the -.B -g -or -.B -a -option to make sure that already exiting auxiliary files are replaced by the -auxiliary files contained in the HINT file. - -.BR WARNING : -This is a dangerous option especially together with the -.B -g -option. Never use it on a HINT file of unknown -origin. It will possibly replace any file on your machine you have -write access to. If in doubt, don't use the -.B -f -option. -.TP -.B -g -Write auxiliar files to disk using the path names as stored in the HINT file. -This option is an alternative to the -.B -a -option and takes precedence if given. -If in doubt, don't use the -.B -g -option. -If you just want to stretch the HINT file, then edit it, and then shrink -it back to the binary format, you should use the -.B -a -option. - -You may use this option if you are stretching a HINT file on the same machine and in -the same directory where you have created the HINT file. Then all files -will be copied to the location they came from in case they were deleted -in the meantime. - -If you are stretching a HINT file on one machine and the file was created -on a different machine, -.B histretch -will try to copy an auxiliary file -into the same directory that was used when the HINT file was created, provided that -you have the necessary writing rights. -This is probably where you want the auxiliary file assuming that both machines have the -same directory structure. - -.BR WARNING : -This is a dangerous option especially together with the -.B -f -option. Never use it on a HINT file of unknown -origin. It can possibly write (and replace) any file on your machine where you have -write access. -.TP -.B --help -Print help message and exit. -.TP -.B -l -Redirect standard error to a log file. The name of the log file is derived from -the name of the input file replacing the extension -.B .hnt -by the extension -.BR .log . -.TP -.BI -o \ name -Use -.I name -for the output file instead of deriving it from the name of the input file. -Append the extension -.B .hint -if the -.I name -does not already has that extension. -.TP -.B -u -Enable the use of UTF8 character codes. -Without this option, the output file is a pure ASCII file, because character codes -outside the ASCII range are written using their numeric representation. -With this option, the file will always represent printable characters using their UTF8 -character codes. This might make the output file more readable if displayed -using an UTF8 enabled program; but it might be less readable if displayed -by a program that does not handle UTF8 characters properly. See also the -.B -x -option. -.TP -.B --version -Print version information and exit. -.TP -.B -x -Enable the use of hexadecimal character codes. -Without this option, characters that are not represented using their -character codes are represented using a decimal representation of -the character code. With this option a hexadecimal representation is used. -The range of character codes that have a numeric representation includes -the non printable characters (character codes smaller than 32) -and unless the -.B -u -option is given, the character codes with a value of 127 and above. -.\"===================================================================== -.SH FILES -Binary HINT files must contain all resources necessary to display the file, -for example font and image files. These files are called auxiliary files. -ASCII HINT files contain only the path names of these files. - -When creating a binary HINT file from an ASCII HINT file, it is -necessary to find these files, read them, and include them in the binary output file. -When creating an ASCII HINT file from a binary HINT file, it is -convenient if these files can be extracted and written to the file system. -To avoid clobbering arbitrary directories with files when extracting auxiliary -files, it is possible to map the path names as stored in the HINT file -to -.B localized -path names before writing or reading auxiliar files. - -When computing a localized path name from a given path name, -a distinction is made between global resources, -like fonts, that are referenced by an absolute path name, and local -resources, for example an image, that are referenced by a relative -path name. The directory that starts the localized path name of the former -has the extension -.B .abs -and for the latter the extension -.BR .rel -is used. -To keep auxiliary files in these subdirectories even if their path -contains links to a parent directory, parent links -.RB ` .. ' -are replaced by -.RB ` __ ' -links to subdirectories. - -For example, -given an input file -.BR paper.hint, -the global resources are stored in the -.B paper.abs -directory and local resources are stored in -.BR paper.rel . -An absolute path like -.B /usr/share/fonts/ -will then map to the localized path -.BR paper.abs/usr/share/fonts/ -and a relative path like -.B ../image/img1.jpg -will then map to the localized path -.BR paper.rel/__/image/img1.jpg . -.\"===================================================================== -.SH NOTES -This manual page is not meant to be exhaustive. The complete -documentation can be found in -.IR "HINT: The file format" . -This document is available as a book or in electronic form from the -HINT project home page at -.BR https://hint.userweb.mwn.de . -There you find additional software, most importantly viewers for HINT files, -and further information. -.\"===================================================================== -.SH AVAILABILITY -.B histretch -should compile on a large variety of machine architectures -and operating systems. -It is part of the \*(TX Live distribution. -.PP -.\"===================================================================== -.SH "SEE ALSO" -.BR hishrink (1), -.BR hitex (1), -.\"===================================================================== -.SH AUTHORS -Martin Ruckert -.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/hitex.man b/Build/source/texk/web2c/hitexdir/hitex.man deleted file mode 100644 index ef1655d1b82..00000000000 --- a/Build/source/texk/web2c/hitexdir/hitex.man +++ /dev/null @@ -1,384 +0,0 @@ -.TH HITEX 1 "11 November 2021" "Version 1.0" -.\"===================================================================== -.if n .ds MF Metafont -.if t .ds MF Metafont -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP -.if n .ds TX TeX -.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP -.el .ds OX TeX -.\" BX definition must follow TX so BX can use TX -.if t .ds BX \fRB\s-2IB\s0\fP\*(TX -.if n .ds BX BibTeX -.\" LX definition must follow TX so LX can use TX -.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX -.if n .ds LX LaTeX -.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX -.if n .ds AX AmSTeX -.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX -.if n .ds AY AmSLaTeX -.if n .ds WB Web -.if t .ds WB W\s-2EB\s0 -.\"===================================================================== -.SH NAME -hitex \- HINT output from TeX -.SH SYNOPSIS -.B hitex -.RI [ options ] -.RI [ \fB&\fPformat ] -.RI [ file | \fB\e\fPcommands ] -.\"===================================================================== -.SH DESCRIPTION -Run the Hi\*(TX typesetter on -.IR file , -usually creating -.IR file.hnt . -If the file argument has no extension, ".tex" will be appended to it. -Instead of a file name, a set of Hi\*(TX commands can be given, the first -of which must start with a backslash. -With a -.BI & format -argument Hi\*(TX uses a different set of precompiled commands, -contained in -.IR format\fB.fmt\fP ; -it is usually better to use the -.B -fmt -.I format -option instead. -.PP -Hi\*(TX is a version of \*(TX that creates HINT files. The HINT file -format is designed for on-screen reading of documents. Using a HINT -viewer (see -.BR https://hint.userweb.mwn.de ) -to display a HINT file its content will dynamically adapt to the -available display area. -.PP -The typical use of Hi\*(TX is with pre generated formats. -The -.B hitex -command uses the equivalent of the plain \*(TX format, and the -.B hilatex -command uses the equivalent of the \*(LX format. -To generate formats, use the -.B -ini -switch. -.PP -Hi\*(TX's handling of its command-line arguments is similar to that of -of the other \*(TX programs in the -.I web2c -implementation. -.PP -Hi\*(TX incorporates the e-\*(TX -extensions (see -.BR etex (1)) -if used with the -.B -etex -switch. -.PP -Hi\*(TX incorporates the extensions needed for \*(LX -(see -.BR latex (1)) -if used with the -.B -ltx -switch. -.\"===================================================================== -.SH OPTIONS -This version of Hi\*(TX understands the following command line options. -.TP -.BI -cnf-line \ string -Parse -.I string -as a -.I texmf.cnf -configuration line. See the Kpathsea manual. -.TP -.B -compress -Enable the use of compression for the HINT file. Compressed files are -smaller but require decompression when viewing. Use only for large -files if the file size matters. -.TP -.B -empty-page -When writing books, often empty pages are inserted - for example to -begin chapters on a right hand side page. These empty pages are -a nuisance for on-screen reading where there are no left or right -hand side pages. This option keeps empty pages in the output. -.TP -.B -no-empty-page -This option tries to eliminate empty pages in the output. It is set as a default. -.TP -.B -etex -Enable the e-\*(TX extensions. This option is only effective in -combination with -.BR -ini . -See -.BR etex (1). -.TP -.B -file-line-error -Print error messages in the form -.I file:line:error -which is similar to the way many compilers format them. -.TP -.B -no-file-line-error -Disable printing error messages in the -.I file:line:error -style. -.TP -.BI -fmt \ format -Use -.I format -as the name of the format to be used, instead of the name by which -Hi\*(TX was called or a -.I %& -line. -.TP -.B -help -Print help message and exit. -.TP -.BI -hint-debug \ bitmask -Sets HINT file debugging flags according to the -.IR bitmask . -See the -.B -hint-debug-help -option for details. -.TP -.B -hint-debug-help -Print an explanation of the HINT debugging flags and exit. -.TP -.B -hyphenate-first-word -\*(TX will usually not attempt to insert hyphenation points into the first -word of a paragraph. If a HINT file must be displayed on a very small device -such hyphenation points might prove necessary. This option is set by default -and enables the generation of these hyphenation points. -.TP -.B -no-hyphenate-first-word -Disable the automatic insertion of hyphenation points in the first word -of a paragraph. Needed only if complete compatibility with \*(TX is required. -.TP -.B -ini -Start in -.I INI -mode, which is used to dump formats. The -.I INI -mode can be used for typesetting, but no format is preloaded, and -basic initializations like setting catcodes may be required. -.TP -.BI -interaction \ mode -Sets the interaction mode. The mode can be either -.IR batchmode , -.IR nonstopmode , -.IR scrollmode , -and -.IR errorstopmode . -The meaning of these modes is the same as that of the corresponding -\ecommands. -.TP -.BI -jobname \ name -Use -.I name -for the job name, instead of deriving it from the name of the input file. -.TP -.BI -kpathsea-debug \ bitmask -Sets path searching debugging flags according to the bitmask. See the -.I Kpathsea -manual for details. -.TP -.B -ltx -Enable the \*(LX extensions. This option is only effective in -combination with -.BR -ini . -See -.BR latex (1). -.TP -.BI -mfmode \ mode -Use -.I mode -as the \*(MF -.I mode -when generating missing fonts. See -.BR mf (1) -for details. -.TP -.BI -mktex \ fmt -Enable -.RI mktex fmt , -where -.I fmt -must be either -.IR tex , -.IR tfm , -.IR fmt , -or -.IR pk . -.TP -.BI -no-mktex \ fmt -Disable -.RI mktex fmt , -where -.I fmt -must be either -.IR tex , -.IR tfm , -.IR fmt , -or -.IR pk . -.TP -.BI -output-directory \ directory -Write output files in -.I directory -instead of the current directory. Look up input files in -.I directory -first, then along the normal search path. -.TP -.B -parse-first-line -If the first line of the main input file begins with -.I %& -parse it to look for a dump name. -.TP -.B -no-parse-first-line -Disable parsing of the first line of the main input file. -.TP -.BI -progname \ name -Pretend to be program -.IR name . -This affects both the format used and the search paths. -.TP -.BI -resolution \ number -When using \*(MF to generate missing pk fonts, use a resolution of -.I number -DPI. See -.BR mf (1) -for details. -.TP -.B -version -Print version information and exit. -.\"===================================================================== -.SH ENVIRONMENT -See the Kpathsea library documentation (e.g., the `Path specifications' -node) for precise details of how the environment variables are used. -The -.B kpsewhich -utility can be used to query the values of the variables. -.PP -One caveat: In most Hi\*(TX formats, you cannot use ~ in a file name you -give directly to Hi\*(TX, because ~ is an active character in \*(TX, -and hence is expanded, not taken as part of the file name. Other -programs, such as \*(MF, do not have this problem. -.PP -.TP -.B TEXMFOUTPUT -Normally, Hi\*(TX puts its output files in the current directory. If -any output file cannot be opened there, it tries to open it in the -directory specified in the environment variable TEXMFOUTPUT. -There is no default value for that variable. For example, if you say -.I hitex paper -and the current directory is not writable and TEXMFOUTPUT has -the value -.IR /tmp , -Hi\*(TX attempts to create -.I /tmp/paper.log -(and -.IR /tmp/paper.hnt , -if any output is produced.) TEXMFOUTPUT is also checked for input -files, as \*(TX often generates files that need to be subsequently -read; for input, no suffixes (such as ``.tex'') are added by default, -the input name is simply checked as given. -.TP -.B TEXINPUTS -Search path for -.I \einput -and -.I \eopenin -files. -This normally starts with ``.'', so -that user files are found before system files. An empty path -component will be replaced with the paths defined in the -.I texmf.cnf -file. For example, set TEXINPUTS to ".:/home/user/tex:" to prepend the -current directory and ``/home/user/tex'' to the standard search path. -.TP -.B TEXFORMATS -Search path for format files. -.TP -.B TFMFONTS -Search path for font metric -.RI ( .tfm ) -files. -.TP -.B SOURCE_DATE_EPOCH -If set, its value, taken to be in epoch-seconds, will be used for the -creation date and as the reference moment for the time related -primitives of \*(LX. This is useful for making reproducible builds. -.TP -.B FORCE_SOURCE_DATE -If set to the value "1", the time-related \*(TX primitives -.RI ( \eyear , -.IR \emonth , -.IR \eday , -.IR \etime ) -are also initialized from the value of SOURCE_DATE_EPOCH. This is not -recommended if there is any viable alternative. -.PP -Many, many more environment variables may be consulted related to path -searching. See the Kpathsea manual. -.\"===================================================================== -.SH FILES -The location of the files mentioned below varies from system to -system. Use the -.B kpsewhich -utility to find their locations. -.TP -.I *.tfm -Metric files for Hi\*(TX's fonts. -.TP -.I *.fmt -Predigested Hi\*(TX format files. -.TP -.I *.pk *.pfb -Font files used by Hi\*(TX. -.\"===================================================================== -.SH NOTES -This manual page is not meant to be exhaustive. The complete -documentation for Hi\*(TX can be found in the -.IR "Hi\*(TX user manual" -Further information can be found in the manual of the -.I "Kpathsea library" -and in -.I "HINT: The file format" -which is available as a book or in electronic form from the -HINT project home page at -.BR https://hint.userweb.mwn.de . -.\"===================================================================== -.SH BUGS -This version of Hi\*(TX fails to handle correctly glues and kerns with a -width that depends on \ehsize or \evsize. Similarly, when -the layout of table entries or mathematical formulas depends on \ehsize -or \evsize their output might be distorted. -.\"===================================================================== -.SH AVAILABILITY -Hi\*(TX should compile on a large variety of machine architectures -and operating systems. -Hi\*(TX is part of the \*(TX Live distribution. -.PP -The Hi\*(TX home page is at -.BR https://hint.userweb.mwn.de . -There you find additional software, most importantly viewers for HINT files, -and further information. -.\"===================================================================== -.SH "SEE ALSO" -.BR histretch (1), -.BR hishrink (1), -.BR latex (1), -.BR tex (1), -.BR kpsewhich (1), -.\"===================================================================== -.SH AUTHORS -The primary author of Hi\*(TX is Martin Ruckert, -with e\*(TX extensions by Peter Breitenlohner, -\*(LX extensions by Thierry Laronde, and -the kpathsearch library by Karl Berry. -.PP -\*(TX was designed by Donald E. Knuth, -who implemented it using his \*(WB system for Pascal programs. -.PP -Many, many more contributed to the typesetting system now known as \*(TX; -far too many to name all of them here. -.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/hitexman.hnt b/Build/source/texk/web2c/hitexdir/hitexman.hnt deleted file mode 100644 index 34a13f4ba8c..00000000000 Binary files a/Build/source/texk/web2c/hitexdir/hitexman.hnt and /dev/null differ diff --git a/Build/source/texk/web2c/hitexdir/hitexman.pdf b/Build/source/texk/web2c/hitexdir/hitexman.pdf deleted file mode 100644 index 2acd7fc9517..00000000000 Binary files a/Build/source/texk/web2c/hitexdir/hitexman.pdf and /dev/null differ diff --git a/Build/source/texk/web2c/hitexdir/hitexman.tex b/Build/source/texk/web2c/hitexdir/hitexman.tex deleted file mode 100644 index b193458db6c..00000000000 --- a/Build/source/texk/web2c/hitexdir/hitexman.tex +++ /dev/null @@ -1,819 +0,0 @@ -% This file is part of HINT -% Copyright 2017-2021 Martin Ruckert, Hochschule Muenchen, Lothstrasse 64, 80336 Muenchen -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the "Software"), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be -% included in all copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT -% OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -% THE SOFTWARE. -% -% Except as contained in this notice, the name of the copyright holders shall -% not be used in advertising or otherwise to promote the sale, use or other -% dealings in this Software without prior written authorization from the -% copyright holders. - -\input cwebmac -\input btxmac.tex -\input hint.sty - -\makeindex -\maketoc - -\titletrue -%\pageno=-2 - -\def\setrevision$#1: #2 ${\gdef\lastrevision{#2}} -\setrevision$Revision: 2705 $ -\def\setdate$#1(#2) ${\gdef\lastdate{#2}} -\setdate$Date: 2022-03-04 16:48:46 +0100 (Fri, 04 Mar 2022) $ - - -\null - -\font\largetitlefont=cmssbx10 scaled\magstep4 -\font\Largetitlefont=cmssbx10 at 40pt -\font\hugetitlefont=cmssbx10 at 48pt -\font\smalltitlefontit=cmbxti10 scaled\magstep3 -\font\smalltitlefont=cmssbx10 scaled\magstep3 - -\hbox{} -\vskip 0pt plus 1fill -{ - \baselineskip=1cm\parindent=0pt - \largetitlefont\raggedright Hi\TeX\par - \vskip 10pt plus 0.1fill - \leftline{\smalltitlefont User Manual} - \vskip-3pt - \vskip 10pt plus 0.5fill - \hskip 0pt plus 2fill \it F\"ur Beatriz\hskip 0pt plus 0.5fill\hbox{} - \vskip 10pt plus 3fill - \leftline{\smalltitlefont Version 1.1 (Draft)} - \bigskip - \raggedright\baselineskip=12pt - \bf MARTIN RUCKERT \ \it Munich University of Applied Sciences\par - \bigskip -} -\eject - -\titletrue -\begingroup -\figrm -\parindent=0pt - -{\raggedright\advance\rightskip 3.5pc -The author has taken care in the preparation of this document, -but makes no expressed or implied warranty of any kind and assumes no -responsibility for errors or omissions. No liability is assumed for -incidental or consequential damages in connection with or arising out -of the use of the information or programs contained herein. -\bigskip -{\def\:{\discretionary{}{}{}} -Internet page {\tt http:\://hint.\:userweb.\:mwn.\:de/\:hint/hitex.html} -may contain current information, downloadable software, -and news.} - -\vfill -Copyright $\copyright$ 2022 by Martin Ruckert -\smallskip -All rights reserved. -\smallskip -This publication is protected by copyright, and permission must be -obtained prior to any prohibited reproduction, storage in -a~retrieval system, or transmission in any form or by any means, electronic, -mechanical, photocopying, recording, or likewise. -To obtain permission to use material from this work, please submit a written -request to Martin Ruckert, -Hochschule M\"unchen, -Fakult\"at f\"ur Informatik und Mathematik, -Lothstrasse 64, -80335 M\"unchen, -Germany. -\medskip -{\tt ruckert\:@cs.hm.edu} -\medskip -Revision: \lastrevision,\quad Date: \lastdate\par -} -\eject -\endgroup - -\frontmatter -\pageno=3% - -\tableofcontent - -\mainmatter - -\def\rs{\hskip 2pt plus 3pt minus 2pt\penalty0\relax} -\def\rule#1:#2.{\par{\hangindent32pt\hangafter1\parindent0pt\rightskip 0pt plus 60pt#1{\bf:}\quad% - \hskip 0pt plus 60pt\penalty-300\hskip 0pt plus -60pt#2{\bf.}\par}} -\def\sym#1{\rs$<${\it #1\/}$>$\rs} -\def\OR{\rs${}\vert{}$\rs} -\def\opt#1{\rs$[{}$#1${}]$\rs} -\def\ctl#1{{\tt\BS #1}} - -\section{Hi\TeX\ primitives} - -While currently Hi\TeX\ is the only \TeX\ engine that supports output in the \HINT\ file -format, this might not be so forever. To avoid unnecessary complications for -package writers, it is strongly suggested that all such \TeX\ engines implement -the same primitives according to the same specification. The following is the first -draft of this specification. All the primitives use {\tt HINT} as a prefix to -avoid name conflicts. The prefix {\tt HINT}, as opposed to e.g. {\tt HiTeX}, -was chosen to stress the idea that these primitives are specific for the -output format---not for the \TeX\ engine. - -Because this is the first specification that will reach a wider user base, -it is reasonable to expect changes to occur in the future. Therefore it is -recommended that these primitives should not be used directly in a -\TeX\ document; instead they should be encapsulated in suitable -macros so that the consequences of any change to the primitives will -be local to these macros. - -\subsection{Syntax Description} -In the following, we describe the syntax of primitive control sequences which were -added to \TeX. - -\itemize -\item We use a {\tt typewriter font}\index{typewriter font} -for text that occurs \index{verbatim}verbatim in the \TeX\ document. -\item We use \sym{italics} enclosed in pointed brackets to denote symbols\index{symbol+\sym{symbol}}. -\item We use rules\index{rule} to define the meaning of symbols. -A rule starts with the symbol -to be explained, followed by a colon ``{\bf :}'', and then the text that this symbol -stands for. A rule ends with a period ``{\bf .}''. -\item Optional\index{optional+\opt{optional}} parts of the rule's text -are enclosed in \opt{square brackets}. -\item Alternatives\index{alternative} are separated by a vertical bar ``\OR''\index{\OR}. -\item Some symbols refer to text that is defined as part of standard \TeX. These are explained here by an example: - -\medskip -\rule\sym{integer}: \index{integer+\sym{integer}} - an integer as in \ctl{penalty}\sym{integer}. -\rule\sym{normal dimension}:\index{normal dimension+\sym{normal dimension}} - a dimension as in \ctl{hrule} \.{width} \sym{normal dimension}. -\rule\sym{dimension}:\index{dimension+\sym{dimension}} - a dimension as in \ctl{vskip} \.{0pt} \.{plus} \sym{dimension}. -\rule\sym{name}:\index{dimension+\sym{dimension}} - a name as in \ctl{input} \sym{name}. -\rule\sym{vertical list}:\index{vertical list+\sym{vertical list}} - a token list with matching braces as in - \ctl{vbox}\.{\LB}\sym{vertical list}\.{\RB}. -\rule\sym{horizontal list}:\index{horizontal list+\sym{horizontal list}} - a token list with matching braces as in - \ctl{hbox}\.{\LB}\sym{horizontal list}\.{\RB}. -\rule\sym{general text}:\index{general text+\sym{general text}} - a token list with matching braces as in - \ctl{write}\.{\LB}\sym{general text}\.{\RB}. -\medskip -\enditemize - -\subsection{Version and Revision} -The control sequences \ctl{HINTversion}\index{HINTversion+\ctl{HINTversion}} -and \ctl{HINTsubversion}\index{HINTsubversion+\ctl{HINTsubversion}} are -used to determine the version and subversion numbers of the HINT output format -that is generated by Hi\TeX. It can be used as part of the output as -in \verbatim|\the\HINTversion|. -The most important use, however, is testing whether the current \TeX\ engine -will in fact produce \HINT\ output. -As an example the file {\tt ifhint.tex}\index{ifhint.tex+{\tt ifhint.tex}} -contains the following code: - - -\verbatim/ -\newif\ifhint -\expandafter\ifx\ctlname HINTversion\endcsname\relax - \hintfalse\else\hinttrue\fi/ - - -\subsection{Images} -The primitive \ctl{HINTimage}\index{HINTimage+\ctl{HINTimage}} -includes an image\index{image} in a document. -The syntax is as follows: - -\medskip -\ctl{HINTimage} \opt{\.{=}} \sym{name} -\opt{\sym{width}} \opt{\sym{height}} -\medskip - -The optional equal sign can be added to make the code look nicer. -The \sym{name} specifies the image file. -The width specification determines the width of the image. If omitted, -Hi\TeX\ tries to determine the image's width from the image file. -The same holds for the height specification. - -\medskip -\rule \sym{width}\index{width+\sym{width}}:\.{width} \sym{normal dimension}. -\rule \sym{height}\index{height+\sym{height}}:\.{height} \sym{normal dimension}. -\medskip - -Note that a \sym{normal dimension} that is computed from \ctl{hsize} -or \ctl{vsize} retains this dependency when processed by Hi\TeX. -This allows an image to adapt to the size of the viewing area. -Scaling in the \HINT\ viewer will, however, never change the -aspect ratio of an image. So it may become smaller or larger, -but it will never be distorted. -For this reason, Hi\TeX\ will inspect the image file to determine the -aspect ratio\index{aspect ratio} of the stored image. -The width and height values as given in the \TeX\ file serve -as the maximum values for the actual width and height. When rendering, -the image will become as large as possible within the given bounds. -If \TeX\ does not specify neither width nor height, the image file -must specify the absolute width and height of the image. -It is considered an error if valid settings for the image's width and height -can not be obtained. - -\subsection{Links, Labels, and Outlines} -A link\index{link} in a \HINT\ document refers to another location in the same document. -It can be used to navigate to that location. -A link is defined using the primitives -\ctl{HINTstartlink}\index{HINTstartlink+\ctl{HINTstartlink}} -and \ctl{HINTendlink}\index{HINTendlink+\ctl{HINTendlink}}. -Neither of them can be used in vertical mode. -The text between the start and the end of the link -constitutes the visible part of the link. Depending on the user interface, clicking -or tapping or otherwise activating the link (e.g. pronouncing) -will navigate to the destination of the link. -The user interface might provide a visual clue to make the user aware of the -available links but it also may choose to leave the visual clues to the author -of the document (e.g. using a special image or a special font). - -The syntax is -\ctl{HINTstartlink} \sym{destination} -and -\ctl{HINTendlink} -with - -\medskip -\rule \sym{destination}\index{destination+\sym{destination}}:\.{goto} \sym{label}. -\rule \sym{label}\index{label+\sym{label}}: - \.{name} \.{\LB}\sym{general text}\.{\RB} \OR\ \.{num} \sym{integer}. -\medskip - -As you can see, the link refers to its destination using a label -which is either a name or a number. -The destination can be defined by using the -\ctl{HINTdest}\index{HINTdest+\ctl{HINTdest}} primitive. -Forward and backward links are allowed; the definition of a label can either -precede or follow the use of the label. If at the end of the document a label -is undefined, a warning is given, and the label will reference the beginning of the -document. - -The syntax is -\ctl{HINTdest} \sym{label} \opt{\sym{placement}} -with - -\medskip -\rule\sym{placement}\index{placement+\sym{placement}}: -\.{top}\index{top+{\tt top}} \OR\ \.{bot}\index{bot+{\tt bot}}. -\medskip - -The optional placement argument specifies how to build the page -containing the destination location. \.{top} demands -a page starting with the destination location. This is useful -if the destination is for example the start of a section or chapter heading. -Similarly \.{bot} asks for a page that ends with the destination location. -The most common case is to omit the placement argument. In this case, the -viewer will build a ``good'' page that includes the given destination. -In case of a section heading, for example, it will most probably start the -page with the section heading because section headings are usually preceded -by a negative penalty that will convince the page builder that this is a good -place to break the page. But if the section heading is immediately preceded -by a chapter heading, the negative penalty found there will probably -persuade the page builder to start with the chapter heading instead. - -There is a special label that has the form -\.{name} \.{\LB}\.{HINT.home}\.{\RB}\index{HINT.home+{\tt HINT.home}}. -It is used to mark the ``home page''\index{home page} of the document. User interfaces -are encouraged to offer a button or keyboard shortcut to navigate to the -document location labeled this way. The page should be a convenient -starting point to explore the document. The typical place for this label -would be the documents table of content. - -The labels that identify destinations in a document can also be used -to define document outlines. A document outline\index{outline} is a document summary -given as a hierarchical list of headings where each of them -refers to a specific location in the document. - -The syntax is -\ctl{HINToutline}\index{HINToutline+\ctl{HINToutline}} -\sym{destination} \opt{\sym{depth}} \.{\LB}\sym{horizontal list}\.{\RB}. - -\medskip -\rule \sym{depth}\index{depth+\sym{depth}}: \.{depth} \sym{integer}. -\medskip - -The user interface can format the \sym{horizontal list} much like -a \ctl{hbox} would do and displays it to the user. When the user selects -this text, the document will be repositioned to show the destination location -in the same way as with a link. In order to support also simpler -user interfaces, the current \HINT\ backend also extracts the characters -(and spaces) from the horizontal list (in top-left to bottom-right order) -and makes this character string available to the user interface. - - -The order in which outline items are defined is important because -this is the order in which they will be presented to the reader of the -document. The optional depth argument allows to structure -the list of outline items as a hierarchy. Outline items with a higher depth value are considered to be sub-items of items earlier in the list with lower -depth values. If no depth value is given, the depth value is set to zero. -It is not necessary to define depth values strictly consecutive. - - -\subsection{Page Templates and Streams}\index{page template}\index{stream} - -To produce the final page, \TeX\ uses a special piece of program -called the output routine\index{output routine}. Because a \HINT\ -file is pure data, it can not contain output routines. Instead it -uses page templates to assemble pages from the main text, footnotes, -floating illustrations, and other material. I start here by -describing how \HINT's page templates work and the special syntax used -to specify them in a \TeX\ file that is about to be processed with -Hi\TeX. For those interested in how the design decision was made and -how page templates relate to \TeX's page building mechanism, a -separate section follows at the end. - -The syntax of a page template specification is: -\ctl{HINTsetpage}\index{HINTsetpage+\ctl{HINTsetpage}} -\sym{integer} \opt{\.{=}} \sym{name} -\opt{\sym{priority}} \opt{\sym{width}} \opt{\sym{height}} -\.{\LB}\sym{vertical list} \sym{stream definition list}\.{\RB} - - -The \sym{integer} specifies the page templates number in the range 1 -to 255. The number 0 is reserved for the build in page template of -the \HINT\ file format, which is used if no other page template has -been defined. The page template 0 can not be redefined. -The \sym{name} associates a name with the page template. The name can -be displayed by the \HINT\ viewer to help the user selecting a -suitable page template. - -After the name follows an optional priority; it is used to select the -``best page template'' if multiple templates are available. The -default value is~1. The build-in template has priority~0. - -\medskip -\rule\sym{priority}\index{priority+\sym{priority}}: {\tt priority} \sym{integer}. -\medskip - - -After that follows an optional width and height of the full page -including the margins. After subtracting \ctl{hsize} from the width -and \ctl{vsize} from the height, the remainder is used for the margins -around the displayed text. For example giving the width as -1.2\ctl{hsize} will leave 0.1\ctl{hsize} for the margins on both sides. -In this case the margins will grow together with the available width -of the display. If the width is computed by adding 20pt -to \ctl{hsize}, the margin will be 10pt on both sides. In this case -the margin will not grow with the size of the display, but it will -grow with the magnification factor. Of course both methods can be -used together. The default is \ctl{hsize} for the width and \ctl{vsize} -for the height so there are no margins. - -The following \sym{vertical list} defines the page itself. It should assign suitable values -to \ctl{topskip} and \ctl{maxdepth} because the values valid at the end of the vertical list -are stored in the page template and are used in the page building process. -The vertical list usually also specifies the insertion of content streams using a \sym{stream insert point}. - -\medskip -\rule\sym{stream insert point}\index{stream insert point+\sym{stream insert point}}: - \ctl{HINTstream} \sym{integer}. -\medskip - -Here the \sym{integer} must be in the range 0 to 254. The value 255 is invalid; -the value 0 indicates the main body of text (what \TeX's page builder would normally put into -box 255 before calling the output routine). -Otherwise, the \sym{integer} is TeX's insertion number, that is the number of \TeX's box -containing the insertions. As usual, this box is filled using \TeX's \ctl{insert} primitive. -So after plain \TeX\ has defined \ctl{footins}, -the footnotes for the current page can be inserted after the main body of text in the \sym{vertical list} -by saying \ctl{HINTstream}\.0 followed by \ctl{HINTstream}\ctl{footins}. -Of course you might want to have a footnote rule and a small skip to separate the -footnotes ---if there are any---from the main text. This can be achieved by a suitable -\sym{stream definition} in the \sym{stream definition list}. - -\medskip -\rule\sym{stream definition list}\index{stream definition list+\sym{stream definition list}}: - \OR\ \sym{stream definition list} \sym{stream definition}. -\rule\sym{stream definition}\index{stream definition+\sym{stream definition}}: - \ctl{HINTsetstream} \sym{integer} \opt{\.{=}} -\opt{{\tt preferred} \sym{integer}} -\opt{\.{next} \sym{integer}} -\opt{\.{ratio} \sym{integer}} \.{\LB}\sym{vertical list}\.{\RB}. -\medskip - - -The first \sym{integer} is the streams insertion number $i$, -and it must match the \sym{integer} -previously used in the \sym{stream insert point}. -Then follows the optional specification of a preferred stream with insertion number $p$, -a next stream with insertion number $n$, and a split ratio $r$. -If $r>0$, the contributions to stream $i$ are split between -stream $p$ and $n$ in the ratio $r/1000$ for $p$ and $1-r/1000$ for $n$ -before contributing streams $p$ and $r$ to the page. -Else if $p\ge0$ any insertion to stream $i$ is moved to stream $p$ as long as possible, -and if $n\ge0$ we move an insert to stream $n$ if there is ``no room left'' in $p$ nor in $i$. -How much ``room'' is available for the insertions is specified inside the vertical list -that follows. -Here \ctl{dimen}$i$ should be set to the maximum total height of the insertions in class $i$ per page. -\ctl{count}$i$ should be set to the magnification factor $f$, -such that inserting a box of height $h$ will contribute $h*f/1000$ to the main page; -and \ctl{skip}$i$ should be set to the extra space needed if an insertion in class $i$ is present. - -This extra space is usually taken up by material that is inserted before and after the insertions, -such as for example the footnote rule. This material can be defined by a -\sym{before list} and an \sym{after list}. - -\medskip\index{HINTbefore+\ctl{HINTbefore}}\index{HINTafter+\ctl{HINTafter}} -\rule \sym{before list}\index{before list+\sym{before list}}: - \ctl{HINTbefore} \opt{\.{=}} \.{\LB}\sym{vertical list}\.{\RB}. -\rule \sym{after list}\index{after list+\sym{after list}}: - \ctl{HINTafter} \opt{\.{=}} \.{\LB}\sym{vertical list}\.{\RB}. -\medskip - -If you are interested in the design decision that motivate the definitions that have -be given in this section, you should read section~\secref{build}. - -\section{Other Primitives} -When I started the \HINT\ project in 2017, -I tried to keep the project as small as possible to increase the -chances that I would be able to complete it. So one design decision -was to keep things simple---or to quote Albert Einstein: ``Make things -as simple as possible, but not simpler''. The other imperative was: -keep things out of the viewer if possible because I do not know -how much processing power or battery power is available. -As a consequence, I focused on Donald Knuth' original \TeX, -disregarding all later extensions like \eTeX\ or \LaTeX, and I -decided that the \TeX\ interpreter would not need to run in the -viewer. - -By now, the state of the \HINT\ project is far beyond of what -I had expected then, and the processing power of even low-cost -mobile devices is far better than expected especially when programming the -graphics card directly using OpenEGL. - -But the line breaking routine, which is running in the viewer, and the -HINT file format, which specifies all the parameters for the -line breaking algorithm, covers just the line breaking of -Donald Knuth's original \TeX. Therefore the viewer will -also do just that, and Hi\TeX\ can not produce files -doing more than that. Of course that might not be so -for ever. -Similarly, the decision to keep the TeX interpreter -out of the HINT viewer implies that \HINT\ files do -not contain token lists. This means that there are -no output routines and no marks. -To replace them, the \HINT\ file format includes -page templates. I have described the technical -means to specify page templates above and try to explain -the rationale behind it below, but \HINT's page templates -are at the time of this writing a largely untested area. - -Since I consider the support for \LaTeX\ to be crucial for -the success of the \HINT\ project, quite a few primitives -have been added to Hi\TeX\ that go beyond \TeX's original -specification. - -First, the primitives of \eTeX\ have been -added with the exception of those primitives that deal with -line breaking, with right to left reading, and with marks. -Here is a list of \eTeX\ primitives that are missing in Hi\TeX: -\itemize -\item\ctl{TeXXeTstate} (current reading direction) -\item\ctl{beginL}, \ctl{endL} (switching reading direction) -\item\ctl{beginR}, \ctl{endR} (switching reading direction) -\item\ctl{predisplaydirection} (reading direction) -\item\ctl{lastlinefit} (line breaking) -\item\ctl{marks} (multiple marks) -\item\ctl{botmarks}, \ctl{splitbotmarks} (multiple marks) -\item\ctl{firstmarks}, \ctl{splitfirstmarks} (multiple marks) -\item\ctl{topmarks} (multiple marks) -\enditemize - -Second, the primitives required to support -\LaTeX\ were added using Thierry Larondes implementation of \Prote. - -\itemize -\item\ctl{Proteversion}, \ctl{Proterevision} (version information) -\item\ctl{resettimer}, \ctl{elapsedtime} (timing information) -\item\ctl{creationdate}, \ctl{filemoddate}, \ctl{filesize}, - \ctl{filedump}, \ctl{mdfivesum} (file information) -\item\ctl{shellescape} (Currently only a dummy implementation.) -\item\ctl{setrandomseed}, \ctl{randomseed}, - \ctl{normaldeviate}, \ctl{uniformdeviate} (random numbers) -\item\ctl{expanddepth}, \ctl{expanded} (programming) -\item\ctl{ifincsname}, \ctl{ifprimitive} \ctl{primitive} (programming) -\item\ctl{savepos}, \ctl{lastxpos}, \ctl{lastypos}, \ctl{pageheight}, - \ctl{pagewidth} (Only dummy implementations since this information - is not available to Hi\TeX\ at runtime.) -\item\ctl{strcmp} (comparing strings) -\enditemize - - - -\section{Replacing \TeX's Page Builder}\label{build} - -\TeX\ uses an output\index{output routine} routine to finalize the page. -The output outline takes the material which the page builder had accumulated in {\tt box255} -and attaches headers, footers, and floating material -like figures, tables, and footnotes. The latter material is specified by insert nodes -while headers and footers are often constructed using mark nodes. -Running an output routine requires the full power of the \TeX\ engine and is not -part of the \HINT\ viewer. Therefore, \HINT\ replaces output routines by page templates\index{template}. -\TeX\ can use different output routines for different parts of a book---for example -the index might use a different output routine than the main body of text. - -\TeX\ uses insertions to describe floating content that is not necessarily displayed -where it is specified. Three examples may illustrate this: -\itemize -\item Footnotes\footnote*{Like this one.} are specified in the middle of the text but are displayed at the -bottom of the page. Several -footnotes\index{footnote} on the same page are collected and displayed together. The -page layout may specify a short rule to separate footnotes from the -main text, and if there are many short footnotes, it may use two columns -to display them. In extreme cases, the page layout may demand a long -footnote to be split and continued on the next page. - -\item Illustrations\index{illustration} may be displayed exactly where specified if there is enough -room on the page, but may move to the top of the page, the bottom of the page, -the top of next page, or a separate page at the end of the chapter. - -\item Margin notes\index{margin note} are displayed in the margin on the same page starting at the top -of the margin. -\enditemize - -\HINT\ uses page templates and content streams to achieve similar effects. -But before I describe the page building\index{page building} mechanisms of \HINT, -let me summarize \TeX's page builder. - -\subsection{\TeX's page building mechanism} -\TeX's page builder ignores leading glue\index{glue}, kern\index{kern}, -and penalty\index{penalty} nodes until the first -box\index{box node} or rule\index{rule node} node is encountered; -whatsit\index{whatsit node} nodes do not really contribute anything to -a page; mark\index{mark node} nodes are recorded for later use. Once -the first box, rule, or insert\index{insert node} arrives, \TeX\ makes -copies of all parameters that influence the page building process and -uses these copies. These parameters are the \.{page\_goal} and the -\.{page\_max\_depth}. Further, the variables {\tt page\_total}, {\tt page\_shrink}, -{\tt page\_stretch}, {\tt page\_depth}, and {\tt in\-sert\_pe\-nal\-ties} are -initialized to zero. The top skip\index{top skip} adjustment is made -when the first box or rule arrives---possibly after an insert. -Now the page builder accumulates material: normal material goes -into {\tt box255}\index{box 255} and will change {\tt page\_total}, {\tt page\_shrink}, -{\tt page\_stretch}, and {\tt page\_depth}. The latter is adjusted so that -is does not exceed {\tt page\_max\_depth}. - -The handling of inserts\index{insert node} is more complex. -\TeX\ creates an insert class using {\tt newinsert}. This reserves a number $i$ -and four registers: {\tt box\hair$i$} for the inserted material, -{\tt count\hair$i$} for the magnification factor $f$, {\tt dimen\hair$i$} -for the maximum size per page $d$, and {\tt skip\hair$i$} for the -extra space needed on a page if there are any insertions of class $i$. - -For example plain \TeX\ allocates $n=254$ for footnotes\index{footnote} and sets -{\tt count254} to~$1000$, {\tt dimen254} to 8in, and {\tt skip254} to {\tt \BS big\-skip\-amount}. - -An insertion node will specify the insertion class $i$, some vertical material, -its natural height plus depth $x$, a {\tt split\-\_top\-\_skip}, a {\tt split\-\_max\_depth}, -and a {\tt floa\-ting\-\_pe\-nal\-ty}. - - -Now assume that an insert node with subtype 254 arrives at the page builder. -If this is the first such insert, \TeX\ will decrease the {\tt page\_goal} -by the width of {\tt skip254} and adds its stretchability and shrinkability -to the total stretchability and shrinkability of the page. Later, -the output routine will add some space and the footnote rule to fill just that -much space and add just that much shrinkability and stretchability to the page. -Then \TeX\ will normally add the vertical material in the insert node to -{\tt box254} and decrease the {\tt page\_goal} by $x\times f/1000$. - -Special processing is required if \TeX\ detects that there is not enough space on -the current page to accommodate the complete insertion. -If already a previous insert did not fit on the page, simply the {\tt floating\_penalty} -as given in the insert node is added to the total {\tt insert\_penalties}. -Otherwise \TeX\ will test that the total natural height plus depth of {\tt box254} -including $x$ does not exceed the maximum size $d$ and that the -${\tt page\_total} + {\tt page\_depth} + x\times f/1000 - {\tt page\_shrink} \le {\tt page\_goal}$. -If one of these tests fails, the current insertion -is split in such a way as to make the size of the remaining insertions just pass the tests -just stated. - -Whenever a glue node, or penalty node, or a kern node that is followed by glue arrives -at the page builder, it rates the current position as a possible end of the page based on -the shrinkability of the page and the difference between {\tt page\_total} and {\tt page\_goal}. -As the page fills, the page breaks tend to become better and better until the -page starts to get overfull and the page breaks get worse and worse until -they reach the point where they become {\tt awful\_bad}. At that point, -the page builder returns to the best page break found so far and fires up the -output routine. - - -\subsection{\HINT\ Page Templates} -Let's look at the problems that show up when implementing a replacement for \TeX's -page building mechanism. - -\enumerate -\item -An insertion node can not always specify its height $x$ because insertions may contain paragraphs that need -to be broken in lines and the height of a paragraph depends in some non obvious way on -its width. - -\item -Before the viewer can compute the height $x$, it needs to know the width of the insertion. Just imagine -displaying footnotes in two columns or setting notes in the margin. Knowing the width, it -can pack the vertical material and derive its height and depth. - -\item -\TeX's plain format provides an insert macro that checks whether there is still space -on the current page, and if so, it creates a contribution to the main text body, otherwise it -creates a {\tt topinsert}. Such a decision needs to be postponed to the \HINT\ viewer. - -\item -\HINT\ has no output routines that would specify something like the space and the rule preceding the footnote. - -\item -\TeX's output routines have the ability to inspect the content of the boxes, -split them, and distribute the content over the page. -For example, the output routine for an index set in two column format might -expect a box containing index entries up to a height of $2\times\.{vsize}$. -It will split this box in the middle and display the top part in the left -column and the bottom part in the right column. With this approach, the -last page will show two partly filled columns of about equal size. - -\item -\HINT\ has no mark nodes that could be used to create page headers or footers. -Marks, like output routines, contain token lists and need the full \TeX\ interpreter -for processing them. Hence, \HINT\ does not support mark nodes. -\endenumerate - - -Instead of output routines, \HINT\ uses page templates. -Page templates are basically vertical boxes with \sym{stream insert points} marking the -positions where the content of the box registers, filled by the page builder, -should appear. -To output the page, the viewer traverses the page template, -replaces the placeholders by the appropriate box content, and -sets the glue. - -It is only natural to treat the page's main body, -inserts, and marks using the same mechanism. We call this -mechanism a content stream\index{stream}. -Content streams are identified by a stream number in the range 0 to 254; -the number 255 is used to indicate an invalid stream number. -The stream number 0 is reserved for the main content stream; it is always defined. - -\medskip -{\small \advance \leftskip by 30pt \advance \rightskip by 30pt -It is planed to implement a replacement for \TeX's mark nodes using -different types of streams: -\itemize -\item normal streams correspond to \TeX's inserts and accumulate content on the page, -\item first\index{first stream} streams correspond to \TeX's first marks and will contain only the first insertion of the page, -\item last\index{last stream} streams correspond to \TeX's bottom marks and will contain only the last insertion of the page, and -\item top\index{top stream} streams correspond to \TeX's top marks. Top streams are not yet implemented. -\enditemize -\medskip -} - -Nodes from the content section are considered contributions to stream~0 except -for insert nodes which will specify the stream number explicitly. -If the stream is not defined or is not used in the current page template, its content is simply ignored. - -The page builder needs a mechanism to redirect contributions from one content -stream to another content stream based on the availability of space. -Hence a \HINT\ content stream can optionally specify a preferred stream number, -where content should go if there is still space available, a next stream number, -where content should go if the present stream has no more space available, and -a split ratio if the content is to be split between these two streams before -filling in the template. - -Various stream parameters govern the treatment of contributions to the stream -and the page building process. - -\itemize -\item The magnification factor $f$: Inserting a box of height $h$ to this stream will contribute $h\times f/1000$ -to the height of the page under construction. For example, a stream -that uses a two column format will have an $f$ value of 500; a stream -that specifies notes that will be displayed in the page margin will -have an $f$ value of zero. - -\item The height $h$: The extended dimension $h$ gives the maximum height this -stream is allowed to occupy on the current page. -To continue the previous example, a stream that will be split into two columns -will have $h=2\cdot\.{vsize}$ , and a stream that specifies -notes that will be displayed in the page margin will have -$h=1\cdot\.{vsize}$. You can restrict the amount of space occupied by -footnotes to the bottom quarter by setting the corresponding $h$ value -to $h=0.25\cdot\.{vsize}$. - -\item The depth $d$: The dimension $d$ gives the maximum depth this -stream is allowed to have after formatting. - -\item The width $w$: The extended dimension $w$ gives the width of this stream -when formatting its content. For example margin notes -should have the width of the margin less some surrounding space. - -\item The ``before'' list $b$: If there are any contributions to this -stream on the current page, the material in list $b$ -is inserted {\it before\/} the material from the stream itself. For -example, the short line that separates the footnotes from the main -page will go, together with some surrounding space, into the list~$b$. - -\item The top skip glue $g$: This glue is inserted between the material -from list $b$ and the first box of the stream, reduced -by the height of the first box. Hence it specifies the distance between -the material in $b$ and the first baseline of the stream content. - -\item The ``after'' list $a$: The list $a$ is treated like list $b$ but -its material is placed {\it after\/} the material from the stream itself. - -\item The ``preferred'' stream number $p$: If $p\ne 255$, it is the number of -the {\it preferred\/} stream. If stream $p$ has still -enough room to accommodate the current contribution, move the -contribution to stream $p$, otherwise keep it. For example, you can -move an illustration to the main content stream, provided there is -still enough space for it on the current page, by setting $p=0$. - -\item The ``next'' stream number $n$: If $n\ne 255$, it is the number of the -{\it next\/} stream. If a contribution can not be -accommodated in stream $p$ nor in the current stream, treat it as an -insertion to stream $n$. For example, you can move contributions to -the next column after the first column is full, or move illustrations -to a separate page at the end of the chapter. - -\item The split ratio\index{split ratio} $r$: If $r$ is positive, both $p$ and $n$ must -be valid stream numbers and contents is not immediately moved to stream $p$ or $n$ as described before. -Instead the content is kept in the stream itself until the current page is complete. -Then, before inserting the streams into the page template, the content of -this stream is formatted as a vertical box, the vertical box is -split into a top fraction and a bottom fraction in the ratio $r/1000$ -for the top and $(1000-r)/1000$ for the bottom, and finally the top -fraction is moved to stream $p$ and the bottom fraction to stream -$n$. You can use this feature for example to implement footnotes -arranged in two columns of about equal size. By collecting all the -footnotes in one stream and then splitting the footnotes with $r=500$ -before placing them on the page into a right and left column. Even -three or more columns can be implemented by cascades of streams using -this mechanism. -\enditemize - -\HINT\ allows multiple page templates but Hi\TeX\ currently does not implement -restricting them to individual page ranges and the viewer selects -the page template with the highest priority. To support different output media, the page -templates are named and a suitable user interface may offer the user a selection -of possible page layouts. In this way, the page layout remains in the hands of the -book designer, and the user has still the opportunity to pick a layout that best fits -the display device. - -The build-in page template with number 0 is always defined and has priority 0. -It will display just the main content stream. It puts a small margin -of $\.{hsize}/8 -4.5\hbox{pt}$ all around it. -Given a letter size page, 8.5 inch wide, this formula yields a margin of 1 inch, -matching \TeX's plain format. The margin will be positive as long as -the page is wider than $1/2$ inch. For narrower pages, there will be no -margin at all. In general, the \HINT\ viewer will never set {\tt hsize} larger -than the width of the page and {\tt vsize} larger than its height. - -%8.5 in should give 1 inch margin 2/17 -%612pt should give 72pt margin -%72pt = 612/8-4.5pt -%This would give a positive margin starting at 36pt or 1/2 inch - - -%\appendix - -%\plainsection{References} - -%{\baselineskip=11pt -%\def\bfblrm{\small\rm}% -%\def\bblem{\small\it}% -%\bibliography{../hint} -%\bibliographystyle{plain} -%} - -\plainsection{Index} -{ -\def\_{{\tt \UL}} % underline in a string -\catcode`\_=\active \let_=\_ % underline is a letter -\input hitexman.ind -} - -\write\cont{} % ensure that the contents file isn't empty -% \write\cont{\catcode `\noexpand\@=12\relax} % \makeatother -\closeout\cont% the contents information has been fully gathered - -\inx -\fin -\end diff --git a/Build/source/texk/web2c/hitexdir/man/hishrink.man b/Build/source/texk/web2c/hitexdir/man/hishrink.man new file mode 100644 index 00000000000..bf29ca9f440 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/man/hishrink.man @@ -0,0 +1,201 @@ +.TH HISHRINK 1 "11 November 2021" "Version 1.3" +.\"===================================================================== +.if n .ds MF Metafont +.if t .ds MF Metafont +.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP +.if n .ds TX TeX +.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP +.el .ds OX TeX +.\" BX definition must follow TX so BX can use TX +.if t .ds BX \fRB\s-2IB\s0\fP\*(TX +.if n .ds BX BibTeX +.\" LX definition must follow TX so LX can use TX +.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX +.if n .ds LX LaTeX +.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX +.if n .ds AX AmSTeX +.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX +.if n .ds AY AmSLaTeX +.if n .ds WB Web +.if t .ds WB W\s-2EB\s0 +.\"===================================================================== +.SH NAME +hishrink\- translating ASCII HINT files to binary files +.SH SYNOPSIS +.B hishrink +.RI [ options ] +.RI [ file ] +.\"===================================================================== +.SH DESCRIPTION +Shrinking converts an ASCII HINT file, usually with the extension +.BR .hint , +into a binary HINT file, with the extension +.BR .hnt . +.PP +The ASCII based HINT file format - also called `long' format - is optimized +for readability. It can be edited using a text editor. Hence it allows +simple modifications that would be difficult to achieve when using the binary +format. It is also convenient when debugging. +.PP +The binary HINT file format - also called `short' format - is optimized +for displaying HINT files. It can be parsed equally well in forward +and backward direction to enable fast forward or backward navigation in the file. +.PP +The binary HINT file format is designed for on-screen reading of documents. +Using a HINT viewer to display a HINT file, its content will dynamically +adapt to the available display area. For complete information on the +HINT file format and programs to view HINT files, see +.BR https://hint.userweb.mwn.de . +.\"===================================================================== +.SH OPTIONS +This version of +.B hishrink +understands the following command line options: +.TP +.B -a +Use only the localized names for auxiliary files as explained in the +.B FILES +section below. + +If you know that the auxiliary files can be found using the localized names, +for example after creating them with +.B histretch +using the +.B -a +option, you can use +.B hishrink +with the +.B -a +option to limit the search for the auxiliar files. +If you are unsure, you should use neither the +.B -a +nor the +.B -g +option. +.B hishrink +will then search for auxiliar files first using the localized path names +and then using the path names as given. +.TP +.B -c +Enable the use of compression for the HINT file. Compressed files are +smaller but require decompression when viewing. Use only for large +files if the file size matters. +.TP +.BI -d \ bitmask +Sets HINT file debugging flags according to the +.IR bitmask . +Use the +.B --help +option for details. +.TP +.B -g +Do not use the localized names for auxiliary files as explained in the +.B FILES +section below. + +You may use this option if you know that all auxiliar files +are at the locations described by the path names stored in the HINT file. +If you are unsure, you should use neither the +.B -g +nor the +.B -a +option. +.B hishrink +will then search for auxiliar files first using the localized path names +and then using the path names as given. +.TP +.B --help +Print help message and exit. +.TP +.B -l +Redirect standard error to a log file. The name of the log file is derived from +the name of the input file replacing the extension +.B .hint +by the extension +.BR .log . +.TP +.BI -o \ name +Use +.I name +for the output file instead of deriving it from the name of the input file. +Append the extension +.B .hnt +if the +.I name +does not already has that extension. +.TP +.B --version +Print version information and exit. +.\"===================================================================== +.SH FILES +Binary HINT files must contain all resources necessary to display the file, +for example font and image files. These files are called auxiliary files. +ASCII HINT files contain only the path names of these files. + +When creating a binary HINT file from an ASCII HINT file, it is +necessary to find these files, read them, and include them in the binary output file. +When creating an ASCII HINT file from a binary HINT file, it is +convenient if these files can be extracted and written to the file system. +To avoid clobbering arbitrary directories with files when extracting auxiliary +files, it is possible to map the path names as stored in the HINT file +to +.B localized +path names before writing or reading auxiliar files. + +When computing a localized path name from a given path name, +a distinction is made between global resources, +like fonts, that are referenced by an absolute path name, and local +resources, for example an image, that are referenced by a relative +path name. The directory that starts the localized path name of the former +has the extension +.B .abs +and for the latter the extension +.BR .rel +is used. +To keep auxiliary files in these subdirectories even if their path +contains links to a parent directory, parent links +.RB ` .. ' +are replaced by +.RB ` __ ' +links to subdirectories. + +For example, +given an input file +.BR paper.hint, +the global resources are stored in the +.B paper.abs +directory and local resources are stored in +.BR paper.rel . +An absolute path like +.B /usr/share/fonts/ +will then map to the localized path +.BR paper.abs/usr/share/fonts/ +and a relative path like +.B ../image/img1.jpg +will then map to the localized path +.BR paper.rel/__/image/img1.jpg . +.\"===================================================================== +.SH NOTES +This manual page is not meant to be exhaustive. The complete +documentation can be found in the +.IR "HINT: The file format" . +This document is available as a book or in electronic form from the +HINT project home page at +.BR https://hint.userweb.mwn.de . +There you find additional software, most importantly viewers for HINT files, +and further information. +.\"===================================================================== +.SH AVAILABILITY +.B hishrink +should compile on a large variety of machine architectures +and operating systems. +It is part of the \*(TX Live distribution. +.PP +.\"===================================================================== +.SH "SEE ALSO" +.BR histretch (1), +.BR hitex (1), +.\"===================================================================== +.SH AUTHORS +Martin Ruckert +.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/man/histretch.man b/Build/source/texk/web2c/hitexdir/man/histretch.man new file mode 100644 index 00000000000..cbc385f5f01 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/man/histretch.man @@ -0,0 +1,239 @@ +.TH HISTRETCH 1 "11 November 2021" "Version 1.3" +.\"===================================================================== +.if n .ds MF Metafont +.if t .ds MF Metafont +.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP +.if n .ds TX TeX +.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP +.el .ds OX TeX +.\" BX definition must follow TX so BX can use TX +.if t .ds BX \fRB\s-2IB\s0\fP\*(TX +.if n .ds BX BibTeX +.\" LX definition must follow TX so LX can use TX +.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX +.if n .ds LX LaTeX +.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX +.if n .ds AX AmSTeX +.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX +.if n .ds AY AmSLaTeX +.if n .ds WB Web +.if t .ds WB W\s-2EB\s0 +.\"===================================================================== +.SH NAME +histretch \- translating binary HINT files to ASCII files +.SH SYNOPSIS +.B histretch +.RI [ options ] +.RI [ file ] +.\"===================================================================== +.SH DESCRIPTION +Stretching converts a binary HINT file, usually with the extension +.BR .hnt , +into an ASCII based HINT file, with the extension +.BR .hint . +.PP +The binary HINT file format - also called `short' format - is optimized +for displaying HINT files. It can be parsed equally well in forward +and backward direction to enable fast forward or backward navigation in the file. +.PP +The ASCII based HINT file format - also called `long' format - is optimized +for readability. It can be edited using a text editor. Hence it allows +simple modifications that would be difficult to achieve when using the binary +format. It is also convenient when debugging. +.PP +The binary HINT file format is designed for on-screen reading of documents. +Using a HINT viewer to display a HINT file, its content will dynamically +adapt to the available display area. For complete information on the +HINT file format and programs to view HINT files, see +.BR https://hint.userweb.mwn.de . +.\"===================================================================== +.SH OPTIONS +This version of +.B histretch +understands the following command line options: +.TP +.B -a +Write auxiliar files to disk using the localized path names as explained in the +.B FILES +section below. + +Use this option if you are stretching a HINT file that you later want +to shrink back to its binary format unless you know that you have +already all the auxiliary files contained in it. +.TP +.BI -d \ bitmask +Sets HINT file debugging flags according to the +.IR bitmask . +See the +.B --help +option for details. +.TP +.B -f +Force the replacement of existing auxiliary files. +Use this option together with the +.B -g +or +.B -a +option to make sure that already exiting auxiliary files are replaced by the +auxiliary files contained in the HINT file. + +.BR WARNING : +This is a dangerous option especially together with the +.B -g +option. Never use it on a HINT file of unknown +origin. It will possibly replace any file on your machine you have +write access to. If in doubt, don't use the +.B -f +option. +.TP +.B -g +Write auxiliar files to disk using the path names as stored in the HINT file. +This option is an alternative to the +.B -a +option and takes precedence if given. +If in doubt, don't use the +.B -g +option. +If you just want to stretch the HINT file, then edit it, and then shrink +it back to the binary format, you should use the +.B -a +option. + +You may use this option if you are stretching a HINT file on the same machine and in +the same directory where you have created the HINT file. Then all files +will be copied to the location they came from in case they were deleted +in the meantime. + +If you are stretching a HINT file on one machine and the file was created +on a different machine, +.B histretch +will try to copy an auxiliary file +into the same directory that was used when the HINT file was created, provided that +you have the necessary writing rights. +This is probably where you want the auxiliary file assuming that both machines have the +same directory structure. + +.BR WARNING : +This is a dangerous option especially together with the +.B -f +option. Never use it on a HINT file of unknown +origin. It can possibly write (and replace) any file on your machine where you have +write access. +.TP +.B --help +Print help message and exit. +.TP +.B -l +Redirect standard error to a log file. The name of the log file is derived from +the name of the input file replacing the extension +.B .hnt +by the extension +.BR .log . +.TP +.BI -o \ name +Use +.I name +for the output file instead of deriving it from the name of the input file. +Append the extension +.B .hint +if the +.I name +does not already has that extension. +.TP +.B -u +Enable the use of UTF8 character codes. +Without this option, the output file is a pure ASCII file, because character codes +outside the ASCII range are written using their numeric representation. +With this option, the file will always represent printable characters using their UTF8 +character codes. This might make the output file more readable if displayed +using an UTF8 enabled program; but it might be less readable if displayed +by a program that does not handle UTF8 characters properly. See also the +.B -x +option. +.TP +.B --version +Print version information and exit. +.TP +.B -x +Enable the use of hexadecimal character codes. +Without this option, characters that are not represented using their +character codes are represented using a decimal representation of +the character code. With this option a hexadecimal representation is used. +The range of character codes that have a numeric representation includes +the non printable characters (character codes smaller than 32) +and unless the +.B -u +option is given, the character codes with a value of 127 and above. +.\"===================================================================== +.SH FILES +Binary HINT files must contain all resources necessary to display the file, +for example font and image files. These files are called auxiliary files. +ASCII HINT files contain only the path names of these files. + +When creating a binary HINT file from an ASCII HINT file, it is +necessary to find these files, read them, and include them in the binary output file. +When creating an ASCII HINT file from a binary HINT file, it is +convenient if these files can be extracted and written to the file system. +To avoid clobbering arbitrary directories with files when extracting auxiliary +files, it is possible to map the path names as stored in the HINT file +to +.B localized +path names before writing or reading auxiliar files. + +When computing a localized path name from a given path name, +a distinction is made between global resources, +like fonts, that are referenced by an absolute path name, and local +resources, for example an image, that are referenced by a relative +path name. The directory that starts the localized path name of the former +has the extension +.B .abs +and for the latter the extension +.BR .rel +is used. +To keep auxiliary files in these subdirectories even if their path +contains links to a parent directory, parent links +.RB ` .. ' +are replaced by +.RB ` __ ' +links to subdirectories. + +For example, +given an input file +.BR paper.hint, +the global resources are stored in the +.B paper.abs +directory and local resources are stored in +.BR paper.rel . +An absolute path like +.B /usr/share/fonts/ +will then map to the localized path +.BR paper.abs/usr/share/fonts/ +and a relative path like +.B ../image/img1.jpg +will then map to the localized path +.BR paper.rel/__/image/img1.jpg . +.\"===================================================================== +.SH NOTES +This manual page is not meant to be exhaustive. The complete +documentation can be found in +.IR "HINT: The file format" . +This document is available as a book or in electronic form from the +HINT project home page at +.BR https://hint.userweb.mwn.de . +There you find additional software, most importantly viewers for HINT files, +and further information. +.\"===================================================================== +.SH AVAILABILITY +.B histretch +should compile on a large variety of machine architectures +and operating systems. +It is part of the \*(TX Live distribution. +.PP +.\"===================================================================== +.SH "SEE ALSO" +.BR hishrink (1), +.BR hitex (1), +.\"===================================================================== +.SH AUTHORS +Martin Ruckert +.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/man/hitex.man b/Build/source/texk/web2c/hitexdir/man/hitex.man new file mode 100644 index 00000000000..ef1655d1b82 --- /dev/null +++ b/Build/source/texk/web2c/hitexdir/man/hitex.man @@ -0,0 +1,384 @@ +.TH HITEX 1 "11 November 2021" "Version 1.0" +.\"===================================================================== +.if n .ds MF Metafont +.if t .ds MF Metafont +.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP +.if n .ds TX TeX +.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP +.el .ds OX TeX +.\" BX definition must follow TX so BX can use TX +.if t .ds BX \fRB\s-2IB\s0\fP\*(TX +.if n .ds BX BibTeX +.\" LX definition must follow TX so LX can use TX +.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX +.if n .ds LX LaTeX +.if t .ds AX \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(TX +.if n .ds AX AmSTeX +.if t .ds AY \fRA\\h'-0.1667m'\\v'0.20v'M\\v'-0.20v'\\h'-0.125m'S\fP\*(LX +.if n .ds AY AmSLaTeX +.if n .ds WB Web +.if t .ds WB W\s-2EB\s0 +.\"===================================================================== +.SH NAME +hitex \- HINT output from TeX +.SH SYNOPSIS +.B hitex +.RI [ options ] +.RI [ \fB&\fPformat ] +.RI [ file | \fB\e\fPcommands ] +.\"===================================================================== +.SH DESCRIPTION +Run the Hi\*(TX typesetter on +.IR file , +usually creating +.IR file.hnt . +If the file argument has no extension, ".tex" will be appended to it. +Instead of a file name, a set of Hi\*(TX commands can be given, the first +of which must start with a backslash. +With a +.BI & format +argument Hi\*(TX uses a different set of precompiled commands, +contained in +.IR format\fB.fmt\fP ; +it is usually better to use the +.B -fmt +.I format +option instead. +.PP +Hi\*(TX is a version of \*(TX that creates HINT files. The HINT file +format is designed for on-screen reading of documents. Using a HINT +viewer (see +.BR https://hint.userweb.mwn.de ) +to display a HINT file its content will dynamically adapt to the +available display area. +.PP +The typical use of Hi\*(TX is with pre generated formats. +The +.B hitex +command uses the equivalent of the plain \*(TX format, and the +.B hilatex +command uses the equivalent of the \*(LX format. +To generate formats, use the +.B -ini +switch. +.PP +Hi\*(TX's handling of its command-line arguments is similar to that of +of the other \*(TX programs in the +.I web2c +implementation. +.PP +Hi\*(TX incorporates the e-\*(TX +extensions (see +.BR etex (1)) +if used with the +.B -etex +switch. +.PP +Hi\*(TX incorporates the extensions needed for \*(LX +(see +.BR latex (1)) +if used with the +.B -ltx +switch. +.\"===================================================================== +.SH OPTIONS +This version of Hi\*(TX understands the following command line options. +.TP +.BI -cnf-line \ string +Parse +.I string +as a +.I texmf.cnf +configuration line. See the Kpathsea manual. +.TP +.B -compress +Enable the use of compression for the HINT file. Compressed files are +smaller but require decompression when viewing. Use only for large +files if the file size matters. +.TP +.B -empty-page +When writing books, often empty pages are inserted - for example to +begin chapters on a right hand side page. These empty pages are +a nuisance for on-screen reading where there are no left or right +hand side pages. This option keeps empty pages in the output. +.TP +.B -no-empty-page +This option tries to eliminate empty pages in the output. It is set as a default. +.TP +.B -etex +Enable the e-\*(TX extensions. This option is only effective in +combination with +.BR -ini . +See +.BR etex (1). +.TP +.B -file-line-error +Print error messages in the form +.I file:line:error +which is similar to the way many compilers format them. +.TP +.B -no-file-line-error +Disable printing error messages in the +.I file:line:error +style. +.TP +.BI -fmt \ format +Use +.I format +as the name of the format to be used, instead of the name by which +Hi\*(TX was called or a +.I %& +line. +.TP +.B -help +Print help message and exit. +.TP +.BI -hint-debug \ bitmask +Sets HINT file debugging flags according to the +.IR bitmask . +See the +.B -hint-debug-help +option for details. +.TP +.B -hint-debug-help +Print an explanation of the HINT debugging flags and exit. +.TP +.B -hyphenate-first-word +\*(TX will usually not attempt to insert hyphenation points into the first +word of a paragraph. If a HINT file must be displayed on a very small device +such hyphenation points might prove necessary. This option is set by default +and enables the generation of these hyphenation points. +.TP +.B -no-hyphenate-first-word +Disable the automatic insertion of hyphenation points in the first word +of a paragraph. Needed only if complete compatibility with \*(TX is required. +.TP +.B -ini +Start in +.I INI +mode, which is used to dump formats. The +.I INI +mode can be used for typesetting, but no format is preloaded, and +basic initializations like setting catcodes may be required. +.TP +.BI -interaction \ mode +Sets the interaction mode. The mode can be either +.IR batchmode , +.IR nonstopmode , +.IR scrollmode , +and +.IR errorstopmode . +The meaning of these modes is the same as that of the corresponding +\ecommands. +.TP +.BI -jobname \ name +Use +.I name +for the job name, instead of deriving it from the name of the input file. +.TP +.BI -kpathsea-debug \ bitmask +Sets path searching debugging flags according to the bitmask. See the +.I Kpathsea +manual for details. +.TP +.B -ltx +Enable the \*(LX extensions. This option is only effective in +combination with +.BR -ini . +See +.BR latex (1). +.TP +.BI -mfmode \ mode +Use +.I mode +as the \*(MF +.I mode +when generating missing fonts. See +.BR mf (1) +for details. +.TP +.BI -mktex \ fmt +Enable +.RI mktex fmt , +where +.I fmt +must be either +.IR tex , +.IR tfm , +.IR fmt , +or +.IR pk . +.TP +.BI -no-mktex \ fmt +Disable +.RI mktex fmt , +where +.I fmt +must be either +.IR tex , +.IR tfm , +.IR fmt , +or +.IR pk . +.TP +.BI -output-directory \ directory +Write output files in +.I directory +instead of the current directory. Look up input files in +.I directory +first, then along the normal search path. +.TP +.B -parse-first-line +If the first line of the main input file begins with +.I %& +parse it to look for a dump name. +.TP +.B -no-parse-first-line +Disable parsing of the first line of the main input file. +.TP +.BI -progname \ name +Pretend to be program +.IR name . +This affects both the format used and the search paths. +.TP +.BI -resolution \ number +When using \*(MF to generate missing pk fonts, use a resolution of +.I number +DPI. See +.BR mf (1) +for details. +.TP +.B -version +Print version information and exit. +.\"===================================================================== +.SH ENVIRONMENT +See the Kpathsea library documentation (e.g., the `Path specifications' +node) for precise details of how the environment variables are used. +The +.B kpsewhich +utility can be used to query the values of the variables. +.PP +One caveat: In most Hi\*(TX formats, you cannot use ~ in a file name you +give directly to Hi\*(TX, because ~ is an active character in \*(TX, +and hence is expanded, not taken as part of the file name. Other +programs, such as \*(MF, do not have this problem. +.PP +.TP +.B TEXMFOUTPUT +Normally, Hi\*(TX puts its output files in the current directory. If +any output file cannot be opened there, it tries to open it in the +directory specified in the environment variable TEXMFOUTPUT. +There is no default value for that variable. For example, if you say +.I hitex paper +and the current directory is not writable and TEXMFOUTPUT has +the value +.IR /tmp , +Hi\*(TX attempts to create +.I /tmp/paper.log +(and +.IR /tmp/paper.hnt , +if any output is produced.) TEXMFOUTPUT is also checked for input +files, as \*(TX often generates files that need to be subsequently +read; for input, no suffixes (such as ``.tex'') are added by default, +the input name is simply checked as given. +.TP +.B TEXINPUTS +Search path for +.I \einput +and +.I \eopenin +files. +This normally starts with ``.'', so +that user files are found before system files. An empty path +component will be replaced with the paths defined in the +.I texmf.cnf +file. For example, set TEXINPUTS to ".:/home/user/tex:" to prepend the +current directory and ``/home/user/tex'' to the standard search path. +.TP +.B TEXFORMATS +Search path for format files. +.TP +.B TFMFONTS +Search path for font metric +.RI ( .tfm ) +files. +.TP +.B SOURCE_DATE_EPOCH +If set, its value, taken to be in epoch-seconds, will be used for the +creation date and as the reference moment for the time related +primitives of \*(LX. This is useful for making reproducible builds. +.TP +.B FORCE_SOURCE_DATE +If set to the value "1", the time-related \*(TX primitives +.RI ( \eyear , +.IR \emonth , +.IR \eday , +.IR \etime ) +are also initialized from the value of SOURCE_DATE_EPOCH. This is not +recommended if there is any viable alternative. +.PP +Many, many more environment variables may be consulted related to path +searching. See the Kpathsea manual. +.\"===================================================================== +.SH FILES +The location of the files mentioned below varies from system to +system. Use the +.B kpsewhich +utility to find their locations. +.TP +.I *.tfm +Metric files for Hi\*(TX's fonts. +.TP +.I *.fmt +Predigested Hi\*(TX format files. +.TP +.I *.pk *.pfb +Font files used by Hi\*(TX. +.\"===================================================================== +.SH NOTES +This manual page is not meant to be exhaustive. The complete +documentation for Hi\*(TX can be found in the +.IR "Hi\*(TX user manual" +Further information can be found in the manual of the +.I "Kpathsea library" +and in +.I "HINT: The file format" +which is available as a book or in electronic form from the +HINT project home page at +.BR https://hint.userweb.mwn.de . +.\"===================================================================== +.SH BUGS +This version of Hi\*(TX fails to handle correctly glues and kerns with a +width that depends on \ehsize or \evsize. Similarly, when +the layout of table entries or mathematical formulas depends on \ehsize +or \evsize their output might be distorted. +.\"===================================================================== +.SH AVAILABILITY +Hi\*(TX should compile on a large variety of machine architectures +and operating systems. +Hi\*(TX is part of the \*(TX Live distribution. +.PP +The Hi\*(TX home page is at +.BR https://hint.userweb.mwn.de . +There you find additional software, most importantly viewers for HINT files, +and further information. +.\"===================================================================== +.SH "SEE ALSO" +.BR histretch (1), +.BR hishrink (1), +.BR latex (1), +.BR tex (1), +.BR kpsewhich (1), +.\"===================================================================== +.SH AUTHORS +The primary author of Hi\*(TX is Martin Ruckert, +with e\*(TX extensions by Peter Breitenlohner, +\*(LX extensions by Thierry Laronde, and +the kpathsearch library by Karl Berry. +.PP +\*(TX was designed by Donald E. Knuth, +who implemented it using his \*(WB system for Pascal programs. +.PP +Many, many more contributed to the typesetting system now known as \*(TX; +far too many to name all of them here. +.\" vim: syntax=nroff diff --git a/Build/source/texk/web2c/hitexdir/verbatim.tex b/Build/source/texk/web2c/hitexdir/verbatim.tex deleted file mode 100644 index ed2aa700b9c..00000000000 --- a/Build/source/texk/web2c/hitexdir/verbatim.tex +++ /dev/null @@ -1,48 +0,0 @@ -% F I L E V E R B A T I M . T E X -% -% THIS SET OF MACROs IS TAKEN FROM D.E.K.'s TeXBook -% AND PROVIDES AN EASY WAY OF TYPESETTING TEXTS VERBATIM: -% -% 1. \verbatim -% causes the text to be set verbatim using \tt font; -% 2. if the text uses up all the alphabet, \doubleverbatim macro -% can be used instead; this is similar to the previous one but -% a pair of characters is now used as a delimiter; -% 3. in case of emergency \tripleverbatim macro may be of help... -% -%--------------------------------------------- -\def\uncatcodespecials % see D.E.K., pp. 344 and 380 - {\def\do##1{\catcode`##1=12}\dospecials}% -%--------------------------------------------- -{\catcode`\^^I=\active \gdef^^I{\ \ \ \ }% TAB character is replaced by - % 4 spaces; it is better than - % nothing, but it does not mimic - % true tabbing satisfactorily---maybe - % some nice day... - \catcode`\`=\active\gdef`{\relax\lq}}% this line inhibits Spanish - % ligatures ?` and !` of \tt font -\def\setupverbatim % see D.E.K., p. 381 - {\tt % - \spaceskip=0pt \xspaceskip=0pt % just in case... - \catcode`\^^I=\active % - \catcode`\`=\active % - \def\par{\leavevmode\endgraf}% this causes that empty lines aren't - % skipped - \obeylines \uncatcodespecials \obeyspaces}% -{\obeyspaces \global\let =\ }% this causes that leading blanks aren't - % skipped; cf. also def's of \space, \endgraf, - % \lq, \obeyspaces, and \obeylines, - % D.E.K., pp. 351--352 -%--------------------------------------------- -% see D.E.K., p. 382 -\def\doverbatim#1{\def\next##1#1{##1\endgroup}\next}% -\def\verbatim{\begingroup\setupverbatim\doverbatim}% -%---------- -\def\dodoubleverbatim#1#2{\def\next##1#1#2{##1\endgroup}\next}% -\def\doubleverbatim{\begingroup\setupverbatim\dodoubleverbatim}% -%---------- -\def\dotripleverbatim#1#2#3{\def\next##1#1#2#3{##1\endgroup}\next}% -\def\tripleverbatim{\begingroup\setupverbatim\dotripleverbatim}% -%--------------------------------------------- -\endinput - -- cgit v1.2.3