diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:47:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:47:15 +0000 |
commit | 130ca907c302991185d76929e2c56cb21046e137 (patch) | |
tree | 7fd3eff1e5ab75adb2dc1e7eb48dfa48e3ba21f3 /Master/texmf-dist/tex | |
parent | 6d6621ddda94a8d3eb3fcd67b4dcfc61335d5450 (diff) |
trunk/Master/texmf-dist/tex/ytex
git-svn-id: svn://tug.org/texlive/trunk@628 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ybase.mac | 914 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/yfonts.mac | 155 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ylog.mac | 494 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ysite.mac | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ytex-cm.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ytex.ieee | 250 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ytex.mac | 92 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/ytex.mail | 75 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/yusage.lst | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/yusage.tex | 1772 | ||||
-rw-r--r-- | Master/texmf-dist/tex/ytex/base/yuser.mac | 1351 |
11 files changed, 5173 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/ytex/base/ybase.mac b/Master/texmf-dist/tex/ytex/base/ybase.mac new file mode 100644 index 00000000000..d105e349990 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ybase.mac @@ -0,0 +1,914 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% Base macros for yTeX. See the file YTEX.MAC for details. + +% CONTENTS + +% ^L-page contents +% ---------------------------------------------------------------------- +% 1 %% Helpful TeX82 macros built on Plain-AlmostCM TeX +% 2 %% handy hacks +% 3 %% more handy hacks +% 4 %% date and time +% 5 %% combinators +% 6 %% special chars +% 7 %% spacing +% 8 %% runners +% 9 %% glosses +% 10 %% inserts +% 11 %% output +% 12 %% page glue +% 13 %% paragraphs +% 14 %% textual displays +% 15 %% tables +% 16 %% titles +% 17 %% special pages +% 18 %% auxiliary files +% 19 %% initialization + +\message{handy hacks,} + +% some more scratch registers +\dimendef\dimen@ii=2 +\skipdef\skip@i=1 +\skipdef\skip@ii=2 +\toksdef\toks@i=1 +\toksdef\toks@ii=2 + +% quick names for character codes +\chardef\@ctive=13 +\chardef\@ther=12 +\chardef\@scape=0 + +% define variations on \vbox and \hbox +\let\vbottom=\vbox +\let\vopen=\relax +\let\hopen=\relax + +% turn interlineskip off and on +\def\offinterlineskip {% + \ifdim \lineskiplimit<\maxdimen + \edef\oninterlineskip{\baselineskip=\the\baselineskip + \lineskip=\the\lineskip \lineskiplimit=\the\lineskiplimit\relax}% + \fi + \baselineskip-1000\p@ \lineskip\z@ \lineskiplimit\maxdimen} +\let\oninterlineskip=\relax +\let\yesinterlineskip=\relax + +% write token lists to the terminal +\def\toksmessage #{% + \afterassignment\t@ksmessage + \toks@=} +\def\t@ksmessage {\message{\the\toks@}} + +% set/add to a token list or a macro +\def\etoks #1{\let\et@ks=#1\afterassignment\eto@s\et@ks} +\def\eto@s {\edef\next{\the\et@ks}\edef\next{\next}\et@ks=\expandafter{\next}} +\def\addtotoks #1{% + \let\addtot@ks=#1% + \afterassignment\addt@toks \toks@} +\def\addt@toks {% + \edef\next{\the\addtot@ks\the\toks@}% + \addtot@ks=\expandafter{\next}} +\def\addtodef #1#2{% + \toks@=\expandafter{#1#2}\edef#1{\the\toks@}} +\def\pushtodef #1#2{% + \toks@=\expandafter{#1}\toks@i={#2}\edef#1{\the\toks@i\the\toks@}} + +% strip the \ and letters from the front of a csname, leave result in \next +{\catcode`\|=\@scape |catcode`\\=|@ther + |gdef|stripn@me #1#2{% + {|def|gobble \#1##1\{##1}% + |global|edef|next{|expandafter|gobble|string#2\}}}} + +% get the arg of a paired delimiter pair (arg is \endXXX) +% N.B. Use this only within a local group: it clobbers itself +\def\get@rg #1{\def\get@rg ##1#1{\toks@={##1}#1}} + +% get confirmation +\def\@yes{yes} +\def\@no{no} +\newif\ifyes +\def\yesornop #1{% + \immediate\write\sixt@@n{}% + \loop + \message{#1 (yes or no) }% + {\catcode`\^^M=14\relax \global\read\m@ne to\next} + \ifx\next\@yes \global\yestrue + \else\ifx\next\@no \global\yesfalse + \else\let\next\yesornop \fi\fi + \ifx\next\yesornop \repeat} +\def\askuser #1#2{% + \immediate\write\sixt@@n{}% + \message{#2}% + {\catcode`\^^M=14\relax \global\read\m@ne to#1}} +\def\askuserline #1#2{% + \immediate\write\sixt@@n{}% + \immediate\write\sixt@@n{#2}% + {\catcode`\^^M=14\relax \global\read\m@ne to#1}} + +% \input manipulations +\newwrite\tfil@ +\def\maybeinput #1 {% + \yesornop {Input file #1?}% + \ifyes \input #1 \fi} +\def\@input #1#2{% + \openin\tfil@=#1 % + \ifeof\tfil@ #2\else \closein\tfil@ \input #1 \fi} +\def\@input@ #1#2{% + \openin\tfil@=#1 % + \ifeof\tfil@ + \closein\tfil@\openin\tfil@=\ytexlibrary #1 % + \ifeof\tfil@ #2\else \closein\tfil@ \input \ytexlibrary #1 \fi + \else \closein\tfil@ \input #1 \fi} + +% set a skip parameter with explicit dimen, glue, and factor +\def\setskip {\afterassignment\setski@\let\next=} +\def\setski@ \dimen{\afterassignment\setsk@p\dimen@} +\def\setsk@p \glue{\afterassignment\s@tskip\skip@} +\def\s@tskip \factor{\dimen@i=\skip@\advance\skip@ by-\dimen@i + \afterassignment\s@tsk@p\multiply\skip@ by} +\def\s@tsk@p {\divide\skip@ by\@m\advance\skip@ by\dimen@ \next=\skip@} + +% skip the stretch amount of glue but not the dimen amount +\def\vstretch {\afterassignment\vstr@tch\skip@=} +\def\vstr@tch {\dimen@=\skip@ \advance\skip@ by-\dimen@ \vskip\skip@} + +% manipulate special chars +\def\addspecial #1{\addtodef\dospecials{\do#1}} +\def\specials@ther {% + \relax\iffalse{\fi % gross hackery for tables + \def\do##1{\catcode`##1=\@ther}\dospecials + \iffalse}\fi\relax} + +% make active space and CR be the arg +% get a token which is \ifx-equal to active space +{\obeylines% + \gdef\activelines #1{\catcode`\^^M=\@ctive \let^^M=#1\relax}% +} % end of def group +{\obeyspaces + \gdef\activespaces#1{\obeyspaces\let =#1\relax\let\sp@ce= \relax}% +} % end of def group + +\message{date and time,} + +\newcount\hour \newcount\minute + +\def\st@rttime {% + \hour=\the\time \minute=\the\time + \divide\hour by 60 \multiply\hour by 60% + \advance\minute by -\hour \divide\hour by 60% + \edef\daytime{\number\hour:\ifnum \minute<10 0\fi\number\minute}% + \edef\monthname {\ifcase\month \or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi}% + \edef\monthshortname {\ifcase\month \or + Jan\or Feb\or Mar\or Apr\or May\or Jun\or + Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi}% + {\def\gobble ##1##2##3##4{##3##4}% + \global\edef\shortyear{\expandafter\gobble\number\year}}% + \edef\date{\monthname~\number\day,~\number\year}% + \edef\shortdate{\number\day~\monthshortname~\number\shortyear}% + \edef\slashdate{\number\month/\number\day/\number\shortyear}} + +\message{combinators,} + +% spreads +{\let\newdimen=\relax % allow next def +\gdef\newspread #1\setup #2\endnew{% + \stripn@me{}#1% + \expandafter\newdimen\csname \next width\endcsname + \toks@={\hbox to}\toks@i={\bgroup #2\spre@d}% + \edef#1##{\the\toks@\expandafter\noexpand\csname \next width\endcsname + \the\toks@i}} +} % end of def group +\def\spre@d #1{% + \setbox\z@=\hbox{#1\Hss}% + \futurelet\next\spr@ad} +\def\spr@ad {% + \ifcat \bgroup\noexpand\next + \hbox to\z@{\hss\unhbox\z@\hss}\hfil + \let\next=\spr@@d + \else + \hbox to\z@{\hss\unhbox\z@}% + \let\next=\egroup + \fi \next} +\def\spr@@d #1{% + \setbox\z@=\hbox{#1}% + \futurelet\next\spr@ad} + +% text wrappers +\long +\def\newtextwrap #1\box #2\setup #3% + \before #4\after #5% + \begin #6\end #7\endnew{% + \stripn@me{}#1% + \toks@={#4\begingroup #3\relax #2}% + \edef#1{% + \the\toks@ \expandafter\noexpand\csname read@\next\endcsname}% + \toks@={\bgroup #6}\toks@i={#7\egroup\endgroup #5}% + \long + \expandafter\edef\csname read@\next\endcsname ##1{% + \the\toks@ ##1\the\toks@i}} + +\message{special chars,} + +% ` needs can be directed backquote +\addspecial\` +\let\agr@ve=\` +\def\bqm@cro {\char"12\relax} +\def\makebbqaccent {\let\`=\agr@ve} +\def\makebbqquote {\let\`=\bqm@cro} +{\catcode`\`=\@ctive\relax + \gdef\makebqspecial {\catcode"60=\active\relax \let`=\bqm@cro} + \gdef\makebqnormal {\catcode"60=\@ther \chardef`="60\relax} +} % end of def group + + +% & and # need to be `ordinary' characters for lisp +\def\makeandother {\catcode`\&=\@ther} +\def\makeandalign {\catcode`\&=4\relax} +\def\makesharpother {\catcode`\#=\@ther} +\def\makesharpparam {\catcode`\#=6\relax} + +% < and > can be angle brackets in text +\addspecial\< +\addspecial\> +\let\@@lt=< \let\@@gt=> +{\catcode`\<=\@ctive \catcode`\>=\@ctive \relax + \gdef\makelgtbrackets{% + \catcode`\<=\@ctive \catcode`\>=\@ctive\relax + \def<{\ifmmode\@@lt\else$\m@th\langle$\fi}% + \def>{\ifmmode\@@gt\else$\m@th\rangle$\fi}% + \sl@shifylgt}} +\def\sl@shifylgt {% + \def\<{\ifmmode\@@lt\else$\m@th\@@lt$\fi}% + \def\>{\ifmmode\@@gt\else$\m@th\@@gt$\fi}} +\def\makelgtother {% + \catcode`\<=\@ther\catcode`\>=\@ther + \def\<{\relax \ifmmode \langle \else $\langle$\fi} + \def\>{\relax \ifmmode \rangle \else $\rangle$\fi}} + +\message{spacing,} + +% vertical glue +\def\vgluefil {\vglue \z@ plus1fil\relax} +\def\vgluefill {\vglue \z@ plus1fill\relax} +\def\Vss {\vskip \z@ plus1fill minus1fill\relax} +\def\VSS {\vskip \z@ plus1filll minus1filll\relax} + +% horizontal glue +\def\hfilll {\hskip \z@ plus1filll\relax} +\def\hfilllneg {\hskip \z@ plus-1filll\relax} +\def\Hss {\hskip \z@ plus1fill minus1fill\relax} +\def\HSS {\hskip \z@ plus1filll minus1filll\relax} + +% glue amounts +\newskip\fillskip \fillskip=\z@ plus1fill +\newskip\filskip \filskip=\z@ plus1fil +\newskip\zeroskip \zeroskip=\z@ +\newskip\emskip \emskip=1em + +% page glue +\def\filpage {\par\vfil\eject} +\def\superfilpage {\par\vfil\supereject} + +% paragraph glue +\def\linebreak {\ifhmode\nobreak\hskip\z@ plus1fil\break\fi} + +% require minimum vertical space +\def\minskip {\afterassignment\m@nskip\skip@} +\def\m@nskip {% + \ifdim \lastskip<\skip@ + \nobreak \vskip-\lastskip \vskip\skip@ \fi} +\def\minbreak {\afterassignment\m@nbreak\count@} +\def\m@nbreak {\afterassignment\m@nbre@k\skip@} +\def\m@nbre@k {% + \ifdim \lastskip<\skip@ + \nobreak \vskip-\lastskip \penalty\count@ \vskip\skip@ \fi} +\def\dobreak {\afterassignment\d@break\count@} +\def\d@break {\afterassignment\d@bre@k\skip@} +\def\d@bre@k {\penalty\count@ \vskip\skip@} + +\message{runners,} + +% control of runners +\newif\ifheaders +\newif\iffooters +\let\res@theaders=\relax +\let\res@tfooters=\relax +\def\res@trunners {\res@theaders \res@tfooters} +\def\noheaders {\global\headersfalse} +\def\nofooters {\global\footersfalse} +\def\norunners {\noheaders \nofooters} +\def\yesheaders {\global\headerstrue} +\def\yesfooters {\global\footerstrue} +\def\yesrunners {\yesheaders \yesfooters} +\def\offheaders {\noheaders \let\res@theaders=\noheaders} +\def\offfooters {\nofooters \let\res@tfooters=\nofooters} +\def\offrunners {\offheaders \offfooters} +\def\onheaders {\yesheaders \let\res@theaders=\yesheaders} +\def\onfooters {\yesfooters \let\res@tfooters=\yesfooters} +\def\onrunners {\onheaders \onfooters} +\res@trunners + +% preserve marks in a stable place +\let\m@rk=\mark +\let\firstm@rk=\firstmark +\let\topm@rk=\topmark +\let\botm@rk=\botmark + +% contents of headers and footers +\newif\iftwosided + +\newtoks\rectoheader +\newtoks\versoheader +\newtoks\rectofooter +\newtoks\versofooter + +\message{glosses,} + +% control of glosses +\newif\iftopgloss +\newif\ifbottomgloss +\let\res@ttopgloss=\relax +\let\res@tbottomgloss=\relax +\def\res@tglosses {\res@ttopgloss \res@tbottomgloss} +\def\notopgloss {\global\topglossfalse} +\def\nobottomgloss {\global\bottomglossfalse} +\def\noglosses {\notopgloss \nobottomgloss} +\def\yestopgloss {\global\topglosstrue} +\def\yesbottomgloss {\global\bottomglosstrue} +\def\yesglosses {\yestopgloss \yesbottomgloss} +\def\offtopgloss {\notopgloss \let\res@ttopgloss=\notopgloss} +\def\offbottomgloss {\nobottomgloss \let\res@tbottomgloss=\nobottomgloss} +\def\offglosses {\offtopgloss \offbottomgloss} +\def\ontopgloss {\yestopgloss \let\res@ttopgloss=\yestopgloss} +\def\onbottomgloss {\yesbottomgloss \let\res@tbottomgloss=\yesbottomgloss} +\def\onglosses {\ontopgloss \onbottomgloss} +\res@tglosses + +% contents of glosses +\newtoks\topgloss +\newtoks\bottomgloss + +\message{inserts,} + +% storage for the inserts +\newinsert\topfloat +\countdef\topmag=\topfloat \topmag=1000 +\dimendef\topmax=\topfloat \topmax=\maxdimen +\newtoks\topsep \topsep={} + +\newinsert\botfloat +\countdef\botmag=\botfloat \botmag=1000 +\dimendef\botmax=\botfloat \botmax=\maxdimen +\newtoks\botsep \botsep={} + +% inserts which always float +\long +\def\newfloat #1\type #2\floatsetup #3\setup #4% + \floatabove #5\floatbelow #6% + \begin #7\end #8\endnew {% + \stripn@me{}#1% + \toks@={\insert#2\bgroup #3\relax #5\relax #4\relax #7}% + \expandafter\edef\csname begin\next\endcsname {% + \the\toks@}% + \toks@={#8\relax #6\egroup}% + \expandafter\edef\csname end\next\endcsname {% + \the\toks@}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} + +\long +\def\newpagefloat #1\type #2\floatsetup #3\setup #4% + \above #5\below #6% + \begin #7\end #8\endnew {% + \stripn@me{}#1% + \toks@={#4\setbox\z@=\vbox\bgroup #7}% + \expandafter\edef\csname begin\next\endcsname {% + \begingroup \the\toks@}% + \toks@={#8\egroup + \insert#2{#3\relax + \dimen@=\dp\z@ + \vbox to\vsize{#5\unvbox\z@#6\kern-\dimen@}}}% + \expandafter\edef\csname end\next\endcsname {% + \the\toks@ \endgroup}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} + +% inserts which sometimes float +\long +\def\newfitfloat #1\type {% + \stripn@me{}#1% + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}% + \newfitfl@at} +\def\newfitfl@at #1\floatsetup #2\setup #3% + \floatabove #4\floatbelow #5% + \above #6\below #7% + \begin #8\end #9\endnew {% + \toks@={\setbox\z@=\vbox\bgroup #3\relax #8}% + \expandafter\edef\csname begin\next\endcsname {% + \the\toks@}% + \toks@={#9\egroup + \dimen@=\ht\z@ \advance\dimen@\dp\z@ + \advance\dimen@\baselineskip \advance\dimen@\pagetotal + \ifdim \dimen@>\pagegoal + \insert#1{#2\relax #4\unvbox\z@#5}% + \else + #6\unvbox\z@#7\relax + \fi}% + \expandafter\edef\csname end\next\endcsname {% + \the\toks@}} + +\message{output,} + +% output routine parameters +\newif\iftrimpages +\newdimen\topglossdrop +\newdimen\bottomglossdrop +\newdimen\footerdrop +\newdimen\headerdrop + +% output routine +\def\ytexoutput {% + \iftrimpages \trimp@ge\fi + \shipout\vbox to9truein{% center box on 8.5x11 page (DVI starts at 1,1) + \vss + \hbox to6.5truein{% + \hss + \vbox{% + \offinterlineskip + \iftopgloss + \vbox to\z@{\vss\line{\the\topgloss}\vskip\topglossdrop}\fi + \ifheaders\makeheadline\fi + \pagebody + \iffooters\makefootline\fi + \ifbottomgloss + \vbox to\z@{\vskip\bottomglossdrop\line{\the\bottomgloss}\vss}\fi + }% end of contents \vbox + \hss}% end of centering \hbox + \vss}% end of centering \vbox + \advancepageno + \res@trunners + \res@tglosses + \ifnum\outputpenalty>-\@MM \else\dosupereject\fi} + +\def\makeheadline {% + \vbox to\z@{% + \vss + \iftwosided + \ifodd\pageno \line{\the\rectoheader}% + \else \line{\the\versoheader}\fi + \else + \line{\the\rectoheader}\fi + \vskip \headerdrop}} + +\def\makefootline {% + \vbox to\z@{% + \vskip \footerdrop + \nointerlineskip + \iftwosided + \ifodd\pageno \line{\the\rectofooter}% + \else \line{\the\versofooter}\fi + \else + \line{\the\rectofooter}\fi + \vss}} + +\def\pagebody {% + \vbox to\vsize{\boxmaxdepth\maxdimen \pagecontents}} + +\def\pagecontents {% + \dimen@i=\ht\@cclv \advance\dimen@i\dp\@cclv + \ifvoid\topfloat\else + \dimen@=\ht\topfloat \advance\dimen@\dp\topfloat + \unvbox\topfloat + \ifdim \dimen@>\z@ \ifdim\dimen@i>\z@ \the\topsep\fi\fi + \fi + \dimen@ii=\dp\@cclv \unvbox\@cclv + \ifvoid\botfloat\else + \dimen@=\ht\botfloat \advance\dimen@\dp\botfloat + \ifdim \dimen@>\z@ \ifdim\dimen@i>\z@ \the\botsep\fi\fi + \unvbox\botfloat + \fi + \ifr@ggedbottom \kern-\dimen@ii \vfil \fi} + +\message{page glue,} + +\newif\ifts@ + +{\catcode`\0=12\relax + \catcode`\.=12\relax + \catcode`\p=12\relax + \catcode`\t=12\relax + \gdef\nullgl@e{0.0pt} +} %end of catcode group + +\def\ifnullskip {% + \edef\next{\the\lastskip}% + \ifx\next\nullgl@e} + +\def\trimp@ge {% + \setbox0=\vbox{\unvbox\@cclv + \loop \ts@false + \ifnum\lastpenalty=\z@ \else\unpenalty \ts@true \fi + \ifnullskip \else\unskip \ts@true \fi + \ifts@ \repeat} + \setbox\@cclv=\box0} + +% hack to make \break, \allowbreak, and friends work +\def\break {\penalty\z@\penalty-\@M} +\def\allowbreak {\penalty-\@ne} +\def\supereject {\par\penalty\z@\penalty-\@MM} + +\message{paragraphs,} + +% force no indent on next par +\def\rem@veindent {\everypar={\setbox0=\lastbox\everypar={}}} + +% neutral paragraphing groups +\def\beginpgroup {\begingroup \everypar={}} +\def\endpgroup {\endgraf \endgroup} +\def\bpgroup {\bgroup \everypar={}} +\def\epgroup {\endgraf \egroup} + +\long +\def\newpar #1\argtext #2\setup #3\vestindent #4\starter #5\endnew {% + \def\next{#4}% + \ifx\next\empty \def#1#2{#3\relax#5} + \else \def#1#2{#3\relax \hangindent #4\hangafter \@ne #5}\fi} + +% turn indentation off and on +\def\offindent {% + \ifdim \parindent>\z@ \edef\onindent{\parindent=\the\parindent}\fi + \parindent=\z@} +\let\onindent=\relax +\let\yesindent=\indent + +% create new element with associated skips and penalties +{\let\newskip=\relax \let\newcount=\relax % allow next def +\long +\gdef\newelement #1\setup #2\above #3\below #4\begin #5\end #6\endnew{% + \stripn@me{}#1% + \expandafter\newskip\csname above\next skip\endcsname + \expandafter\newskip\csname below\next skip\endcsname + \expandafter\newcount\csname pre\next penalty\endcsname + \expandafter\newcount\csname post\next penalty\endcsname + \toks@={\endgraf #3\begingroup #2\relax #5}% + \expandafter\edef \csname begin\next \endcsname {% + \the\toks@}% + \toks@={#6\endgroup #4}% + \expandafter\edef \csname end\next \endcsname {% + \the\toks@}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} +} % end of def group + +\message{textual displays,} + +% nofill +\def\setupnofill {% + \parskip=\z@ + \def\par{\endgraf}% empty lines not preserved + \obeylines + \activespaces\ } + +% textual displays +{\obeylines % defs using ^^M +\long% +\gdef\newtext #1\display #2\setup #3\begin #4\end #5\endnew{% + \stripn@me{}#1% + \toks@={$$#2\halign\bgroup ##\cr \noalign\bpgroup #3% + \begingroup \obeylines}% + \expandafter\edef\csname begin\next \endcsname {% + \the\toks@ \expandafter\noexpand\csname re@d\next \endcsname}% + \toks@={\endgroup #4}% + \expandafter\edef\csname re@d\next \endcsname ##1^^M{% + \the\toks@##1}% + \toks@={#5\epgroup\egroup$$}% + \expandafter\edef\csname end\next \endcsname {% + \the\toks@}}% +} % end of def group + +% verbatim material (mostly from TeXbook) +\def\setupverbatim {% + \specials@ther + \setupnofill} + +\long +\def\newverbatim #1\begincs #2\readcs #3\endcsname #4% + \display #5\setup #6\begin #7\end #8\endnew{% + \toks@={$$#5\halign\bgroup ##\hfil\cr + \noalign\bpgroup \setupverbatim #6#3}% + \edef#2{\the\toks@}% + \makev@rbatim{#3}{#4}{#7}{#8}} +{\obeylines \catcode`\|=\@scape \catcode`\\=\@ther % + |long% + |gdef|makev@rbatim#1#2#3#4{% + |toks@={#3}|toks@i={#4|epgroup|egroup$$}% + |edef#1##1^^M##2\#2{|the|toks@##1##2|the|toks@i}}} + +\message{tables,} + +% preamble specification analysis +\newif\ifmoresp@c +\def\esp@cl {\esp@cl} % null spec list marker +\newtoks\sp@c +\newtoks\sp@cl +\newtoks\pre@mble +\newtoks\pad@mble +\newtoks\prep@rt +\newtoks\padp@rt + +% table dimensions and tabskip glue +\newtoks\tablespec +\def\tablewidth {\afterassignment\t@blewidth\dimen@} +\def\t@blewidth {% + \ifdim\dimen@>\z@ \edef\next{to\the\dimen@}\else + \ifdim\dimen@<\z@ \edef\next{expand\the\dimen@}\else + \edef\next{}\fi\fi + \tablespec=\expandafter{\next}} +\newskip\pretabskip +\newskip\intabskip +\newskip\posttabskip +\newtoks\tablestyle +\newdimen\padheight % height of padding around lines +\newdimen\hbarheight % height of horizontal lines +\newdimen\dhbarheight % height of "double" horizontal lines +\newdimen\vbarwidth % width of normal vertical bars +\newdimen\dvbarwidth % width of "double" vertical bars + +\def\makepre@mblepart #1{% + \padp@rt={\omit\vrule width\z@ height\padheight depth\z@ \relax#1}% + \if l\noexpand\sp@@ \prep@rt={##\hfil\strut#1}\else + \if L\noexpand\sp@@ \prep@rt={$\the\tablestyle ##$\hfil\strut#1}\else + \if c\noexpand\sp@@ \prep@rt={\hfil##\hfil\strut#1}\else + \if C\noexpand\sp@@ \prep@rt={\hfil$\the\tablestyle ##$\hfil\strut#1}\else + \if r\noexpand\sp@@ \prep@rt={\hfil##\strut#1}\else + \if R\noexpand\sp@@ \prep@rt={\hfil$\the\tablestyle ##$\strut#1}\else + \if |\noexpand\sp@@ \prep@rt={\vrule width\vbarwidth###1}% + \padp@rt={height\padheight#1}\else + \if "\noexpand\sp@@ \prep@rt={\vrule width\dvbarwidth###1}% + \padp@rt={height\padheight#1}\else + \if &\noexpand\sp@@ \prep@rt={&}\padp@rt={&}\else + \ifx \sp@@\tabskip \prep@rt=\expandafter{\the\sp@c}\padp@rt={}% + \else \prep@rt=\expandafter{\the\sp@c#1}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +\def\makepre@mble {% + \sp@cl=\expandafter{\the\sp@cl\esp@cl}% avoid {arg} at end of \sp@cl + \pre@mble={\tabskip\intabskip}\pad@mble={}% + \def\breaksp@c##1##2\@nd{\sp@c={##1}\sp@cl={##2}}% + \def\firstsp@c{\futurelet\sp@@\f@rstspec}\def\f@rstspec##1\@nd{}% + \loop + \expandafter\breaksp@c\the\sp@cl\@nd + \expandafter\firstsp@c\the\sp@c\@nd + \edef\next{\the\sp@cl}% + \ifx \next\esp@cl \moresp@cfalse \makepre@mblepart{}% + \else \moresp@ctrue \makepre@mblepart&\fi + \addtotoks\pre@mble\prep@rt + \addtotoks\pad@mble\padp@rt + \ifmoresp@c \repeat + \pre@mble=\expandafter{\the\pre@mble\tabskip\posttabskip\cr}% + \pad@mble=\expandafter{\the\pad@mble\cr}} + +\def\checkpre@mble {% + \edef\next{\the\sp@cl}% + \ifx\next\empty + \errhelp={Just continue and I'll use left-justified columns.}% + \errmessage{Empty table preamble.}% + \sp@cl={&l}\fi} + +\long +\def\newtable #1\leftdelim #2\rightdelim #3% + \before #4\after #5% + \begin #6\end #7\endnew{% create a table macro + \stripn@me{}#1% + \toks@={\begingroup}\toks@i={\checkpre@mble \setuph@lign + #4\offinterlineskip + \halign\the\tablespec \bgroup\span\the\pre@mble #6}% + \expandafter\edef\csname begin\next \endcsname #2##1#3{% + \the\toks@ \sp@cl={##1}\the\toks@i}% + \toks@={#7\crcr\egroup#5\endgroup}% + \expandafter\edef\csname end\next \endcsname {% + \the\toks@}% + \long + \edef#1#2##1#3##2{% + \expandafter\noexpand\csname begin\next\endcsname #2##1#3% + ##2\expandafter\noexpand\csname end\next\endcsname}} + +\def\setuph@lign {% + \makepre@mble + \let\explicitcr=\relax + \def\implicitcr{\let\par=\crcr\obeylines}% + \let\\=\crcr + \def\inline{\noalign{\hrule height\hbarheight}}% + \def\dinline{\noalign{\hrule height\dhbarheight}}% + \edef\topline{\noexpand\inline\the\pad@mble}% + \edef\midline{\the\pad@mble\noexpand\inline\the\pad@mble}% + \edef\botline{\the\pad@mble\noexpand\inline}% + \edef\dtopline{\noexpand\dinline\the\pad@mble}% + \edef\dmidline{\the\pad@mble\noexpand\dinline\the\pad@mble}% + \edef\dbotline{\the\pad@mble\noexpand\dinline}% + \def\padline {\noalign\bgroup\global\dimen@=\padheight + \afterassignment\padlin@\global\padheight=}% + \def\padlin@ {\global\edef\next{\the\pad@mble + \noalign{\global\padheight=\the\dimen@}}\egroup \next}% + \tabskip\pretabskip} + +\message{titles,} + +\def\ts@ttings {% + \spaceskip=.3333em \xspaceskip=.5em + \pretolerance=9999 \tolerance=9999 \hbadness=9999 + \hyphenpenalty=10000 \exhyphenpenalty=10000 + \def\linebreak{\ifhmode\break\fi}% + \let\cr=\linebreak \let\crcr=\linebreak \def\\{\linebreak\ignorespaces}% + \offindent} + +\def\titleleft #1#2{% + \leftskip=\z@ \rightskip=\z@ plus.25\hsize + \advance\leftskip by#1\advance\rightskip by#2% + \parfillskip=\z@ plus1fil + \ts@ttings} + +\def\titlecenter #1#2{% + \leftskip=\z@ plus.125\hsize \rightskip=\leftskip + \advance\leftskip by#1\advance\rightskip by#2% + \parfillskip=\z@ + \ts@ttings} + +\def\titleright #1#2{% + \leftskip=\z@ plus.25\hsize \rightskip=\z@ + \advance\leftskip by#1\advance\rightskip by#2% + \parfillskip=\z@ + \ts@ttings} + +\long +\def\newtitle #1\box #2\shape #3% + \font #4\setup #5\begin #6\end #7\endnew{% + \stripn@me{}#1% + \toks@={#2\bgroup #4\relax #3\relax #5\relax #6}% + \expandafter\edef\csname begin\next\endcsname {% + \the\toks@}% + \toks@={#7\endgraf\egroup}% + \expandafter\edef\csname end\next\endcsname {% + \the\toks@}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} + +\message{special pages,} + +% get to a recto page +\def\rectoeject {\par + \filpage + \iftwosided + \ifodd\pageno + \else \ymessage{{Force recto}}\norunners\null\vfil\eject \fi\fi + \norunners} + +\def\rectosupereject {\par + \superfilpage + \iftwosided + \ifodd\pageno + \else \ymessage{{Force recto}}\norunners\null\vfil\eject \fi\fi + \norunners} + +% special pages +\long +\def\newpage #1\setup #2\glue #3\begin #4\end #5\endnew{% + \stripn@me{}#1% + \toks@={\rectoeject \beginpgroup #2\relax \hrule width\z@\relax #3 #4}% + \expandafter\edef\csname begin\next \endcsname {% + \the\toks@}% + \toks@={#5\relax #3\endpgroup\eject}% + \expandafter\edef\csname end\next \endcsname {% + \the\toks@}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} + +\long +\def\newsuperpage #1\setup #2\glue #3\begin #4\end #5\endnew{% + \stripn@me{}#1% + \toks@={\rectosupereject \beginpgroup #2\relax \hrule width\z@\relax #3 #4}% + \expandafter\edef\csname begin\next \endcsname {% + \the\toks@}% + \toks@={#5\relax #3\endpgroup\eject}% + \expandafter\edef\csname end\next \endcsname {% + \the\toks@}% + \long + \edef#1##1{\expandafter\noexpand\csname begin\next\endcsname + ##1\expandafter\noexpand\csname end\next\endcsname}} + +\message {auxiliary files,} + +\newif\ifauxfiles + +\def\@uxfiles {} +\def\add@uxfile #1{\addtodef\@uxfiles{\do@ux#1}} +\def\map@uxfiles #1{\let\do@ux=#1\@uxfiles} + +\def\forgetauxfiles {\def\@uxfiles{}} + +\def\perjob {perjob} + +{\let\newwrite=\relax % allow next def +\gdef\newaux #1\filename #2\extension #3\endnew{% + \stripn@me{}#1% + \edef#1{#3}% + \expandafter\newwrite\csname \next @ut\endcsname + \expandafter\let\csname write\next \endcsname=\bad@uxwrite + \expandafter\edef\csname begin\next \endcsname{% + \expandafter\noexpand\csname input\next \endcsname + \expandafter\noexpand\csname open\next \endcsname}% + \expandafter\edef\csname end\next \endcsname{% + \expandafter\noexpand\csname close\next \endcsname}% + \ifx #2\perjob + \add@uxfile #1% + \expandafter\def\csname input\next \endcsname{\input@ux#1\jobname}% + \expandafter\def\csname open\next \endcsname{\open@ux#1\jobname}% + \expandafter\def\csname close\next \endcsname{\close@ux#1}% + \else + \expandafter\def\csname input\next \endcsname{\input@ux#1{#2}}% + \expandafter\def\csname open\next \endcsname{\open@ux#1{#2}}% + \expandafter\def\csname close\next \endcsname{\close@ux#1}% + \fi} +} % end of def group + +\def\bad@uxwrite #1{% + \ifauxfiles + \errhelp={I will write to your log file instead.}% + \errmessage{Writing on an unopened auxiliary file.}% + \write\m@ne{#1}% + \fi} + +\def\input@ux #1#2{% + \ifauxfiles \@input{#2.#1}{\ywarning{{No file #2.#1}}}\fi} + +\def\open@ux #1#2{% + \stripn@me{}#1% + \ifauxfiles + \immediate\expandafter\openout\csname \next @ut\endcsname=#2.#1 % + \expandafter\edef\csname write\next \endcsname {% + \write \expandafter\noexpand\csname \next @ut\endcsname}% + \immediate\csname write\next \endcsname{\relax}% + \else + \expandafter\edef\csname write\next \endcsname {% + \write\m@ne}% + \fi} + +\def\close@ux #1{% + \stripn@me{}#1% + \ifauxfiles \immediate\expandafter\closeout\csname \next @ut\endcsname \fi + \expandafter\let\csname write\next \endcsname=\bad@uxwrite} + +\def\input@uxfile #1{\input@ux#1\jobname} +\def\input@uxfiles {\map@uxfiles\input@uxfile} +\def\open@uxfile #1{\open@ux#1\jobname} +\def\open@uxfiles {\map@uxfiles\open@uxfile} +\def\close@uxfiles {\map@uxfiles\close@ux} + +\def\beginjob {\input@uxfiles \open@uxfiles} +\def\endjob {\superfilpage \close@uxfiles \end} + +\message{initialization,} + +% page layout +\trimpagesfalse +\offheaders +\offfooters +\twosidedfalse +\topglossfalse +\bottomglossfalse +\topglossdrop=2.5pc +\bottomglossdrop=2.5pc +\headerdrop=1.25pc +\footerdrop=1.25pc + +% tables +\tablewidth=0pt +\intabskip=\emskip +\pretabskip=\filskip +\posttabskip=\filskip +\padheight=2pt +\tablestyle={\displaystyle} +\hbarheight=.4pt +\dhbarheight=1pt +\vbarwidth=.4pt +\dvbarwidth=1pt + +% auxiliary files +\auxfilestrue + +% special chars +\makebqnormal +\makebbqaccent +\makeandalign +\makesharpparam +\makelgtother + diff --git a/Master/texmf-dist/tex/ytex/base/yfonts.mac b/Master/texmf-dist/tex/ytex/base/yfonts.mac new file mode 100644 index 00000000000..499fbb6e9b6 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/yfonts.mac @@ -0,0 +1,155 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% Font macros for yTeX. See the file YTEX.MAC for details. + +% CONTENTS + +% ^L-page contents +% ---------------------------------------------------------------------- +% 1 %% Font macros for YTEX +% 2 %% typesize +% 3 %% usersize +% 4 %% initialization + +\message{typesize,} + +\newif\ifmagscaling +\newif\ifexactsizes +\newdimen\typesiz@ +\newtoks\baselinefactor + +\def\typesize {\afterassignment\typ@size\dimen@} +\def\typ@siz@ {% + \let\typ@size=\siz@rr + \ymessage{{\string\typesize=\the\dimen@}} + \ifdim 10\p@=\dimen@ \tenp@int \csname usersizeten\endcsname + \else \ifdim 11\p@=\dimen@ \elevenp@int \csname usersizeeleven\endcsname + \else \ifdim 12\p@=\dimen@ \twelvep@int \csname usersizetwelve\endcsname + \else \let\typ@size=\typ@siz@ + \errhelp={Insert `\string\typesize=<dimen>' + where <dimen> is 10pt, 11pt, or 12pt.}% + \errmessage{Unrecognized size (\the\dimen@) in \string\typesize. + Try again.}\fi\fi\fi} +\def\siz@rr {% + \errhelp={Just continue and I'll ignore the size switch.}% + \errmessage{You can't change sizes in the middle of a document.}% + \relax} +\def\fixsiz@ {% + \ifx\typ@size\siz@rr + \else \global\let\typ@size=\siz@rr \global\let\fixsiz@=\relax + \errhelp={Too late now. Just continue and I'll assume you want }% + \addtotoks\errhelp\expandafter{\the\typesiz@.}% + \errmessage{You never gave a \string\typesize\space command.}% + \fi} +\let\typ@size=\typ@siz@ + +\def\tenp@int {% + \typesiz@=10pt + \s@tten \mag=\magstep\z@} + +\def\elevenp@int {% + \typesiz@=11pt + \ifmagscaling + \s@tten \ifexactsizes \mag=1100 \else \mag=\magstephalf \fi + \else + \s@televen \mag=\magstep\z@ + \fi} + +\def\twelvep@int {% + \typesiz@=12pt + \ifmagscaling + \s@tten \ifexactsizes \mag=1200 \else \mag=\magstep\@ne \fi + \else + \s@ttwelve \mag=\magstep\z@ + \fi} + +\def\s@tten {% + \let\regsize=\tenpoint + \let\smlsize=\ninepoint + \let\smllsize=\eightpoint + \let\smlllsize=\eightpoint + \let\bigsize=\twelvepoint + \let\biggsize=\fourteenpoint + \let\bigggsize=\eighteenpoint + \regsize} + +\def\s@televen {% + \let\regsize=\elevenpoint + \let\smlsize=\tenpoint + \let\smllsize=\ninepoint + \let\smlllsize=\eightpoint + \let\bigsize=\twelvepoint + \let\biggsize=\fourteenpoint + \let\bigggsize=\eighteenpoint + \regsize} + +\def\s@ttwelve {% + \let\regsize=\twelvepoint + \let\smlsize=\tenpoint + \let\smllsize=\ninepoint + \let\smlllsize=\eightpoint + \let\bigsize=\fourteenpoint + \let\biggsize=\eighteenpoint + \let\bigggsize=\eighteenpoint + \regsize} + +\message{usersize,} + +% new def of \setnormalspa@cing that leaves displayskips alone +\def\setnormalsp@cing{% SIDE EFFECT is to go into \rm + \rm % set the em properly + \normalbaselineskip=\the\baselinefactor em% + \normalbaselines} + +% user hook to \setnormalsp@cing +\def\setnormalbaselines {\setnormalsp@cing} + +\def\normalbaselines{% + \lineskip\normallineskip + \baselineskip\normalbaselineskip + \lineskiplimit\normallineskiplimit + \setbox\strutbox=\hbox{\vrule height .7\baselineskip + depth .3\baselineskip width\z@}} + +\def\usereighteenpointmacro {% + \let\smllrm=\twelverm + \let\smlrm=\fourteenrm\let\smlit=\fourteenit + \let\smlbf=\fourteenbf\let\smltt=\fourteentt} + +\def\userfourteenpointmacro {% + \let\smllrm=\tenrm + \let\smlrm=\twelverm\let\smlit=\twelveit + \let\smlbf=\twelvebf\let\smltt=\twelvett} + +\def\usertwelvepointmacro {% + \let\smllrm=\ninerm + \let\smlrm=\tenrm\let\smlit=\tenit + \let\smlbf=\tenbf\let\smltt=\eleventt} + +\def\userelevenpointmacro {% + \let\smllrm=\eightrm + \let\smlrm=\tenrm\let\smlit=\tenit + \let\smlbf=\tenbf\let\smltt=\tentt} + +\def\usertenpointmacro {% + \let\smllrm=\eightrm + \let\smlrm=\ninerm\let\smlit=\nineit + \let\smlbf=\ninebf\let\smltt=\ninett} + +\def\userninepointmacro {% + \let\smllrm=\sevenrm + \let\smlrm=\eightrm\let\smlit=\eightit + \let\smlbf=\eightbf\let\smltt=\eighttt} + +\def\usereightpointmacro {% + \let\smllrm=\sevenrm + \let\smlrm=\eightrm\let\smlit=\eightit + \let\smlbf=\eightbf\let\smltt=\eighttt} + +\message{initialization,} + +% parameters +\magscalingtrue +\baselinefactor={1.3} + +% default type size +\tenp@int diff --git a/Master/texmf-dist/tex/ytex/base/ylog.mac b/Master/texmf-dist/tex/ytex/base/ylog.mac new file mode 100644 index 00000000000..d0ad664368d --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ylog.mac @@ -0,0 +1,494 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% Log of changes to the yTeX macros. See the file YTEX.MAC for details. +% This header declares the yTeX version. +\def\fmtversion {2.0} +\endinput + +RELEASE 0.93 -- 30 Jan 85 + +30 Jan 85 +-put call to \titlesection in \section +-add \secdef and \secref +-make floating figures the default +-add \figureskip, \captionskip +-add full page stationary figures +-add full page section figures +-change \figuresize to \captionsize +-check after floating figure if \vpar indicated by glue + +RELEASE 0.94 -- 30 Jan 85 + +31 Jan 85 +-define \figure and friends via def to allow changing underlying +definitions +-add \futurearg +-enclose \readarg actions in a group to allow nesting +-add raggedcenter +-change \title, \author, and friends to be paragraphs +-broke \chapter into \@chapter,\@ch@pter, same with \section + +4 Feb 85 +-encapsulate big \before@rgs in \footnote and \table in +sub-macros +-adjust \hbadness and \leftskip/\rightskip in \raggedcenter to +force maximum full lines and no underfull box messages. +-add \verb and friends +-put extra braces in \chapter and \section \toksmessage +-make \verb do obeyspaces +-change \\ to \! +-change \inverbatim to do an \afterassignment +-add \let\par=\endgraf to \verbatim +-add \addtodef and \addspecial +-change various macros to use \addtotoks and \addtodef when +possible +-interchange handy hacks and reading args +-add specials hacking: \otherspecials and friends +-insert \newverbatim, def \beginverb using \newverbatim +-add \verbindent +-add various parameter settings to init, remove them elsewhere +-add \activespaces, use it instead of \obeyspaces + +RELEASE 0.95 -- 4 Feb 85 + +5 Feb 85 +-add \chaptereject, define \pchapter and \@pchapter using it +-rename \@otherspecials to \specials@ther +-change verbatim around, add textual displays +-get rid of \begin and \end, put begin in macro names +-fix spread to use \futurearg + +RELEASE 0.96 -- 5 Feb 85 + +6 Feb 85 +-add \st@rttime def and add call to \everyjob +-fix \header to do \raggedright and \cr + +7 Feb 85 +-define captions using \captionindent +-make \beginpartp@ge use \chaptereject +-define \tabfil, \tabzero, and \tabem as glue specs +-default is \makelgtother +-make \setarg \long to allow \pars in args, add \let\futurearg=\relax +-make \heading do a medskip +-reduce spacing around displays +-change \shortdate to use \shortyear +-define \setnormalsp@cing to fix display skips + +8 Feb 85 +-reduce displayskips a bit more +-change setnormalspacing to leave displayskip alone +and do correct baseline spacing +-change log file to just record version number +-conditionalize 11 and 12pt defs for Helvetica and TimesRoman + +11 Feb 85 +-change \newtext and \newverb to use \vcenter instead of \vbox + +RELEASE 0.97 -- 11 Feb 85 + +13 Feb 85 +-change \chaptereject to use \superfilpage +-change \newtext to read pre-^^M stuff as defns arg +-change textual displays to know about \displaywidth and +\displayindent +-add and use \begin/end/b/e/pgroup + +RELEASE 0.98 -- 13 Feb 85 + +28 Feb 85 +-make \beginnofill call \setupnofill + +4 Mar 85 +-fix footnote not to use \beginpgroup and \endpgroup + +RELEASE 0.99 -- 5 Mar 85 + +8 Mar 85 +-add \newelement, define \begin and \endbullets using it + +3 Apr 85 +-remodularize into MACROS, BASE, FONTS, USER + +PRE-RELEASE 0.00 -- 3 Apr 85 + +4 Apr 85 +-add \nextpar, define \vpar using it +-reorganize handy hacks +-add \stripn@me +-fix \newelement, \vstretch +-add \setskip + +8 Apr 85 +-add \newmathtext, define \underline and \overline using it +-start consistency work + +17 Apr 85 +-finish first pass of consistency work +-add \eqdef and \eqref a la Eric Grimson +-add \leftindent and \rightindent to titles, make them use +\everypar to allow multiple paragraphs +-put def of \output routine into USER + +PRE-RELEASE 0.01 -- 17 Apr 85 + +18 Apr 85 +-fix table padding lines, add \padheight +-fix tables and title so they have \begin/\end and argument forms +-fix \unindent +-fix chapters, sections, and headings to do \nointerlineskip +before title +-let titles be \long +-put \endgrafs in titles + +RELEASE 0.1 -- 18 Apr 85 + +19 Apr 85 +-add \endgraf to \newelement +-fix def of \author in \titlepagedefs +-start to remove \readarg and friends because they break normal +macros +-fix \tablewidth to do correct assignment +-start renaming of keyword args +-add \Hss and friends + +22 Apr 85 +-finish removal of \readarg +-finish renaming of keyword args +-fix \vpar to take \global prefixes, remove \nextpar +-fix \padline timing bug +-change the \ytex macro + +RELEASE 0.2 -- 22 Apr 85 + +23 Apr 85 +-add \ucsy and \ucsybox +-change default typesize to 10pt +-put \lastskip check in \newelement + +25 Apr 85 +-change \linespread back to \spread +-put open braces of defs on same line as \endcsname +-go to \newpar +-change \vpar to \unindent in base, restore in user +-fix footnotes not to interfere with \textindent + +29 Apr 85 +-fix problems related to \vpar rename (TLP, TERZOP) + +RELEASE 0.3 -- 29 Apr 85 + +30 Apr 85 +-go to \newfloat scheme +-add page layout parameters +-rename \t* to \title* +-add \t* as user macros +-add \ignore as user macro + +1 May 85 +-fix error in def of \newfitfloat which clobbered \topfloat (WELG) +-fix spelling bug in \floatingfigures +-fix \if bug in \spre@d +-add % where necessary in \obeylines def groups +-fix \ytexoutput to use \botfloat instead of \footins +-add boxes to all figure defs +-spell \expandafter correctly in \siz@rr +-make output unbox \topfloat instead of \topins +-add an \unindent to a non-floated fitfloat figure +-remove unpaired version created by \newtext + +RELEASE 0.4 -- 1 May 85 + +2 May 85 +-got to \halign\noalign scheme to allow interline spacing in +\newtext and \newverb +-change \program to \lisp; use \newtext instead of \newelement +-add \lisplines +-fix \begintext and friends to use \displayindent +-change \quote to advance leftskip instead of setting it +-fix full page figures to use \vbox to \vsize with bottom glue to +avoid depth problems + +RELEASE 0.5 -- 2 May 85 + +3 May 85 +-integrate WELG suggestion about thick horizontal and vertical +lines + +6 May 85 +-change all macro parameters to toks parameters +-change \newelement to have \above and \below +-add \minskip, \minbreak, and \dobreak +-fix \newelement defs in USER + +7 May 85 +-discipline \vpar with \ifvpar and \everypar empty test +-add \etoks +-change \fixedhead, \runninghead, \copyrightholder to use toks +-add \displaytable +-add \footnotetext +-add \newtoks for the fonts +-move \rectocenterheader et al to USER +-define chapter et al with \newelement +-change \versoeject et al to \rectoeject +-set \floatabovefigureskip to \z@skip +-move \verb to USER +-fix \newelement to edef the standard name +-add \get@rg, use it in \chapter et al + +RELEASE 0.6 -- 7 May 85 + +9 May 85 +-change all \new defs to use \edef with toks to allow +consistent macro definition +-add \yesindent synonym for consistency +-rename \undindent to \rem@veindent +-add \long in front of all the standard forms that need it +-move 2 columns to USER +-move \raggedcenter to USER +-move indexes to USER +-move \everyjob to MACROS + +10 May 85 +-fix parameter problems from all \news using \edefs +-change meanings of L,C,R in tables, add & and \tablestyle + +RELEASE 0.7 -- 10 May 85 + +13 May 85 +-add \esp@cl to fix trailing {} in alignment preambles +-fix empty preamble error recovery +-set \clubpenalty=900 and \windowpenalty=900 in USER +-set \parskip to 1pt plus2pt minus1pt +-make \vpartrue by default +-add \endgraf in \caption +-set captionindent to 2em explicitly +-fix quotes not to \offindent too early. + +RELEASE 0.71 -- 13 May 85 + +14 May 85 +-fix \newtable to do \offinterlineskip after \before material +-put \vpar instead of \unvpar below \bullets +-add \yesinterlineskip +-fix \pad@mble entry for non-rule columns to be a strut +\padheight high +-add \iffigureline, \figurelineskip, etc. to figures +-put depth struts in last lines of captions + +RELEASE 0.72 -- 14 May 85 + +16 May 85 +-rename Bigg to biggg and \Sml to \smlll +-change \figurelineskip to \figurelinedrop +-break out \title, \author, etc. +-change \acknowledgements to \bottomtext +-rationalize \footnote, \vfootnote, and \footmatter + +RELEASE 0.8 -- 16 May 85 + +21 May 85 +-change \linebreak to have \ifhmode +-change \cr in titles to have \ifhmode + +22 May 85 +-change \activespaces to take arg +-add \activelines +-add \nfootnote +-add \footdef and \footref +-set strut in \normalbaselines, \normallineskip in \se@tnormalspacing +-add \ifcenterheadings +-add \singlespace and \doublespace + +RELEASE 0.9 -- 22 May 85 + +23 May 85 +-add \hss to \atpar + +RELEASE 0.91 -- 23 May 85 + +24 May 85 +-remove \newmathwrap, \underline, and \overline +-add \before and \after to \newtextwrap +-remove \! + +28 May 85 +-fix misspelling of \beginpr@gram in BASE +-add \setnormalbaselines, fix \singlespace and \doublespace +-rename programs to lisp +-make several fixes in \l@sp + +RELEASE 1.0 -- 28 May 85 + +5 June 85 +-make \\ be \crcr in tables +-put "Part title" message in braces +-fix \specials@ther so it works in tables + +RELEASE 1.01 -- 5 June 85 + +12 June 85 +-only insert \topsep or \botsep if insertion has height+depth +greater than 0. + +RELEASE 1.02 -- 12 June 85 + +13 June 85 +-change \newpage and \newsuperpage to put all material in a +pgroup +-define \titlepage and \partpage using \newelement +-add \math +-only insert \topsep or \botsep if page has height+depth +-take addition of "page" to name out of \newpage et al + +RELEASE 1.03 -- 13 June 85 + +14 June 85 +-change \ytex def to be correct in boldface and italics by not +using math mode. + +RELEASE 1.04 -- 14 June 85 + +19 Mar 85 +-don't allow breaks between floating figures and trailing +whitespace +-put prefigure floatpenalty and prefigure floatskip together in +the before section of figures +-leave indent on in captions, start them with \vpar +-leave indent on in footnotes + +RELEASE 1.05 -- 19 June 85 + +5 Aug 85 +-add \figurebox + +RELEASE 1.06 -- 5 Aug 85 + +6 Aug 85 +-reset \parfillskip=\filskip in footnotes to allow footnotes in +titles +-add \setup parameter to \newpar +-add \partagsep parameter, use it in \ftp and \atp +-add \vtp +-put \m@th in bullet paragraph starter + +RELEASE 1.07 -- 6 Aug 85 + +7 Aug 85 +-reset \parfillskip=\filskip in figures +-add paired delimiters \stationaryfigure et al +-remove \figurebox +-change \newpar to allow use of argument text + +RELEASE 1.08 -- 7 Aug 85 + +26 Aug 85 +-change tagged pars to use \partagbox to avoid conflict with +\everypar + +RELEASE 1.09 -- 26 Aug 85 + +11-12 Oct 85 +-fix two columns to integrate TUGboat fixes +-allow figures and footnotes in two column; these are one column +-add \figuresetuphook et al + +RELEASE 1.1 -- 12 Oct 85 + +14 Oct 85 +-add \doublecolumn + +RELEASE 1.11 -- 14 Oct 85 + +-make fixes to \doublecolumn +-add \pageeject + +RELEASE 1.12 -- 14 Oct 85 + +15 Oct 85 +-further fixes in \twocolumntext and \doublecolumn +-allow @ in names by default in ytex.fixes + +RELEASE 1.13 -- 15 Oct 85 + +-fix absolutely glaring, obcvious bug in \doublecolumn + +RELEASE 1.14 -- 15 Oct 85 + +-fix yet another glaring, obvious bug in \doublecolumn + +RELEASE 1.15 -- 15 Oct 85 + +-fix bug in \pageeject (forgotten \vfil) + +RELEASE 1.16 -- 15 Oct 85 + +29 Oct 85 +-fix \supereject in two-column mode + +RELEASE 1.17 -- 29 Oct 85 + +30 Oct 85 +-fix closure lossage in \@input +-add \filen@me to init, set it equal to \jobname +-add \yesornop, \askuser +-change \input to define \filen@me +-add auxiliary files to NEW + +1 Nov 85 +-add conditional input to new +-change \input, \@input, \@input@ to use \inputfil@ +-add \maybeinput + +5 Nov 85 +-add immediate write of \relax to open of aux files +-change \inputfil@ to save state without a \begingroup + +6 Nov 85 +-move lisp programs from base to user +-put auxiliary files into base +-put citations, labels, and conditional input into user +-add \ifyinfo and \ifydebug, conditionalize \messages + +3-5 Dec 85 +-remove filen@me stuff +-make aux files only perjob or explicit +-remove conditional input of lists of files +-add \bibitem + +RELEASE 1.18 -- 5 Dec 85 + +5 Dec 85 +-use \setupbibliography scheme +-add missing \fi in \maybeinput + +RELEASE 1.19 -- 5 Dec 85 + +13 Dec 85 +-fix citation writing to protect citations in toklists +-rename ytex.log to ytex.record +-add ytex.site +-replace texinputs: with \ytexlibrary +-removed periods in messages +-add \ywarning, \ifywarn +-convert citation and label messages to warnings +-convert missing file messages to warnings + +RELEASE 1.20 -- 13 Dec 85 (Friday!) + +-go to site changes in SITE file. +-use YPLAIN by default instead of PLAIN-CM. + +RELEASE 1.21 -- 29 Dec 85 + +-rename files: MACROS to YTEX, FONTS to YFONTS, BASE to YBASE, +USER to YUSER, RECORD to YLOG, SITE to YSITE. +-rename files: YTEX.FIXES to YFIX.MAC, YTEX.LOCAL to YLOCAL.TEX, +YTEX.MATH to YMATH.TEX. + +RELEASE 1.90 -- 14 Apr 86 + +-add \ifexactsizes, allowing site changes. +-make the first letter of yTeX a Y (traditional upsilon) instead +of TeX's version (a medieval upsilon). + +RELEASE 2.0 -- 9 Jun 86 diff --git a/Master/texmf-dist/tex/ytex/base/ysite.mac b/Master/texmf-dist/tex/ytex/base/ysite.mac new file mode 100644 index 00000000000..d718e05036e --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ysite.mac @@ -0,0 +1,11 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% Site modifications for the yTeX macros. See the file YTEX.MAC for details. + +%% MIT-OZ (Twenex) changes + +% magnification scaling is according to TeX 1.2-based scheme +\exactsizesfalse + +% where to look up yTeX library files +\def\ytexlibrary {texinputs:} + diff --git a/Master/texmf-dist/tex/ytex/base/ytex-cm.tex b/Master/texmf-dist/tex/ytex/base/ytex-cm.tex new file mode 100644 index 00000000000..60f7b88c51b --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ytex-cm.tex @@ -0,0 +1,4 @@ +% preload an INITEX with YTEX +\input plain +\def\fmtname {YTEX-CM} +\input ytex.mac diff --git a/Master/texmf-dist/tex/ytex/base/ytex.ieee b/Master/texmf-dist/tex/ytex/base/ytex.ieee new file mode 100644 index 00000000000..59559beab46 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ytex.ieee @@ -0,0 +1,250 @@ +% -*- TeX -*- +% for yTeX +% Michael A. Gennert +% MICHAELG%OZ@MIT-MC + +% These macros generate IEEE style papers. They break each page into +% 4 pieces, except for the first page, which is broken into 5. This +% allows a paper to be created with the minimum amount of pasting onto +% pages. The text of all pages is broken into quadrants, where each +% quadrant is 4.25 inches wide by 5.75 inches long. Two quadrants are +% pasted together to make a column and two columns pasted together to +% make a page. The top two quadrants of the first page are shorter, +% allowing space for the title piece. There are no headers nor +% footers. Twocolumn mode may not be used (it is superfluous). +% Glosses are not allowed. A typical paper looks like: + +% \input <michaelg.tex>yTeX.ieee +% \begintitlepage +% \ctitle{yTeX.IEEE: A NEW MACRO PACKAGE} +% \cauthor{Michael A. Gennert} +% \caffiliation{Artificial Intelligence Laboratory\cr +% Massachusetts Institute of Technology\cr +% Cambridge, Massachusetts 02139\cr} +% \endtitlepage +% \section{Abstract} +% This paper introduces a new macro package called yTeX.IEEE, for the +% yTeX text formatter. And so on. +% \section{1. Introduction} ... + +% There are new entries for the titlepage, \affiliation and +% \caffiliation, that behave exactly like \author and \cauthor, except +% that their font is \affiliationfont, defaulting to \regsize\rm. + +% \section underlines and centers the section title and numbers it. +% \subsection underlines and places flush left. \subsubsection +% underlines, indents, and then runs the text in. Each has its own +% font, defaulting to \regsize\bf. + +% Footnotes cannot be used in the title page. They disappear if you try. + +% The \draft macro does not put the words draft anywhere now, since it +% used to use glosses, which are disabled. But, it does give a rule +% at the edge of overfull boxes, helpful for pointing out lines that +% are too long. + +% The \ref macro makes references easier. Sample usage is +% \ref{1} M.A. Gennert, ``yTeX.IEEE: A New Macro Package,'' + +% While yTeX is running, it prints the page numbers on the screen as +% they are shipped out. Here, we use a convention for page numbers. +% The title page is page 0. Other pages are of the form pq, where p +% is the manuscript page (which of course never gets shipped out at +% all), and q is the quadrant, from 1 to 4. Thus, the normal sequence +% of page numbers on the screen will be [0], [1.1], ... [1.4], [2.1] ... + +\makeatletter % allow @ in macro names + +\offrunners % no runners at all + +% quadrants +\countdef\quadrant=1 +\quadrant=1 + +% Title page hacks. Titles cannot have footnotes. If you can make title +% footnotes appear at the bottom of the first column of text, let me +% know how you did it. Title should be 1.875 inches high and normal width. + +% main title pages %%% vsize 1.875 truein? +\newelement\titlepage + \setup \output={\ytextitlepageoutput} + \above + \below + \begin \begintitlingpage \hsize=6.5truein \vsize=8truein \ymessage{{Title page}} + \end \endgraf \endtitlingpage \global\vsize=8.625truein + \endnew + +% title pages for sub-parts of a book, etc. +\newelement\partpage + \setup \ymessage{{No part titles allowed in IEEE format}} + \above + \below + \begin + \end + \endnew + +% add spacing around elements of title +\newtitle\title + \box \vbottom + \shape \titleleft{\z@}{\z@}% + \font \the\titlefont + \setup + \begin + \end \vskip .20truein plus .25truein minus .10truein + \endnew +\newtitle\ctitle + \box \vbottom + \shape \titlecenter{\z@}{\z@}% + \font \the\titlefont + \setup + \begin + \end \vskip .20truein plus .25truein minus .10truein + \endnew +\newtitle\author + \box \vbottom + \shape \titleleft{\z@}{\z@}% + \font \the\authorfont + \setup + \begin \vskip .15truein plus .25truein minus .5truein + \end \vskip .15truein plus .25truein minus .5truein + \endnew +\newtitle\cauthor + \box \vbottom + \shape \titlecenter{\z@}{\z@}% + \font \the\authorfont + \setup + \begin \vskip .15truein plus .25truein minus .5truein + \end \vskip .15truein plus .25truein minus .5truein + \endnew + +% affiliation +\newtoks\affiliationfont +\newtitle\affiliation + \box \vbottom + \shape \titleleft{\z@}{\z@}% + \font \the\affiliation + \setup + \begin \vskip .15truein plus .25truein minus .5truein + \end + \endnew +\newtitle\caffiliation + \box \vbottom + \shape \titlecenter{\z@}{\z@}% + \font \the\affiliationfont + \setup + \begin \vskip .15truein plus .25truein minus .5truein + \end + \endnew + +% fonts +\affiliationfont={\regsize\rm} + +% title page output routine +\def\ytextitlepageoutput {\pageno=0 % + \shipout\vbox{% + \hbox to6.5truein{% + \hss + \vbox to1.875truein{% + \offinterlineskip + \unvbox\@cclv + }% end of contents \vbox + \hss}% end of centering \hbox + }% end of centering \vbox + \ifnum\outputpenalty>-\@MM \else\dosupereject\fi + \global\output={\ytexoutput}} + +% normal(?) output routine +\def\ytexoutput {% + \iftrimpages \trimp@ge\fi + \setbox\@cclv=\vbox{\pagecontents} + \setbox\z@=\vsplit\@cclv to 5.7truein + \shipout\addpageno{\box\z@} + \advancequadrant + \shipout\addpageno{\box\@cclv} + \advancequadrant + \ifnum\quadrant=1\global\vsize=11.4truein\fi + \ifnum\outputpenalty>-\@MM \else\dosupereject\fi} + +% fancy quadrant increment scheme +\def\advancequadrant{% + \global\advance\quadrant by 1 + \ifnum\quadrant>4 \global\advance\quadrant by -4 \global\advance\pageno by 1\fi} + +% add page number to bottom of output sheet +\def\addpageno#1{% + \vbox to 9truein{% + \hbox to 6.5truein{#1\hss} + \vskip 0pt plus 1filll + \hbox to 6.5truein{\hss\number\pageno .\number\quadrant}}} + +% sections, subsections, subsubsections +\newtitle\sectiontitle + \box \vbottom + \shape \titlecenter{\z@}{\z@} + \font \the\sectionfont + \setup + \begin + \end + \endnew + +\newelement\section + \setup \get@rg\endsection \sectionsetup + \above \minbreak \presectionpenalty \abovesectionskip + \below \dobreak \postsectionpenalty \belowsectionskip \vpar + \begin \get@rg + \end \ymessage{{Section: \the\toks@}}% + \sectiontitle{\underbar{\the\toks@}}% + \endnew +\setskip\abovesectionskip \dimen 9pt \glue \parskip \factor 3000 +\setskip\belowsectionskip \dimen 3pt \glue \parskip \factor 2000 + +\newtitle\subsectiontitle + \box \vbottom + \shape \titleleft{\z@}{\z@} + \font \the\subsectionfont + \setup + \begin + \end + \endnew + +\newelement\subsection + \setup \get@rg\endsubsection + \above \minbreak \presectionpenalty \abovesectionskip + \below \dobreak \postsectionpenalty \belowsectionskip \vpar + \begin \get@rg + \end \ymessage{{Subsection: \the\toks@}}% + \subsectiontitle{\underbar{\the\toks@}}% + \endnew + +\def\subsubsection#1{% + \minbreak \presectionpenalty \abovesectionskip + \underbar{{\the\subsubsectionfont #1}} \noindent} + +% subsection and subsubsection fonts +\newtoks\subsectionfont +\subsectionfont={\regsize\bf} +\newtoks\subsubsectionfont +\subsubsectionfont={\regsize\bf} + +% references are adjoint tagged paragraphs +\def\ref#1{\atpar{[#1]}} + +% skip .5 inch after the abstract +\def\abstractskip{\vskip .5truein} + +% first paragraph after a heading not flush left +\vparfalse + +% footnotes have a rule along their entire length +\def\footnoterule{\kern-3pt + \hrule width \hsize \kern 2.6pt} + +% set page size +\hsize=4.25truein +\vsize=11.4truein + +% set proper spacing +\baselinefactor={1.1}\setnormalbaselines + +% disallow @ elsewhere +\makeatother diff --git a/Master/texmf-dist/tex/ytex/base/ytex.mac b/Master/texmf-dist/tex/ytex/base/ytex.mac new file mode 100644 index 00000000000..3fb03e09820 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ytex.mac @@ -0,0 +1,92 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% The yTeX macros. Written and maintained by DCB@MIT-AI.ARPA +% Questions, suggestions, bug reports by net mail to BUG-YTEX@MIT-AI.ARPA + +\ifx \fmtname\completelyundefinedcontrolsequence + \input yplain.mac \fi % load a Plain format if needed + +\message{[Loading the YTEX macros:} + +% CONTENTS + +% ^L-page contents +% ---------------------------------------------------------------------- +% 1 %% YTEX macros +% 2 %% setup +% 3 %% Load the library +% 4 %% Load the fonts +% 5 %% Load the user level +% 6 %% miscellany +% 7 %% initialization + +%% setup + +% @ used in macros +\def\makeatletter {\catcode`\@=11\relax} +\def\makeatother {\catcode`\@=12\relax} +\makeatletter + +% conditional message output +\newif\ifyinfo +\newif\ifywarn +\newif\ifydebug +\def\ymessage #1{\ifyinfo \message{#1}\fi} +\def\ywarning #1{\ifywarn \message{#1}\fi} +\def\ybuginfo #1{\ifydebug \message{#1}\fi} + +% preserve def of \input +\let\@@input=\input + +%% Load the library + +\message{(BASE)} +\@@input ybase.mac + +%% Load the fonts + +\message{(FONTS)} +\@@input yfonts.mac + +%% Load the user level + +\message{(USER)} +\@@input yuser.mac + +%% miscellany + +% library location +\def\ytexlibrary {} + +% name of this TeX +\def\yTeX {\leavevmode\lower.5ex\hbox{Y}\kern-.1667em\TeX} +\def\ytex {\yTeX} +\let\YTEX=\ytex +\let\YTeX=\ytex +\let\oopstex=\ytex + +%% initialization + +% format name, version, and site modifications +\ifx \fmtname\completelyundefinedcontrolsequence + \def\fmtname{yTeX}\fi +\@@input ylog.mac +\@@input ysite.mac + +% read fixes and augmentations to these macros +\everyjob={% + \ymessage{{YTEX version \fmtversion}}% + \st@rttime + \makeatletter + \@input{\ytexlibrary yfix.mac}{\ymessage{{No fixes}}}% + \makeatother + \@input@{ymath}{}% + \@input@{ylocal}{}% + } + +% no user @ in macro names, print messages only +\makeatother +\yinfotrue +\ywarntrue +\ydebugfalse + +\message{(DONE)]} diff --git a/Master/texmf-dist/tex/ytex/base/ytex.mail b/Master/texmf-dist/tex/ytex/base/ytex.mail new file mode 100644 index 00000000000..f0cd755071b --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/ytex.mail @@ -0,0 +1,75 @@ + + 3-Jun-86 12:20:41-EDT,1879;000000000000 +Mail-From: DCB created at 3-Jun-86 12:20:27 +Date: 3 Jun 1986 12:20 EDT (Tue) +Message-ID: <DCB.12211894578.BABYL@MIT-OZ> +From: Daniel Brotsky <DCB@OZ.AI.MIT.EDU> +To: info-ytex@OZ.AI.MIT.EDU +Subject: New yTeX release: version 2.0 +cc: dcb@OZ.AI.MIT.EDU + +I have just released version 2.0. There are only cosmetic +differences between this version and the last version. These +are: + +o The file YTEX.LOCAL is renamed to YLOCAL.TEX + +o The file YTEX.MATH is renamed to YMATH.TEX + +o The file YTEX.USAGE is renamed to YUSAGE.TEX + +o All the yTeX source files have moved from TEXLOCAL: + to KS:<TEX.YTEX>. + +The new version is due to a slight restructuring of the source +files. In particular, there have been the following name +changes: + +YTEX.MACROS --> YTEX.MAC +YTEX.BASE --> YBASE.MAC +YTEX.FONTS --> YFONTS.MAC +YTEX.USER --> YUSER.MAC +YTEX.LOG --> YLOG.MAC +YTEX.FIXES --> YFIX.MAC + +In addition, there is a new file YSITE.MAC which contains +settings and definitions appropriate to the yTeX installation at +a particular site. + +These changes were made to make yTeX easier to transport to +installations where, for example, file names can only have six +characters in the name and three characters in the extension. In +addition, the sources no longer refer to logical names such as +TEXINPUTS:; instead, they use a prepended string \ytexlibrary +which is defined in the YSITE file. (On OZ the definition in the +YSITE file for \ytexlibrary is TEXINPUTS: so the behavior of yTeX +on OZ should not change.) + +Note that the YUSAGE documentation file has not been updated to +relect these name changes. If anyone feels like doing this, they +should feel free. + +If you maintain yTeX at another site, you should import the new +version immediately. + +This will be the last change I make in yTeX for quite a while. + + + dan + 3-Jun-86 12:35:14-EDT,658;000000000000 +Mail-From: DCB created at 3-Jun-86 12:34:44 +Date: 3 Jun 1986 12:34 EDT (Tue) +Message-ID: <DCB.12211897177.BABYL@MIT-OZ> +From: Daniel Brotsky <DCB@OZ.AI.MIT.EDU> +To: info-ytex@OZ.AI.MIT.EDU +Subject: yTeX 2.0 documentation fixed. +cc: dcb@OZ.AI.MIT.EDU + +OK, OK, I updated the documentation file to show the new file +names. If I really get motivated, I will even add stuff to the +documentation about all the wonderful new features that went in +months ago, like \twocolumntext and \doublecolumn and \maybeinput +and cross references and bibliographies and \yesornop. Better +yet, maybe someone else will get inspired and do it for me! + + dan diff --git a/Master/texmf-dist/tex/ytex/base/yusage.lst b/Master/texmf-dist/tex/ytex/base/yusage.lst new file mode 100644 index 00000000000..013d7447565 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/yusage.lst @@ -0,0 +1,55 @@ +This is TeX, MIT-OZ Version 1.5 (preloaded format=ytex-am 86.6.9) 20 NOV 1986 23:37 +**YUSAGE.TEX.5 +(KANSAS:<TEX.YTEX>YUSAGE.TEX.5 {YTEX version 2.0} {No fixes} +{\typesize=11.0pt} +\abovegabskip=\skip58 +\belowgabskip=\skip59 +\pregabpenalty=\count60 +\postgabpenalty=\count61 +\abovebottomtextskip=\skip60 +\belowbottomtextskip=\skip61 +\prebottomtextpenalty=\count62 +\postbottomtextpenalty=\count63 + {Main title} [0] {Section: What is \ytex ?} +{Section: About This Document} [1] +{Section: Some Notation and Conventions I Use Throughout} +Overfull \vbox (2.30855pt too high) has occurred while \output is active +\vbox(528.0+3.60753)x336.0, glue set - 1.0 +.\glue(\topskip) 3.05556 +.\hbox(6.94444+2.15277)x336.0, glue set - 0.42229 +..\hbox(0.0+0.0)x20.0 +..\tenrm I +..\tenrm f +..\glue 3.33333 plus 1.66666 minus 1.1111 +..\tenrm y +..etc. +.\penalty 900 +.\glue(\baselineskip) 3.90282 +.\hbox(6.94444+1.94444)x336.0, glue set - 0.00592 +..\tenrm t +..\tenrm u +..\tenrm r +..\tenrm n +..\glue 3.33333 plus 1.66666 minus 1.1111 +..etc. +.etc. + + +[2] {Section: Format of a \ytex \ Input File} [3] +{Section: How To Invoke \ytex } {Section: Where are the Sources} +{Section: The \ytex \ View of Documents} [4] +{Section: The Five Kinds of \ytex \ Commands} [5] +{Section: More About Delimiter Commands} [6] [7] +{Section: More About Switches} {Section: A List of the \ytex \ User Macros} +{Heading: Titling Pages} [8] {Heading: Chapters and Sections} [9] +{Heading: Page Layout} [10] {Heading: Paragraphs} [11] [12] +{Heading: Fonts and Sizes} [13] {Heading: Figures} [14] [15] [16] +{Heading: Tables} [17] [18] {Heading: Footnotes} {Heading: Textual Displays} +[19] [20] [21] {Heading: Two-Column Text} +{Heading: Formatting Small Pieces of Text} [22] {Heading: The Date} +{Heading: Miscellany} [23] {Section: For Wizards Only} {Heading: Page Glosses} +{Heading: Size Changing} [24] {Heading: Setup Hooks} +{Heading: More About Tables} [25] {Section: A List of Many \ytex \ Commands} +{Heading: The Commands} [26] [27] [28] {Heading: Parameters} [29] [30] +{Heading: Switches} [31] +Output written on KANSAS:<TEX.YTEX>YUSAGE.DVI.1 (32 pages, 86408 bytes). diff --git a/Master/texmf-dist/tex/ytex/base/yusage.tex b/Master/texmf-dist/tex/ytex/base/yusage.tex new file mode 100644 index 00000000000..202435fffa3 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/yusage.tex @@ -0,0 +1,1772 @@ +% for yTeX +\typesize=10pt +\runninghead={How to Use \ytex} +\makelgtbrackets + +% small caps font +\font\sc=cmcsc10 + +% easy indexing of macros described +\let\+=\relax % commands +\let\==\relax % parameters +\let\:=\relax % switches + +% easy verbatim stuff +\catcode`\"=12\relax +\def\"{\hbox{\tt "}} +\def\verbq{\verb"} +\addspecial\" +\catcode`\"=\active \let"=\verbq + +% macro descriptions +\newelement\gab + \setup \unvpar + \advance\parskip by2pt plus1pt + \leftskip=\parindent + \clubpenalty=10000 + \def\*{\noindent \hskip-\leftskip\ignorespaces}% + \def\\{\linebreak\ignorespaces}% + \def\##1{{\tt \char`\{}#1{\tt \char`\}}}% + \above \minbreak \pregabpenalty \abovegabskip + \below \dobreak \postgabpenalty \belowgabskip \vpar + \begin + \end \endgraf + \endnew +\abovegabskip=\abovebulletsskip +\belowgabskip=\belowbulletsskip +\pregabpenalty=\prebulletspenalty +\postgabpenalty=\postbulletspenalty + +% names for TeXs +\let\tex=\TeX +\def\LaTeX{L\kern-.2em\raise.3ex\hbox{a}\kern-.09em\TeX} +\let\latex=\LaTeX +\def\Tbase{\sy{TBASE}} +\let\tbase=\Tbase +\def\Plain{{\rm Plain}} +\let\plain=\Plain +\def\lisp{L{\smllrm ISP}} + +\begintitlepage + +\tcenter{\sc The Artificial Intelligence Laboratory\\ Massachusetts +Institute of Technology} + +\vskip 1pc + +\spread {Working Paper 273}{May 1985} +\spread {}{Revised, June 1986} + +\vskip 6pc + +\ctitle {How to Use \ytex} + +\vskip 3pc + +\cauthor {Daniel Brotsky\\ June 9, 1986} + +\vskip 3pc + +\beginabstract + +\ytex---pronounced {\it why}-\tex\ or {\it oops}-\tex---is a +\tex\ macro package. \ytex\ provides both an easy-to-use +interface for \tex\ novices and a powerful macro-creation library +for \tex\ programmers. It is this two-tier structure that makes +\ytex\ more useful to a diverse \tex\ user community than other +macro packages such as \plain\ or \latex. + +This paper contains \ytex\ instructions intended for novice +users. It summarizes the facilities provided in \ytex\ and +concludes with a table of useful commands. + +The version of \ytex\ documented here is release \fmtversion. + +\endabstract + +\beginbottomtext + +Work on \ytex\ was supported by a desire to avoid doing real +work, like research. + +\smallskip + +A.I. Laboratory Working Papers are produced for internal +circulation, and may contain information that is, for example, +too preliminary or too detailed for formal publication. It is +not intended that they should be considered papers to which +reference can be made in the literature. + +\endbottomtext + +\endtitlepage + +\section {What is \ytex?} + +\ytex---usually pronounced {\it why}-\tex\ but see below---is a +\tex\ macro package. \ytex\ evolved from the author's experience +with other \tex\ macro packages, primarily \tbase, \plain, +\latex, and the \sy{PHW} book macros. This experience showed +that, on the one hand, packages as complete as \latex\ or \tbase\ +tend to be inflexible while, on the other hand, packages as +flexible as \plain\ tend to be incomplete. \ytex\ ties both +hands together by aiming for inflexibility and incompleteness +simultaneously. + +Like most \tex-related programs and macro packages, \ytex\ has a +``cute'' name that attempts a dual-language pun in English and +pseudo-Greek.\footnote*{The result is about as weak the premise +suggests.} The letter preceding the \tex\ in \ytex\ is not just a +`Y' but also an {\it upsilon}---the Greek antecedent for the +English letters `u' and `y'.\footnote\dag{Experienced \TeX\ math +hackers may know that \TeX\ makes a version of capital upsilon +available as $\Upsilon$, and they may wonder why the name \yTeX\ +is not spelled as \lower.5ex\hbox{$\Upsilon$}\kern-.1667em\TeX. +That's because \TeX's version of $\Upsilon$ is not a Greek +version (one of which really looked like `Y'---trust the Romans +to be accurate in their borrowing) but actually the Uncial +version popular among middle-ages religious circles. Hey, what +can I say? Trust \TeX\ to be medieval whenever possible.} Thus +you may pronounce \ytex\ as the expected {\it why}-\tex, the +erudite {\it upsilon}-\tex, or the shorter {\it oops}-\tex. But +when you spell it to the computer, you have to spell it +\sy{YTEX}. + +\section {About This Document} + +This document contains basic instructions for using \ytex. It +describes the things you can do using the user interface that +\ytex\ always provides. It does {\it not} explain how to use the +\ytex\ library facilities to add to and replace parts of that +interface. Readers who are interested in such matters should +look at the \ytex\ sources. + +If you are a complete \tex\ beginner you may find this document +hard to follow. In fact, almost everyone will find parts of the +presentation hard to follow. My advice to those who are confused +is to not worry about it: most of the time you will be confused +because you are reading about a feature you have no use for and +thus no experience with. If you need to use something and don't +understand what is said about it here, just try the examples I +give in one of your manuscripts and see if you can figure it out +from there. If that doesn't work, try finding someone who does +use the feature and ask them. As a last resort, try finding a +\tex\ wizard and asking them. + +If you wish a quick summary of most of the \ytex\ commands, you +should turn to the tables of commands, parameters, and switches +at the very end of this document. + +\section {Some Notation and Conventions I Use Throughout} + +In what follows, I try to use notation and conventions very +similar to those Knuth uses in the \tex book. For +convenience,\footnote*{(and also for those many of us who find +the \tex book completely confusing)} I summarize most of +the conventions here. + +\beginbullets + +\bpar Text set in "typewriter" type is suitable for \ytex\ input. + +\bpar Commands---also called {\it control sequences} or {\it +macros}---all start with a backslash. {\it Alphabetic commands} +such as "\section" and "\it" have one or more letters after their +backslash, while {\it non-alphabetic commands} such as "\'" and +"\&" have a single non-letter after their backslash. When you +use an alphabetic command, you must have a space or other +non-letter right after the command name (as in "{\it italics}"), +and any spaces after the command are ignored by \tex. When you +use a non-alphabetic command, you can have anything at all after +the command name (as in the Spanish "m\'agico"), and spaces you +put there are {\it not} ignored by \tex. + +\bpar Commands sometimes need {\it arguments}, such as the stuff +typed in braces in +\beginverb +\section {This is the Argument.} +\endverb +Most commands which use arguments---a process also called {\it +taking} or {\it reading} arguments---expect their arguments to be +enclosed in braces (as they were in this example). But there are +other ways of specifying arguments, and these are detailed in +what follows. + +\bpar \ytex\ and \tex\ both have the notion of {\it parameters} +which have {\it values}. For example, the value of the "\hsize" +parameter is used as the normal length of lines in paragraphs. +To set a parameter, you give the name of the parameter, an +optional `"="' sign, and then the desired new value for the +parameter. For example, to set the normal line length to 5 +inches, you could say either of the following things: +\beginverb +\hsize=5in +\hsize 5in +\endverb + +\bpar There are several kinds of parameters: <integer> parameters +hold integers (such as 3 or $-1$), <dimen> parameters hold +distances (such as "2in" or "5pt"), <glue> parameters hold +variable distances (such as "6pt plus 2pt minus 1pt"), and <toks> +parameters hold token lists (such as +"{\bigsize\bf}").\footnote\dag{There are also <muglue> +parameters, but only math wizards worry about those.} The +different kinds of parameters are used for different purposes; +for example, the "\hsize" parameter mentioned above is a <dimen> +because line length is a distance, and the "\pageno" parameter +that holds the current page number is---as expected---an +<integer> parameter. But no matter what their type, you assign +values to parameters in the manner described above. + +\bpar If you ever want to examine the value of a parameter---for +example, if you want to know what it is so you can change it +appropriately---you can get \ytex\ to show you the value by +putting "\showthe" in front of the parameter name. For example, +if you said "\showthe\parindent" in your input file, \ytex\ would print +\beginverb +>20.0pt. +... \showthe\parindent +\endverb +on your terminal screen when it processes your input. It would +then pause and wait for you to type a carriage return before +continuing. + +\endbullets + +\section {Format of a \ytex\ Input File} + +\ytex\ input is just normal \tex\ input.\footnote*{Of course, +this means \tex82! \tbase\ input, for example, will not work in +\ytex.} It is customary, however, to start \ytex\ input files +with a comment indicating that \ytex\ is expected to process the +file. For example, the manuscript file for this document starts +with the line +\beginverb +% for yTeX +\endverb +so anyone who looks at the file will realize this. + +The first command in every \ytex\ manuscript should be a +\="\typesize"\= command specifying the desired type size for the +text of the document. For example, after the comment shown +above, the manuscript for this document has the line +\beginverb +\typesize=11pt +\endverb +As you can see, a "\typesize" command looks like a command for +setting one of \tex's <dimen> parameters, such as "\parindent". +However, the dimension that follows the equal sign must be one +of 10pt, 11pt, or 12pt, since these are the only sizes that +\ytex\ supports for normal text. + +If you forget to put a "\typesize" command at the beginning of +your manuscript, \ytex\ will complain with the error message +\beginverb +! You never gave a \typesize command. +\endverb +Don't panic; just type a carriage return and \ytex\ will use +10~point type. But you should add a "\typesize" command before +you run the file again. + +You can't give more than one "\typesize" command in a single +manuscript. This is because \ytex\ implements your desired size +by magnifying a 10pt document by the right amount, and \tex\ does +not like to change magnification in the middle of a run. This +may seem like a drawback, but it's really a feature, because it +means that the line and page breaks will not change if you run a +manuscript through \ytex\ a second time using a different +typesize! So you can proof your document in one size and run it +off in a different size without worrying about formatting +changes. + +\section {How To Invoke \ytex} + +To invoke \ytex\ on \sy{OZ} you give the command \sy{YTEX} to the +\sy{EXEC}.\footnote*{The commands \sy{YTEXHE} and \sy{YTEXTR} +also exist for those who prefer the Helvetica or Times Roman font +families.} \ytex\ starts up by printing a release number and +reading in any recent fixes to itself. It then looks for two +files called \sy{YMATH.TEX} and \sy{YLOCAL.TEX} in your +connected directory (and on \sy{TEXINPUTS:} if they are not +found locally). You can customize your \ytex\ by putting +appropriate commands in these two files. + +The \sy{YMATH.TEX} files are intended for favorite mathematics +macros while the \sy{YLOCAL.TEX} macros are for macros or +parameter settings of any kind. Of course, all kinds of \tex\ +commands can be put in either of these files, but keep the +following in mind: separating math macros from others can make +the job of merging different authors' manuscripts a lot easier. + +\section {Where are the Sources} + +The source for \ytex\ lives in the directory \sy{KS:<TEX.YTEX>} +on \sy{OZ} and is split primarily among the files \sy{YTEX.MAC}, +\sy{YBASE.MAC}, \sy{YFONTS.MAC}, and \sy{YUSER.MAC}. The file +\sy{YLOG.MAC} contains a log of essentially all the changes made +to \ytex\ since its early stages; the first few lines of this +file declare the current version number. The file \sy{YSITE.MAC} +contains definitions and parameter settings (``site changes'') +appropriate to the local installation. The file \sy{YUSAGE.TEX} +contains the source for this document. + +The file \sy{KS:<TEX.YTEX>YFIX.MAC} is where \ytex\ looks for +revisions made to the macros since the last version was dumped. +Finally, an archive of correspondence about \ytex\ can be found +in the file \sy{KS:<TEX.YTEX>YTEX.MAIL} on \sy{OZ}. + +\section {The \ytex\ View of Documents} + +\ytex\ believes that documents are made up of chunks of text +called {\it elements} which are laid out on pages. For example, +each paragraph is an element, as is each chapter or section +heading, each figure, each footnote, and so on. Many of the +\ytex\ commands you will use most often serve to tell \ytex\ +which text belongs to which element. For example, the command +"\footnote" tells \ytex\ that its argument is a footnote +element. + +As \ytex\ encounters elements of various types in its input, it +first tries to format the content of each element in the desired +way. For example, when it finishes reading the contents of a +paragraph, it first tries to break the contents into lines +according to the rules currently in effect for paragraph +elements. When \ytex\ finishes reading the text of a table, it +tries to format that text according to the current rules for +table elements. + +Once \ytex\ accumulates enough elements to fit on a page, it +tries to lay those elements out on a page according to the layout +rules that apply to each element. For example, header elements +appear as a single line alone at the very top of a page, while +footnote elements appear tacked onto the bottoms of pages. + +Page layout is the hardest part of \ytex's job. This is because +the rules for laying out various elements may come into conflict. +For example, the rules for figures elements that appear in text +may say that the figure should be separated from the surrounding +text by one pica.\footnote*{There are six picas to the inch.} +But a figure may be placed just before a section heading, and the +rules for section heading elements may say that they should be +preceded by two picas. In cases like this, \ytex\ does the best +it can, but it may not do exactly what you want. So if you are +very picky about the page layout of a particular document, you +may have to tell \ytex\ exactly what you want at each place a +conflict like this arises. But don't worry: usually only people +who are publishing books need to be this picky. + +\section {The Five Kinds of \ytex\ Commands} + +There are five kinds of \ytex\ commands: + +\beginbullets + +\bpar {\it Delimiters\/} are commands that demarcate the text of +particular elements: they do what is commonly known as +``typemarking.'' For example, "\section" and "\footnote" are +both delimiters. All delimiters read arguments (in ways +explained below); it is the contents of these arguments that +become the contents of the elements they delimit. + +\bpar {\it Parameters\/} are commands that affect the formatting +and layout rules for particular elements. For example, "\hsize" +and "\parskip" are parameters that affect the width and layout of +paragraphs and pages. Parameters don't take arguments; instead, +they have values which can be assigned in the manner described +above. + +\bpar {\it Switches\/} are commands like parameters that affect +the formatting and layout of particular elements. For example, +"\noindent" and "\offheaders" are switches. Switches come in two +kinds---on/off switches and true/false switches---which are +described in detail later. Switches never take arguments. + +\bpar {\it Abbreviations\/} are commands that expand into common +sequences of low-level \tex\ commands. For example, "\padline" +and "\linebreak" are abbreviations. Some abbreviations have +arguments, and some don't. Any abbreviations that take arguments +take them in braces in the normal \tex\ way. + +\bpar {\it Descriptors\/} are commands that create new element +types with particular formatting and layout rules. For example, +the commands "\newfloat" and "\newtitle" are descriptors that +are used to create elements which float to the top of pages or +which title things. Descriptors take very complex arguments. + +\endbullets + +Normally, you use only delimiters, parameters, switches, and +abbreviations in your manuscripts. Descriptors are for +compulsive \tex\ hackers who feel the need for new element types, +or for wizards who are preparing documents with special +requirements (such as this manual). + +\section {More About Delimiter Commands} + +Delimiters come in three kinds: + +\beginbullets + +\bpar {\it Standard\/} delimiters---such as "\section", "\footnote", +or "\spread"---take their arguments in the standard \tex\ way: +the arguments are enclosed in braces and appear immediately after +the command. For example, this is how you give two arguments +to the "\spread" command: +\beginverb +\spread {First argument}{Second argument} +\endverb + +\bpar {\it Paired\/} delimiters---such as +"\begintext"/\allowbreak"\endtext" and +"\beginabstract"/\allowbreak"\endabstract"---surround their +argument. For example, this is how you delimit the text of an +abstract: +\beginverb +\beginabstract +This is a very short abstract +used only for expository purposes. +I wish all my abstracts were this simple. +\endabstract +\endverb + +\bpar {\it Paragraph\/} delimiters---such as "\bpar" and +"\ftpar"---are kind of a cross between standard and paired +delimiters. Their most important argument---the text of the +paragraph---is delimited by the paragraph delimiter in front and +the command "\par" (or a blank line) in back. But they may have +additional arguments (such as tag text) which are given in braces +immediately following the paragraph delimiter. For example, this +paragraph starts with +\beginverb +\bpar {\it Paragraph\/} delimiters--- +\endverb +and ends with a blank line. But it would look exactly the same +if it had started with +\beginverb +\ftpar{$\bullet$} {\it Paragraph\/} delimiters--- +\endverb +instead. + +\endbullets + +Most paired delimiters are also available in a standard form. +For example, you can use the command "\abstract" instead of +"\beginabstract" and "\endabstract", in which case you would +enclose the text of the abstract in braces and place it right +after the command.\footnote*{The only paired delimiters that are +not available in standard form are those in which the delimited +text is in ``nofill'' mode, such as "\beginverbatim" and +"\endverbatim". This has to do with subtle differences between +the effect of the two forms, differences that you needn't care +about and which can confuse even \tex\ wizards.} As you may have +guessed from the example, you get the standard form of paired +delimiters by removing the "begin" and "end" prefixes. + +Each argument to a standard or paired delimiter is a local group; +that is, font and other parameter changes inside the element do +not have any effects outside. So if you want the text of your +abstract to be in italics, you can just say +\beginverb +\beginabstract +\it This abstract is in italics. +\endabstract +\endverb +instead of the (also correct but) tedious +\beginverb +\beginabstract +{\it This abstract is in italics.} +\endabstract +\endverb +Similarly, you can just say +\beginverb +\section {\it An Italic Section Header} +\endverb +instead of +\beginverb +\section {{\it An Italic Section Header}} +\endverb + +\section {More About Switches} + +Switches come in two kinds: + +\bpar {\it On/off} switches are usually used to control whether +things such as headers and footers appear on a page. +For example, whether headers appear or not is controlled by the +two commands "\onheaders" and "\offheaders". These two commands +together are said to control the "\headers" switch. + +\vpar All on/off switches have variations in a {\it yes/no} form. +For example, the commands "\yesheaders" and "\noheaders" are like +"\onheaders" and "\offheaders", except that they {\it only} +control headers on the current page, not on future pages as well. + +The point of having both on/off and yes/no versions of switches +can be seen from the following: If you want none of the pages of +a letter numbered, you would put "\offfooters" at the beginning of +the letter. But if you want numbers on the bottoms of all pages +except the first, you would put "\nofooters" at the beginning. +The effect of "\nofooters" is to turn off the "\footers" switch +for the first page {\it only}. + +\bpar {\it True/false} switches are mostly used by wizards, so I +won't say much about them here. They are much like off/on +switches except that they have a different form. For example, +the "\vpar" switch controls whether the first paragraph after a +section heading is left-flush or not; the "\vpar" switch is +turned on with "\vpartrue" and turned off with "\vparfalse". You +can see the effects of saying "\vpartrue" in this document. + +\section {A List of the \ytex\ User Macros} + +This section contains descriptions of the most useful \ytex\ +macros. The listing is broken down by subject area; for example, +all the commands relevant to footnotes can be found in one place, +and all the commands relevant to sectioning in another. The next +section gives an alphabetized list of all the commands. + +In the following descriptions, only the "begin" half of paired +delimiters is mentioned. All the paired delimiters are available +in standard forms unless the description mentions otherwise. +Also, only the "on" form of on/off switches is mentioned. Of +course, the "off", "yes", and "no" forms are also available. + +\heading {Titling Pages} + +\ytex\ provides two kinds of titling pages: {\it part pages} +which are delimited by \+"\beginpartpage"\+ and {\it title pages} +which are delimited by \+"\begintitlepage"\+. The only +difference between the two is that title pages are always +numbered 0 while part pages have whatever number they would +normally be assigned. The contents of titling pages are centered +by default, and titling pages have no runners unless you ask for +them. + +The following commands are useful both on titling pages and +elsewhere: + +\begingab + +\*\+"\begintitle"\+ and \+"\beginctitle"\+\\set their arg as +titles. "\begintitle" gives a left-flush ragged-right paragraph +and "\beginctitle" gives a ragged-center paragraph. Inside of +titles, the commands \+"\\"\+, \+"\cr"\+, and \+"\crcr"\+ force +line breaks. + +\*\+"\beginauthor"\+ and \+"\begincauthor"\+\\are like +"\begintitle" and "\beginctitle" but use \="\authorfont"\= +(default "\regsize\rm") instead of \="\titlefont"\= (default +"\bigsize\bf"). + +\*\+"\beginabstract"\+\\delimits abstract text which is set in +\="\abstractfont"\= (default "\smlsize\rm") and indented from +both margins by "\abstractindent" (default "0pt"). + +\endgab + +The following command is available only on titling pages: + +\begingab + +\*\+"\beginbottomtext"\+\\delimits text which is set at the +bottom of the page in \="\bottomtextfont"\= (default +"\smllsize\rm"). If you use this command, the text of the page +will no longer be centered. Instead, the delimited material +appears at the bottom of the page and material above it will +start at the top of the page. + +\endgab + +\heading {Chapters and Sections} + +These macros produce titles at the top of chapters, sections, and +so on. Titles are normally set as left-flush, ragged-right +paragraphs. Inside of titles, the commands \+"\\"\+, \+"\cr"\+, +and \+"\crcr"\+ force line breaks. + + +\begingab + +\*\+"\beginchapter"\+ <title> "\endchapter"\\starts a new +chapter. The <title> is set in the \="\chapterfont"\= (default +"\bigsize\bf") as a left-flush ragged-right paragraph. The title +is preceded by \="\prechapterpenalty"\= and +\="\abovechapterskip"\= and followed by \="\postchapterpenalty"\= +and \="\belowchapterskip"\=. Most people prefer the standard +form "\chapter"~\#{<title>}. + +\*\+"\beginpchapter"\+\\is like "\beginchapter" but it forces the +title to the top of a new page and turns off runners for that +page. In two-sided matter, it forces the title to the top of a +recto page. + +\*\+"\beginsection"\+\\is like "\beginchapter" but uses smaller +font and spacing. Neither chapters nor sections do any automatic +numbering for you. But there are no-op commands \+"\secdef"\+ +and \+"\secref"\+ which, like their figure and table cousins, can +be used to help keep track of numbering. There are commands +\+"\beginsubsection"\+ and \+"\beginsubsubsection"\+ but they are +just aliases for "\section". + +\*\+"\beginheading"\+\\is like "\beginsection" but with smaller +font and spacing. + +\endgab + +The true/false switch \:"\centerheadingstrue"\: controls whether +chapter, section, and other titles are set as left-flush or +centered ragged-margin paragraphs. The default is +"\centerheadingsfalse"; that is, headings are left-flush as +mentioned above. + +\heading {Page Layout} + +Pages have headers and footers, jointly called runners. When +they are turned on, runners are single lines that appear +separated from the main text by the distances \="\headerdrop"\= +and \="\footerdrop"\=.\footnote*{These dimensions are not +measured baseline-to-baseline; rather, they are the appearing +space between the runners and the text.} By default, headers are +turned on and footers are turned off. + +\begingab + +\*\:"\onrunners"\:, \:"\onheaders"\:, and \:"\onfooters"\:\\are +switches that turn the various runners on. Recall that the +effects of these commands are permanent; the effects of their +yes/no counterparts are confined to the current page. + +\endgab + +There are actually two versions of headers and footers---one for +recto (right-hand or odd-numbered) pages and one for verso +(left-hand or even-numbered) pages. By default, all pages are +considered to be recto pages, but you can use the switch +\:"\twosidedtrue"\: to get two-sided output and "\twosidedfalse" +to go back to one-sided. + +The contents of headers and footers are the values of the <toks> +parameters \="\versoleftheader"\=, \="\rectoleftheader"\=, and so +on. By default, the \="\rectorightheader"\=, the +"\versoleftheader", and both center footers contain a boldface +page number (called a {\it folio}); these come out in roman +numerals if they are negative. (The page number is the parameter +\="\pageno"\= which you can set.) Also by default, the +"\rectoleftheader" is the "\firstmark". + +For example, if you want your pages numbered at the bottom, you +could say +\beginverb +\offheaders % turn off the header lines +\onfooters % turn on the footer lines +\endverb +because the footers contain page numbers by default. If you want +each page to have a title and a page number, you can say +\beginverb +\rectoleftheader={The Title of My Paper} +\endverb +Since this is done so often, there is a synonym +\="\runninghead"\= for "\rectoleftheader" that lets you say +\beginverb +\runninghead={The Title of My Paper} +\endverb +instead. + +The default font for runners is kept in the <toks> parameter +\="\runnerfont"\=, which starts out as "\smlsize\rm". + +\heading {Paragraphs} + +Each paragraph is an element to \ytex. Paragraphs are considered +to consist of a crown (the first line) and a vest (all the other +lines). By default, the crown is indented "\parindent" and the +vest is not. But there are a variety of paragraph delimiters +that give you paragraph elements that are formatted differently. +(Recall that paragraph delimiters start paragraphs that are +ended by "\par" or a blank line.) + +\begingab + +\*\+"\ivpar"\+\\delimits an {\it inverted} paragraph: the crown +is not indented but the vest is. + +\*\+"\ipar"\+\\delimits an {\it indented} paragraph: both crown +and vest are indented. + +\*\+"\ftpar"\+ \#{<tag text>}\\delimits a {\it flush-tagged} +paragraph: both crown and vest are indented and the first +argument (in braces) to "\ftpar" is set flush on the left margin +of the crown. For example, +\beginverb +\ftpar {1.} First line ...\linebreak second line ...\par +\endverb +produces a paragraph that looks like this: +\begintextlines +\parindent=2em% +\ftpar{1.}First line \dots\linebreak{}second line \dots +\endtextlines + +\*\+"\atpar"\+ \#{<tag text>}\\delimits an {\it adjoint-tagged} +paragraph: both crown and vest are indented and the first +argument (in braces) to "\atpar" is set so its right edge is +\="\partagsep"\= away from the left edge of the crown line. +(This is like the \plain\ \tex\ "\item" command.) For example, +\beginverb +\atpar {a)} First line ...\linebreak second line ...\par +\endverb +produces a paragraph that looks like this: +\begintextlines +\parindent=2em% +\atpar{a)}First line \dots\linebreak{}second line \dots +\endtextlines + +\*\+"\vtpar"\+ \#{<tag text>}\\delimits a {\it variably-tagged} +paragraph: the crown, vest, and tag are set just like an +adjoint-tagged paragraph but the width of the indent is not the +"\parindent" but instead is the width of the tag text. For +example, +\beginverb +\vtpar {Keywords:} This ...\linebreak and that ...\par +\endverb +produces a paragraph that looks like this: +\begintextlines +\vtpar{Keywords:}This \dots\linebreak{}and that \dots +\endtextlines + +\*\+"\bpar"\+\\delimits a {\it bullet} paragraph: a flush-tagged +paragraph whose tag is a bullet symbol. + +\endgab + +If bullet paragraphs appear next to each other, it is good +practice to put a \+"\beginbullets"\+ before the first one and an +\+"\endbullets"\+ after the last one. This will add a little +space before and after so as to visually cluster the paragraphs. + +If you interpose math or a figure or a title between paragraphs, +it is standard typesetting practice not to indent the paragraph +immediately following the interposed element. For example, +the paragraphs which immediately follow section titles +in this document are not indented, nor are those which follow +figures or textual displays. + +To follow this practice in your own documents, you could +use "\noindent" to start the paragraphs which follow interposed +elements. But \ytex\ does this for you automatically. The +command \+"\vpar"\+ effectively forces the next paragraph to +start with "\noindent", and all \ytex\ commands which interpose +material between paragraphs---such as "\section"---end with +"\vpar". Thus you will not have to use "\noindent" after +figures and so on. + +If for some reason you want a particular paragraph that follows +interposed text to be indented normally, just give the command +\+"\unvpar"\+ in front of that paragraph. "\unvpar" cancels the +effect of "\vpar" and allows the paragraph to be indented. + +\begingab + +\*\:"\vpartrue"\: and "\vparfalse"\\allow and disallow the +effects of "\vpar". If you don't want the first paragraphs of +sections and so on to be left-flush, say "\vparfalse". + +\*\+"\linebreak"\+\\ends the current line of a paragraph, filling +out to the right hand margin with blank space. + +\*\:"\onindent"\:\\turns the default indentation of crown lines +on. If you want your paragraphs to normally have no indentation, +say "\offindent". But keep in mind that this will break commands +like "\bpar" which rely on indentation. + +\*\+"\beginquote"\+\\delimits a quote. Quotes are set in the +\="\quotefont"\= (default "\smlsize\rm") with the left and right +margins narrowed by "\parindent". Inside of quotes paragraph +indentation is turned off (with "\offindent"). + +\endgab + +\heading {Fonts and Sizes} + +To change type face in a document, you use the normal \tex\ +commands "\it", "\bf", "\tt", "\sl", and "\rm". To change to +increasingly bigger sizes of type, you can use the commands +\+"\bigsize"\+, \+"\biggsize"\+, and \+"\bigggsize"\+. For +increasingly smaller sizes, you can use \+"\smlsize"\+, +\+"\smllsize"\+, and \+"\smlllsize"\+. You can switch to the +regular size with \+"\regsize"\+. The size-changing commands all +switch to the roman face. + +There are commands \+"\smlrm"\+, \+"\smllrm"\+, and \+"\smltt"\+ +which are like face-changing commands in that the baseline +spacing does not change, but the ``typeface'' they switch to are +actually smaller sizes of the indicated face. For example, to +get the effect of what printers call ``small caps'', you can use +the "\smllrm" face. To get \lisp, you would say +"L{\smllrm"~"ISP}". + +If you ever want to set material in the font selected by a font +parameter such as "\titlefont", you can select that font by +saying "\the" in front of the parameter name. For example, to +set three words in the "\captionfont", I could say +\beginverb +Here are {\the\captionfont three small words}. +\endverb +which gives me +\begintext +Here are {\the\captionfont{}three small words}. +\endtext +\vpar + +The command \+"\singlespace"\+ causes lines to be single spaced, +and the command \+"\doublespace"\+ causes lines to be double +spaced. Single spaced lines are the default. These commands +affect all text, including footnotes and captions, so that if you +use "\doublespace" you might want to add a "\singlespace" command +to the font parameters for footnotes, captions, and so on. If +you don't like the exact spacing values used by "\singlespace" or +"\doublespace", read what it says below about line spacing for +wizards and define your own versions of these commands. + +\heading {Figures} + +You can ask \yTeX\ to lay out your figures in one of four ways: +{\it stationary}, which means that figures are boxes that appear +where they are defined; {\it section}, which are like stationary +except that they are followed by "\vfil" glue which makes them +suitable for putting all in one section with no intervening text; +{\it top}, which means all figures float to the top of a page; or +{\it floating}, which means they appear where they are defined +unless they can't fit on the page there in which case they float +to the top of the next page they fit on. The current layout +discipline (default {\it floating}) can be set with +\+"\stationaryfigures"\+, \+"\sectionfigures"\+, +\+"\topfigures"\+, and \+"\floatingfigures"\+. + +\begingab + +\*\+"\figdef"\+ and \+"\figref"\+\\are no-ops which are useful +for keeping track of figure numbers. + +\*\+"\beginfigure"\+\\delimits a figure definition. You get a +figure layed out according to the current discipline. Each +figure is enclosed in a "\vbox" so you don't have to worry about +breaks. + +\begingroup \figurelinetrue +\beginfigure + +\noindent This figure was defined with +\beginverb +\beginfigure +\noindent This figure was defined with ... + ... +\begincaption +Figure~\figdef{1}. A figure which is ... +... it will float. +\endcaption +\endfigure +\endverb +and this was the result. + +\begincaption +Figure~\figdef{1}. A figure which is also an example of how to +prepare a figure. This figure will appear where it was defined +unless it can't fit on that page, in which case it will +float. +\endcaption + +\endfigure +\endgroup + +\*\+"\beginpagefigure"\+\\delimits a full-page figure definition. +These figures go on pages by themselves. + +\beginpagefigure + +\vfil + +\noindent This full-page figure was defined with +\beginverb +\beginpagefigure +\vfil +\noindent This full-page figure was defined with ... + ... +\begincaption +Figure~\figdef{2}. A figure which is ... +... it will float. +\vfil +\endcaption +\endpagefigure +\endverb +and this was the result. + +\vfil + +\begincaption +Figure~\figdef{2}. A figure which is also an example of how to +prepare a figure. This figure will appear where it was defined +unless it can't fit on that page, in which case it will float. +\endcaption + +\endpagefigure + +\*\+"\beginstationaryfigure"\+\\gives a stationary figure no +matter what the current layout discipline is. The paired +delimiter "\beginstationarypagefigure" gives a full-page +stationary figure, and there are similar explicit commands +provided for all four of the layout disciplines. + +\*\+"\begincaption"\+\\is defined only within figures and +delimits captions, which are set as unindented paragraphs in +\="\captionfont"\= with margins narrowed by \="\captionindent"\=. +Captions are preceded by \="\abovecaptionskip"\=. + +\endgab + +For examples, see figures~\figref{1} and~\figref{2}, which I +referred to here by saying +\beginverb +... see figures~\figref{1} and~\figref{2}, ... +\endverb +Note, in particular, that figure~\figref{1} is bracketed by +horizontal lines. \ytex\ will put out such lines if you say +\:"\figurelinetrue"\: at the front of your document; the default +is \:"\figurelinefalse"\: (no lines). (The lines themselves are +put \="\figurelinedrop"\= away from the body of the figure.) + +The easiest way to leave space for a paste-in figure is to define +a figure whose body consists of a vertical skip command, as in +\beginverb +\beginfigure +\vskip 2 true in +\begincaption +This will be a 2 inch high pasted in figure. +\endcaption +\endfigure +\endverb +Note that the amount to skip was given in {\tt true} inches, not +just inches. This is because typesizes larger than ten point are +implemented by magnifying the entire document: if the dimension +had been given as "2in" and the typesize were given as "11pt", +\yTeX\ would leave 2.2 inches of space instead of 2. The use of +"true" in the dimension specification prevents \yTeX\ from +magnifying the space it leaves for the paste-in +material.\footnote*{Keep in mind that specifying sizes in true +dimensions may cause the page breaks to change when the type +size changes. If you are proofing in a larger typesize and you +want page breaks to remain consistent, you should specify +paste-in sizes {\it without} the "true" specification, basing the +declared size on the magnification which will be used in {\it +final} output. Then don't worry about the fact that the spaces +in the proof version are a little large.} + +There is a <toks> parameter \="\topsep"\= whose contents are +inserted between the floating figures and text on any page where +floating figures appear. By default, "\topsep" is empty, so only +the normal below-figure space appears between floating figures +and text. If you want more space, you can say, for example, +\beginverb +\topsep={\bigskip} +\endverb + +\heading {Tables} + +Tables are delimited with \+"\begintable"\+ and "\endtable". +Right after the "\begintable" command you must have a {\it +preamble specification} enclosed in brackets ("[" and "]"), such +as in +\beginverb +\begintable [l"r|lc] +\topline +Item&& Price&& User& Use\cr +\dmidline +Widgets&& \$2.50&& D. Brotsky& \TeX\ work\cr +\midline +Grommets&&\$2500.50&& The Pentagon& none\cr +\botline +\endtable +\endverb +which produces table~\tabref{1}. + +\beginfigure + +{\catcode`\"=12\relax + \centerline {% + \begintable [l"r|lc] + \topline + Item&& Price&& User& Use\cr + \dmidline + Widgets&& \$2.50&& D. Brotsky& \TeX\ work\cr + \midline + Grommets&&\$2500.50&& The Pentagon& none\cr + \botline + \endtable}} + +\begincaption +Table~\tabdef{1}. This table is produced by the example in the +text. Well, actually, this table is {\it almost} produced by +that example; in fact, this one has also been centered on the +page by putting the entire text of that example into the argument +of "\centerline". +\endcaption + +\endfigure + +Inside of a preamble specification, each character stands for one +column in the table. The meanings of the characters are: +\begindisplaytable [cl] +"l"& left-aligned column\cr +"L"& left-aligned math column\cr +"c"& center-aligned column\cr +"C"& center-aligned math column\cr +"r"& right-aligned column\cr +"R"& right-aligned math column\cr +"|"& single-thickness vertical line\cr + \"& double-thickness vertical line\cr +"&"& repeat specification marker\cr +\enddisplaytable +Math columns are just like their non-math counterparts except +that the entries are set in math mode in \="\tablestyle"\= +(default "\displaystyle"). The "&" specification allows you to +take advantage of \tex's automatic iteration of column +specifications: if you have more entries in a line than you have +columns in the preamble, the preamble columns will repeat from +wherever the "&" was specified. + +The thickness of a "|" line is the <dimen> parameter +\="\vbarwidth"\= (default ".4pt") and the thickness of a \" line +is the <dimen> parameter \="\dvbarwidth"\= (default "1pt"). Keep +in mind that "|" and \" columns must be delimited by "&" like +other columns. It's just that normally the contents of these +columns are empty, so you end up with "&&" in the rows of your +input. + +Inside tables the command "\\" ends rows like "\cr". In +addition, you get access to a variety of useful commands: + +\begingab + +\*\+"\inline"\+\\puts a horizontal line in the table. Better to +use are \+"\topline"\+, \+"\midline"\+, and \+"\botline"\+ (which +you normally use at the top, middle, and bottom of the table) +because they put padding around the line which looks good. + +\*\+"\dinline"\+, \+"\dtopline"\+, \+"\dmidline"\+, and +\+"\dbotline"\+\\are the double-width counterparts of the +commands mentioned above. "\inline"-type lines have thickness +\="\hbarheight"\=, and "\dinline"-type lines have thickness +\="\dhbarheight"\=. + +\*\+"\padline"\+ <dimen>\\puts <dimen> extra space between lines +of the table with the nice feature that vertical bars specified +in the preamble extend right through the extra space. The +<dimen> is not an argument: don't put it in braces. + +\endgab + +In addition, you get \+"\tabdef"\+ and \+"\tabref"\+ which, like +"\figdef" and "\figref", are no-ops useful for keeping track of +table numbers. Also, there are the following table-affecting +parameters: + +\begingab + +\*\="\pretabskip"\=, \="\intabskip"\=, and +\="\posttabskip"\=\\are the glue parameters that "\tabskip" glue +is set to before the first column, between columns, and after the +last column of a table. Defaults are "\hfil" glue for +"\pretabskip" and "\posttabskip", "1em" glue for "\intabskip". + +\*\="\tablewidth"\=\\is settable like a <dimen>, and setting it +has strong side effects. If you set it positive, all lines in +tables are set to that width. If you set it to zero, tables have +their natural width. If you set it negative, tables are expanded +by the negative of what you set it to. The default is "0pt"; +that is, tables have their natural size. + +\endgab + +Finally, in addition to the "\begintable" command which puts a +box around its table, there is \+"\beginopentable"\+ which does +not put a box and there is \+"\begindisplaytable"\+ which centers +the whole table in a "$$"-style display. + +\heading {Footnotes} + +\ytex\ gives you a footnote mechanism essentially equivalent to +\plain's, but footnotes are output as adjoint-tagged paragraphs +in the \="\footnotefont"\= with an indent of +\="\footnotemarkerwidth"\=. + +\begingab + +\*\+"\footnote"\+\#{<tag>}\#{<footnote text>}\\puts <tag> where +you call "\footnote" and also gives you a footnote marked with +<tag>. You use "\footnote" inside paragraphs. + +\*\+"\nfootnote"\+\#{<tag>}\#{<footnote text>}\\is like +"\footenote" but the <tag> must be a number. The tag is set as a +superscript. + +\*\+"\vfootnote"\+\#{<tag>}\#{<footnote text>}\\is like +"\footnote" but it doesn't put the tag where you call it, only on +the footnote text itself. You use "\vfootnote" between +paragraphs. + +\*\+"\beginfootmatter"\+\\gives you a footnote with no marker and +with no left margin indentation where the marker would go. I'm +not sure why you would want this. + +\endgab + +The no-ops \+"\footdef"\+ and \+"\footref"\+ are provided to help +keep track of footnote numbering. There is a <toks> parameter +\="\botsep"\= whose contents are inserted between the text and +footnotes on any page where footnotes appear. By default, +"\botsep" puts in some space and a short line. If you just want +space, you can say, for example, +\beginverb +\botsep={\bigskip} +\endverb + +\heading {Textual Displays} + +These macros give you "$$"-like displays containing text and +other useful textual blocks. There are no standard forms for any +of the "begin" and "end" paired delimiters that produce textual +displays. + +\begingab + +\*\+"\beginnofill"\+\\delimits text that is not made into filled +lines, but output in lines as it appears in the input. +Indentation is turned off. + +\*\+"\begintext"\+\\gives you a "$$"-like display containing the +nofill material it delimits. The displayed lines have width +"\displaywidth" and are indented "\parindent" from the normal +"\displayindent" of the display. + +\*\+"\begintextlines"\+\\is like "\begintext" but the displayed +lines are the full "\hsize" wide and the normal "\displayindent" +is ignored. + +\endgab + +\hangindent 2\parindent \hangafter0 +\noindent For example, this is a paragraph which has both its +crown and vest indented twice the normal paragraph indentation. +If, inside this paragraph, we produce a display with +\beginverb +\begintext +Here is the first line of the display +Here is the second. +\endtext +\endverb +then the result appears to have a left margin even with the +indentation of the paragraph, as in: +\begintext +Here is the first line of the display +Here is the second. +\endtext +(Each line of the display is indented "\parindent" from the +margin because each line starts a paragraph.) But if we specify +the text of the display using the following commands: +\beginverb +\begintextlines +Here is the first line of the display +Here is the second. +\endtextlines +\endverb +then the display ignores the indentation of the paragraph, +producing the following: +\begintextlines +Here is the first line of the display +Here is the second. +\endtextlines + +\begingab + +\*\+"\begincode"\+ and \+"\begincodelines"\+\\are like +"\begintext" and "\begintextlines" but the material is set in the +typewriter font. + +\*\+"\verb"\+\\is used as +\begintext +\noindent"\verb"<char><text><char> +\endtext +and gives you <text> verbatim in the typewriter font. All \tex\ +special characters (such as "\" and "&") are treated as normal +characters. + +\*\+"\beginverb"\+ and \+"\beginverblines"\+\\are like +"\begincode" and "\begincodelines" except the intervening text is +taken verbatim. + +\endgab + +\begingroup + +\newverbatim\myverb + \begincs \beginmyverb + \readcs \readmyv@rb + \endcsname endmyverb% + \display + \setup \hsize=\displaywidth \advance\leftskip\displayindent \tt + \begin + \end + \endnew + +For example +\beginmyverb +\beginverb +\noindent This is some \verbatim \text. +\centerline {Note that commands are ignored.} +\endverb +\endmyverb +produces +\beginverb +\noindent This is some \verbatim \text. +\centerline {Note that commands are ignored.} +\endverb + +\endgroup + +\begingab + +\*\+"\beginlisp"\+ and \+"\beginlisplines"\+\\delimit \lisp\ +programs. Programs are printed in the \="\lispfont"\= (default +"\regsize\tt") in nofill mode; the \tex\ control characters (such +as "#") often found in \lisp\ code are turned off; and comments +are printed in roman. Programs are boxed to prevent breaks; the +sequence ";\pbrk"\+ at the start of a line makes that line an +escape into surrounding vertical mode: you can put in breaks and +glue. If you just specify \+"\pbrk"\+ after the semicolon, with +nothing else on the line, you get a space suitable for insertion +between function definitions. + +\endgab + +For example, this input +\beginverb +\beginlisp +;;Good Old Factorial +(defun fact (n) + (cond ((zerop n) 1) ;base case + (t (* n (fact (1- n)))))) ;recursive case +;\pbrk +(defun myfact (n) + (cond ((> n 0) (fact n)) ;OK if pos + (t (- (fact (- n)))))) ;invert if neg +;\pbrk \medskip +(fact -5) ;sample usage + -125 +\endlisp +\endverb +produces this output +\beginlisp +;;Good Old Factorial +(defun fact (n) + (cond ((zerop n) 1) ;base case + (t (* n (fact (1- n)))))) ;recursive case +;\pbrk +(defun myfact (n) + (cond ((> n 0) (fact n)) ;OK if pos + (t (- (fact (- n)))))) ;invert if neg +;\pbrk \medskip +(fact -5) ;sample usage + -125 +\endlisp + +\heading {Two-Column Text} + +The paired delimiter \+"\begintwocolumntext"\+ sets its argument +material in two columns, with the columns separated by +\="\columnskip"\=. Top figures and footnotes in this material +are still set in a single column extending the full width of the +page. Note that you can not use the floating figure style in +two-column text because there is no way of knowing in advance +whether figure material set in this style should be one- or +two-columns wide. Also, full-page stationary or section figures +are liable not to work. + +The paired delimiter \+"\begindoublecolumn"\+ sets its argument +material two columns per page, just as if the "\hsize" had been +narrowed and the results pasted up. Thus, every page becomes a +single column, and commands like "\eject" refer to columns, not +pages. The command \+"\pageeject"\+ will force a true page +break. {\it Warning}: The "\begindoublecolumn" command will +throw away everything on the current page, so it is only safe to +use at the start of a fresh page. + +\heading {Formatting Small Pieces of Text} + +These commands produce little chunks of text in useful shapes, or +combine small blocks of text in handy ways. + +\begingab + +\*\+"\spread"\+\\takes two or more arguments and spreads them out +evenly spaced on a line. For example, the input +\beginverb +\spread{Piece1}{Piece2}{}{Piece4 (3 was empty)} +\endverb +produces +\begintextlines +\spread{Piece1}{Piece2}{}{Piece4 (3 was empty)} +\endtextlines +Each piece of text except the leftmost and rightmost are centered +on their appropriate position. Notice that the empty argument +took up a position even though it didn't put anything in that +place. + +\*\+"\begintleft"\+, \+"\begintcenter"\+, and +\+"\begintright"\+\\set their arguments as left-flush, centered, +and right-flush titles in the current font. Titles are allowed +to contain more than one paragraph. Inside of titles, the +commands \+"\\"\+, \+"\cr"\+, and \+"\crcr"\+ force line breaks. + +\*\+"\sy"\+ and \+"\sybox"\+\\set their arguments in a slightly +smaller typewriter font. They differ only in that "\sybox" also +puts the argument in an hbox so it can't be broken across lines. + +\*\+"\ucsy"\+ and \+"\ucsybox"\+\\are relatives of "\sy" and +"\sybox" that put their arguments in upper case. + +\*\+"\ignore"\+\\does just that to its single argument. + +\*\+"\filpage"\+\\fills up the rest of the page with white space +and does a page break. + +\endgab + +\heading {The Date} + +\begingab + +\*\="\hour"\= and \="\minute"\=\\are <number> parameters that +hold the time \ytex\ started in 24-hour format. \+"\daytime"\+ +outputs this in the form \sybox{15:35}. + +\*\+"\monthname"\+ and \+"\monthshortname"\+\\output the name of +the current month; "\monthshortname" is three letters long. + +\*\+"\shortyear"\+\\names the current year without the first two +digits, as in 86. + +\*\+"\date"\+, \+"\shortdate"\+, and \+"\slashdate"\+\\output the +current date as in June~9,~1986; 9~Jun~86; and 6/9/86. + +\endgab + +For example, you can get output like +\begintext +Today is day 14 of Aug ({\it{}i.e.} August), % +and the time is 14:34. +\endtext +by saying +\beginverb +Today is day \number\day\ of \monthshortname +({\it i.e.} \monthname), and the time is \daytime. +\endverb + +\heading {Miscellany} + +\begingab + +\*\+"\ytex"\+, "\yTeX", "\YTEX", "\YTeX", and \+"\oopstex"\+\\all +give the \ytex\ symbol. + +\*\+"\draft"\+\\adds a line to the bottom of each page that looks +like this: +\begintextlines +\let\message=\ignore% +\draft\line{\the\bottomgloss}% +\endtextlines +This command also sets the "\overfullrule" to "5pt" instead of +the default "0pt" and prints the message "{Draft}" on your +terminal screen. + +\endgab + +Here are the default values of a few parameters not yet +mentioned: +\beginverb +\hsize=28pc \vsize=44pc +\abovedisplayskip=3pt plus1pt minus2pt +\belowdisplayskip=3pt plus1pt minus2pt +\abovedisplayshortskip=0pt plus1pt +\belowdisplayshortskip=2pt plus1pt minus1pt +\parindent=2em +\parskip=0pt plus1pt +\normallineskip=2pt +\normallineskiplimit=0pt +\clubpenalty=900 +\widowpenalty=900 +\endverb +The default "\typesize" is ten point. Keep in mind that, if you +make the "\typesize" "11pt" or "12pt", the "\hsize" and "\vsize" +will be magnified by $1.1$ or $1.2$, so you probably won't need +to change them. If you have a definite measurement you want used +for the margins independent of what magnification gets used, +specify it in ``true'' units (as in "\hsize=6 true in"). The +output routine will always try to center your output on the +output page; you can use "\hoffset" and "\voffset" to shift it +off center any desired amount. + +\section {For Wizards Only} + +Here are some features that inexperienced \tex nicians should +probably avoid. Once again they are grouped by topic: some of +the topics also appeared above. + +\heading {Page Glosses} + +Pages can have {\it glosses} which are special lines that appear +above the header and below the footer. The <toks> parameters +\="\topgloss"\= and \="\bottomgloss"\= contain the contents of +the glosses. You turn glosses off and on just like runners, but +both glosses default off. The top gloss defaultly contains a +copyright message like the following: +\begintextlines +\copyrightholder={by the author}% +\line{\the\topgloss}% +\endtextlines +while the bottom gloss is defaultly empty. The words ``by the +author'' are the value of the <toks> parameter +\="\copyrightholder"\=. + +\begingab + +\*\:"\showcopyrighttrue"\: and "\showcopyrightfalse"\\allow and +disallow the showing of the top gloss. To actually get the top +gloss to show on a particular page, you also have to say +\+"\copyrightpage"\+ somewhere on that page. + +\endgab + +The "\draft" macro described above uses the bottom gloss. + +\heading {Size Changing} + +There are also explicit size-selection commands such as +"\twelevepoint", but these pay no attention to the "\typesize", +so their use is not advised. + +The baseline spacing is set whenever a size change command is +given by saying +\beginverb +\normalbaselineskip=\the\baselinefactor em% +\baselineskip\normalbaselineskip +\endverb +Thus, the value of the <toks> parameter \="\baselinefactor"\= +(default "{1.3}") can be used to vary the baseline spacing. Note +that changes in "\baselinefactor" will not take effect until you +give a size-changing command or say \+"\setnormalbaselines"\+. +For example, these are the default definitions for "\singlespace" +and "\doublespace": +\beginverb +\def\singlespace{\baselinefactor={1.3}\setnormalbaselines} +\def\doublespace{\baselinefactor={2.6}\setnormalbaselines} +\endverb + +\heading {Setup Hooks} + +A variety of the default user-level macros---such as figures, +captions, footnotes, etc.---provide for user-defined set-up +hooks. For example, every figure macro calls the macro +"\setupfigure", which in turn calls a macro "\setupfigurehook" +which the user is free to define. Check the source code for +details as to which of these hooks exist. + +\heading {More About Tables} + +There is an escape mechanism whereby arbitrary alignment +specifications can be put into the preamble of a table. A column +is normally specified by a letter, but arbitrary material +enclosed within balanced braces may be used to specify a column +instead. For example, the preamble specification +\beginverb +[l{\hfil $\displaystyle #$}c] +\endverb +produces the following preamble +\beginverb +\tabskip\intabskip +#\hfil & \hfil $\displaystyle #$& \hfil #\hfil +\tabskip\posttabskip\cr +\endverb + +The material within matching braces can only specify one column +in the preamble: you must use more than one set of braces to +specify more than one column. There is no limit on the number of +columns that can be specified in this way. When a column is +specified in this way, the entry produced for that column by +"\padline" will contain an "\omit" so as to produce white space. +Thus, if the specified material contains a "\vrule" +specification, that rule will not extend through padding. + +If the material in braces starts with a "\tabskip" specification, +\ytex\ assumes that it contains only that specification, and it +merely embeds the specification in the preamble instead of making +it a column specification. For example, the specification +\beginverb +[l{\tabskip=2em }lr] +\endverb +produces the preamble +\beginverb +\tabskip\intabskip +#\hfil & \tabskip=2em #\hfil& \hfil #% +\tabskip\posttabskip\cr +\endverb +This mechanism can be used to vary the between-column skip within +a line. Keep in mind, however, that the "\posttabskip" will +override such specifications after the last column. + +The interline glue is normally turned off in tables, and struts +are used to keep the line spacing correct. If all of the +preamble specifications in a table are given with the "{}" escape +mechanism instead of \ytex's abbreviations, you should put struts +in at least one of the columns to force correct line spacing. + +If you specify \hbox{"height" <dimen>} as the contents of a "|" +or \" column, that will override the natural height of the +"\vrule". This is the mechanism used by "\padline". + +\section {A List of Many \ytex\ Commands} + +Here is a list of all the commands, parameters, and switches +described hereto. It is not a complete list of all the \ytex\ +commands, but it gets most of the useful ones. + +\heading {The Commands} + +The {\bf type} given in this table is one of {\bf SD} for +standard delimiter, {\bf PD} for paired delimiter, {\bf Par} for +paragraph delimiter, and {\bf A} for abbreviation. If a paired +delimiter has a standard form, it appears in this table in that +form. Paired delimiters which do not have standard forms ({\it +i.e.}, those which delimit nofill text) appear in their "begin" +form alphabetized under "begin". + +\medskip + +\begingroup + \def\crs{\cr\noalign{\vskip 0pt plus.2pt}} + \intabskip=.5em + \beginopentable [lcl]% + \bf Command& \bf Type& \bf Summary\cr + \midline + "\\"& A& breaks lines in titles, ends rows in tables\crs + "\abstract"& PD& abstract text\crs + "\atpar"& Par& adjoint-tagged paragraph\crs + "\author"& PD& author's name(s)\crs + "\begincode"& PD& typewriter font textual display\crs + "\begincodelines"& PD& unindented typewriter font textual display\crs + "\beginlisp"& PD& \lisp\ program display\crs + "\beginlisplines"& PD& unindented \lisp\ program display\crs + "\beginnofill"& PD& unboxed unfilled text\crs + "\begintext"& PD& unfilled textual display\crs + "\begintextlines"& PD& unindented unfilled textual display\crs + "\beginverb"& PD& typewriter font verbatim display\crs + "\beginverblines"& PD& unindented typewriter font verbatim display\crs + "\bigsize"& A& switch to a larger size of type\crs + "\biggsize"& A& switch to an even larger size\crs + "\bigggsize"& A& switch to an even larger size still\crs + "\botline"& A& horizontal line for bottom of tables\crs + "\bottomtext"& PD& text for bottom of title page\crs + "\bpar"& Par& bullet paragraph\crs + "\bullets"& PD& group of bullet paragraphs\crs + "\caption"& PD& caption (figures only)\crs + "\cauthor"& PD& centered author's name\crs + "\chapter"& PD& chapter title\crs + "\copyrightpage"& A& allow copyright message\crs + "\cr"& A& breaks lines in titles, ends rows in tables\crs + "\crcr"& A& breaks lines in titles, ends rows in tables\crs + "\ctitle"& PD& centered title\crs + "\date"& A& date as June 9, 1986\crs + "\daytime"& A& time of day in 24 hour format\crs + "\dbotline"& A& double width line for bottom of table\crs + "\dinline"& A& double width unpadded table line\crs + "\displaytable"& PD& table display\crs + "\dmidline"& A& double width line for middle of table\crs + "\doublecolumn"& PD& double-column mode\crs + "\doublespace"& A& double space text\crs + "\draft"& A& put draft mark on all pages\crs + "\dtopline"& A& double width line for top of table\crs + "\figdef"& A& no-op for managing figure numbers\crs + "\figref"& A& no-op for managing figure numbers\crs + "\figure"& PD& figure in current style\crs + "\figurebox"& PD& stationary boxed figure\crs + "\filpage"& A& end current page with white space\crs + "\floatingfigures"& A& figure style is {\it floating}\crs + "\floatingfigure"& PD& define floating figure\crs + "\floatingpagefigure"&PD& define floating full-page figure\crs + "\footdef"& A& no-op for managing footnote numbers\crs + "\footref"& A& no-op for managing footnote numbers\crs + "\footnote"& SD& specify footnote while in paragraph\crs + "\footmatter"& PD& specify footnote text with no marker\crs + "\ftpar"& Par& flush-tagged paragraph\crs + "\heading"& PD& left-flush heading\crs + "\ignore"& A& ignore argument\crs + "\inline"& A& unpadded horizontal line in table\crs + "\ipar"& Par& indented paragraph\crs + "\ivpar"& Par& inverted paragraph\crs + "\linebreak"& A& force line break in paragraph\crs + "\midline"& A& horizontal line for middle of table\crs + "\monthname"& A& full name of current month\crs + "\monthshortname"& A& first three letters of current month\crs + "\nfootnote"& SD& specify numbered footnote in paragraph\crs + "\oopstex"& A& the \ytex\ symbol\crs + "\opentable"& PD& unboxed table\crs + "\padline"& A& put padding in table\crs + "\pageeject"& A& force a page break in double-column mode\crs + "\pagefigure"& PD& full page figure in desired style\crs + "\partpage"& PD& titling page with usual page number\crs + "\pbrk"& A& escape to vertical mode in \lisp\ programs\crs + "\pchapter"& PD& chapter title on new page\crs + "\quote"& PD& quotation text\crs + "\regsize"& A& switch to the regular size of type\crs + "\secdef"& A& no-op for managing section numbers\crs + "\secref"& A& no-op for managing section numbers\crs + "\section"& PD& section title\crs + "\sectionfigures"& A& figure style is {\it section}\crs + "\sectionfigure"& PD& define section figure\crs + "\sectionpagefigure"&PD& define section full-page figure\crs + "\setnormalbaselines"&A& use "\baselinefactor" to set baselines\crs + "\shortdate"& A& date as in 9 Jun 86\crs + "\shortyear"& A& last two digits of current year\crs + "\singlespace"& A& single space text\crs + "\slashdate"& A& date as in 6/9/86\crs + "\smlsize"& A& switch to a smaller size of type\crs + "\smllsize"& A& switch to an even smaller size\crs + "\smlllsize"& A& switch to an even smaller size still\crs + "\spread"& SD& spread args evenly on line\crs + "\stationaryfigures"& A& figure style is {\it stationary}\crs + "\stationaryfigure"& PD& define stationary figure\crs + "\stationarypagefigure"&PD& define stationary full-page figure\crs + "\subsection"& PD& synonym for "\section"\crs + "\subsubsection"& PD& synonym for "\section"\crs + "\sy"& SD& set arg in smaller typewriter font\crs + "\sybox"& SD& hboxed "\sy"\crs + "\tabdef"& A& no-op for managing table numbers\crs + "\table"& PD& vboxed table\crs + "\tabref"& A& no-op for managing table numbers\crs + "\tcenter"& PD& centered title\crs + "\title"& PD& title\crs + "\titlepage"& PD& titling page with page number 0\crs + "\tleft"& PD& left-flush title\crs + "\topfigures"& A& figure style is {\it top}\crs + "\topfigure"& PD& define top figure\crs + "\toppagefigure"& PD& define top full-page figure\crs + "\topline"& A& horizontal line for top of table\crs + "\tright"& PD& right-flush title\crs + "\twocolumntext"& PD& two-column text\crs + "\ucsy"& SD& uppercase "\sy"\crs + "\ucsybox"& SD& uppercase "\sybox"\crs + "\unvpar"& A& allow indentation on next paragraph\crs + "\verb"& A& verbatim text\crs + "\vfootnote"& PD& specify footnote text in vertical mode\crs + "\vpar"& A& disallow indentation on next paragraph\crs + "\vtpar"& Par& variably-tagged paragraph\crs + "\ytex"& A& the \ytex\ symbol\cr + \endopentable +\endgroup + +\heading {Parameters} + +The {\bf type} given in this table is one of {\bf I} for +<integer>, {\bf D} for <dimen>, {\bf G} for <glue>, and {\bf +T} for <toks>. + +\medskip + +\begingroup + \def\crs{\cr\noalign{\vskip 0pt plus.2pt}} + \intabskip=.5em + \beginopentable [lcl]% + \bf Parameter& \bf Type& \bf Default\cr + \midline + "\abovecaptionskip"& G& "\medskipamount"\crs + "\abovechapterskip"& G& "18pt", stretch is 3 times the "\parskip"'s\crs + "\abstractfont"& T& "{\smlsize\rm}"\crs + "\abstractindent"& D& "0pt"\crs + "\authorfont"& T& "{\regsize\rm}"\crs + "\baselinefactor"& T& "{1.3}"\crs + "\belowchapterskip"& G& "9pt", stretch is 3 times the "\parskip"'s\crs + "\bottomgloss"& T& <empty>\crs + "\bottomtextfont"& T& "{\smllsize\rm}"\crs + "\botsep"& T& "{\vskip\bigskipamount \footnoterule}"\crs + "\captionindent"& D& "\parindent"\crs + "\captionfont"& T& "{\smlsize\rm}"\crs + "\chapterfont"& T& "{\bigsize\bf}"\crs + "\columnskip"& D& "2pc"\crs + "\copyrightholder"& T& "{by the author}"\crs + "\dhbarheight"& D& "1pt"\crs + "\dvbarwidth"& D& "1pt"\crs + "\figurelinedrop"& D& "4pt"\crs + "\footerdrop"& D& "1.25pc"\crs + "\footnotefont"& T& "{\smlsize\rm}"\crs + "\footnotemarkerwidth"&D& "10pt"\crs + "\hbarheight"& D& "0.4pt"\crs + "\headerdrop"& D& "1.25pc"\crs + "\hour"& I& starting hour of job\crs + "\intabskip"& G& "1em"\crs + "\lispfont"& T& "{\smlsize\tt}"\crs + "\minute"& I& starting minute of job\crs + "\pageno"& I& current page number\crs + "\partagsep"& D& separation between tag and crown line\crs + "\postchapterpenalty"& I& "10000"\crs + "\posttabskip"& G& "0pt plus 1fil"\crs + "\prechapterpenalty"& I& "-500"\crs + "\pretabskip"& G& "0pt plus 1fil"\crs + "\quotefont"& T& "{\smlsize\rm}"\crs + "\rectoleftheader"& T& "{\firstmark}"\crs + "\rectocenterheader"& T& <empty>\crs + "\rectorightheader"& T& "{\bf folio}"\crs + "\rectoleftfooter"& T& <empty>\crs + "\rectocenterfooter"& T& "{\bf folio}"\crs + "\rectorightfooter"& T& <empty>\crs + "\runnerfont"& T& "{\smlsize\rm}"\crs + "\runninghead"& T& <synonym for "\rectoleftheader">\crs + "\tablewidth"& D& "0pt" (settable only)\crs + "\tablestyle"& T& {"\displaystyle"}\crs + "\titlefont"& T& "{\bigsize\bf}"\crs + "\topgloss"& T& <empty>\crs + "\topsep"& T& <empty>\crs + "\typesize"& D& 10pt (settable only)\crs + "\vbarwidth"& D& "0.4pt"\crs + "\versoleftheader"& T& "{\bf folio}"\crs + "\versocenterheader"& T& <empty>\crs + "\versorightheader"& T& <empty>\crs + "\versoleftfooter"& T& <empty>\crs + "\versocenterfooter"& T& "{\bf folio}"\crs + "\versorightfooter"& T& <empty>\cr + \endopentable +\endgroup + +\heading {Switches} + +The {\bf type} given in this table is one of {\bf O} for on/off +and {\bf T} for true/false. + +\medskip + +\begingroup + \def\crs{\cr\noalign{\vskip 0pt plus.2pt}} + \intabskip=.5em + \beginopentable [lcl]% + \bf Switch& \bf Type& \bf Default\cr + \midline + "\centerheadings"& T& false\crs + "\figureline"& T& false\crs + "\footers"& O& off\crs + "\headers"& O& on\crs + "\indent"& O& on\crs + "\runners"& O& on\crs + "\showcopyright"& T& false\crs + "\twosided"& T& false\crs + "\vpar"& T& true\cr + \endopentable +\endgroup + +\bye diff --git a/Master/texmf-dist/tex/ytex/base/yuser.mac b/Master/texmf-dist/tex/ytex/base/yuser.mac new file mode 100644 index 00000000000..960b8aee074 --- /dev/null +++ b/Master/texmf-dist/tex/ytex/base/yuser.mac @@ -0,0 +1,1351 @@ +% Copyright (c) 1985, 1986 Daniel C. Brotsky. All rights reserved. +% User interface for yTeX. See the file YTEX.MAC for details. + +% CONTENTS + +% ^L-page contents +% ---------------------------------------------------------------------- +% 1 %% User interface to YTEX macros +% 2 %% combinators +% 3 %% runners +% 4 %% glosses +% 5 %% paragraphs +% 6 %% textual displays +% 7 %% lisp programs +% 8 %% footnotes +% 9 %% figures +% 10 %% tables +% 11 %% equations +% 12 %% chapters and sections +% 13 %% special pages +% 14 %% 2 columns +% 15 %% indexes +% 16 %% citations +% 17 %% labels +% 18 %% initialization + +\message{combinators,} + +% verbatim word +\def\verb {% <token>#1<token> + \begingroup\tt\specials@ther\activespaces\ \v@rb} +\def\v@rb #1{% + \def\next##1#1{##1\endgroup}\next} + +% spread to the current hsize +\newspread\spread + \setup + \endnew +\let\@@spreadwidth=\spreadwidth \let\spreadwidth=\hsize + +% left-adjusted, center-adjusted, and right-adjusted titles +\newtitle\tleft + \box \vopen + \shape \titleleft{\z@}{\z@}% + \font + \setup + \begin + \end + \endnew +\newtitle\tcenter + \box \vopen + \shape \titlecenter{\z@}{\z@}% + \font + \setup + \begin + \end + \endnew +\newtitle\tright + \box \vopen + \shape \titleright{\z@}{\z@}% + \font + \setup + \begin + \end + \endnew + +% symbols +\newtextwrap\sy + \box \hopen + \setup \smltt + \before + \after + \begin + \end + \endnew +\newtextwrap\sybox + \box \hbox + \setup \smltt + \before + \after + \begin + \end + \endnew +\newtextwrap\ucsy + \box \hopen + \setup \smltt + \before + \after + \begin \uppercase\bgroup + \end \egroup + \endnew +\newtextwrap\ucsybox + \box \hbox + \setup \smltt + \before + \after + \begin \uppercase\bgroup + \end \egroup + \endnew + +\def\ignore #{% + \begingroup + \def\do ##1{\catcode`##1=12\relax}% + \dospecials % turn off all special chars + \catcode`\\=0\relax % need to see commands as single tokens + \catcode`\{=1\catcode`\}=2\relax % need to recognize balanced braces + \catcode`\%=14\relax % need to ignore comments + \let\par=\relax + \ignorereader} +\long +\def\ignorereader #1{% + \endgroup} + +\message{runners,} + +% contents of headers and footers +\newtoks\versoleftheader +\newtoks\versocenterheader +\newtoks\versorightheader +\newtoks\rectoleftheader +\newtoks\rectocenterheader +\newtoks\rectorightheader + +\newtoks\versoleftfooter +\newtoks\versocenterfooter +\newtoks\versorightfooter +\newtoks\rectoleftfooter +\newtoks\rectocenterfooter +\newtoks\rectorightfooter + +\newtoks\runnerfont + +\rectoheader={\the\runnerfont + \line{\hbox to\z@{\the\rectoleftheader\hss}\hfil + \hbox to\z@{\hss\the\rectocenterheader\hss}\hfil + \hbox to\z@{\hss\the\rectorightheader}}} +\versoheader={\the\runnerfont + \line{\hbox to\z@{\the\versoleftheader\hss}\hfil + \hbox to\z@{\hss\the\versocenterheader\hss}\hfil + \hbox to\z@{\hss\the\versorightheader}}} +\rectofooter={\the\runnerfont + \line{\hbox to\z@{\the\rectoleftfooter\hss}\hfil + \hbox to\z@{\hss\the\rectocenterfooter\hss}\hfil + \hbox to\z@{\hss\the\rectorightfooter}}} +\versofooter={\the\runnerfont + \line{\hbox to\z@{\the\versoleftfooter\hss}\hfil + \hbox to\z@{\hss\the\versocenterfooter\hss}\hfil + \hbox to\z@{\hss\the\versorightfooter}}} + +\versoleftheader={\bf\folio} +\rectoleftheader={\firstm@rk} +\rectorightheader={\bf\folio} + +\versocenterfooter={\bf\folio} +\rectocenterfooter={\bf\folio} + +% convenient runner settings: args are toklists +\let\fixedhead=\versorightheader +\let\runninghead=\rectoleftheader + +\message{glosses,} + +% top gloss: copyright +\newif\ifshowcopyright +\newtoks\copyrightholder +\def\copyrightpage {\ifshowcopyright\yestopgloss\fi} +\copyrightholder={by the author} +\topgloss={\regsize\bf + Copyright $\m@th\copyright$ \number\year~\the\copyrightholder\hfil + \shortdate \enspace[\daytime]} + +% drafts +\def\draft {% + \ymessage{{Draft}} + \overfullrule=5\p@ + \bottomgloss={\regsize\bf + DRAFT $\bullet$ DRAFT $\bullet$ DRAFT\hfil + \date \enspace [\daytime]} + \bottomglosstrue} + +\message{paragraphs,} + +% disciplined \rem@veindent +\newif\ifvpar +\def\vpar {% + \ifvpar \edef\next{\the\everypar}\ifx\next\empty \rem@veindent \fi\fi} +\def\unvpar {\everypar={}} + +% various paragraph shapes +\newpar\ivpar + \argtext + \setup + \vestindent \parindent + \starter \noindent + \endnew +\newpar\ipar + \argtext + \setup + \vestindent \parindent + \starter \indent + \endnew +\newdimen\partagsep +\newbox\partagbox +\newpar\ftpar + \argtext #1% + \setup \setbox\partagbox=\hbox{#1}% + \ifdim \wd\partagbox<\parindent + \setbox\partagbox=\hbox to\parindent{\unhbox\partagbox \hfil}% + \else + \setbox\partagbox=\hbox{\unhbox\partagbox \hskip\partagsep}\fi + \vestindent \parindent + \starter \noindent \box\partagbox \ignorespaces + \endnew +\newpar\atpar + \argtext #1% + \setup + \vestindent \parindent + \starter \noindent \hbox to\parindent {\hss #1\hskip\partagsep}\ignorespaces + \endnew +\newpar\vtpar + \argtext #1% + \setup \setbox\partagbox=\hbox{#1\hskip\partagsep}% + \vestindent 1\wd\partagbox + \starter \noindent \box\partagbox \ignorespaces + \endnew + +% bullet paragraphs and lists thereof +\newpar\bpar + \argtext + \setup + \vestindent \parindent + \starter \noindent \hbox to\parindent {$\m@th\bullet$\hfil}\ignorespaces + \endnew + +\newelement\bullets + \setup \unvpar + \above \minbreak \prebulletspenalty \abovebulletsskip + \below \dobreak \postbulletspenalty \belowbulletsskip \vpar + \begin + \end \endgraf + \endnew +\setskip\abovebulletsskip \dimen 2pt \glue \parskip \factor 500 +\setskip\belowbulletsskip \dimen 2pt \glue \parskip \factor 500 +\prebulletspenalty=-200 +\postbulletspenalty=-200 + +% quotes +\newtoks\quotefont +\newelement\quote + \setup \advance\leftskip\parindent \advance\rightskip\parindent + \unvpar \the\quotefont \offindent + \above \vskip\baselineskip \nobreak % compensate for smaller baseline + \begingroup \the\quotefont \vskip-\baselineskip \endgroup + \below \vpar + \begin + \end \endgraf + \endnew + +% ragged center (mostly from the TeXbook) +\def\raggedcenter {% + \leftskip=\z@ plus2em \rightskip=\leftskip + \spaceskip=.3333em \xspaceskip=.5em \parfillskip=\z@ + \pretolerance=9999 \tolerance=9999 \hbadness=9999 + \hyphenpenalty=9999 \exhyphenpenalty=9999 + \offindent} + +% ragged left +\def\raggedleft {% + \leftskip=\z@ plus2em \rightskip=\z@skip + \spaceskip=.3333em \xspaceskip=.5em \parfillskip=\z@ + \pretolerance=9999 \tolerance=9999 \hbadness=9999 + \hyphenpenalty=9999 \exhyphenpenalty=9999 + \offindent} + +\message{textual displays,} + +% nofill +\newelement\nofill + \setup \offindent \setupnofill + \above \vskip\parskip % compensate for loss of \parskip + \below \vpar + \begin + \end \endgraf + \endnew + +\newtext\text + \display + \setup \hsize=\displaywidth \advance\leftskip\displayindent \setupnofill + \begin + \end + \endnew +\newtext\textlines + \display \displaywidth=\hsize \displayindent=\z@ + \setup \setupnofill + \begin + \end + \endnew +\newtext\code + \display + \setup \hsize=\displaywidth \advance\leftskip\displayindent \tt \setupnofill + \begin + \end + \endnew +\newtext\codelines + \display \displaywidth=\hsize \displayindent=\z@ + \setup \tt \setupnofill + \begin + \end + \endnew + +% verbatim material +\def\beginverbatim {% + \par + \beginpgroup + \vskip\parskip + \setupverbatim + \re@dverbatim} +{\obeylines \catcode`\|=\@scape \catcode`\\=\@ther % + |gdef|re@dverbatim#1^^M#2\endverbatim{#1#2|endgroup}} + +\newverbatim\verb + \begincs \beginverb + \readcs \readv@rb + \endcsname endverb% + \display + \setup \hsize=\displaywidth \advance\leftskip\displayindent \tt + \begin + \end + \endnew +\newverbatim\verblines + \begincs \beginverblines + \readcs \readv@rblines + \endcsname endverblines% + \display \displaywidth=\hsize \displayindent=\z@ + \setup \tt + \begin + \end + \endnew + +\message{lisp programs,} + +% make semis active a la \obeylines +{\catcode`\;=\@ctive + \gdef\obeysemis {\catcode`\;=\@ctive\relax \let;=\lispsemi}} + +% \beginl@sp <body> \endl@sp +\def\beginl@sp {% + \beginpgroup + % semis start comments unless immediately followed by \pbrk + \def\lispsemi{\futurelet\next\l@spsemi}% + \def\l@spsemi{\ifx\next\pbrk \let\next=\relax + \else \let\next=\l@spcomment\fi + \next}% + \obeysemis + % spaces made active so they start paragraphs + % and so multiple spaces aren't collapsed to one. + \activespaces\ % + % nofill via every line a par, if spaces start next line + % we do a \noindent to make sure a par gets started. + % in addition, turn off interline skip and use struts + % to insure baseline spacing + \offinterlineskip + \parskip=\z@skip + \def\par{\ifhmode \nobreak\strut \fi \endgraf} + \obeylines + % compensate for loss of baseline spacing + \skip@=\dp\strutbox \advance\skip@ -\prevdepth + \ifdim \skip@>\z@ \vskip\skip@ \nobreak \fi + % make ',` do the right thing; make &, #, <> harmless + \makebqspecial + \makeandother + \makesharpother + \makelgtother + \vbox\bgroup} + +\def\endl@sp {% + \egroup + \endpgroup} + +{\obeylines % for defs that happen where ^^M is active +% each program is a box, preventing page splits, but we +% make the \pbrk macro work a la \noalign whose arg is +% the entire rest of the line. +\gdef\pbrk #1^^M{% + \egroup% + \def\next{#1}% + \ifx\empty\next% + \smallskip + \else \begingroup \activespaces\space \next\endgroup\fi% + \vbox\bgroup% + ^^M} % end with a CR since arg did +% semicolons start program comments which end with the end +% of the line. These comments are in roman, in an \hbox to +% avoid line breaking, <> become angle brackets, +% and ; becomes harmless +\gdef\l@spcomment {% + \begingroup% + \def\lispsemi{;\kern\p@}\obeysemis % this works even if ; already read + \def^^M{\egroup\endgroup^^M}% end with ^^M since line does + \leavevmode\hbox\bgroup \rm \strut;\kern\p@}% +} % end of def group + +\newtoks\lispfont +\newtext\lisp + \display + \setup \hsize=\displaywidth \advance\leftskip\displayindent + \the\lispfont + \begin \beginl@sp + \end \endl@sp + \endnew +\newtext\lisplines + \display \displaywidth=\hsize \displayindent=\z@ + \setup \the\lispfont + \begin \beginl@sp + \end \endl@sp + \endnew + +\message{footnotes,} + +\let\footdef=\relax +\let\footref=\relax + +\newfloat\footn@te + \type \botfloat + \floatsetup \setupfootnotefloat + \setup \setupfootnote + \floatabove + \floatbelow + \begin \startfootnote + \end \strut\endgraf + \endnew + +\def\setupfootnotefloat {% + \splittopskip=\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth=\dp\strutbox + \floatingpenalty=\@M + \setupfootnotefloathook} +\def\setupfootnotefloathook {} + +\newtoks\footnotefont +\def\setupfootnote {% + \interlinepenalty=\interfootnotelinepenalty + \leftskip=\footnotemarkerwidth + \parfillskip=\filskip + \rightskip=\z@skip + \spaceskip=\z@skip + \xspaceskip=\z@skip + \the\footnotefont + \setupfootnotehook} +\def\setupfootnotehook {} + +% footnote markers +\newdimen\footnotemarkerwidth +\def\footstrut {\vbox to\splittopskip{}} +\def\startfootnote #1{% + \noindent \llap{#1}\footstrut} + +% hmode footnote invocation +\def\footnote #1{\let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi + #1\@sf\beginfootn@te{#1}\futurelet\next\fo@t} +\def\@foot {\endfootn@te} + +% numbered hmode footnote +\def\nfootnote #1{\footnote{$\m@th^{#1}$}} + +% vmode footnote invocation +\def\vfootnote #1{\beginfootn@te{#1}\futurelet\next\fo@t} + +% general footnote invocation +\newfloat\footmatter + \type \botfloat + \floatsetup \setupfootnotefloat \leftskip=\z@skip + \setup \setupfootnote + \floatabove + \floatbelow + \begin \noindent \footstrut + \end \strut\endgraf + \endnew + +\message{figures,} + +\let\figdef=\relax +\let\figref=\relax + +% lines above and below figures +\newif\iffigureline +\newdimen\figurelinedrop +\def\figl@nabove {% + \iffigureline \hrule \vskip\figurelinedrop\relax \fi} +\def\figl@nbelow {% + \iffigureline \nobreak \vskip\figurelinedrop \hrule\relax \fi} + +% figure environment definitions +\newdimen\captionindent +\newtoks\captionfont +\def\setupcaption {% + \leftskip=\captionindent + \rightskip=\captionindent + \the\captionfont + \parskip=\z@skip + \everypar={}% + \vpar + \setupcaptionhook} +\def\setupcaptionhook {} + +\newelement\c@ption + \setup \setupcaption + \above \dobreak \prec@ptionpenalty \abovec@ptionskip + \below \dobreak \postc@ptionpenalty \belowc@ptionskip + \begin + \end \ifhmode \vrule width\z@ height\z@ depth\dp\strutbox \fi \endgraf + \endnew +\let\abovecaptionskip=\abovec@ptionskip +\let\belowcaptionskip=\belowc@ptionskip +\let\precaptionpenalty=\prec@ptionpenalty +\let\postcaptionpenalty=\postc@ptionpenalty + +\def\setupfigure {% + \let\begincaption=\beginc@ption + \let\endcaption=\endc@ption + \let\caption=\c@ption + \leftskip=\z@skip + \rightskip=\z@skip + \spaceskip=\z@skip + \xspaceskip=\z@skip + \parfillskip=\filskip + \everypar={}% + \setupfigurehook} +\def\setupfigurehook {} + +% figure type indicators +\newif\ifstationaryfigur@ +\newif\ifsectionfigur@ +\newif\iftopfigur@ +\newif\iffloatingfigur@ + +% stationary figures +\newelement\stationaryfigure + \setup \stationaryfigur@true \setupfigure + \above \minbreak \prestationaryfigurepenalty \abovestationaryfigureskip + \nointerlineskip + \below \dobreak \poststationaryfigurepenalty \belowstationaryfigureskip + \nointerlineskip + \begin \vbox\bgroup \figl@nabove + \end \figl@nbelow \egroup + \endnew +\abovestationaryfigureskip=\bigskipamount +\belowstationaryfigureskip=\bigskipamount +\prestationaryfigurepenalty=\z@ +\poststationaryfigurepenalty=-200 +\newpage\pagestationaryfigure + \setup \stationaryfigur@true \setupfigure + \glue + \begin \vbox to\vsize\bgroup \figl@nabove + \end \figl@nbelow \vskip \z@ plus\@M\p@ \egroup + \endnew +\def\stationaryfigures {% + \let\figure=\stationaryfigure + \let\pagefigure=\stationarypagefigure + \let\beginfigure=\beginstationaryfigure + \let\endfigure=\endstationaryfigure + \let\beginpagefigure=\beginstationarypagefigure + \let\endpagefigure=\endstationarypagefigure + \let\abovefigureskip=\abovestationaryfigureskip + \let\belowfigureskip=\belowstationaryfigureskip + \let\prefigurepenalty=\prestationaryfigurepenalty + \let\postfigurepenalty=\poststationaryfigurepenalty} + +% section figures +\newelement\sectionfigure + \setup \sectionfigur@true \setupfigure + \above \dobreak \presectionfigurepenalty \abovesectionfigureskip + \nointerlineskip + \below \dobreak \postsectionfigurepenalty \belowsectionfigureskip + \nointerlineskip + \begin \vbox\bgroup \figl@nabove + \end \figl@nbelow \egroup + \endnew +\abovesectionfigureskip=\z@skip +\belowsectionfigureskip=\fillskip +\presectionfigurepenalty=\@M +\postsectionfigurepenalty=-200 +\newpage\sectionpagefigure + \setup \sectionfigur@true \setupfigure + \glue + \begin \vbox to\vsize\bgroup \figl@nabove + \end \figl@nbelow \vskip \z@ plus\@M\p@ \egroup + \endnew +\def\sectionfigures {% + \let\figure=\sectionfigure + \let\pagefigure=\sectionpagefigure + \let\beginfigure=\beginsectionfigure + \let\endfigure=\endsectionfigure + \let\beginpagefigure=\beginsectionpagefigure + \let\endpagefigure=\endsectionpagefigure + \let\abovefigureskip=\abovesectionfigureskip + \let\belowfigureskip=\belowsectionfigureskip + \let\prefigurepenalty=\presectionfigurepenalty + \let\postfigurepenalty=\postsectionfigurepenalty} + +% floating top figures +\newskip\abovetopfigureskip \abovetopfigureskip=\z@skip +\newskip\belowtopfigureskip \belowtopfigureskip=\bigskipamount +\newcount\pretopfigurepenalty \pretopfigurepenalty=100 +\newcount\posttopfigurepenalty \posttopfigurepenalty=\z@ +\newfloat\topfigure + \type \topfloat + \floatsetup \floatingpenalty\posttopfigurepenalty + \splitmaxdepth\maxdimen \splittopskip\z@skip + \setup \topfigur@true \setupfigure + \floatabove \penalty\pretopfigurepenalty \vskip\abovetopfigureskip + \nointerlineskip + \floatbelow \nobreak \vskip\belowtopfigureskip + \begin \vbox\bgroup \figl@nabove + \end \figl@nbelow \egroup + \endnew +\newpagefloat\toppagefigure + \type \topfloat + \floatsetup \penalty\pretopfigurepenalty + \floatingpenalty\posttopfigurepenalty + \splitmaxdepth\maxdimen \splittopskip\z@skip + \setup \topfigur@true \setupfigure + \above + \below + \begin \vbox to\vsize\bgroup \figl@nabove + \end \figl@nbelow \vskip \z@ plus\@M\p@ \egroup + \endnew +\gdef\topfigures {% + \let\figure=\topfigure + \let\pagefigure=\toppagefigure + \let\beginfigure=\begintopfigure + \let\endfigure=\endtopfigure + \let\beginpagefigure=\begintoppagefigure + \let\endpagefigure=\endtoppagefigure + \let\abovefigureskip=\abovetopfigureskip + \let\belowfigureskip=\belowtopfigureskip + \let\prefigurepenalty=\pretopfigurepenalty + \let\postfigurepenalty=\posttopfigurepenalty} + +% inline/floating figures +\newskip\floatabovefloatingfigureskip +\newskip\floatbelowfloatingfigureskip +\newcount\floatprefloatingfigurepenalty +\newcount\floatpostfloatingfigurepenalty +\floatabovefloatingfigureskip=\z@skip +\floatbelowfloatingfigureskip=\bigskipamount +\floatprefloatingfigurepenalty=100 +\floatpostfloatingfigurepenalty=\z@ +\newskip\abovefloatingfigureskip \abovefloatingfigureskip=\bigskipamount +\newskip\belowfloatingfigureskip \belowfloatingfigureskip=\bigskipamount +\newcount\prefloatingfigurepenalty \prefloatingfigurepenalty=\z@ +\newcount\postfloatingfigurepenalty \postfloatingfigurepenalty=-200 +\newfitfloat\floatingfigure + \type \topfloat + \floatsetup \floatingpenalty\floatpostfloatingfigurepenalty + \splitmaxdepth\maxdimen \splittopskip\z@skip + \setup \floatingfigur@true \setupfigure + \floatabove \penalty\floatprefloatingfigurepenalty + \vskip\floatabovefloatingfigureskip + \nointerlineskip + \floatbelow \nobreak \vskip\floatbelowfloatingfigureskip + \above \penalty\prefloatingfigurepenalty + \vskip\abovefloatingfigureskip + \nointerlineskip + \below \penalty\postfloatingfigurepenalty + \vskip\belowfloatingfigureskip + \nointerlineskip \vpar + \begin \vbox\bgroup \figl@nabove + \end \figl@nbelow \egroup + \endnew +\newpagefloat\floatingpagefigure + \type \topfloat + \floatsetup \penalty\floatprefloatingfigurepenalty + \floatingpenalty\floatpostfloatingfigurepenalty + \splitmaxdepth\maxdimen \splittopskip\z@skip + \setup \floatingfigur@true \setupfigure + \above + \below + \begin \vbox to\vsize\bgroup \figl@nabove + \end \figl@nbelow \vskip \z@ plus\@M\p@ \egroup + \endnew +\gdef\floatingfigures {% + \let\figure=\floatingfigure + \let\pagefigure=\floatingpagefigure + \let\beginfigure=\beginfloatingfigure + \let\endfigure=\endfloatingfigure + \let\beginpagefigure=\beginfloatingpagefigure + \let\endpagefigure=\endfloatingpagefigure + \let\abovefigureskip=\abovefloatingfigureskip + \let\belowfigureskip=\belowfloatingfigureskip + \let\prefigurepenalty=\prefloatingfigurepenalty + \let\postfigurepenalty=\postfloatingfigurepenalty} + +\message{tables,} + +\let\tabdef=\relax +\let\tabref=\relax + +\newtable\table + \leftdelim [% + \rightdelim ]% + \before \vbox\bgroup + \after \egroup + \begin + \end + \endnew +\newtable\toptable + \leftdelim [% + \rightdelim ]% + \before \vtop\bgroup + \after \egroup + \begin + \end + \endnew +\newtable\centertable + \leftdelim [% + \rightdelim ]% + \before \vcenter\bgroup + \after \egroup + \begin + \end + \endnew +\newtable\opentable + \leftdelim [% + \rightdelim ]% + \before + \after + \begin + \end + \endnew +\newtable\displaytable + \leftdelim [% + \rightdelim ]% + \before \tablewidth=\hsize$$ + \after $$ + \begin + \end + \endnew + +\message{equations,} + +% equation numbering +\let\eqdef=\relax +\let\eqref=\relax + +% synonyms for $$ +\def\beginmath {$$} +\def\endmath {$$} +\def\math #1{$$#1$$} + +\message{chapters and sections,} + +\let\secref=\relax +\let\secdef=\relax + +% are section, etc. headings centered or left-flush +\newif\ifcenterheadings + +% chapters +\newtoks\chapterfont +\newtitle\chaptertitle + \box \vopen + \shape \ifcenterheadings \titlecenter{\z@}{\z@}\else + \titleleft{\z@}{\z@}\fi + \font \the\chapterfont + \setup \interlinepenalty=\@M + \begin + \end + \endnew + +\def\chaptersetup {% + \chaptersetuphook} +\def\chaptersetuphook {} + +\newelement\chapter + \setup \get@rg\endchapter \chaptersetup + \above \minbreak \prechapterpenalty \abovechapterskip + \below \dobreak \postchapterpenalty \belowchapterskip \vpar + \begin \get@rg + \end \ymessage{{Chapter: \the\toks@}}\chaptertitle{\the\toks@}% + \endnew +\setskip\abovechapterskip \dimen 36pt \glue \parskip \factor 3000 +\setskip\belowchapterskip \dimen 18pt \glue \parskip \factor 2000 +\prechapterpenalty=-500 +\postchapterpenalty=10000 + +\newelement\pchapter + \setup \get@rg\endpchapter \chaptersetup + \above \rectosupereject + \below \dobreak \postchapterpenalty \belowchapterskip \vpar + \begin \get@rg + \end \ymessage{{Chapter: \the\toks@}}\chaptertitle{\the\toks@}% + \endnew + +% starts sections. +\newtoks\sectionfont +\newtitle\sectiontitle + \box \vbottom + \shape \ifcenterheadings \titlecenter{\z@}{\z@}\else + \titleleft{\z@}{\z@}\fi + \font \the\sectionfont + \setup + \begin + \end + \endnew + +\def\sectionsetup {% + \sectionsetuphook} +\def\sectionsetuphook {} + +\newelement\section + \setup \get@rg\endsection \sectionsetup + \above \minbreak \presectionpenalty \abovesectionskip + \below \dobreak \postsectionpenalty \belowsectionskip \vpar + \begin \get@rg + \end \ymessage{{Section: \the\toks@}}\sectiontitle{\the\toks@}% + \endnew +\setskip\abovesectionskip \dimen 18pt \glue \parskip \factor 3000 +\setskip\belowsectionskip \dimen 9pt \glue \parskip \factor 2000 +\presectionpenalty=-200 +\postsectionpenalty=10000 + +\let\beginsubsection=\beginsection +\let\endsubsection=\endsection +\let\subsection=\section + +\let\beginsubsubsection=\beginsubsection +\let\endsubsubsection=\endsubsection +\let\subsubsection=\subsection + +% simple heading +\newtoks\headingfont +\newtitle\headingtitle + \box \vbottom + \shape \ifcenterheadings \titlecenter{\z@}{\z@}\else + \titleleft{\z@}{\z@}\fi + \font \the\headingfont + \setup + \begin + \end + \endnew + +\def\headingsetup {% + \headingsetuphook} +\def\headingsetuphook {} + +\newelement\heading + \setup \get@rg\endheading \headingsetup + \above \minbreak \preheadingpenalty \aboveheadingskip + \below \dobreak \postheadingpenalty \belowheadingskip \vpar + \begin \get@rg + \end \ymessage{{Heading: \the\toks@}}\headingtitle{\the\toks@}% + \endnew +\setskip\aboveheadingskip \dimen 9pt \glue \parskip \factor 1000 +\setskip\belowheadingskip \dimen 4pt \glue \parskip \factor 1000 +\preheadingpenalty=-200 +\postheadingpenalty=10000 + +\message{special pages,} + +% titling pages +\newsuperpage\titlingpage + \setup \norunners \copyrightpage + \glue \vfil + \begin + \end + \endnew + +% main title pages +\newelement\titlepage + \setup \titlepagedefs + \above + \below + \begin \begintitlingpage \global\pageno=\z@ \ymessage{{Main title}} + \end \endgraf \endtitlingpage \global\pageno=\@ne + \endnew + +% title pages for sub-parts of a book, etc. +\newelement\partpage + \setup \titlepagedefs + \above + \below + \begin \begintitlingpage \ymessage{{Part title}} + \end \endgraf \endtitlingpage + \endnew + +% titles and abstracts +\newtoks\titlefont +\newtoks\authorfont +\newtitle\title + \box \vbottom + \shape \titleleft{\z@}{\z@}% + \font \the\titlefont + \setup + \begin + \end + \endnew +\newtitle\ctitle + \box \vbottom + \shape \titlecenter{\z@}{\z@}% + \font \the\titlefont + \setup + \begin + \end + \endnew +\newtitle\author + \box \vbottom + \shape \titleleft{\z@}{\z@}% + \font \the\authorfont + \setup + \begin + \end + \endnew +\newtitle\cauthor + \box \vbottom + \shape \titlecenter{\z@}{\z@}% + \font \the\authorfont + \setup + \begin + \end + \endnew + +\newtoks\abstractfont +\newdimen\abstractindent +\newelement\abstract + \setup \the\abstractfont \parindent=2em% + \leftskip=\abstractindent \rightskip=\abstractindent + \above \minbreak \preabstractpenalty \aboveabstractskip + \below \dobreak \postabstractpenalty \belowabstractskip + \begin + \end \endgraf + \endnew + +\newtoks\bottomtextfont +\def\titlepagedefs {% + \newelement\bottomtext + \setup \the\bottomtextfont \offindent + \above \bigskip \vfill + \below + \begin + \end \endgraf + \endnew} + +\message{2 columns,} + +% N.B. this stuff mostly adapted from the TeXbook + +% parameters +\newdimen\columnskip + +\newbox\partialp@ge +\newdimen\onec@lhsize +\newdimen\onec@lvsize +\newtoks\onec@loutput +\newdimen\twoc@lvsize + +\def\setuptwocolumn {% + \trimpagesfalse + \onec@lfigfoot + \def\columneject{\vfil\penalty200}% + \baselinefactor={1.2}\setnormalbaselines + \spaceskip=.3333em plus .3333em minus .1666em + \xspaceskip=.3333em plus .6666em minus .0833em + \advance\parskip by 0pt plus 2pt + \setuptwocolumnhook} +\def\setuptwocolumnhook {} + +% make figures and footnotes be one column +\def\onec@lfigfoot {% + \topmag=2000% + \botmag=2000% + \addtodef\setupfigurehook{% + \iffloatingfigur@ + \errhelp={I will assume it doesn't float.}% + \errmessage{You can't use a floating figure in two-column text.}% + \fi + \iftopfigur@ \hsize=\onec@lhsize \fi + \vsize=\onec@lvsize}% + \addtodef\setupfootnotehook{\hsize=\onec@lhsize}} + +\def\begintwocolumntext {% + \begingroup + \onec@lhsize=\hsize + \onec@lvsize=\vsize + \onec@loutput=\output + \output={\global\setbox\partialp@ge=\vbox{\unvbox\@cclv}}% + \let\dosupereject=\twoc@lsupereject + \eject + \output={\twoc@lout}% + \hsize=.5\hsize \advance\hsize by-.5\columnskip + \vsize=2\vsize \advance\vsize by2pc\relax + \twoc@lvsize=\vsize + \advance\vsize by-2\ht\partialp@ge + \setuptwocolumn} + +\def\endtwocolumntext {% + \output={\balancec@ls}% + \eject + \global\output=\onec@loutput + \global\vsize=\onec@lvsize + \endgroup + \pagegoal=\vsize} + +\def\twocolumntext #1{\begintwocolumntext #1\endtwocolumntext} + +\def\twoc@lout {% + \dimen@=\onec@lvsize \advance\dimen@ by-\ht\partialp@ge + \advance\dimen@ by-\ht\topfloat \advance\dimen@ by-\dp\topfloat + \advance\dimen@ by-\ht\botfloat \advance\dimen@ by-\dp\botfloat + \ifdim \dimen@>\baselineskip + \dimen@i=\ht\@cclv \advance\dimen@i\dp\@cclv + \ifdim \dimen@i>\z@ + \splittopskip=\topskip \splitmaxdepth=\maxdimen + \setbox\z@=\vsplit\@cclv to\dimen@ + \setbox\@ne=\vsplit\@cclv to\dimen@ + \else + \setbox\z@=\box\voidb@x + \setbox\@ne=\box\voidb@x + \fi + \else + \setbox\z@=\box\voidb@x + \setbox\@ne=\box\voidb@x + \fi + \def\line{\hbox to\onec@lhsize}% + \let\pagebody=\twoc@lpagebody + \ytexoutput + \global\vsize=\twoc@lvsize + \unvbox\@cclv + \penalty\outputpenalty} + +\def\twoc@lsupereject {% + \ifnum\insertpenalties>\z@ % something is being held over + \hbox{}\kern-\topskip\nobreak\vskip 0pt plus.5\vsize\penalty-200% + \hbox{}\kern-\topskip\nobreak\vskip 0pt plus.5\vsize\supereject\fi} + +\def\twoc@lpagebody {% + \vbox{\twoc@lpagecontents}} + +\def\twoc@lpagecontents {% + \dimen@i=\ht\partialp@ge \advance\dimen@i\ht\z@ + \ifvoid\topfloat\else + \dimen@=\ht\topfloat \advance\dimen@\dp\topfloat + \unvbox\topfloat + \ifdim \dimen@>\z@ \ifdim\dimen@i>\z@ \the\topsep\fi\fi + \fi + \unvbox\partialp@ge + \wd\z@=\hsize \wd\@ne=\hsize + \hbox to\onec@lhsize{\box\z@\hfil\box\@ne} + \ifvoid\botfloat\else + \dimen@=\ht\botfloat \advance\dimen@\dp\botfloat + \ifdim \dimen@>\z@ \ifdim\dimen@i>\z@ \the\botsep\fi\fi + \unvbox\botfloat + \fi} + +\def\balancec@ls {% + \setbox\z@=\vbox{\unvbox\@cclv}% + \dimen@=\ht\z@ \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip + \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdimen + {\vbadness=10000 + \loop \global\setbox\tw@=\copy\z@ \global\setbox\@ne=\vsplit\tw@ to\dimen@ + \ifdim\ht\tw@>\dimen@ \global\advance\dimen@ by\p@ \repeat} + \setbox\z@=\vbox to\dimen@{\unvbox\@ne}% + \setbox\@ne=\vbox to\dimen@{\unvbox\tw@}% + \global\output={\balancing@rror} + \unvbox\partialp@ge + \wd\z@=\hsize \wd\@ne=\hsize + \hbox to\onec@lhsize{\box\z@\hfil\box\@ne}} + +\def\balancing@rror {% + \errhelp={Please change the page into one that works.}% + \errmessage{Page can't be balanced.}% + \def\line{\hbox to\onec@lhsize}% + \def\pagebody{\vbox{\unvbox\@cclv}}% + \ytexoutput} + +% complete double columns +\newif\iffirstc@l +\newbox\firstc@l +\newbox\secondc@l + +\def\setupdoublecolumn {% + \trimpagesfalse + \def\pageeject{% + \filpage\iffirstc@l \else \line{}\filpage \fi}% + \baselinefactor={1.2}\setnormalbaselines + \spaceskip=.3333em plus .3333em minus .1666em + \xspaceskip=.3333em plus .6666em minus .0833em + \advance\parskip by 0pt plus 2pt + \setupdoublecolumnhook} +\def\setupdoublecolumnhook {} + +\def\begindoublecolumn {% + \begingroup + \onec@lhsize=\hsize + \output={\box\@cclv=\voidb@x}% + \eject + \output={\doublec@lout}% + \global\firstc@ltrue + \hsize=.5\hsize \advance\hsize by-.5\columnskip + \setupdoublecolumn} + +\def\enddoublecolumn {% + \pageeject + \endgroup + \pagegoal=\vsize} + +\def\doublecolumn #1{\begindoublecolumn #1\enddoublecolumn} + +\def\doublec@lout {% + \iffirstc@l + \def\line{\hbox to\onec@lhsize}% + \global\setbox\firstc@l=\pagebody + \def\next{\global\firstc@lfalse} + \else + \def\line{\hbox to\onec@lhsize}% + \global\setbox\secondc@l=\pagebody + \wd\firstc@l=\hsize + \wd\secondc@l=\hsize + \def\pagecontents{\vbox{\line{\box\firstc@l\hfil\box\secondc@l}}}% + \def\next{\ytexoutput\global\firstc@ltrue}% + \fi + \next} + +\message{indexes,} + +\gdef\beginindex {% + \beginpgroup + \def\entry##1{% + \hangindent=2\parindent + \hangafter=\@ne + \noindent ##1\par} + \def\subentry##1{% + \hangindent=2\parindent + \hangafter=\@ne + \indent ##1\par} + \raggedright + \exhyphenpenalty=\@M + \tolerance=\@M + \interlinepenalty=\@M + \begintwocolumntext} + +\gdef\endindex {% + \endtwocolumntext + \endpgroup} + +\message {citations,} + +\def\writec@te {\write\m@ne} + +\def\setciteaux #1{% + \stripn@me{}#1% + \edef\writec@te{\expandafter\noexpand\csname write\next \endcsname}} + +\def\c@te #1{% + \expandafter\ifx \csname @cd-#1\endcsname \relax + \expandafter\let\csname @cd-#1\endcsname=\cite% + \writec@te{\string\citation{#1}}% + \fi + \expandafter\ifx \csname @cr-#1\endcsname \relax + \expandafter\def\csname @cr-#1\endcsname{??}% + \ywarning{{Citation #1 undefined}}% + \fi} + +\def\cite #1{% + \c@te{#1}% + \csname @cr-#1\endcsname} + +\def\explicitcite #1#2{% + \c@te{#1}% + #2} +\let\ecite=\explicitcite + +\def\citation #1{\relax} + +\def\bibcite #1#2{% + \expandafter\def\csname @cr-#1\endcsname{#2}} + +\def\setbibstyle #1{% + \toks@={#1}% + \immediate\writec@te{\string\bibstyle{\the\toks@}}} + +\def\bibstyle #1{\relax} + +\newcount\bibcount +\newskip\bibparskip +\newtoks\biblabelfont +\newtoks\bibsetup +\newif\ifbibopenform + +\def\setupbibliography #1{ + \bibcount=\z@ + \setbox\z@=\hbox{\the\biblabelfont [#1]\enspace}\parindent=\wd\z@ + \ifbibopenform \let\newblock=\linebreak \else \let\newblock=\relax \fi + \setupbibliographyhook}% + +\def\setupbibliographyhook {} + +\def\bibpar #1{\ftpar{\the\biblabelfont [#1]}} + +\def\bibitem {\futurelet\next\bib@tem} +\def\bib@tem {% + \if[\noexpand\next + \let\next=\bibit@m + \else + \let\next\b@bitem + \fi + \next} +\def\bibit@m [#1]#2{% + \toks@={#1}% + \immediate\writec@te{\string\bibcite{#2}{\the\toks@}}% + \bibpar{#1}} +\def\b@bitem #1{% + \advance\bibcount\@ne + \edef\next{\number\bibcount} + \immediate\writec@te{\string\bibcite{#1}{\next}}% + \bibpar{\number\bibcount}} + +\def\bibliography #1{% + \toks@={#1}% + \immediate\writec@te{\string\bibdata{\the\toks@}}% + \begingroup % for latex-like defs + \def\begin##1##2{\begingroup \setupbibliography{##2}}% + \def\end##1{\par\endgroup}% + \@input{\jobname.bbl}{\ywarning{{No file \jobname.bbl}}}% + \endgroup} + +\def\explicitbibliography #1#2{% + \toks@={#1}% + \writec@te{\string\bibdata{\the\toks@}} + \@input{#2.bbl}{\ywarning{{No file #2.bbl}}}} +\let\ebibligraphy=\explicitbibliography + +\def\bibdata #1{\relax} + +\message {labels,} + +\def\writel@bel {\write\m@ne} + +\def\setlabelaux #1{% + \stripn@me{}#1% + \edef\writel@bel{\expandafter\noexpand\csname write\next \endcsname}} + +\def\reference #1{% + \expandafter\ifx \csname @lr-#1\endcsname \relax + \expandafter\def\csname @lr-#1\endcsname{??}% + \ywarning{{Reference #1 undefined}}% + \else + \csname @lr-#1\endcsname + \fi} + +\def\pagereference #1{% + \expandafter\ifx \csname @lrp-#1\endcsname \relax + \expandafter\def\csname @lrp-#1\endcsname{??}% + \ywarning{{Page reference #1 undefined}}% + \else + \csname @lrp-#1\endcsname + \fi} + +\def\label #1#2{% + \edef\next{#2}% + \expandafter\ifx \csname @lr-#1\endcsname \relax + \ywarning{{Label #1 defined as \next}}% + \fi + \expandafter\let\csname @lr-#1\endcsname=\next + \writel@bel{\string\deflabel{#1}{\csname @lr-#1\endcsname}{\the\pageno}}} + +\def\deflabel #1#2#3{% + \expandafter\def\csname @lr-#1\endcsname{#2}% + \expandafter\def\csname @lrp-#1\endcsname{#3}} + +\message{initialization,} + +% output routine +\output={\fixsiz@ \ytexoutput} + +% page layout +\hsize=28pc \vsize=44pc +\onheaders +\offfooters +\twosidedfalse +\showcopyrightfalse +\columnskip=2pc + +% displays +\abovedisplayskip=3pt plus1pt minus2pt +\belowdisplayskip=3pt plus1pt minus2pt +\abovedisplayshortskip=0pt plus1pt +\belowdisplayshortskip=2pt plus1pt minus1pt + +% footnotes +\footnotemarkerwidth=10pt +\botsep={\vskip\bigskipamount \footnoterule} + +% figures +\figurelinefalse +\figurelinedrop=4pt +\topsep={} +\floatingfigures +\abovecaptionskip=\medskipamount +\captionindent=2em + +% tables +\tablewidth=0pt +\intabskip=\emskip +\pretabskip=\filskip +\posttabskip=\filskip + +% miscellany +\abstractindent=0pt +\centerheadingsfalse + +% citations and labels +\newaux\aux + \filename \perjob + \extension aux% + \endnew +\setciteaux\aux +\setlabelaux\aux +\bibsetup={} +\biblabelfont={} +\bibopenformfalse + +% fonts +\runnerfont={\smlsize\rm} +\footnotefont={\smlsize\rm} +\captionfont={\smlsize\rm} +\quotefont={\smlsize\rm} +\titlefont={\bigsize\bf} +\authorfont={\regsize\rm} +\abstractfont={\smlsize\rm} +\bottomtextfont={\smllsize\rm} +\chapterfont={\bigsize\bf} +\sectionfont={\regsize\bf} +\headingfont={\regsize\bf} +\lispfont={\regsize\tt} + +% running text +\vpartrue +\overfullrule=0pt +\parindent=2em +\partagsep=.5em +\parskip=1pt plus2pt minus1pt +\normallineskip=2pt +\normallineskiplimit=0pt +\def\singlespace {\baselinefactor={1.3}\setnormalbaselines} +\def\doublespace {\baselinefactor={2.6}\setnormalbaselines} +\singlespace +\clubpenalty=900 +\widowpenalty=900 + |