diff options
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/laps.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/longdiv.tex | 53 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/mandel.tex | 139 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/pagereference.tex | 67 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/quotation.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/ragged.sty | 781 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/random.tex | 94 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/selectpage.tex | 30 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/shadebox.tex | 171 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/underlin.tex | 18 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/undertilde.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/verbatim.tex | 258 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/weekday.sty | 74 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/wiggly.tex | 30 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/genmisc/zip.tex | 88 |
15 files changed, 0 insertions, 1825 deletions
diff --git a/Master/texmf-dist/tex/generic/genmisc/laps.tex b/Master/texmf-dist/tex/generic/genmisc/laps.tex deleted file mode 100644 index b8b2d54b646..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/laps.tex +++ /dev/null @@ -1,14 +0,0 @@ -%%% File: Laps.TeX -\catcode`\@=11 % Let's pretend @ is a letter -% Vertical `laps'; cf. \llap and \rlap -\long\def\ulap#1{\vbox to \z@{\vss#1}} -\long\def\dlap#1{\vbox to \z@{#1\vss}} - -% And centered horizontal and vertical `laps' -\def\xlap#1{\hbox to \z@{\hss#1\hss}} -\long\def\ylap#1{\vbox to \z@{\vss#1\vss}} - -% And a `lap' centered on its midpoint -\long\def\zlap#1{\ylap{\xlap{#1}}} - -\catcode`\@=12 % That's enough pretending for one day. diff --git a/Master/texmf-dist/tex/generic/genmisc/longdiv.tex b/Master/texmf-dist/tex/generic/genmisc/longdiv.tex deleted file mode 100644 index 4c9a1d4fd16..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/longdiv.tex +++ /dev/null @@ -1,53 +0,0 @@ -% longdiv.tex v.1 (1994) Donald Arseneau -% -% Work out and print integer long division problems. Use: -% \longdiv{numerator}{denominator} -% The numerator and denominator (divisor and dividend) must be integers, and -% the quotient is an integer too. \longdiv leaves a remainder. -% Use this in any type of TeX. - -\newcount\gpten % (global) power-of-ten -- tells which digit we are doing -\countdef\rtot2 % running total -- remainder so far -\countdef\LDscratch4 % scratch - -\def\longdiv#1#2{% - \vtop{\normalbaselines \offinterlineskip - \setbox\strutbox\hbox{\vrule height 2.1ex depth .5ex width0ex}% - \def\showdig{$\underline{\the\LDscratch\strut}$\cr\the\rtot\strut\cr - \noalign{\kern-.2ex}}% - \global\rtot=#1\relax - \count0=\rtot\divide\count0by#2\edef\quotient{\the\count0}%\show\quotient - % make list macro out of digits in quotient: - \def\temp##1{\ifx##1\temp\else \noexpand\dodig ##1\expandafter\temp\fi}% - \edef\routine{\expandafter\temp\quotient\temp}% - % process list to give power-of-ten: - \def\dodig##1{\global\multiply\gpten by10 }\global\gpten=1 \routine - % to display effect of one digit in quotient (zero ignored): - \def\dodig##1{\global\divide\gpten by10 - \LDscratch =\gpten - \multiply\LDscratch by##1% - \multiply\LDscratch by#2% - \global\advance\rtot-\LDscratch \relax - \ifnum\LDscratch>0 \showdig \fi % must hide \cr in a macro to skip it - }% - \tabskip=0pt - \halign{\hfil##\cr % \halign for entire division problem - $\quotient$\strut\cr - #2$\,\overline{\vphantom{\big)}% - \hbox{\smash{\raise3.5\fontdimen8\textfont3\hbox{$\big)$}}}% - \mkern2mu \the\rtot}$\cr\noalign{\kern-.2ex} - \routine \cr % do each digit in quotient -}}} - -\endinput % Demonstration below: - -\noindent Here are some long division problems - -\indent -\longdiv{12345}{13} \quad -\longdiv{123}{1234} \quad -\longdiv{31415926}{2} \quad -\longdiv{81}{3} \quad -\longdiv{1132}{99} \quad -\longdiv{86491}{94} -\bye diff --git a/Master/texmf-dist/tex/generic/genmisc/mandel.tex b/Master/texmf-dist/tex/generic/genmisc/mandel.tex deleted file mode 100644 index e008dc98f2b..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/mandel.tex +++ /dev/null @@ -1,139 +0,0 @@ -% TeX Mandelbrot Program -% -% My entry for the contest ``The most useless TeX program ever written''. -% Can anyone top that? (Don't mention MusicTeX in this context. That's not -% meant to be a joke.) -% Also welcome: Improvements of this saving on TeX's resources. This takes -% more than five minutes on my NeXT 486/66.
-%
-% Seb, 6.7.94
-% -% (seb@balu.afp.ruhr-uni-bochum.de) -% -%
-% parameters that you can modify:
-%
-% \x, \y, \xmax, \ymax in units of 10000
-\newcount\x
-\x=-20000 % means -2.000 for real part of start value
-\newcount\y
-\y=-20000 % imaginary part
-\newcount\xmax
-\xmax=20000 % end value, real
-\newcount\ymax
-\ymax=20000 % end value, imaginary
-%
-% calculation depth
-\newcount\mandeldepth
-\mandeldepth=100
-%
-%
-% recursation depth = number of pixels.
-\newcount\xsize % (Don't go wild, tail recursion
-\xsize=100 % uses loads of TeX memory!)
-\newcount\ysize
-\ysize=100
-%
-% picture size
-\newdimen\height
-\newdimen\width
-\height=10cm
-\width=10cm
-%
-% that was all the parameters!
-%
-%
-% pixel size:
-\newdimen\xgrid
-\xgrid=\height
-\divide\xgrid by\xsize
-\newdimen\ygrid
-\ygrid=\width
-\divide\ygrid by\ysize
-%
-\nopagenumbers
-%
-\newcount\stepX % work out step sizes
-\stepX=\xmax
-\advance\stepX by -\x
-\divide\stepX by\xsize
-\newcount\stepY
-\stepY=\ymax
-\advance\stepY by -\y
-\divide\stepY by\ysize
-%
-\def\cout#1{\immediate\write16{#1}} % type out debug message
-%
-\def\yes{Y} % some stupid logical macros
-\def\no{N}
-\def\notyet{x}
-%
-\newcount\u % variables for calculation
-\newcount\v
-\newcount\newV
-\newcount\newU
-\newcount\d
-\newcount\h
-\def\runmandel{% % recursive Mandelbrot macro
- \newU=\u%
- \multiply\newU by \u% % newU := u^2
- \h=\v%
- \multiply\h by \v% % h := v^2
- \advance\newU by -\h% % newU := u^2 - v^2
- \h=\x%
- \multiply\h by 10000% % h := x * 10000 (normalize)
- \advance\newU by \h% % newU := newU + h
- \divide\newU by 10000% % renormalize u
- \newV=\u%
- \multiply\newV by \v%
- \multiply\newV by 2% % newV := 2 *u * v
- \h=\y%
- \multiply\h by 10000% % h := y * 10000
- \advance\newV by \h% % newV := newV + h
- \divide\newV by 10000% % renormalize v
- \u=\newU% % newU = u^2 - v^2 + x
- \v=\newV% % newV = 2 * u * v + y
- \advance\d by 1%
- % \cout{d: \the\d, u: \the\u, v: \the\v}%
- \ifnum\d>\mandeldepth% % member ofthe Mandelbrot set
- \def\result{\yes}%
- \fi%
- \ifnum\u<-20000%
- \def\result{\no}% % real part exceeded -2
- \fi%
- \ifnum\u>20000%
- \def\result{\no}% % real part exceeded 2
- \fi%
- \ifnum\v<-20000%
- \def\result{\no}% % imaginary part exceeded -2
- \fi%
- \ifnum\v>20000%
- \def\result{\no}% % real part exceeded 2
- \fi%
- \if\notyet\result\runmandel\fi% % play it again...
-}%
-\def\result{\yes}%
-\def\makeline{\advance\x by \stepX%
- %\cout{testing \the\x = i * \the\y}%
- \u=0%
- \v=0%
- \d=0%
- \def\result{\notyet}%
- \runmandel% result expands to either yes or no now
- \if\result\yes%
- \vrule height \xgrid depth 0pt width \ygrid%
- \else%
- \vrule height \xgrid depth 0pt width 0pt\hskip\xgrid%
- \fi%
- \ifnum\x<\xmax%
- \makeline%
- \else\fi}%
-\def\makepicture{\advance\y by \stepY%
- \hbox{\makeline}%
- %\cout{y in makepicture: \the\y}%
- \ifnum\y<\ymax%
- \makepicture%
- \else\fi}%
-\vbox{\offinterlineskip\makepicture} % now, let's go tail
-\bye % recursive!
-
diff --git a/Master/texmf-dist/tex/generic/genmisc/pagereference.tex b/Master/texmf-dist/tex/generic/genmisc/pagereference.tex deleted file mode 100644 index 34ebc44c68c..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/pagereference.tex +++ /dev/null @@ -1,67 +0,0 @@ -%%%%%%%% PAGEREFERENCE MACROS -% May 2nd, 1994 -% Peter Ungar, 914 723 7187, laxa@acfcluster.nyu.edu -% 109 Lee Road, Scarsdale, N.Y. 10583-5229 -% -\long\def\COMMENT#1!E{} -% -% MACROS BEGIN HERE -\newwrite\inpr -\message{Is this the second pass? (y or n)} -\read16 to\answer -\if n\answer\immediate\openout\inpr=\jobname.pgn% -\def\wrx{\write\inpr}% -\def\plbl*#1*{\wrx{\noexpand\let\csname prec#1\endcsname=\folio}} -\def\pref*#1*{XX} -\fi -\if y\answer\closeout\inpr -\input \jobname.pgn -\def\plbl*#1*{} -\def\pref*#1*{\csname prec#1\endcsname} -\fi -% MACROS END HERE - -\COMMENT - - We use the macros as follow. Suppose you want to refer to a page -where you say something about Pythagoras. Put at the place to -which you want to refer -\plbl*pyth* Where you want to refer to this page, put -\pref*pyth* Here, in the place of pyth, one may use any sequence -of small and capital letters. Since the sequence will end up as -part of a TEX control sequence, digits are unfortunately not -allowed. (If that is very burdensome, we suggest encoding digits -as capitals, A for 1 etc.) In the second pass, the macros insert -a page number where there is a \pref. - - The macro \plbl (pagelabel), as defined when the answer to the -question, Is this the second pass, was n, writes the page number -into the file filename.pgn. To be precise, it creates a new -control sequence, consisting of \prec followed by the letters -identifying the label, which would result in \precpyth in the -example we gave, and sets it equal to the page number. In the -meanwhile, the \pref (page reference) macro is defined to print XX. - For the second pass, we input the file of labels and the page -numbers they signify which we wrote in the first pass. The -pagenumber recording macro -\plbl is redefined as vacuous, and the page reference macro \pref -is set to insert the page number. - -!E - - -This is a test of the page reference macro pair, -$\backslash$plbl (pagelabel) and $\backslash$pref (pagereference) -control sequences. There is a pagelabel command, with no effect on -the tpyeset output, just before the period at the end of this -sentence\plbl*aaa*. - -Reference to the page label on the next page: p.\pref*bb*; -reference to the pgae label on this page: p.\pref*aaa*. -\vfill -\eject Here is a second pagelabel, just before the -period\plbl*bb*. A reference to the first page label: -p.\pref*aaa*, and a reference to the second page page label: -p.\pref*bb*. - -\end diff --git a/Master/texmf-dist/tex/generic/genmisc/quotation.tex b/Master/texmf-dist/tex/generic/genmisc/quotation.tex deleted file mode 100644 index 357a113816c..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/quotation.tex +++ /dev/null @@ -1,5 +0,0 @@ -\def\quotation#1#2{{% An extra group to keep changes to \tabskip local - \tabskip=0pt plus 1fill\let\\=\cr - \halign to\hsize{##\hfil\cr - #1\cr - \hfill#2\crcr}}} diff --git a/Master/texmf-dist/tex/generic/genmisc/ragged.sty b/Master/texmf-dist/tex/generic/genmisc/ragged.sty deleted file mode 100644 index 909de8695ce..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/ragged.sty +++ /dev/null @@ -1,781 +0,0 @@ - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%% ragged.sty by Laurent Siebenmann, March 1996 -- - %% beta version of Mar 30, 1996. - %% Aim: Maintain hyphenation and raggedness control - %% while providing the following for all formats. - %% --- to make a paragraph ragged on left and justified - %% on right, use the syntax - %% \raggedL <paragraph> - %% --- to make a paragraph ragged on both left and right - %% (and symmetric), use the syntax - %% \raggedC <paragraph> - %% \raggedR is essentially equivalent \raggedright of Plain - %% or to \RaggedRight of raggedri.sty of G. Schr"oder. - %% All three \raggedX should give the same linebreaks; they - %% just provide different horizontal positioning of the lines. - %% Documentation of options etc. follows \endinput. - %% Run this file alone to see a demo. - - \ifx\undefined\raggedL\else\expandafter\endinput\fi - - \chardef\raggedcatAT=\catcode`\@ \catcode`\@=11 - - %%temporarily suppress Plain's logging of allocations - \let\R@Gtemp\wlog - \def\wlog#1{\relax} - - \newbox\R@Gvbox - \newbox\R@Ghbox - \newbox\R@Ghbox@ - - \newcount\R@Glinect - - \newskip\R@Gfillskip - - \newdimen\R@Gauxdim - \newdimen\R@Gindentdim - \newdimen\R@Ghsize - \newdimen\raggedStretch - - \raggedStretch=10\p@ %% default - - \newtoks\raggedEnv - \newtoks\raggedEnvOnce - - \let\wlog\R@Gtemp - - \R@Gfillskip=\z@ plus 1fil - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%% Core macros - - \def\R@Gprep{\ifhmode - \errmessage{ Do not use - \noexpand\raggedX commands in horizontal mode}% - \expandafter\par\fi} - - \def\R@Gcore{% - \setbox\R@Gvbox=\vbox\bgroup - \hsize=\maxdimen \leftskip=\z@ - \hskip\z@skip} - - \def\CalcR@GIndent@{% - %% first set \R@Gindentdim to excess of \R@Ghsize over remainder - \R@Gindentdim=\hsize - \advance\R@Gindentdim by -\rightskip - \advance\R@Gindentdim by -\wd\R@Ghbox@ - %% second convert to hang as l,c,r demand - \fixR@Ghang@ %% \R@Gindentdim=.5\R@Gindentdim for \raggedC - }% - - \def\endR@Gcore{\endgraf - \global\R@Glinect=\prevgraf - \global\setbox\R@Ghbox=\lastbox - \egroup % - \ifcase\R@Glinect\relax %% 0 - \or \endR@Gcore@ %% 1 - \else \errmessage{\noexpand\raggedX is failing. - Read about \string\RaggedX}\endR@Gcore@ %% >1 - \fi} - - \def\endR@Gcore@{% - \setbox\R@Gvbox=\vbox{% - \unhcopy\R@Ghbox\unpenalty\unskip\unskip - \endgraf\global\R@Glinect=\prevgraf %\showthe\prevgraf - \global\setbox\R@Ghbox@=\lastbox}% - \setbox\R@Ghbox@=\hbox{% - \unhbox\R@Ghbox@\unpenalty\unskip\unskip}% - \CalcR@GIndent@ %% - \ifdim\R@Gindentdim>\z@ - \hangindent=\R@Gindentdim %\showthe\R@Gindentdim - \else - \hangindent=\z@ - %% Rmk: neg hangindents are from right margin - \fi - \advance\R@Glinect by -1\relax - \hangafter\R@Glinect - \unhbox\R@Ghbox - \endgraf} - - \def\endR@@G{\endR@Gcore\let\par\R@Goldpar\endgroup} - - \def\raggedFrac#1{\def\R@GFrac{#1 }} - - \raggedFrac{1} %% default - - \def\R@GEnv@{% - %\parskip=4pt plus 1pt - %\baselineskip=12pt - %\parfillskip=0pt plus 1fil - %\emergencystretch=20pt - \finalhyphendemerits=20000 % 5000 is Plain default - \parindent=\z@ %% 0 - \pretolerance=\@M %% 10000 - %% end of options easily changeable - %% via \raggedEnv{...} and \raggedEnvOnce{...} - \let\R@Goldpar\par - \let\par\endR@@G - \R@Gauxdim=\hsize - \advance\R@Gauxdim by -\leftskip - \advance\R@Gauxdim by -\rightskip - \R@Ghsize=\R@GFrac\R@Gauxdim - \advance\R@Gauxdim by -\R@Ghsize - \R@GRedefs - \the\raggedEnv - \the\raggedEnvOnce\global\raggedEnvOnce{}% - }% - - \def\R@GRedefs{\let\break\R@Gbreak - \let\vadjust\R@Gvadjust@ - \everydisplay{\R@Geverydisplaymole@}} - - \def\R@Gnono{ is forbidden with \string\raggedX} - \def\R@Gbreak{\errmessage{\noexpand\break\R@Gnono}\penalty-\@M}% - \def\R@Gvadjust@#1{{\tt (USE OF vadjust)}% - \errmessage{\noexpand\vadjust\R@Gnono.\space See output}}% - \def\R@Geverydisplaymole@#1$${$${\tt (DISPLAY)}% - \errmessage{Display math\R@Gnono. See output}}% - - \def\raggedHrule{\unskip\penalty0 - \vrule height0.3\p@ depth-0\p@ width \R@Ghsize \penalty0}% - - %%% \R@GEnv@@ corrects \R@Ghsize if user has modified it - %% through \leftskip, \rightskip via \raggedEnv{...} - %% then does other last minute tasks tasks - \def\R@GEnv@@{% - \R@Ghsize=\hsize - \advance\R@Ghsize by -\leftskip - \advance\R@Ghsize by -\rightskip - \parfillskip=\R@Gfillskip - } - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%% User macros - - %%% \raggedC - \def\raggedC{\R@Gprep\begingroup - \leftskip=1\leftskip \rightskip=1\rightskip - \R@GEnv@ - \advance\leftskip by .5\R@Gauxdim plus .5\raggedStretch - \advance\rightskip by .5\R@Gauxdim plus .5\raggedStretch - \def\fixR@Ghang@{\R@Gindentdim=.5\R@Gindentdim}% - \R@GEnv@@ - \R@Gcore} - - %%% \RaggedC - \def\RaggedC{\R@Gprep\begingroup\let\R@Gcore\relax - \let\R@GRedefs\relax\raggedC - \parfillskip=\z@ - \def\par{\let\par\R@Goldpar\par\endgroup\endgroup}% - } - - % %%% \raggedR@ is strict analog of \raggedR@, \raggedC@ - % %% present for testing only - % \def\raggedR@{\R@Gprep\begingroup - % \R@GEnv@ %% not needed - % \advance\rightskip by \R@Gauxdim plus \raggedStretch - % \def\fixR@Ghang@{\R@Gindentdim=0\p@}% - % \R@GEnv@@ - % \R@Gcore - % } - - %%% \raggedR is more robust then \raggedL, \raggedC as it - %% it allows $$...$$ and \vadjust, \break etc. in paragraph. - \def\raggedR{\R@Gprep\begingroup - \let\R@GRedefs\relax - \R@GEnv@ %% initial part - \advance\rightskip by \R@Gauxdim plus \raggedStretch - \R@GEnv@@ - \def\par{\let\par\R@Goldpar\par\endgroup}% - } - - %%% \RaggedR - \def\RaggedR{\R@Gprep\raggedR - \parfillskip=\z@\relax} - - \def\raggedL{\R@Gprep\begingroup - \R@GEnv@ - \advance\leftskip by \R@Gauxdim plus \raggedStretch - \def\fixR@Ghang@{}% - \R@GEnv@@ - \R@Gcore} - - %%% \RaggedL - \def\RaggedL{\R@Gprep\begingroup\let\R@Gcore\relax - \let\R@GRedefs\relax\raggedL - \parfillskip=\z@ - \def\par{\let\par\R@Goldpar\par\endgroup\endgroup}% - } - - \def\gobble#1{} - - \catcode`\@=\raggedcatAT - - %%%% END INPUT IF THIS IS NOT A DEMO RUN ! - \edef\temp{\csname\jobname\endcsname}% - \edef\Temp{\csname ragged.sty\endcsname}% - \ifx\temp\Temp\else - \expandafter\endinput - \fi - - %%%% END OF MACROS - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%% BEGINNING OF DEMONSTRATION - %%% TESTS FOR \raggedX - - \ifx\documentstyle\undefined - \let\documentstyle\gobble \let\begin\gobble - \fi - \documentstyle{article} - \begin{document} - - \hsize=400pt - - \raggedStretch=1000pt - \RaggedC - THESE ARE TESTS FOR ragged.sty\break - EXPORT THE TESTS BEFORE PLAYING WITH THEM - \bigskip - - \widowpenalty=10000 - \leftskip=0\hsize %plus 10pt - \rightskip=0\hsize %plus 10pt - \raggedStretch=10pt %% 10pt dafault - \raggedFrac{.5} - \raggedEnv{\parskip=4pt plus 3pt - \emergencystretch=20pt - %\pretolerance=100 - } - \parskip=0pt plus 2pt - \parindent=0pt - -\def\TESTTEXT{It is the union of passionate interest in detailed -facts with equal devotion to abstract generalization which forms -the novelty in \hbox{our present society}. } - - \TESTTEXT - - %\raggedEnvOnce{\raggedStretch=0pt} - \raggedL\raggedHrule - % $$dfd$$ %\vadjust{\hrule}% \break - \TESTTEXT - - \raggedL - {\sl A.N. Whitehead} - - \raggedC\raggedHrule\TESTTEXT - - %\raggedEnvOnce{\parskip=0pt} - \raggedC{\sl A.N. Whitehead} - - - \raggedR\raggedHrule\TESTTEXT - - \raggedR -{\sl A.N. Whitehead} - - %\end - %{document} - - %%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%% TESTS FOR \RaggedX - - \raggedStretch=1000pt %% default 10pt %% play with this - \raggedEnv{% - %\linepenalty=0 %% default 50 %% play with this - \parskip=4pt plus 3pt - %\pretolerance=0 %% default 100 - %\hyphenpenalty=0 %% default 50 - } - - \bigskip \hrule \bigskip - - \TESTTEXT - - \RaggedL\raggedHrule\TESTTEXT - - \raggedL -{\sl A.N. Whitehead} - - - \RaggedC\raggedHrule\TESTTEXT - - %\raggedEnvOnce{\parskip=0pt} - \raggedC{\sl A.N. Whitehead} - - - \RaggedR\raggedHrule\TESTTEXT - - \raggedR -{\sl A.N. Whitehead} - -\end -{document} - - %%%% END OF TESTS - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - ***** USER DOCUMENTATION FOR ragged.sty ***** - - - - *** TYPICAL EXAMPLE - - \input ragged.sty - - \raggedFrac{.4} - \raggedEnv{\parskip=4pt plus 3pt} - \raggedL\raggedHrule -I was not a Child~Prodigy, because a Child~Prodigy is -a child who knows as much when it is a child as it -does when it~grows~up. - -\raggedL -{--- Will Rogers} - -The above will produce a quotation that is aligned to the right margin, -ragged on the left and having about .4 the width of a normal line. - - Just compose this file itself to see to see a more extensive -example instantly composed. - - - - *** INTENDED USES - -(i) For "ragged-left-and-flush-right" formatting of short prose -quotations tradionally placed at the end of book chapters. - -(ii) For captions on figures in an artistic page layout. - -(iii) For notes in a left hand margin ragged on the left and aligned -on the right. - - (iv) For "raggedleft" composition of left-hand pages of of narrow -brochures --- matching "raggedright" composition of right hand pages. - - Admittedly, hand specification of linebreaks is often the best -option, and that is how Don Knuth proceeds for use (i) in most of his -books. But in case reformatting for different page sizes or screen sizes -is anticipated, Knuth's alternative should be avoided like the plague; -this should apply to all documents distributed in ".tex" typescript -format. The last 3 applications seem to demand good control on -raggedness and hyphenation. - - - - *** NOVELTY - - It is too early to assert with confidence that ragged.sty offers -genuinely new capabilities in all formats. - - Hopefully \raggedL and \raggedC offer something new even for LaTeX -users. The standard "center" and "flushright" environments of LaTeX do -*roughly* the same thing by a different method. But the macros -\raggedL and \raggedC seem a necessery innovation in case one wants -control on raggedness and/or hyphenation. - - Outside LaTeX, even the offer even the more limited LaTeX features -are little known; thus, particularly sturdy macros \RaggedC and \RaggedL -are also offered by ragged.sty to provide just the LaTeX features in -other formats --- which means all features except raggedness control and -hyphenation. - - - - *** USER CONTROL SEQUENCE SUMMARY - -The \raggedX trio: -\raggedL <paragraph> %% sets paragraph ragged on left justified on right -\raggedC <paragraph> %% sets paragraph ragged on both left and right -\raggedR <paragraph> %% sets paragraph ragged on right justified on left -See also the companion trio \RaggedX below. - -With the default configuration, each of these leaves an arbitrarily -short last line while maintaining some tension on earlier lines -(\raggedStretch=10pt, total raggedness stretch). - -Only the following paragraph is affected by each. - - --- \raggedHrule provides a horizontal line of the ragged text width -if put *immediately after* \raggedX. - - --- \raggedFrac{<decimal fraction>} sets the length of the lines of -the ragged-set paragraphs as a fraction of current line length. -The current line length is - - (\hsize diminished by \leftskip and \rightskip) - - --- \raggedEnv{...} is to be placed before \raggedX; it allows the user -to redefine parameters for the line breaking environment of \raggedX. -Inspect the definition of the internal macro \R@GEnv@ for hints on -which parameters to change. Never change the code in ragged.sty; -your modifications belong in \raggedEnv{...} within your typescripts. - - \raggedEnv{...} and \raggedFrac{...} need not be repeated before -each use of \raggedX. If you want once-only temporary ragged -environment change, you can use grouping or \raggedEnvOnce{...} - - \raggedFrac, \hsize, \leftskip, \rightskip should not appear in the -argument of \raggedEnv; this is roughly because they relate to external -parameters. - - By default, paragraph indentation of the ragged paragraph is -zero. Hyphenation is by default switched off. However -\raggedEnv{\parindent=20pt \pretolerance=100} would change this back -to Plain defaults. - - You may want to adjust the new dimension \raggedStretch, which is -10pt by default. Incidentally, if the total stretch in lines falls -below about 20pt, you may have to add, say \emergencystretch=20pt -inside \raggedEnv{...}. - - In tuning stretch and hyphenation, consider also the following: -\fontdimen3\font=<dimension>, \spaceskip=<skip> and \xspaceskip=<skip>. -Cf. Plain's \raggedright. - - A companion trio \RaggedL, \RaggedC, \RaggedR are simpler, -robuster, and faster macros that perform two services already available -in LaTeX: - - (i) If used with default parameters, they force the last paragraph line -to have roughly the same length as all others. Results are good if -there are many lines. - - (ii) If used with parameter value \raggedStretch=1000pt, they behave -like the competing LaTeX environments with default parameters: lines are -relaxed and filled in natural order. - - - *** INSTALLATION - - For any format, \input ragged.sty will install the package. - - For LaTeX (version 2e), place \usepackage{ragged} in the article header -between \documentclass{...} and \begin{document}. - - - - *** OCCASIONAL PROBLEMS AND THEIR REMEDIES - - \raggedL and \raggedC (not \raggedR and \RaggedX) are only -moderately robust: they work correctly only when the paragraph contents -will form a single line if composed on an "infinitely" long line. -Therefore, they misbehave if they contain *for example* displayed math -or \break or material inserted by \vadjust; and also if the paragraph -exceeds about a page of typing; error warnings are given. - - The most annoying failing is the unavailability of \break; it can -be replaced by \hbox{...} and the tie ~ ; indeed without introducing the -inflexibility which \break does. - - Fortunately such limitations do not much interfere with the use -intended. (Indeed the unavailability of \break is a blessing in -disguise.) - - If difficulty is nevertheless encountered, use the *fast* and -*robust* \RaggedL and \RaggedC where necessary (search out "\Ragged" -instructions and tests!). - - On a given paragraph, all 3 \raggedX should always produce the -*same* linebreaks; any exception is a bug. Similarly for all three -\RaggedX. - - Please report undocumented bugs to lcs@topo.math.u-psud.fr. - - - - *** A TRIVIAL SOLUTION WHEN RAGGEDNESS IS NULL - - Donald Arseneau pointed out (Info-TeX, Sat Mar 9, 1996) that if -left and right margins are justified (i.e. \raggedStretch is zero) then -the last line of paragraphs can be center or right aligned by a simple -"trick" setting as follows: - - *** Center Alignment - - \leftskip=1\leftskip plus 1fil %% use \setlength in LaTeX - \rightskip=-\leftskip - \parfillskip=0pt plus 2fil - - *** Right Alignment - - \leftskip=1\leftskip plus 1fil %% use \setlength in LaTeX - \rightskip=-\leftskip - \parfillskip=0pt plus 1fil - -Donald considers this *well known*; he learned of it first from -Barbara Beeton. - - This device will also work in ragged environments IF AND WHEN -*extended* TeX allows skips to have *both* finite and infinite stretch --- analogous to ordinals of the form integer + \omega. This is not -yet planned. - - As always in TeX, there may yet be another "deus ex machina"! Time -will tell. - - - - *** WHY USE ragged.sty WITH LATEX? - - LaTeX (in all versions) has the environments "flushleft", "center", -and "flushright" that perform very nearly the services of \RaggedL, -\RaggedC, and \RaggedR. LaTeX also has macros \raggedright and -\raggedleft roughly equivalent to "flushleft" and "flushright" minus -the grouping that goes along with an environment. - - These LaTeX environments/macros perform reliably, and like \RaggedX -do *not* suffer the fragility mentioned above for \raggedX. - - All these LaTeX features are programmed by a mare parameter setting -(cf. programmer documentation below): they simply use the infinite value -1fil for the stretch component of \leftskip and/or \rightskip, and this -permits quite excessive raggedness -- as testing shows. If one just -makes this stretch finite and modest, then the last line becomes -excessively stretched and/or all lines tend to become equal. This matter -seems to have been first recorded and remedied by Jan van der Steen and -Martin Schr\"oder who wrote raggedri.sty (1993) (see CTAN) producing a -macro \RaggedRight more or less equivalent to Plain's \raggedright -- -but no \RaggedCenter nor \RaggedLeft. - - Consequently LaTeX users have reason to use my macros \raggedL and -\raggedC when controlled raggedness is wanted. In addition, I suspect -the ragged.sty syntax will prove helpful in adjusting up width's and -margins. - - Since the competing LaTeX environments are deeply imbricated in -the complicated "list" environment apparatus, I have not attempted to -tinker directly with the LaTeX code to make the new ragged.sty features -a well integrated patch for LaTeX; that is a job for those working on -LaTeX3. - - - - *** HISTORY - - These macros were initially programmed to respond to a request of -Laszlo Battha <battha@apollo.ggki.hu>, Mon Mar 4, 1996 on the Info-TeX -list. - - Laurent Siebenmann - Math'ematique, Bat. 425, - Univ de Paris-Sud, - 91405-Orsay, - France - - - - - - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - ***** PROGRAMMER DOCUMENTATION FOR ragged.sty ***** - - In essence, \RaggedX is a mere parameter setting; indeed, it sets -the stretch components of \leftskip and \rightskip to total -\raggedStretch. What is a miracle preordained by Knuth is that as -soon as \raggedStretch is huge (say 1000pt), while \linepenalty -remains substantial (say 50) all lines but the last are as full as -they can be without puting interword spaces under tension. -Hyphenation occurs only to prevent line length overrun. LaTeX -operates similarly but using infinite stretch. - - In contrast, \raggedL and \raggedC are hopefully original; they -are more devious than outright difficult; what will be more -difficult is to make them work in absolutely all circumstances where -Plain's \raggedright works. They already give perfect typography -or else complain. - - Permit me to set the scene with an overstatement. Analogs of all -three \raggedX exist in every competent wordprocessor since 1984 -- -beginning with MacWrite. However, in TeX (1982) there was an -unfortunate oversight; there should be not just one \parfillskip but -two: \leftparfillskip and \rightparfillskip=\parfillskip. These -should be "skip"s (elastic spaces) inserted at the left and right of -the last line of each paragraph. If these become available (say in -an e-TeX or Omega), one will be able to program \raggedL and -\raggedC by merely setting these parameters along with \leftskip, -\rightskip and a few others. - - This makes it clear that the moderately complicated programming -I have used is just a "workaround". Fortunately it is neither slow -nor bulky. - - Here is the logic of the present programming of \raggedL; it -will be followed by some promising alternatives. - - - - *** CURRENT METHOD (A) - - --- Sweep the paragraph text into \vbox of huge \hsize so that the -paragraph text fits on one line. The use of a \vbox instead of an -\hbox; here is the one recent "breakthrough" involved; it surfaced as a -result of investigations of Barbara Beeton, Michael Downes and Don -Knuth -- in this order! -- see TUGboat 11 (Nov 1991), pages 605--612. - - --- Extract the line as an \hbox and \unhbox it into a \vbox with -the "raggedleft" environment as desired, except for \parfillskip=0pt -plus 1fil where we would really want \leftparfillskip=0pt plus 1fil -and \rightparfillskip=0pt. Here we learn the number of lines in the -paragraph by use of \lastgraph. - - --- We find out the length of the the last line by using \lastbox to -pick off the last \hbox in the above \vbox, and then \unhbox'ing it -into another \hbox stripping off a penalty10000, \rightskip and -\parfillskip (going right to left). - - --- From this, we can calculate the indentation by which to push the -last box right to make it flush with the right margin. - - But we do *not* do that since it entails unpleasant technical -complications related to vertical placement. Instead we more -simply: - - --- unhbox onto the current page (essentially) the first \hbox -encountered above, using the last mentioned environment modified only by -a \hangindent equal to the measured indent, which is scheduled by -\hangafter to intervene on the last line of the paragraph. - - In a real sense the current page receives the final paragraph -just like a normal paragraph. Therefore (hopefully!) no vertical -mode complications will occur. - - Far *more* complex tricks of this sort, *the last one excepted*, are -exploited in Donald Arseneau's shapepar.sty on CTAN. Fortunately, -ragged.sty and shapepar.sty do not compete on the performance -front. - - - - *** ALTERNATIVE METHOD (B) - - This is the method I first attempted in a preliminary "hack" posted -on Info-teX Sat Mar 9, 1996. The raggedleft paragraph can contain -\vadjust and \break since the "one-long-line" requirement of (A) -disappears. - - --- first compose the paragraph \vbox with the ultimately desired -\hsize, \leftskip, \rightskip, but use \parfillskip=0pt plus 1fil. - - --- obtain the relaxed length of the last paragraph line much as -as above, using \lastbox etc. The last line is thus "deleted". - - --- reconstruct the last line as an \hbox to assure the correct -horizontal location. - - --- restore the last line into the \vbox. This requires careful -vertical placement, possibly involving \lastskip, \lastdepth, -\lastpenalty, - - --- \unvbox the corrected \vbox onto the current page. -This again requires careful vertical placement, eg. as regards -space both above and below, penalties etc. - - The last step requires that one be able to perfectly emulate, by -hand as it were, important parts of TeX's paragraph builder. It is by -far a more delicate task than the first method. Donald Arseneau called -it "painful" (Info-TeX, Sat Mar 9, 1996). - - Indentations above *displayed equations* have not been discussed -(but they are in alternative C below); that would redouble complexity. - - - - *** ALTERNATIVE METHOD (C) - - This last alternative is my proposed improvement of the first -method by use of an auxiliary file for storing widths between TeX -jobs and by possible use of two passes on each paragraph. - - This method seems to fully eliminate the failings of \raggedX, -ie. refusal of: displays, \break, \vadjust. Very desirable for a -narrow brochure with left-hand pages composed "raggedleft". But I -have done only fragmentary prototyping. - - Two passes on a paragraph are executed (when that is necessary) -by taking up the whole paragraph in a macro argument, storing it -temporarily in unexpanded token list form, and then rereading it so -that category assignments are those for normal progressive input. -This will be done by fast internal primitives in all versions of -e-TeX. But in Knuth's TeX it requires writing the unexpanded token -list out to a file, with help of the the \meaning primitive and -then rereading. - - An auxiliary file with indentation widths may indicate that a -preliminary pass is unnecessary; thus, on the average, composition -should be very fast. - - --- during a possible preliminary composition of a paragraph one -keeps \parfillskip equal 0pt plus 1fil, and merely records, in the -order of occurrence: - - (a) the widths of remainders on the last line before each display, -using \predisplaysize and a temporary addition to the token list -\everydisplay. - - (b) the width of the remainder on the paragraph's last line. This -is gotten using \lastbox much as in methods (A) or (B). - -Note that \lastbox operates in internal vertical mode, and not in -vertical mode. Hence all preliminary composition is to be done in a -\vbox. This \vbox is discarded once the necessary indentation -information has been extracted --- just as in method (A) but -contrary to method (B). - - --- during final raggedleft composition of a paragraph, the width -information is applied with help from \lastgraf, \hangindent, -\hangafter much as in method (A). - -In this final raggedleft composition of a paragraph, the width -information used may be either from the current job or from a -previous job. But it is always obtained from some preliminary -composition. - - In the case of a paragraph that is composed by \raggedL in a -single pass, it would be highly desirable to have a check that the -composed paragraph is OK; it would for example probably *not* be OK -if changes had intervened there since last composition. The -unavailability of \lastbox in ordinary vertical mode seems to make -a *sure* check difficult. Perhaps one must be content with checks -that are less than sure --- such as variation of the number of -typescript lines occupied by the paragraph as found via -\inputlineno. The user could also signal changes using a syntax like -\raggedL[changed 1647]. Also, \raggedTwoPass in the header could -force slow but sure two-pass treatment. - - - Incidentally, a simple way to make a brochure with left pages -raggedleft and right pages raggedright and *without* altering the -output routine is to compose the brochure twice, once raggedleft -and once raggedright; then one can mix the two at the .dvi (or -postscript) level. - - It is clear that, for such brochures, vertical spacing in and -among paragraphs should be perfectly normal, and identical for -raggedleft and raggedright composition. Method (C) seems to -promise this without pain. - - - - I recommend (C) as next method to program. But I could -be wrong. - - Laurent Siebenmann - Math'ematique, Bat. 425, - Univ de Paris-Sud, - 91405-Orsay, - France - - 30 March 1996 - - diff --git a/Master/texmf-dist/tex/generic/genmisc/random.tex b/Master/texmf-dist/tex/generic/genmisc/random.tex deleted file mode 100644 index d1a818558b2..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/random.tex +++ /dev/null @@ -1,94 +0,0 @@ -% RANDOM.TEX v.1 (Donald Arseneau) -% Generating "random" numbers in TeX. -% -% Random integers are generated in the range 1 to 2147483646 by the -% macro \nextrandom. The result is returned in the counter \randomi. -% Do not change \randomi except, perhaps, to initialize it at some -% random value. If you do not initialize it, it will be initialized -% using the time and date. (This is a sparse initialization, giving -% fewer than a million different starting values, but you should use -% other sources of numbers if they are available--just remember that -% most of the numbers available to TeX are not at all random.) -% -% The \nextrandom command is not very useful by itself, unless you -% have exactly 2147483646 things to choose from. Much more useful -% is the \setrannum command which sets a given counter to a random -% value within a specified range. There are three parameters: -% \setrannum {<counter>} {<minimum>} {<maximum>}. For example, to -% simulate a die-roll: \setrannum{\die}{1}{6} \ifcase\die... . -% -% If you need random numbers that are not integers, you will have to -% use dimen registers and \setrandimen. For example, to set a random -% page width: \setrandimen \hsize{3in}{6.5in}. The "\pointless" macro -% will remove the "pt" that TeX gives so you can use the dimensions -% as pure `real' numbers. In that case, specify the range in pt units. -% For example, -% \setrandimen\answer{2.71828pt}{3.14159pt} -% The answer is \pointless\answer. -% -% The random number generator is the one by Lewis, Goodman, and Miller -% (1969) and used as "ran0" in "Numerical Recipies" using Schrage's -% method for avoiding overflows. The multiplier is 16807 (7^5), the -% added constant is 0, and the modulus is 2147483647 (2^{31}-1). The -% range of integers generated is 1 - 2147483646. A smaller range would -% reduce the complexity of the macros a bit, but not much--most of the -% code deals with initialization and type-conversion. On the other hand, -% the large range may be wasted due to the sparse seed initialization. - -\newcount\randomi % the random number seed (while executing) -\global\randomi\catcode`\@ % scratch variable during definitions -\catcode`\@=11 - -\def\nextrandom{\begingroup - \ifnum\randomi<\@ne % then initialize with time - \global\randomi\time - \global\multiply\randomi388 \global\advance\randomi\year - \global\multiply\randomi31 \global\advance\randomi\day - \global\multiply\randomi97 \global\advance\randomi\month - \message{Randomizer initialized to \the\randomi.}% - \nextrandom \nextrandom \nextrandom - \fi - \count@ii\randomi - \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836 - \count@\count@ii - \multiply\count@ii 127773 - \global\advance\randomi-\count@ii % random mod 127773 - \global\multiply\randomi 16807 - \multiply\count@ 2836 - \global\advance\randomi-\count@ - \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi - \endgroup -} - -\countdef\count@ii=2 % use only in boxes! -\ifx\@tempcnta\undefined \csname newcount\endcsname \@tempcnta \fi -\ifx\@tempcntb\undefined \csname newcount\endcsname \@tempcntb \fi - -\def\setrannum#1#2#3{% count register, minimum, maximum - \@tempcnta#3\advance\@tempcnta-#2\advance\@tempcnta\@ne - \@tempcntb 2147483645 % = m - 2 = 2^{31} - 3 - \divide\@tempcntb\@tempcnta - \getr@nval - \advance\ranval#2\relax - #1\ranval -} - -\def\setrandim#1#2#3{% dimen register, minimum length, maximum length - \dimen@#2\dimen@ii#3\relax - \setrannum\ranval\dimen@\dimen@ii - #1\ranval sp\relax -} - -\def\getr@nval{% The values in \@tempcnta and \@tempcntb are parameters - \nextrandom - \ranval\randomi \advance\ranval\m@ne \divide\ranval\@tempcntb - \ifnum\ranval<\@tempcnta\else \expandafter\getr@nval \fi -} - -\def\pointless{\expandafter\PoinTless\the} -{\catcode`p=12 \catcode`t=12 -\gdef\PoinTless#1pt{#1}} - -\catcode`\@=\randomi -\global\randomi=0 -\newcount\ranval diff --git a/Master/texmf-dist/tex/generic/genmisc/selectpage.tex b/Master/texmf-dist/tex/generic/genmisc/selectpage.tex deleted file mode 100644 index 5a1405d3c44..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/selectpage.tex +++ /dev/null @@ -1,30 +0,0 @@ -%From Tugboat volume 8, number 2 july 1987 -%by Donald Knuth -% -% The idea is to make TeX look for a file called pages.tex. if such a -%file doesn't exit, everything works as before, Otherwise the file -%should contain a list of apge numbers, one per line, in the order that -%they will be generated. After the last page number has been matched, -%all further pages will be printed. Thus, if you want ot print pages -%123 and all pages from 300 onwards, your file pages.tex should say -% 123 -% 300 -%but if you want to print pages 123 and 300 only, the file should say, -%e.g., -% 123 -% 300 -% -99999999999 % impossible number -%so that the end of file will never occur. -% - -\let\Shipout=\shipout -\newread\pages \newcount\nextpage \openin\pages=pages -\def\getnextpage{\ifeof\pages\else - {\endlinechar=-1\read\pages to\next \ifx\next\empty % in this case we -should have eof now \else\global\nextpage=\next\fi}\fi} -\ifeof\pages\else\message{OK, I'll ship only the requested pages!} - \getnextpage\fi -\def\shipout{\ifeof\pages\let\next=\Shipout - \else\ifnum\pageno=\nextpage\getnextpage\let\next=\Shipout - \else\let\next=\Tosspage\fi\fi \next} -\newbox\garbage \def\Tosspage{\deadcycles=0\setbox\garbage=} diff --git a/Master/texmf-dist/tex/generic/genmisc/shadebox.tex b/Master/texmf-dist/tex/generic/genmisc/shadebox.tex deleted file mode 100644 index 3044d631f70..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/shadebox.tex +++ /dev/null @@ -1,171 +0,0 @@ -%% Save file as: SHADEBOX.TEX Source: FILESERV@SHSU.BITNET -%% Author: Leo@vaxc.cc.monash.edu.au -%% Original Source: Posted by Jim Hefferon <HEFFERON@SMCVAX.BITNET> to -%% INFO-TeX on Thu, 16 Jan 1992 11:21 EST - -%% Small (and subtle) bug correction on 25 July 2002 -%% by Danilo {\v S}egan <mm01142@alas.matf.bg.ac.yu> -%% -%% The mysterious factor of 65782 is number of sp in 1bp, or 1bp/1pt * 65536. -%% 1pt - printer point 1/72.27" -%% 1bp - ps point aka bigpoint 1/72" -%% 65536 - a number of TeX's scaled points (sp) in 1pt. -%% -%% The other solution is to use temporary registers for dividing all -%% dimensions by 1bp, but who would want to do that? - - -%---------------------------------------------------------------------------- -\newbox\graybox -\newdimen\xgrayspace -\newdimen\ygrayspace -%---------------------------------------------------------------------------- -% -% The following \TeX code was based on previous work by -% -% Je'ro^me Maillot, maillot@bora.inria.fr -% -%---------------------------------------------------------------------------- -% -% Use the following for one or more words within a line. -% -\def\textshade#1#2{% - \xgrayspace=4pt% - \ygrayspace=4pt% - \def\grayshade{0.95}% - \def\linewidth{1}% - \def\theradius{5}% - \setbox\graybox=\hbox{\surroundboxa{#2}}% - \hbox{% - \hbox to 0pt{% - \special{"gsave newpath 0 0 moveto % - 0 1 copy /xmin exch store % - \number\dp\graybox \space -65782 div 1 copy /ymin exch store % - \number\wd\graybox \space 65782 div 1 copy /xmax exch store % - \number\ht\graybox \space 65782 div 1 copy /ymax exch store % - \theradius\space /radius exch store - \linewidth\space /linewidth exch store - \grayshade\space /grayshade exch store - #1 grestore}}% - \box\graybox}}% -% -% Use the following for paragraphs. -% -\def\parashade#1#2{% - \xgrayspace=10pt% - \ygrayspace=10pt% - \def\grayshade{0.95}% - \def\linewidth{2}% - \def\theradius{10}% - \def\thevskip{15pt}% - \setbox\graybox=\hbox{\surroundboxb{#2}}% - \vskip\thevskip - \hbox{% - \hbox to 0pt{% - \special{"gsave newpath 0 0 moveto % - 0 1 copy /xmin exch store % - \number\dp\graybox \space -65782 div 1 copy /ymin exch store % - \number\wd\graybox \space 65782 div 1 copy /xmax exch store % - \number\ht\graybox \space 65782 div 1 copy /ymax exch store % - \theradius\space /radius exch store - \linewidth\space /linewidth exch store - \grayshade\space /grayshade exch store - #1 grestore}}% - \box\graybox}% - \vskip\thevskip% -}% -%---------------------------------------------------------------------------- -% -% A pair of box macros. Each builds a slightly oversized box -% containing the text. The text is centred both in the vertical -% horizontal directions. -% -% Use the following for one or more words within a line. -% -\long\def\surroundboxa#1{\leavevmode\hbox{\vtop{% -\vbox{\kern\ygrayspace% -\hbox{\kern\xgrayspace#1% - \kern\xgrayspace}}\kern\ygrayspace}}} -% -% Use the following for a paragraphs. -% -\long\def\surroundboxb#1{\leavevmode\hbox{\vtop{% -\vbox{\kern\ygrayspace% -\hbox{\kern\xgrayspace\vbox{\advance\hsize-2\xgrayspace#1}% - \kern\xgrayspace}}\kern\ygrayspace}}} -%---------------------------------------------------------------------------- -% -% Here are some simple PostScript routines. -% -% The TeX command \PScommands must be called before any of the -% shading routines can be used. -% -\long\def\PScommands{\special{! TeXDict begin -% -/sharpbox{% - newpath - xmin ymin moveto - xmin ymax lineto - xmax ymax lineto - xmax ymin lineto - xmin ymin lineto - closepath - }bind def -% -/roundbox{% - newpath - xmin radius add ymin moveto - xmax ymin xmax ymax radius arcto - xmax ymax xmin ymax radius arcto - xmin ymax xmin ymin radius arcto - xmin ymin xmax ymin radius arcto 16 {pop} repeat - closepath - }bind def -% -/sharpcorners{% - sharpbox gsave grayshade setgray fill grestore - linewidth setlinewidth stroke - }bind def -% -/plainbox{% - sharpbox grayshade setgray fill - }bind def -% -/roundcorners{% - roundbox gsave grayshade setgray fill grestore - linewidth setlinewidth stroke - }bind def -% -end}% Closes dictionnary -}% - -\PScommands - -This is a test of a\ \textshade{roundcorners}{shaded box} routine. -% -This is another test of a\ \textshade{sharpcorners}{shaded box} routine - -\parashade{roundcorners}{% -This is one very long line which I expect will be broken over one or more -lines. The idea is to have this paragraph enclosed in a shaded box. I'll -just keep on typing until I can be sure that there are more than two lines -in this paragraph. I expect that this should be well and truely sufficient -to test this macro. -} -\parashade{sharpcorners}{% -This is one very long line which I expect will be broken over one or more -lines. The idea is to have this paragraph enclosed in a shaded box. I'll -just keep on typing until I can be sure that there are more than two lines -in this paragraph. I expect that this should be well and truely sufficient -to test this macro. -} - -The field equations of General Relativity are\ % -% -\textshade{roundcorners}{\hbox{$G_{\mu\nu} = kT_{\mu\nu}$}} - -They can also be written as - -\parashade{sharpcorners}{$$R_{\mu\nu}-{1\over2}g_{\mu\nu}R = kT_{\mu\nu}$$} - -\bye diff --git a/Master/texmf-dist/tex/generic/genmisc/underlin.tex b/Master/texmf-dist/tex/generic/genmisc/underlin.tex deleted file mode 100644 index eec6aaa129c..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/underlin.tex +++ /dev/null @@ -1,18 +0,0 @@ -% underlin.tex - real multi-word underlining -% By Stephen Gildea <gildea@x.org> January 1995. - -% Usage: \textul{text to underline} - -\def\textul#1{\leavevmode\let\textulnext=\textuli\textuli#1 & } -\def\textuli#1 {\ifx\unskip\let\textulnext=\relax\else - \textulword{#1}\textulspace\fi \textulnext} -\newskip\textulspskip %saved size of a space -\def\textulword#1{% - \setbox0\hbox{#1\space\global\textulspskip=\the\lastskip\unskip}% - \dimen0=\dp0\dp0=1.2pt - \setbox0\vtop{\box0\hrule}\ifdim\dp0<\dimen0\dp0=\dimen0\fi \box0} -\def\textulspace{\leaders\hrule height -1.2pt depth 1.6pt - \hskip\textulspskip} - -% For a much fancier version with many options (e.g., strikeout), -% see ulem.sty in the CTAN archive. diff --git a/Master/texmf-dist/tex/generic/genmisc/undertilde.tex b/Master/texmf-dist/tex/generic/genmisc/undertilde.tex deleted file mode 100644 index a586f5554b9..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/undertilde.tex +++ /dev/null @@ -1,3 +0,0 @@ -\def\undertilde#1{\mathord{\vtop{\ialign{##\crcr - $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern1.5pt\nointerlineskip} - $\hfil\tilde{}\hfil$\crcr\noalign{\kern1.5pt}}}}} diff --git a/Master/texmf-dist/tex/generic/genmisc/verbatim.tex b/Master/texmf-dist/tex/generic/genmisc/verbatim.tex deleted file mode 100644 index 11d684db6f3..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/verbatim.tex +++ /dev/null @@ -1,258 +0,0 @@ -\catcode `\@ = 11 %%% we use commercial-at as a letter throughout; -\chardef \l@tter = 11 %%% and introduce synonyms for the \catcodes for -\chardef \@ther = 12 %%% <letter> and <other>; -\newcount \c@unt %%% a loop-counter; -\newcount \ch@rcode %%% this will hold the character-code of the - %%% escape character; -\newif \ifd@bugging %%% set <true> if you want to watch the - %%% finite-state automaton at work; -\newif \ifshewleadingspaces %%% set <true> if you want to see leading spaces - %%% shewn as inverted square cup (explicit); -\newif \ifshewembeddedspaces %%% set <false> if you want to see embedded -\shewembeddedspacestrue %%% spaces shewn as white space (implicit); -\ifd@bugging %%% if <debugging>, - \let \m@ssage = \message %%% \m@ssage is synonymous with \message -\else %%% otherwise - \def \m@ssage #1{}% %%% it simply throws its parameter away; -\fi -% -\def \verbatim %%% the \verbatim macro takes no parameter - {\begingroup %%% and immediately starts a nested group - \tracingonline = 0 - \def \n@sted %%% within which \n@sted is defined - {\begingroup %%% to start a further group within which - \let \n@sted %%% \n@sted becomes a synonym for \endgroup - = \endgroup - \@nvironment %%% and the environment is restored to that - %%% which obtained two levels of nesting out; - \ignorespaces %%% for tidyness, we ignore any <lwsp> - }% %%% which follows the escape character; - \edef \@nvironment %%% we initialise \@nvironment - {\the \font %%% who forgot this ????? - \parindent = %%% to prepare to restore \parindent - \the \parindent - \parskip = %%% and \parskip; - \the \parskip - \space %%% and ensure that the value to be assigned to - }% %%% \parskip is properly terminated; - \displayverbatimfont %%% we assume Knuth's font-selectors and - %%% select the `typewriter' font; - \parskip = 0 pt %%% we then set \parindent and - \parindent = 0 pt %%% \parskip to 0 pt; - \c@unt = 0 %%% and initialise \count to 0; - \loop %%% this loop checks the \catcode of each - %%% character code in the range 0 .. 127 - %%% (or 0 .. 255 for TeX V3) and if it - %%% is other than <letter> or <other>, as - %%% appropriate, saves the current value in - %%% \@nvironment for subsequent restoration - %%% within an inner group; it then sets the - %%% \catcode to either <letter> or <other>; - \ifnum \c@unt < `\A - \s@ve \catcode \c@unt = \@ther - \else \ifnum \c@unt > `\z - \s@ve \catcode \c@unt = \@ther - \else \ifnum \c@unt > `\Z - \ifnum \c@unt < `\a - \s@ve \catcode \c@unt = \@ther - \else \s@ve \catcode \c@unt = \l@tter - \fi - \else \s@ve \catcode \c@unt = \l@tter - \fi - \fi - \fi - \advance \c@unt by 1 - \ifnum \c@unt < 256 % or 128 for the V2 sites ... - \repeat - \v@rbatim - } -% -\def \v@rbatim #1% %%% - {\if #1 %%% - \let \n@xt = \v@rb@tim %%% - \else %%% - \def \n@xt %%% - {\v@rb@tim #1}% %%% - \fi %%% - \n@xt %%% - } %%% -% -\def \v@rb@tim #1% - {\ch@rcode = `#1 %%% - \edef \@nvironment %%% and append code to \@nvironment - {\@nvironment %%% to make the escape character active; - \catcode \the \ch@rcode - = \active - \space %%% <space> separates list items in \@nvironment - }% - \catcode \ch@rcode %%% the escape character is made active; - = \active - \uccode `\^^M = \ch@rcode %%% and the upper-case code of <return> is made - %%% equal to the character-code of the escape - %%% character; this is necessary because only - %%% <return> can be guaranteed to be active at - %%% this point, and we need an active character - %%% to form the primary operand of \def; - %%% the \@x's below are \expandafter's, - %%% and the effect is to upper-case <return> - %%% (yielding the escape character), then \def - %%% (an active instance of) this character as - %%% \n@sted, which has been defined above; -% - \@x \uppercase \@x {\@x \def \r@turn {\n@sted}}% -% - \uccode `\^^M = 0 %%% the upper-case code of <return> is then re- - %%% instated (not strictly true; it is set to 0, - %%% which is assumed to be its previous value - %%% --- could be improved here); - \@ctivecr %%% <return> is made active; - \@ctivespace %%% and so is <space> (to avoid space-elision); - %%% finally, the finite-state automaton which - }% %%% processes <space>s is set to <????>; - %%% this ends the definition of \verbatim. -% -\def \s@ve #1#2=#3% %%% \s@ve minimises the \catcode restoration - {\ifnum #1#2 = #3% %%% work of \@nvironment by saving only the - %%% \catcode of characters whose \catcode - %%% is to be changed; it then changes the - %%% \catcode of those characters. - \else \edef \@nvironment - {\@nvironment #1\the #2=\the #1#2 }% - #1#2 = #3% - \fi - }% - %%% the code which follows implements the finite - %%% state automaton which determines whether - %%% <space>s are ignored, shewn explicitly or - %%% implied, and which ensures that blank - %%% lines are reproduced correctly. -% -\def \v@id {\futurelet \n@xt \v@idifspace}% -\def \l@ad {\l@adingspace \futurelet \n@xt \l@adifspace}% -\def \sk@p {\vskip \baselineskip \futurelet \n@xt \l@adifspace}% -\def \emb@d {\emb@ddedspace}% -\def \sh@wspace {\char 32\relax}% -\def \h@despace {\leavevmode \kern \fontdimen 2 \font}% -\def \l@adingspace {\ifshewleadingspaces \sh@wspace \else \h@despace \fi}% -\def \emb@ddedspace {\ifshewembeddedspaces \sh@wspace \else \h@despace \fi}% -\def \v@idifspace {\testn@xt {\afterassignment \v@id}}% -\def \l@adifspace {\testn@xt {\afterassignment \sk@p}}% -% - %%% \testn@xt provides a common look-ahead for - %%% \v@idifspace and \l@adifspace, and also -\def \testn@xt #1% %%% implements some essential debugging hooks. - {\ifx \n@xt \sp@c@ - \m@ssage {Next character is a space}% - \let \n@xt = \relax - \else \ifx \n@xt \r@t@rn - \m@ssage {Next character is a return}% - \def \n@xt {#1\let \n@xt = }% - \else \m@ssage {Next character is \meaning \n@xt}% - \let \n@xt = \relax - \@x \let \sp@ce = \emb@d - \fi - \fi - \n@xt - }% -% - %%% We next tamper with the \catcode of <space> - %%% and <return>, while defining macros and - %%% synonyms which require them to be active; - %%% the \catcode is then restored to its default - %%% (not necessarily the previous value --- - %%% could be improved). \@ctivespace makes - %%% <space> active, then defines <space> as -\catcode `\ = \active% %%% \v@id with a synonym \sp@c@. This code is -\def\sp@ce{ }% %%% used by the finite-state automaton. -\def\@ctivespace% -{\catcode`\ =\active\def {\v@id}\let\sp@c@= }\catcode`\ =10\relax% -\catcode`\ =10\relax% -% -\catcode `\^^M = \active % %%% <return> is made active; -\def \r@turn {^^M}% %%% \r@turn defined as an active <return>; -\let \r@t@rn = ^^M% %%% \r@t@rn is made a synonym; -\def \@ctivecr % %%% and \@ctivecr is defined to - {\catcode `\^^M = \active % %%% make <return> active, then - \def ^^M% %%% define <return> to manipulate the - %%% finite-state automaton and ... - {\@x \def \sp@ce {\l@ad}% - \@x \let \@x \sp@c@ \@x =\sp@ce % -% - \endgraf % %%% insert a \par primitive (for blank lines). -% - \futurelet \n@xt \l@adifspace % - }% - \let \r@t@rn = ^^M% %%% \r@t@rn is synonymous with active <return> - }% -\catcode `\^^M = 5 % %%% finally, the \catcode of <return> is - %%% restored to its normal value; -% - %%% the \AfterGroup macro is intended for - %%% use within a nested normal environment, - %%% and causes (a concealed macro defined as) - %%% its parameter text to be inserted into - %%% TeX's input stream when the nested normal - %%% group terminates. -% -\def \AfterGroup #1{\global \def \@ftergroup {#1}\aftergroup \@ftergroup}% -% -\let \@x = \expandafter %%% \@x is a brief synonym for \expandafter; -% -% -\def \mitabrev %%% and \mitabrev defined as the closure for - {\endgroup \endgroup}% %%% \verbatim; any other name could be used, - %%% as the code performs no look-ahead for - %%% any particular string. -% - %%% Finally we announce to the world that we - %%% have been loaded, and gives some clues as - %%% to the usage. -% - -\catcode `\Ý = \active -\catcode `\| = \active - -\def Ý{\begingroup - \def \s@lidus ##1Ý{\inlineverbatimfont ##1\endgroup}% - \p@ssivate \activesp@ces \s@lidus - } - -\def |{\begingroup - - \def \s@lidus ##1|{\inlineverbatimfont ##1\endgroup}% - \p@ssivate \activesp@ces \s@lidus - } - -\def \p@ssivate - {\tracingonline = 0 - \c@unt = 0 - \loop - \ifnum \catcode \c@unt = 11 {}% - \else \ifnum \catcode \c@unt = 12 {}% - \else \catcode \c@unt = 12 - \fi - \fi - \ifnum - \c@unt < 255 - \advance \c@unt by 1 - \repeat - \catcode `\Ý = \active - \catcode `\| = \active - } - -\begingroup -\catcode `\ = \active\gdef\activesp@ce{\def {\phantom{\char`\ }}}% -\endgroup - -\def \activesp@ces {\catcode `\ = \active \activesp@ce} - -\catcode `\@ = \@ther %%% commercial-at is restored to its normal - %%% <other> catcode (not necessarily the - %%% previous value --- could be improved); - -\message {Verbatim environment loaded;}% -\message {usage: ``\noexpand \verbatim <char> ... <char> \noexpand \mitabrev''}% -\message {less functional short forms: \string Ý...\string Ý & - \string |...\string |}% - -%%% ======================================================================== %%% diff --git a/Master/texmf-dist/tex/generic/genmisc/weekday.sty b/Master/texmf-dist/tex/generic/genmisc/weekday.sty deleted file mode 100644 index cda185ad31b..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/weekday.sty +++ /dev/null @@ -1,74 +0,0 @@ -% Save file as: WEEKDAY.STY Source: FILESERV@SHSU.BITNET -%% WEEKDAY.STY -- original source: Dimitri Vulis <DLV@CUNYVMS1.BITNET> with -%% modifications by George D. Greenwade <BED_GDG@SHSU.BITNET>, and gracious -%% assistance from Bernhard Schroeder <UPK002@DBNRHRZ1.BITNET>, Hunter -%% Goatley <GOATHUNTER@WKUVX1.BITNET>, and others via INFO-TeX/comp.text.tex. -%% 21-FEB-1991 17:42:37 -%% -%% Usage: \weekday{yyyy}{mm}{dd} (where "yyyy" is a year, "mm" is the numeric -%% equilavent of the month, and "dd" is the specific calendar date -%% which may be one or two numbers) yields the weekday associated with -%% the date provided (i.e., Sunday, Monday, ...). May pass \year, -%% \month, and \day to generate today's weekday. -%% -%% -- \weekdaydate{yyyy}{mm}{dd} yields result of \weekday, as well as the -%% calendar date (i.e., \weekdaydate{1991}{02}{21} yields Thursday, -%% February 21, 1991). (NOTE: syntax is changed from \weekdaydisplay -%% to \weekdaydate to make it a little more rememberable) -%% -%% May be used as a TeX macro or as a LaTeX style, from what I can tell. -%% Please report any enhancements or bugs you come across so they can be -%% posted in FILESERV's STYle archives. George <BED_GDG@SHSU.BITNET> -%% -\newcount\wwwy -\newcount\wwwm -\newcount\wwwd -\newcount\wwwc -\newcount\wwwt -\newcount\wwws - -\def\weekday@{% -\wwwc=\wwwy -\divide\wwwc100\relax -\wwwt=-\wwwc -\multiply\wwwt100\relax -\advance\wwwy\wwwt -\wwws=\wwwy -\multiply\wwws1461\relax -\divide\wwws4\relax -\wwwt=\wwwm -\multiply\wwwt764\relax -\divide\wwwt25\relax -\advance\wwws\wwwt -\advance\wwws\wwwd -\ifnum\wwwm>\tw@\advance\wwws\thr@@\else\weekday@@\fi -\wwwt=-\wwws -\divide\wwwt7\relax -\multiply\wwwt7\relax -\advance\wwws\wwwt -} - -% By the year 2000 we ought to examine \wwwc as well - -\def\weekday@@{% -\wwwt=\wwwy -\divide\wwwt4\relax -\multiply\wwwt4\relax -\advance\wwwt-\wwwy -\ifnum\wwwt=\z@\advance\wwws4\else\advance\wwws5\fi -} - -\def\weekday#1#2#3{% year, month 1--12, day 1--31 -\wwwy=#1\relax\wwwm=#2\relax\wwwd=#3\relax \weekday@ -\ifcase\wwws Sunday\or - Monday\or Tuesday\or Wednesday\or Thursday\or Friday\or Saturday\fi} - -\def\weekdaydate#1#2#3{% year, month 1--12, day 1--31 -\wwwy=#1\relax\wwwm=#2\relax\wwwd=#3\relax\weekday@ -\ifcase\wwws Sunday,\or -Monday,\or Tuesday,\or Wednesday,\or Thursday,\or Friday,\or Saturday,\fi -\space -\ifcase #2\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 -\space\number#3, \space\number#1} % Here I (Bernhard) inserted \number diff --git a/Master/texmf-dist/tex/generic/genmisc/wiggly.tex b/Master/texmf-dist/tex/generic/genmisc/wiggly.tex deleted file mode 100644 index 7f04760f34a..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/wiggly.tex +++ /dev/null @@ -1,30 +0,0 @@ -% A macro \underwiggle for drawing variable length wiggly lines horizontally -% under its argument in the same way as \underbar. -% Written by Dr. John S. Garavelli on 4 December 1987 and adapted from a routine -% by A. G. W. Cameron at Harvard University which appeared in TUGBOAT November -% 1985, vol. 6, no. 3, p. 155. -% WARNING: the computations performed by this macro can be very time consuming, -% so use it sparingly. - -\newcount\vone \newcount\vtwo \newcount\vthree \newcount\vfour \newcount\vfive -\newcount\vsix \newcount\vseven \newcount\veight \newcount\vnine \newcount\vten -\newbox\wbox \newdimen\wbsize -\def\underwiggle#1{\ifmmode\setbox\wbox=\hbox{$#1$} - \else\setbox\wbox=\hbox{#1}\fi -\dp\wbox=0pt\wbsize=\wd\wbox\lower2pt\hbox to0pt -{\hss$\vone=0\vtwo=0\vthree=7000\vfive=\vtwo -\loop -\vseven=\vone \divide\vseven by 2 -\vsix=\vfive \divide\vsix by 2 \multiply\vsix by -1 -\veight=16384 \advance\veight by \vsix -\vnine=16384 \advance\vnine by -\vsix -\vten=\vseven \advance\vten by 32768 -\hskip\vseven sp -\vrule height\veight sp width 32768 sp depth\vnine sp -\hskip-\vten sp -\ifdim\vseven sp<\wbsize \advance\vone by 20000 -\advance\vtwo by \vthree -\vfour=-\vtwo \divide\vfour by 10 -\advance\vthree by \vfour -\advance\vfive by \vtwo -\repeat$}\box\wbox} diff --git a/Master/texmf-dist/tex/generic/genmisc/zip.tex b/Master/texmf-dist/tex/generic/genmisc/zip.tex deleted file mode 100644 index c1139b3cc41..00000000000 --- a/Master/texmf-dist/tex/generic/genmisc/zip.tex +++ /dev/null @@ -1,88 +0,0 @@ -% zip.tex -% -% J. Daniel Smith -% 24 May 1990 -% -% Modified from a STY file snarfed from someplace else. But I don't -% remember where the original code came from... OOPS!!! -% -% Make a barcode for a ZIP code! -% -% Example usage is below. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\catcode`@=11 % letter -% -% Dimensions of bars to be used in the barcode -\newdimen\b@rwidth \newdimen\b@rlong \newdimen\b@rshort \newdimen\b@rsep -\b@rwidth=0.02true in \b@rlong=0.125true in \b@rshort=0.05true in -\b@rsep=0.0275true in -\def\sb@r{\vrule height\b@rshort width\b@rwidth depth0pt \kern\b@rsep} -\def\lb@r{\vrule height\b@rlong width\b@rwidth depth0pt \kern\b@rsep} - -% The barcodes for each digit -\def\zerob@r{\lb@r\lb@r\sb@r\sb@r\sb@r} -\def\oneb@r{\sb@r\sb@r\sb@r\lb@r\lb@r} -\def\twob@r{\sb@r\sb@r\lb@r\sb@r\lb@r} -\def\threeb@r{\sb@r\sb@r\lb@r\lb@r\sb@r} -\def\fourb@r{\sb@r\lb@r\sb@r\sb@r\lb@r} -\def\fiveb@r{\sb@r\lb@r\sb@r\lb@r\sb@r} -\def\sixb@r{\sb@r\lb@r\lb@r\sb@r\sb@r} -\def\sevenb@r{\lb@r\sb@r\sb@r\sb@r\lb@r} -\def\eightb@r{\lb@r\sb@r\sb@r\lb@r\sb@r} -\def\nineb@r{\lb@r\sb@r\lb@r\sb@r\sb@r} - -\newcount\zipb@rm -\newcount\zipb@rn -\chardef\ten=10 - -%Almost like using \ifcase... except `-' is ignored. -\def\zipb@r@@@#1#2{\expandafter\def\csname zipb@r@@#1\endcsname% - {#2\advance\zipb@rn#1\relax}} - -\newbox\zipbarcode -\zipb@r@@@0{\global\setbox\zipbarcode\hbox{\box\zipbarcode\zerob@r}} -\zipb@r@@@1{\global\setbox\zipbarcode\hbox{\box\zipbarcode\oneb@r}} -\zipb@r@@@2{\global\setbox\zipbarcode\hbox{\box\zipbarcode\twob@r}} -\zipb@r@@@3{\global\setbox\zipbarcode\hbox{\box\zipbarcode\threeb@r}} -\zipb@r@@@4{\global\setbox\zipbarcode\hbox{\box\zipbarcode\fourb@r}} -\zipb@r@@@5{\global\setbox\zipbarcode\hbox{\box\zipbarcode\fiveb@r}} -\zipb@r@@@6{\global\setbox\zipbarcode\hbox{\box\zipbarcode\sixb@r}} -\zipb@r@@@7{\global\setbox\zipbarcode\hbox{\box\zipbarcode\sevenb@r}} -\zipb@r@@@8{\global\setbox\zipbarcode\hbox{\box\zipbarcode\eightb@r}} -\zipb@r@@@9{\global\setbox\zipbarcode\hbox{\box\zipbarcode\nineb@r}} - -\def\zipb@r@@#1{\csname zipb@r@@#1\endcsname} - -\def\zipb@r@#1{\ifx#1\null - \let\next\relax - \else - \zipb@r@@{#1}#1% - \let\next\zipb@r@ - \fi - \next} - -\def\zipbar#1{\setbox\zipbarcode=\null - \hbox{ % put numbers in an \hbox - \global\setbox\zipbarcode\hbox{\box\zipbarcode\lb@r} % start with long bar - \zipb@rn\z@\zipb@r@#1\null - \zipb@rm\zipb@rn \divide\zipb@rm\ten \multiply\zipb@rm\ten - \advance\zipb@rm-\zipb@rn - \ifnum\zipb@rm<0 - \advance\zipb@rm\ten - \fi - \zipb@r@@{\the\zipb@rm} % last digit, so that the sum is divisible by ten - \global\setbox\zipbarcode\hbox{\box\zipbarcode\lb@r}% end with a long bar - } % end of \hbox -} - -\catcode`@=12 % disable private sequences -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -%\zipbar{1234567890} -% -%\zipbar{48837} -% -%\zipbar{78653--0102} -%\bye -\endinput |