Debian Codegraph @

texmf-dist/doc/texlive/texlive-en/archive/tex-live.sty-2022

raw
1 % $Id: tex-live.sty 61754 2022-01-26 23:11:05Z karl $
2 % TeX Live documentation style. Written by many people over many years.
3 % Public domain.
4 %
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesPackage{tex-live}[2019/08/14 TeX Live Guide style]
7 %
8 % colortbl and other packages otherwise make the default be letter, it seems.
9 \RequirePackage[a4paper,hscale=0.75,lines=60,vmarginratio=10:8]{geometry}
10 %
11 \RequirePackage{alltt}
12 \RequirePackage{array}
13 \RequirePackage{colortbl}
14 \RequirePackage{comment}
15 \RequirePackage{float}
16 \RequirePackage{graphicx}
17 \RequirePackage{longtable}
18 \RequirePackage{shortvrb}
19 \RequirePackage[normalem]{ulem}
20 \RequirePackage[obeyspaces]{url}
21 \RequirePackage{xspace}
22 %
23 % for a proper \acro command.
24 \RequirePackage{relsize}
25 %\DeclareRobustCommand{\acro}[1]{\textscale{.9}{#1}\@}
26 \def\acro#1{\texorpdfstring{\textscale{.9}{#1}}{#1}\@}
27 %
28 %% No lmodern for Russian; LM doesn't have cyrillic.
29 \ifx\tldocrussion\undefined \RequirePackage{lmodern}\fi
30 %
31 \usepackage{textcomp}% including \textbullet
32 \def\p.{p.\,}
33
34 \RequirePackage{fancyvrb}
35 \DefineVerbatimEnvironment{verbatim}{Verbatim}{fontsize=\normalsize}
36 \DefineVerbatimEnvironment{sverbatim}{Verbatim}{fontsize=\small}
37 \DefineVerbatimEnvironment{fverbatim}{Verbatim}{fontsize=\footnotesize}
38 \DefineVerbatimEnvironment{boxedverbatim}
39 {Verbatim}{fontsize=\footnotesize,frame=single}
40 \DefineVerbatimEnvironment{Verbatim}{Verbatim}{fontsize=\normalsize}
41 \def\verbatiminput#1{\VerbatimInput[fontsize=\small]{#1}}
42 \def\boxedverbatiminput#1{\VerbatimInput[frame=single,fontsize=\footnotesize]{#1}}
43 \def\listinginput#1#2{\VerbatimInput[fontsize=\scriptsize,firstnumber=#1,numbers=left]{#2}}
44 \MakeShortVerb\|
45 %
46 %
47 % Done with packages.
48 %
49 % emacs-page page layout.
50 %
51 %ltr \advance\textwidth by 1.1in
52 %ltr \advance\oddsidemargin by -.55in
53 %ltr \advance\evensidemargin by -.55in
54 %ltr %
55 %ltr \advance\textheight by 1in
56 %ltr \advance\topmargin by -.5in
57 %ltr \advance\footskip by -.5in
58 %ltr %
59 \message{dimens: textwidth=\the\textwidth\space
60 oddsidemargin=\the\oddsidemargin\space
61 evensidemargin=\the\evensidemargin\space
62 textheight=\the\textheight\space
63 topmargin=\the\topmargin\space
64 footskip=\the\footskip}
65 %
66 % with settings above, and without a4 (hence letter):
67 % textwidth=424.49744pt oddsidemargin=22.25128pt evensidemargin=22.25128pt
68 % textheight=622.26999pt topmargin=-20.135pt footskip=-6.135pt
69 %
70 % with default a4paper geometry settings (not enough height):
71 % textwidth=418.25368pt oddsidemargin=17.3571pt evensidemargin=17.3571pt
72 % textheight=591.5302pt topmargin=-7.86334pt footskip=30.0pt
73 %
74 % with geometry settings [a4paper,hscale=0.75,lines=60,vmarginratio=10:8]:
75 % textwidth=448.1309pt oddsidemargin=2.41849pt evensidemargin=2.41849pt
76 % textheight=718.0pt topmargin=-38.68848pt footskip=30.0pt
77
78 %
79 \pagestyle{headings}
80 %
81 % LaTeX parameters.
82 \renewcommand{\topfraction}{0.85}
83 \renewcommand{\floatpagefraction}{0.86}
84 \renewcommand{\textfraction}{0.1}
85 \renewcommand{\abovecaptionskip}{4pt}
86 \renewcommand{\belowcaptionskip}{4pt}
87 \setcounter{tocdepth}{3}
88 \setcounter{secnumdepth}{3}
89 \setcounter{topnumber}{5}
90 \setcounter{totalnumber}{5}
91 %
92 % linebreaking, etc.
93 \hbadness=4000
94 \vbadness=4000
95 \emergencystretch=.1\hsize
96 \relpenalty=500
97 %
98 \def\slash{/\penalty\z@\hskip\z@skip }
99 %
100 % various sorts of names
101 \newcommand*{\pkgname}[1]{\textsf{#1}}% package name
102 \newcommand*{\optname}[1]{\texttt{#1}}% (package,class) option name
103 \newcommand*{\cmdname}[1]{\textsf{#1}}% command name
104 \newcommand*{\colname}[1]{\emph{#1}}% collection name
105 \newcommand*{\dirname}[1]{\path{#1}}% directory name
106 \def\filename#1{\path{#1}}% file name
107 \newcommand*{\envname}[1]{\texttt{#1}}% environment variable name
108 \newcommand{\code}[1]{\texttt{#1}}
109 \newcommand{\file}[1]{\texttt{#1}}
110 \newcommand{\prog}[1]{\textsf{#1}}% same as \cmdname
111 \newcommand{\samp}[1]{`\texttt{#1}'\@}
112 \newcommand{\var}[1]{{\sl #1}}% not \textsl, for roman not typewriter slanted.
113 \newcommand{\ttvar}[1]{\texttt{\var{#1}}}
114 %
115 % underlined command input.
116 %\def\Ucom#1{%
117 % \uline{\rule[-.2\baselineskip]{0pt}{.9\baselineskip}\ttfamily #1}}
118 % bold command input
119 \def\Ucom#1{{\bfseries\ttfamily #1}}
120 %
121 % \CDref is for url's with a #, where we need to write the target url and
122 % displayed url separately in the input, due to catcode madness.
123 % (We could simplify/remove this next time, I think.)
124 \def\CDref#1#2{\texttt{#1}}
125 %
126 % \OnCD no longer has any use at all, since we don't have unpacked files
127 % on the DVD and it has never worked when reading the PDF online.
128 \def\OnCD#1{\path{#1}}
129 %
130 % \OnCD is currently for any other reference to a file or directory in
131 % the distribution. PDF readers only open .pdf files, though, so we
132 % should change this to only use \href for those. Or more likely use
133 % different macros in the source.
134 %\def\OnCD#1{\href{../../../../#1}{\path{#1}}}
135 %
136 % \href incorrectly appends .pdf to anything without an extension; these
137 % definitions using \hyper@linkurl do not, but they fail for .pdf
138 % references -- which are the only ones that work anyway. So this is
139 % useless, in practice.
140 %\def\CDref#1#2{\hyper@linkurl{#2}{../../../../#1}}
141 %\def\OnCD#1{\hyper@linkurl{\path{#1}}{../../../../#1}}
142
143 % GUI menu/button/tab sequence:
144 \def\guiseq#1{\textsf{#1}}
145 \def\arw{\unskip$\rightarrow$\ignorespaces}
146 %
147 % Special names.
148 \def\dpi{$\,$dpi\xspace}
149 \def\bs{{\protect\normalfont\ttfamily\char'134}}
150 \DeclareRobustCommand{\cs}[1]{{\normalfont\ttfamily\char`\\#1}}
151 \def\Q#1{\par\vskip6pt\leftline{#1}\par}
152 \def\hyph{-}
153 %
154 % many abbreviations.
155 \def\AllTeX{(\La\kern-.075em)\kern-.075em\TeX}
156 \def\AFMtoTFM{\cmdname{AFM2TFM}\null}
157 \def\bv{\emph{Baskerville}}
158 \let\BV=\bv
159 \newcommand{\CS}{$\mathcal{C}\kern-.1667em\lower.5ex%
160 \hbox{$\mathcal{S}$}\kern-.075em $}
161 \def\Dash{\unskip\nobreak\thinspace---\thinspace\ignorespaces}
162 \def\dvicopy{\cmdname{dvicopy}}
163 \def\dvidvi{\cmdname{dvidvi}}
164 \def\dvips{\cmdname{dvips}}
165 \def\eTeX{$\varepsilon$-\TeX}
166 \def\fpTeX{\textrm{fp}\TeX\xspace}
167 \def\GFtoDVI{\cmdname{GFtoDVI}\null}
168 \def\GFtoPK{\cmdname{GFtoPK}\null}
169 \def\GFtype{\cmdname{GFtype}}
170 \def\GUI{GUI\xspace}
171 \def\KPS{Kpathsea}
172 % This code % is hacked from its definition of \cs{LaTeX}; it allows
173 % slants (for example) to propagate into the raised (small) `A':
174 \newcommand{\La}%
175 {L\kern-.36em
176 {\setbox0\hbox{T}%
177 \vbox to\ht0{\hbox{$\m@th$%
178 \csname S@\f@size\endcsname
179 \fontsize\sf@size\z@
180 \math@fontsfalse\selectfont
181 A}%
182 \vss}%
183 }}
184 \def\OMEGA{$\Omega$}
185 \def\OzMF{OzMF}
186 \def\OzMP{OzMP}
187 \def\OzTeX{O\kern-.03em z\kern-.15em\TeX}
188 \def\PKtype{\cmdname{PKtype}}
189 \def\PLtoTF{\cmdname{PLtoTF}\null}
190 \def\ProTeXt{pro\TeX t}
191 \def\teTeX{\textrm{te}\TeX\xspace}
192 \def\TeXLive{\TeX{} Live\xspace}
193 \def\TFtoPL{\cmdname{TFtoPL}\null}
194 \def\TK{\TeX\ Collection}
195 \let\TL=\TeXLive
196 \def\TypeI{Type~1}
197 \def\VFtoVP{\cmdname{VFtoVP}\null}
198 \def\VPtoVF{\cmdname{VPtoVF}\null}
199 \def\Thanh{H\`an~Th\ifx % get Unicode char in tex4ht's HTML output
200 \HCode\UnDef\^e\llap{\raise 0.5ex\hbox{\'{}}}\else
201 \HCode{\string&\#x1EBF;}\fi~Th\`anh}
202 \def\XEmTeX{\textrm{XEm}\TeX\xspace}
203 \def\XEmacs{\textrm{XEmacs}\xspace}
204 \def\XeTeX{Xe\TeX}
205 \def\Webc{Web2C}
206 \providecommand*{\CD}{CD\xspace}
207 \providecommand*{\CTAN}{CTAN\xspace}
208 \providecommand*{\DVD}{DVD\xspace}
209 \providecommand*{\GNU}{GNU\xspace}
210 \providecommand*{\HTML}{HTML\xspace}
211 \providecommand*{\ISO}{ISO\xspace}
212 \providecommand*{\MacOSX}{\texorpdfstring{Mac\,OS\,X}{MacOSX}\xspace}
213 \providecommand*{\PS}{Post\-Script\xspace}
214 \providecommand*{\TDS}{TDS\xspace}
215 \providecommand*{\USB}{USB\xspace}
216 \providecommand*{\dvi}{DVI\xspace}
217 \providecommand*{\web}{\texttt{WEB}\xspace}
218
219 % Include a png image.
220 % #1 - basename of image file in ../texlive-common/, always .png
221 % #2 - width for TeX
222 % #3 - alt text for image; used only in html
223 \def\tlpng#1#2#3{%
224 \ifnum \Status=2 % html, have to have explicit relative path in output
225 \includegraphics[alt={#3}]{../texlive-common/#1.png}%
226 %
227 % We intentionally are not specifying the size, so that the natural
228 % size of the graphic is used in the HTML output. Thus we do not
229 % get a graphics.sty warning about "cannot determine size of graphic
230 % (no BoundingBox)" on every image. Unfortunately there is no good
231 % way to eliminate that except by eliminating all LaTeX errors
232 % (\@latex@error), which does not seem like a good idea.
233 \else % not html, handled by TEXINPUTS in Makefile
234 \par
235 \centerline{\includegraphics[width=#2]{#1.png}}%
236 \fi
237 }
238
239 % description-like environment that uses tt instead of bf, and doesn't
240 % go to the left margin. Without the \hfil, get an underfull box.
241 % Don't know why \descriptionlabel doesn't.
242 %
243 \newenvironment{ttdescription}
244 {\begin{list}{label must be supplied}{%
245 \itemsep=0pt % these lists tend to have short descriptions
246 \parindent=0pt
247 \let\makelabel=\ttdescriptionlabel}}%
248 {\end{list}}
249 \newcommand*\ttdescriptionlabel[1]{\hspace\labelsep
250 \normalfont\ttfamily #1\hfil}
251 %
252 % Likewise, for commands using sans serif.
253 \newenvironment{cmddescription}
254 {\begin{list}{label must be supplied}{%
255 \itemsep=0pt
256 \let\makelabel=\cmddescriptionlabel}}%
257 {\end{list}}
258 \newcommand*\cmddescriptionlabel[1]{\hspace\labelsep
259 \normalfont\sffamily #1\hfil}
260
261 % General squeezed itemize/enumerate; no extra space at top or between items.
262 \newenvironment{itemize*}%
263 {\begin{itemize}%
264 \setlength{\itemsep}{0pt}%
265 \setlength{\parskip}{0pt}%
266 \setlength{\topsep}{0pt}%
267 \setlength{\partopsep}{0pt}%
268 }%
269 {\end{itemize}}
270
271 \newenvironment{enumerate*}%
272 {\begin{enumerate}%
273 \setlength{\itemsep}{0pt}%
274 \setlength{\parskip}{0pt}}%
275 {\end{enumerate}}
276
277 \newsavebox{\wbox}
278 \newenvironment{warningbox}
279 {\begin{lrbox}{\wbox}
280 \begin{minipage}{.95\textwidth}}
281 {\end{minipage}\end{lrbox}\fbox{\usebox{\wbox}}}
282 %
283 % lrbox is used as a representation marking. I changed it to
284 % lrBox in tne source file, to get closer to logical marking
285 \newsavebox{\mylrbox}
286 \newenvironment{lrBox}
287 {\begin{lrbox}{\mylrbox}}
288 {\end{lrbox}}
289
290
291 % emacs-page output setup
292 %
293 \ifx \HCode\UnDef
294 \providecommand{\Status}{0}% running TeX
295 \else
296 \providecommand{\Status}{2}% running TeX4ht
297 \fi
298 %\typeout{Status is \Status}
299 %
300 \newif\ifSingleColumn
301 %
302 % By default, we won't be creating hyperlinks.
303 \def\href#1#2{#2}
304 \def\hypertarget#1#2{}
305 \def\email#1{\href{mailto:#1}{\path{#1}}} % \path comes from url
306 \def\htmlanchor#1{}
307 %
308 \definecolor{hypercolor}{rgb}{0.5,0.0,0.5} % purplish external links.
309 %
310 %
311 \ifcase\Status
312 % \Status = 0
313 \typeout{TeX Live documentation in DVI format}
314 \SingleColumntrue
315 \newenvironment{multicols}[1]{}{}
316 \or
317 % \Status = 1
318 \typeout{TeX Live documentation in PDF format}
319 \RequirePackage[breaklinks,
320 colorlinks,linkcolor=hypercolor,citecolor=hypercolor,
321 urlcolor=hypercolor,filecolor=hypercolor,
322 bookmarksopen,
323 %pdfstartview={FitBH -320000}, % fails with acrobat7
324 hyperindex]
325 {hyperref}
326 \SingleColumntrue
327 \newenvironment{multicols}[1]{}{}
328 \or
329 % \Status = 2
330 \typeout{TeX Live documentation in HTML format}
331 \SingleColumntrue
332 \newenvironment{multicols}[1]{}{}
333 % Our config file, live4ht.cfg, is read from the htlatex call
334 % in the Makefile.
335 \RequirePackage[tex4ht]{hyperref} \hyperlinkfileprefix{}
336 % definitions need simplifying for TeX4ht to make relative paths work.
337 \def\CDref#1#2{\href{../../../../#1}{#2}}
338 \def\OnCD#1{\href{../../../../#1}{#1}}
339 \def\htmlanchor#1{\HCode{<a id="#1"></a>}}
340 \or
341 % \Status = 3
342 \typeout{TeX Live documentation as a Baskerville issue}
343 \@ifundefined{Fonts}%
344 {\RequirePackage{ae}}%
345 {\RequirePackage[T1]{\Fonts}}
346 \RequirePackage{bvoutln}% outline of baskerville
347 \SingleColumnfalse
348 \RequirePackage{multicol}
349 \or
350 % \Status = 4
351 \typeout{TeX Live documentation as a TUB article}
352 \@ifundefined{Fonts}%
353 {\RequirePackage{ae}}%
354 {\RequirePackage[T1]{\Fonts}}
355 \SingleColumnfalse
356 \newenvironment{multicols}[1]{}{}
357 \fi
358 %
359 \ifnum \Status=4
360 \else
361 \RequirePackage{texnames}
362 \providecommand\TeXXeT{\TeX-{}-%
363 \kern-.1emX\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@}
364 \def\MP{MetaPost}
365 \let\mf\MF
366 \newcommand\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
367 \newcommand\MIKTEX{MiK\kern-.025em \TeX}% per www.miktex.org
368 % from pictex.tex:
369 \ifx\PiC\undefined \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \fi
370 \ifx\PiCTeX\undefined \def\PiCTeX{\PiC\kern-.11em\TeX} \fi
371 \fi
372 %
373 % hacking at sections etc., to pay attention to baskerville status
374 \newcommand{\@condend@multicols}{%
375 \ifSingleColumn
376 \else
377 \def\@tempa{multicols}%
378 \ifx\@tempa\@currenvir
379 \end{multicols}%
380 \fi
381 \fi
382 }
383 \let\Section\section
384 \renewcommand{\section}{%
385 \@ifstar
386 {\Section*}%
387 {%
388 \@condend@multicols
389 \@dblarg\@full@section
390 }%
391 }
392 \def\@full@section[#1]#2{%
393 \Section[#1]{#2}%
394 \ifSingleColumn\else\begin{multicols}{2}\fi
395 }
396 \let\SubSection\subsection
397 \renewcommand{\subsection}{%
398 \@ifstar{\SubSection*}%
399 {%
400 \@condend@multicols
401 \@dblarg\@full@subsection
402 }
403 }
404 \def\@full@subsection[#1]#2{%
405 \SubSection[#1]{#2}%
406 \ifSingleColumn\else\begin{multicols}{2}\fi
407 }
408
409 % Reduce list spacing.
410 \def\@listI{\leftmargin\leftmargini
411 \parsep \z@
412 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
413 \itemsep \z@ \@plus .1\p@
414 }
415 \let\@listi\@listI
416 \@listi
417 \def\@listii{\leftmargin\leftmarginii
418 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
419 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
420 \parsep \z@
421 \itemsep \z@ \@plus .1\p@
422 }
423 \def\@listiii{\leftmargin\leftmarginiii
424 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
425 \topsep 1\p@ \@plus 1\p@ \@minus 1\p@
426 \parsep \z@
427 \partopsep \z@
428 \itemsep \topsep
429 }
430 \def\@listiv{\leftmargin\leftmarginiv
431 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
432 }
433 \def\@listv{\leftmargin\leftmarginv
434 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
435 }
436 \def\@listvi{\leftmargin\leftmarginvi
437 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
438 }
439 %
440 % array package stuff
441 \def\arraybackslash{\let\\=\@arraycr}
442 \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
443 %
444 % shaded rows (using facilities of colortbl)
445 %
446 \definecolor{pale}{gray}{.9}
447 \newcount\colrow
448 \gdef\RowColor{pale}
449 \def\SetRowColor{%
450 \rowcolor{\RowColor}%
451 \global\advance\colrow by1\relax
452 \ifodd\colrow
453 \gdef\RowColor{pale}%
454 \else
455 \gdef\RowColor{white}%
456 \fi
457 }
458 % redefine to hack up a reference even though we don't need it...
459 \renewcommand\@bibitem[1]{\if@filesw \immediate\write\@auxout
460 {\string\bibcite{#1}{?}}\fi\ignorespaces}
461 %
462 % \unknownTeXlive is a dummy texlive entry for the biblio
463 \newcommand\unknownTeXlive[2][\relax]{\textbf{\textsc{unknown}}%
464 \global\@all@unknown\expandafter{\the\@all@unknown{#2}}%
465 }
466 \newtoks\@all@unknown
467 \global\@all@unknown{}
468 \AtEndDocument{\@message@unknowns}
469 \def\@message@unknowns{\edef\@tempa{\the\@all@unknown}%
470 \ifx\@tempa\@empty
471 \else
472 \def\@tempa{*** TeX Live package location of }%
473 \expandafter\@output@unknowns\the\@all@unknown\@empty
474 \fi
475 }
476 \def\@output@unknowns#1{\edef\@tempb{#1}%
477 \ifx\@tempb\@empty
478 \typeout{ unknown}%
479 \else
480 \message{\@tempa#1,}%
481 \def\@tempa{}%
482 \expandafter\@output@unknowns
483 \fi
484 }
485
486
487 % Silence font warnings about no bold typewriter in LM.
488 \def\@font@warning#1{}%
489
490 % Silence hyperref warnings about \kern.
491 \def\HyPsd@Warning#1{}%
492
493 \endinput