% pubx.macros ejb 17 Aug 91 % macros from pubs.macros needed for exd and exb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Note from pubs.macros: This is a macro file designed to be used with tex ... % supposed to do basically what pntex does % % Taken from pubs.macros, it contains at least portions of % the following sections: modelled on stuff from the following macro files: % % FONTS (partial) fonts-86.macro, lecmacros.tex % PARAMETERS init.macro, lecmacros.tex % %ENVIRONMENTS (done in twimacx) % COUNTERS AND NUMBERS init.macro, lecmacros.tex %%%%None of the rest: % TOLERANCES init.macro % INDEX, TOC index.macro % DOCUMENT STRUCTURE init.macro, lecmacros.tex, aczel % MISCELLANEOUS init.macro % FOOTNOTES footnote.macro % REFERENCES init.macro % DISPLAYS AND ENUMERATION display.macro, enum.macro % OUTPUT SPECS output.macro,lecmacros.tex % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ***************** % **** FONTS **** % ***************** % \font \tenchapfont =cmbx10 scaled \magstep 2 \font \tenchapmi =cmmi10 scaled \magstep 2 %math it \font \tenchapsl =cmsl12 scaled \magstep 1 %slanted rm \font \tenchapit =cmbxti10 scaled \magstep 2 %reg. it. \font \tenchaptt =cmtt12 scaled \magstep 1 \font \tenchapsc =cmbx10 scaled \magstep 1 \font \tenchaprm =cmr10 scaled \magstep 2 \font \eleventt =cmtt10 scaled \magstephalf \let \sectionfont =\elevenbf \let \sectiontt =\eleventt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % init.macros, lecmacros.tex % % ********************** % **** PARAMETERS **** % ********************** \newdimen \normalparindent \normalparindent =18pt \parindent =\normalparindent \newskip \normalparskip \normalparskip =0pt \parskip =\normalparskip \newskip \abovechapterskip \newskip \belowchapterskip \newskip \chapterbaselineskip \newskip \abovesectionskip \newskip \belowsectionskip \newskip\sectionbaselineskip \newskip \abovesubsectionskip \newskip \belowsubsectionskip \newskip \subsectionbaselineskip \newskip\abovesubsubsectionskip \newskip\belowsubsubsectionskip \newskip\subsubsectionbaselineskip \newskip\itemskipamt \newskip\beginitemskip \newskip\enditemskip \newskip\abovethingskip \newskip\belowthingskip \newif\ifelevenpoint \newif\iftenpoint \newif\iftwelvepoint \newif\ifdouble \doublefalse \let\nodoublespace=\doublefalse \let\doublespace=\doubletrue \newskip\doublebaselineskip \newskip\doublelineskip \newskip\bls \def\doublebaselines{\lineskip =\doublelineskip \baselineskip =\doublebaselineskip} \def\baselines{\ifdouble \doublebaselines \else \normalbaselines \fi} \def\parameters{\let\nbls=\normalbaselineskip \doublelineskip =\normallineskip \iftwelvepoint \doublebaselineskip =1.6\nbls \else \ifelevenpoint \doublebaselineskip =1.5\nbls \else \iftenpoint \doublebaselineskip =1.5\nbls \else \doublebaselineskip =1.25\nbls \fi \fi \fi \ifdouble \bls=\doublebaselineskip \else \bls=\nbls \fi \belowchapterskip =2.75\bls plus .27\bls minus .20\bls \advance\belowchapterskip by -\bls \chapterbaselineskip =1.5\bls % \abovesectionskip =2.5\bls plus .25\bls minus .19\bls % \belowsectionskip =1.9\bls plus .19\bls minus .15\bls \abovesectionskip =1.9\bls plus .19\bls minus .13\bls \belowsectionskip =1.4\bls plus .14\bls minus .10\bls \advance \belowsectionskip by -\bls % This compensates for TeX's automatic interbaseline glue. \sectionbaselineskip =1.25\bls \abovesubsectionskip =1.9\bls plus .19\bls minus .13\bls \belowsubsectionskip =1.4\bls plus .14\bls minus .10\bls \advance \belowsubsectionskip by -\bls \subsectionbaselineskip =\bls \abovesubsubsectionskip =1.4\bls plus .14\bls minus .10\bls \belowsubsubsectionskip =1.1\bls plus .11\bls minus .08\bls \advance \belowsubsubsectionskip by -\bls \subsubsectionbaselineskip=\bls \itemskipamt =.2\bls plus .01\bls minus .01\bls \beginitemskip =.25\bls plus .01\bls minus .01\bls \advance\beginitemskip by -\itemskipamt \enditemskip =.25\bls plus .01\bls minus .01\bls \abovethingskip =.45\bls plus .03\bls minus .01\bls \belowthingskip =.45\bls plus .03\bls minus .01\bls \setbox \strutbox=\hbox{\vrule height .70\bls depth .30\bls width 0pt} \baselines} \newskip\onbls % "old" normal baseline-skip \def\baselinecontrol#1{\onbls=\nbls %must FOLLOW style and envirmnt commands \def\usualbaselines{\normalbaselineskip=\onbls \parameters} \normalbaselineskip=#1 \parameters} \def\begindouble{\begingroup \baselinecontrol{1.5\bls}} \def\enddouble{\par\vskip-\parskip \endgroup \noindent} \def\beginhalf{\begingroup \baselinecontrol{.6667\bls}} \def\endhalf{\par\vskip-\parskip \endgroup \noindent} \def\beginbaselinectrl#1{\begingroup \baselinecontrol{#1}} \let\endbaselinectrl=\enddouble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % init.macro, lecmacros.tex % % ******************************** % **** COUNTERS AND NUMBERS **** % ******************************** % % Counters are explained in the TeXbook. Numbers (e.g., \sectionnumber) % are commands to TeX to print the current value of the corresponding % counter. Only counters can be changed (by the \advance command); numbers % cannot. \newcount \beginchappageno \beginchappageno =0 \newcount \bottompageno \bottompageno =1 \newcount \partno \partno =0 \newcount \chapterno \chapterno =0 \newcount \sectionno \sectionno =0 \newcount \subsectionno \subsectionno =0 \newcount \subsubsectionno \subsubsectionno =0 \newcount \displayno \displayno =0 \let\sentenceno=\displayno \newcount \footnoteno \footnoteno =0 \newcount \appendixno \appendixno =0 \def \Partnumber {\uppercase \expandafter {\number\partno}} \def \Chapternumber {\uppercase \expandafter {\number\chapterno}} \def \partnumber {\number\partno} \def \partroman {\uppercase\expandafter{\romannumeral\partno}} \def \chapternumber {\number\chapterno} \def \sectionnumber {\number\sectionno} \def \sectionroman {\uppercase\expandafter{\romannumeral\sectionno}} \def \subsectionnumber {\number\subsectionno} \def \subsubsectionnumber {\number\subsubsectionno} \def \displaynumber {\number\displayno} \let\sentencenumber=\displaynumber \def \footnotenumber {\number\footnoteno} \def \appendixnumber {\number\appendixno} \def\zeroall{} %\def\zeroall{\global\theoremno=0 \global\exampleno=0 \global\exerciseno=0 % \global\definitionno=0 \global\figureno=0 \global\tableno=0} \newif\iftocmode \tocmodefalse %************************* INDEX MACROS ********************** %% the following is a short setup of what the index file should look like % %%%%%%%%%%%%%%%%%%%%%%%%%% % % \null\vfil\eject % \ifodd\pageno \else\ifblankpages % \null\vskip15pc\centerline{(blank page)}\vfil\eject % \else\global\advance\pageno by 1\fi\fi % \begingroup % \indexformat % % [Heading of some sort --- extend hsize temporarily?] % % \beginindexitems % % \newletter{a}bbreviatory conventions, 63 % % Ades, A. E., 8, 76n, 82 % % \vskip\entryskip % % \newletter{X}erox Palo Alto Research Center, 92 % % \endindexitems % \endgroup % %%%%%%%%%%%%%%%%%%%%%%%%%%% % % At the top of second column of the first page, will have to % introduce a \vtop to9pc{\vfil} (or thereabouts) to make the tops of % the columns line up. Adjust till it works. % If the \hsize of the text has been advanced, it needs to be done % half as much again immediately after \indexformat command; and % also advance \fullhsize by the full amount. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Changed \inx to \idx, to avoid conflict with lpwebmac. -ejb 22 Oct 91 % \newdimen\fullhsize \newbox\leftcolumn \newdimen\idxskip \idxskip=7.6pc \outer\def\indexformat{\vfill\eject \ifodd\pageno \else\ifblankpages \null\vskip15pc\centerline{(blank page)}\vfill\eject \else\global\advance\pageno by 1 \fi \fi \beginchappageno=\pageno \hsize=13pc \fullhsize=27pc \advance\idxskip by\bls \advance\idxskip by\chapterbaselineskip \advance\idxskip by\belowchapterskip \output={\if L\lr \global\setbox\leftcolumn=\columnbox \global\let\lr=R \else\doubleformat \global\let\lr=L\fi \ifnum\outputpenalty>-20000 \else\dosupereject\fi} \def\makeheadline{\vbox to 0pt{\vskip-22.5pt \fullline{\vbox to8.5pt{}\the\headline}\vss}\nointerlineskip} \def\makefootline{\baselineskip24pt\fullline{\the\footline}} } \def\fullline{\hbox to\fullhsize} \let\lr=L \def\doubleformat{\def\righthoffset{\hoffset=4.0pc} \def\lefthoffset{\hoffset=5.5pc} \ifdoubleside \ifodd\pageno \righthoffset \else \lefthoffset \fi \else \righthoffset \fi \shipout\vbox{\makeheadline \fullline{\box\leftcolumn\hfil\columnbox} \makefootline} \advancepageno } \def\columnbox{\leftline{\pagebody}} \outer\def \beginindexitems {\begingroup \parskip =0pt plus 1pt \leftskip =\normalparindent \parindent =-\normalparindent \ifelevenpoint \tenpoint \else \ninepoint \fi \raggedright} \def \endindexitems {\vfil\eject \endgroup} \newskip\entryskip \entryskip=9pt \def\newletterfont{\ifelevenpoint\twelvebf \else\iftenpoint\elevenbf \else\tenbf \fi \fi} \def\newletter#1{{\newletterfont\uppercase{#1}}} \def\idxspace{\vtop to\idxskip{\vfill}} \let\firstletter=\newletter \outer\def\subidxitem#1\par{\begingroup \advance\parindent by.5\normalparindent \raggedright #1 \par \endgroup} % Use the following \subidxitem defn if \obeylines is used (i.e., if % index entries are not to be separated by blank lines) otherwise % use the defn above... % \outer\def\subidxitem#1 {\begingroup % \advance\parindent by.5\normalparindent % \raggedright #1 % \endgroup} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifproofmode %\proofmodetrue % this should be false when making camera-ready copy \proofmodefalse \let\indexmodetrue=\proofmodetrue \let\indexmodefalse=\proofmodefalse % run into trouble when preloading macros since among other things % \jobname is not defined. To avoid define a macro \makeindex. \catcode`@=11 % borrow the private macros of PLAIN (with care) % the following uses the definition of \newwrite without \outer \newwrite\idx \def\makeindex{\alloc@7\write\chardef\sixt@@n\idx %\newwrite\idx \immediate\openout\idx=\jobname.ind % file for index reminders } \newif\ifsilent \def\specialhat{\ifmmode\def\next{^}\else\let\next=\beginxref\fi\next} \def\beginxref{\futurelet\next\beginxrefswitch} \def\beginxrefswitch{\ifx\next\specialhat\let\next=\silentxref \else\silentfalse\let\next=\xref\fi \next} \catcode`\^=\active \let ^=\specialhat \def\silentxref^{\silenttrue\xref} \def\marginstyle{\vrule height6pt depth2pt width\z@ \sevenrm} %% The following is changed from what's in pubs.macros, to conform to %% what's in the TeXbook. \chardef\bslash=`\\ \def\xref{\futurelet\next\xrefswitch} \def\xrefswitch{\begingroup \ifx\next|\aftergroup\vxref % code 1, |arg|. Or 2, |\arg| \else\ifx\next<\aftergroup\anglexref % code 3, \else\aftergroup\normalxref \fi\fi\endgroup} % case 0, "{arg}" \def\normalxref#1{\def\xreftype{0}\def\text{#1}\let\next=\text\makexref} \def\vxref|{\catcode`\\=\active \futurelet\next\vxrefswitch} \def\vxrefswitch#1|{\catcode`\\=0 \ifx\next\empty% \def\xreftype{2}\def\next{{\tt\bslash\text}}% code 2, |\arg| \else\def\xreftype{1}\def\next{{\tt\text}}\fi % code 1, |arg| \edef\text{#1}\makexref} {\catcode`\|=0 \catcode`\\=\active |gdef\{}} \def\anglexref<#1>{\def\xreftype{3}\def\text{#1}\def\next{\<\text>}\makexref} \def\makexref{\ifproofmode\insert\margin{\hbox{\marginstyle\text}}% \xdef\writeit{\write\idx{\text\space!\xreftype\space \noexpand\number\pageno.}}\writeit \else\ifhmode\kern\z@\fi\fi \ifsilent\ignorespaces\else\next\fi} % the \insert (which is done in proofmode only) suppresses hyphenation, % so the \kern\z@ is put in to give the same effect in non-proofmode. \newinsert\margin \dimen\margin=\maxdimen \count\margin=0 \skip\margin=0pt % marginal inserts take up no space \catcode`@=12 % borrow the private macros of PLAIN (with care) \def\everyjob{\makeindex} \def\IN#1{^{#1}} \def\INO#1{^^{#1}} \def\INA#1{^|#1|} \def\INAO#1{^^|#1|}