Debian Codegraph @

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

raw
1 % $Id: tex-live.sty 54322 2020-03-15 18:10:11Z 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 - name of image file in ../texlive-common/, always .png
221 % #2 - width for TeX
222 %
223 \def\tlpng#1#2{%
224 \ifnum \Status=2 % html, want relative path in output
225 \includegraphics{../texlive-common/#1.png}%
226 % We intentionally are not specifying the size, so that the natural
227 % size of the graphic is used in the HTML output. Thus we do not
228 % get a graphics.sty warning about "cannot determine size of graphic
229 % (no BoundingBox)" on every image. Unfortunately there is no good
230 % way to eliminate that except by eliminating all LaTeX errors
231 % (\@latex@error), which does not seem like a good idea.
232 \else % not html, handled by TEXINPUTS in Makefile
233 \par
234 \centerline{\includegraphics[width=#2]{#1.png}}%
235 \fi
236 }
237
238 % description-like environment that uses tt instead of bf, and doesn't
239 % go to the left margin. Without the \hfil, get an underfull box.
240 % Don't know why \descriptionlabel doesn't.
241 %
242 \newenvironment{ttdescription}
243 {\begin{list}{label must be supplied}{%
244 \itemsep=0pt % these lists tend to have short descriptions
245 \parindent=0pt
246 \let\makelabel=\ttdescriptionlabel}}%
247 {\end{list}}
248 \newcommand*\ttdescriptionlabel[1]{\hspace\labelsep
249 \normalfont\ttfamily #1\hfil}
250 %
251 % Likewise, for commands using sans serif.
252 \newenvironment{cmddescription}
253 {\begin{list}{label must be supplied}{%
254 \itemsep=0pt
255 \let\makelabel=\cmddescriptionlabel}}%
256 {\end{list}}
257 \newcommand*\cmddescriptionlabel[1]{\hspace\labelsep
258 \normalfont\sffamily #1\hfil}
259
260 % General squeezed itemize/enumerate.
261 \newenvironment{itemize*}%
262 {\begin{itemize}%
263 \setlength{\itemsep}{0pt}%
264 \setlength{\parskip}{0pt}}%
265 {\end{itemize}}
266
267 \newenvironment{enumerate*}%
268 {\begin{enumerate}%
269 \setlength{\itemsep}{0pt}%
270 \setlength{\parskip}{0pt}}%
271 {\end{enumerate}}
272
273 \newsavebox{\wbox}
274 \newenvironment{warningbox}
275 {\begin{lrbox}{\wbox}
276 \begin{minipage}{.95\textwidth}}
277 {\end{minipage}\end{lrbox}\fbox{\usebox{\wbox}}}
278 %
279 % lrbox is used as a representation marking. I changed it to
280 % lrBox in tne source file, to get closer to logical marking
281 \newsavebox{\mylrbox}
282 \newenvironment{lrBox}
283 {\begin{lrbox}{\mylrbox}}
284 {\end{lrbox}}
285
286
287 % emacs-page output setup
288 %
289 \ifx \HCode\UnDef
290 \providecommand{\Status}{0}% running TeX
291 \else
292 \providecommand{\Status}{2}% running TeX4ht
293 \fi
294 %\typeout{Status is \Status}
295 %
296 \newif\ifSingleColumn
297 %
298 % By default, we won't be creating hyperlinks.
299 \def\href#1#2{#2}
300 \def\hypertarget#1#2{}
301 \def\email#1{\href{mailto:#1}{\path{#1}}} % \path comes from url
302 \def\htmlanchor#1{}
303 %
304 \definecolor{hypercolor}{rgb}{0.5,0.0,0.5} % purplish external links.
305 %
306 %
307 \ifcase\Status
308 % \Status = 0
309 \typeout{TeX Live documentation in DVI format}
310 \SingleColumntrue
311 \newenvironment{multicols}[1]{}{}
312 \or
313 % \Status = 1
314 \typeout{TeX Live documentation in PDF format}
315 \RequirePackage[breaklinks,
316 colorlinks,linkcolor=hypercolor,citecolor=hypercolor,
317 urlcolor=hypercolor,filecolor=hypercolor,
318 bookmarksopen,
319 %pdfstartview={FitBH -320000}, % fails with acrobat7
320 hyperindex]
321 {hyperref}
322 \SingleColumntrue
323 \newenvironment{multicols}[1]{}{}
324 \or
325 % \Status = 2
326 \typeout{TeX Live documentation in HTML format}
327 \SingleColumntrue
328 \newenvironment{multicols}[1]{}{}
329 % Our config file, live4ht.cfg, is read from the htlatex call
330 % in the Makefile.
331 \RequirePackage[tex4ht]{hyperref} \hyperlinkfileprefix{}
332 % definitions need simplifying for TeX4ht to make relative paths work.
333 \def\CDref#1#2{\href{../../../../#1}{#2}}
334 \def\OnCD#1{\href{../../../../#1}{#1}}
335 \def\htmlanchor#1{\HCode{<a id="#1"></a>}}
336 \or
337 % \Status = 3
338 \typeout{TeX Live documentation as a Baskerville issue}
339 \@ifundefined{Fonts}%
340 {\RequirePackage{ae}}%
341 {\RequirePackage[T1]{\Fonts}}
342 \RequirePackage{bvoutln}% outline of baskerville
343 \SingleColumnfalse
344 \RequirePackage{multicol}
345 \or
346 % \Status = 4
347 \typeout{TeX Live documentation as a TUB article}
348 \@ifundefined{Fonts}%
349 {\RequirePackage{ae}}%
350 {\RequirePackage[T1]{\Fonts}}
351 \SingleColumnfalse
352 \newenvironment{multicols}[1]{}{}
353 \fi
354 %
355 \ifnum \Status=4
356 \else
357 \RequirePackage{texnames}
358 \providecommand\TeXXeT{\TeX-{}-%
359 \kern-.1emX\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@}
360 \def\MP{MetaPost}
361 \let\mf\MF
362 \newcommand\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
363 \newcommand\MIKTEX{MiK\kern-.025em \TeX}% per www.miktex.org
364 % from pictex.tex:
365 \ifx\PiC\undefined \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \fi
366 \ifx\PiCTeX\undefined \def\PiCTeX{\PiC\kern-.11em\TeX} \fi
367 \fi
368 %
369 % hacking at sections etc., to pay attention to baskerville status
370 \newcommand{\@condend@multicols}{%
371 \ifSingleColumn
372 \else
373 \def\@tempa{multicols}%
374 \ifx\@tempa\@currenvir
375 \end{multicols}%
376 \fi
377 \fi
378 }
379 \let\Section\section
380 \renewcommand{\section}{%
381 \@ifstar
382 {\Section*}%
383 {%
384 \@condend@multicols
385 \@dblarg\@full@section
386 }%
387 }
388 \def\@full@section[#1]#2{%
389 \Section[#1]{#2}%
390 \ifSingleColumn\else\begin{multicols}{2}\fi
391 }
392 \let\SubSection\subsection
393 \renewcommand{\subsection}{%
394 \@ifstar{\SubSection*}%
395 {%
396 \@condend@multicols
397 \@dblarg\@full@subsection
398 }
399 }
400 \def\@full@subsection[#1]#2{%
401 \SubSection[#1]{#2}%
402 \ifSingleColumn\else\begin{multicols}{2}\fi
403 }
404
405 % calm things down a bit if we're in a multiple-column version
406 \ifSingleColumn
407 \else
408 \def\@listI{\leftmargin\leftmargini
409 \parsep \z@
410 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
411 \itemsep \z@ \@plus .1\p@
412 }
413 \let\@listi\@listI
414 \@listi
415 \def\@listii{\leftmargin\leftmarginii
416 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
417 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
418 \parsep \z@
419 \itemsep \z@ \@plus .1\p@
420 }
421 \def\@listiii{\leftmargin\leftmarginiii
422 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
423 \topsep 1\p@ \@plus 1\p@ \@minus 1\p@
424 \parsep \z@
425 \partopsep \z@
426 \itemsep \topsep
427 }
428 \def\@listiv{\leftmargin\leftmarginiv
429 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
430 }
431 \def\@listv{\leftmargin\leftmarginv
432 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
433 }
434 \def\@listvi{\leftmargin\leftmarginvi
435 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
436 }
437 \fi
438 %
439 % array package stuff
440 \def\arraybackslash{\let\\=\@arraycr}
441 \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
442 %
443 % shaded rows (using facilities of colortbl)
444 %
445 \definecolor{pale}{gray}{.9}
446 \newcount\colrow
447 \gdef\RowColor{pale}
448 \def\SetRowColor{%
449 \rowcolor{\RowColor}%
450 \global\advance\colrow by1\relax
451 \ifodd\colrow
452 \gdef\RowColor{pale}%
453 \else
454 \gdef\RowColor{white}%
455 \fi
456 }
457 % redefine to hack up a reference even though we don't need it...
458 \renewcommand\@bibitem[1]{\if@filesw \immediate\write\@auxout
459 {\string\bibcite{#1}{?}}\fi\ignorespaces}
460 %
461 % \unknownTeXlive is a dummy texlive entry for the biblio
462 \newcommand\unknownTeXlive[2][\relax]{\textbf{\textsc{unknown}}%
463 \global\@all@unknown\expandafter{\the\@all@unknown{#2}}%
464 }
465 \newtoks\@all@unknown
466 \global\@all@unknown{}
467 \AtEndDocument{\@message@unknowns}
468 \def\@message@unknowns{\edef\@tempa{\the\@all@unknown}%
469 \ifx\@tempa\@empty
470 \else
471 \def\@tempa{*** TeX Live package location of }%
472 \expandafter\@output@unknowns\the\@all@unknown\@empty
473 \fi
474 }
475 \def\@output@unknowns#1{\edef\@tempb{#1}%
476 \ifx\@tempb\@empty
477 \typeout{ unknown}%
478 \else
479 \message{\@tempa#1,}%
480 \def\@tempa{}%
481 \expandafter\@output@unknowns
482 \fi
483 }
484
485
486 % Silence font warnings about no bold typewriter in LM.
487 \def\@font@warning#1{}%
488
489 % Silence hyperref warnings about \kern.
490 \def\HyPsd@Warning#1{}%
491
492 \endinput