Debian Codegraph @

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

raw
1 % $Id: tex-live.sty 19329 2010-07-10 00:44:42Z 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}[2009/08/23 v1.7 TeX Live documentation 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 \RequirePackage{lmodern}
24 \usepackage{textcomp}% including \textbullet
25 \def\p.{p.\,}
26
27 % for a proper \acro command.
28 \RequirePackage{relsize}
29 %\DeclareRobustCommand{\acro}[1]{\textscale{.9}{#1}\@}
30 \def\acro#1{\textscale{.9}{#1}\@}
31 %
32 \RequirePackage{fancyvrb}
33 \DefineVerbatimEnvironment{verbatim}{Verbatim}{fontsize=\normalsize}
34 \DefineVerbatimEnvironment{fverbatim}{Verbatim}{fontsize=\footnotesize}
35 \DefineVerbatimEnvironment{sverbatim}{Verbatim}{fontsize=\small}
36 \DefineVerbatimEnvironment{boxedverbatim}
37 {Verbatim}{fontsize=\footnotesize,frame=single}
38 \DefineVerbatimEnvironment{Verbatim}{Verbatim}{fontsize=\normalsize}
39 \def\verbatiminput#1{\VerbatimInput[fontsize=\scriptsize]{#1}}
40 \def\boxedverbatiminput#1{\VerbatimInput[frame=single,fontsize=\scriptsize]{#1}}
41 \def\listinginput#1#2{\VerbatimInput[fontsize=\scriptsize,firstnumber=#1,numbers=left]{#2}}
42 \MakeShortVerb\|
43 %
44 %
45 % Done with packages.
46 %
47 % emacs-page page layout.
48 %
49 %ltr \advance\textwidth by 1.1in
50 %ltr \advance\oddsidemargin by -.55in
51 %ltr \advance\evensidemargin by -.55in
52 %ltr %
53 %ltr \advance\textheight by 1in
54 %ltr \advance\topmargin by -.5in
55 %ltr \advance\footskip by -.5in
56 %ltr %
57 \message{dimens: textwidth=\the\textwidth\space
58 oddsidemargin=\the\oddsidemargin\space
59 evensidemargin=\the\evensidemargin\space
60 textheight=\the\textheight\space
61 topmargin=\the\topmargin\space
62 footskip=\the\footskip}
63 %
64 % with settings above, and without a4 (hence letter):
65 % textwidth=424.49744pt oddsidemargin=22.25128pt evensidemargin=22.25128pt
66 % textheight=622.26999pt topmargin=-20.135pt footskip=-6.135pt
67 %
68 % with default a4paper geometry settings (not enough height):
69 % textwidth=418.25368pt oddsidemargin=17.3571pt evensidemargin=17.3571pt
70 % textheight=591.5302pt topmargin=-7.86334pt footskip=30.0pt
71 %
72 % with geometry settings [a4paper,hscale=0.75,lines=60,vmarginratio=10:8]:
73 % textwidth=448.1309pt oddsidemargin=2.41849pt evensidemargin=2.41849pt
74 % textheight=718.0pt topmargin=-38.68848pt footskip=30.0pt
75
76 %
77 \pagestyle{headings}
78 %
79 % LaTeX parameters.
80 \renewcommand{\topfraction}{0.85}
81 \renewcommand{\floatpagefraction}{0.86}
82 \renewcommand{\textfraction}{0.1}
83 \renewcommand{\abovecaptionskip}{4pt}
84 \renewcommand{\belowcaptionskip}{4pt}
85 \setcounter{tocdepth}{3}
86 \setcounter{secnumdepth}{3}
87 \setcounter{topnumber}{5}
88 \setcounter{totalnumber}{5}
89 %
90 % linebreaking, etc.
91 \hbadness=4000
92 \vbadness=4000
93 \emergencystretch=.1\hsize
94 \relpenalty=500
95 %
96 \def\slash{/\penalty\z@\hskip\z@skip }
97 %
98 % various sorts of names
99 \newcommand*{\pkgname}[1]{\textsf{#1}}% package name
100 \newcommand*{\optname}[1]{\texttt{#1}}% (package,class) option name
101 \newcommand*{\cmdname}[1]{\textsf{#1}}% command name
102 \newcommand*{\colname}[1]{\emph{#1}}% collection name
103 \newcommand*{\dirname}[1]{\path{#1}}% directory name
104 \def\filename#1{\path{#1}}% file name
105 \newcommand*{\envname}[1]{\texttt{#1}}% environment variable name
106 \newcommand{\code}[1]{\texttt{#1}}
107 \newcommand{\file}[1]{\texttt{#1}}
108 \newcommand{\prog}[1]{\textsf{#1}}% same as \cmdname
109 \newcommand{\samp}[1]{`\texttt{#1}'}
110 \newcommand{\var}[1]{{\sl #1}}% not \textsl, for roman not typewriter slanted.
111 \newcommand{\ttvar}[1]{\texttt{\var{#1}}}
112 %
113 % underlined command input.
114 %\def\Ucom#1{%
115 % \uline{\rule[-.2\baselineskip]{0pt}{.9\baselineskip}\ttfamily #1}}
116 % bold command input
117 \def\Ucom#1{{\bfseries\ttfamily #1}}
118 %
119 % \CDref is for url's with a #, where we need to write the target url and
120 % displayed url separately in the input, due to catcode madness.
121 % (We could simplify/remove this next time, I think.)
122 \def\CDref#1#2{\texttt{#1}}
123 %
124 % \OnCD no longer has any use at all, since we don't have unpacked files
125 % on the DVD and it has never worked when reading the PDF online.
126 \def\OnCD#1{\path{#1}}
127 %
128 % \OnCD is currently for any other reference to a file or directory in
129 % the distribution. PDF readers only open .pdf files, though, so we
130 % should change this to only use \href for those. Or more likely use
131 % different macros in the source.
132 %\def\OnCD#1{\href{../../../../#1}{\path{#1}}}
133 %
134 % \href incorrectly appends .pdf to anything without an extension; these
135 % definitions using \hyper@linkurl do not, but they fail for .pdf
136 % references -- which are the only ones that work anyway. So this is
137 % useless, in practice.
138 %\def\CDref#1#2{\hyper@linkurl{#2}{../../../../#1}}
139 %\def\OnCD#1{\hyper@linkurl{\path{#1}}{../../../../#1}}
140
141 % GUI menu/button/tab sequence:
142 \def\guiseq#1{\textsf{#1}}
143 \def\arw{\unskip$\rightarrow$\ignorespaces}
144 %
145 % Special names.
146 \def\dpi{$\,$dpi\xspace}
147 \def\bs{{\protect\normalfont\ttfamily\char'134}}
148 \DeclareRobustCommand{\cs}[1]{{\normalfont\ttfamily\char`\\#1}}
149 \def\Q#1{\par\vskip6pt\leftline{#1}\par}
150 \def\hyph{-}
151 %
152 % many abbreviations.
153 \def\AllTeX{(\La\kern-.075em)\kern-.075em\TeX}
154 \def\AFMtoTFM{\cmdname{AFM2TFM}\null}
155 \def\bv{\emph{Baskerville}}
156 \let\BV=\bv
157 \newcommand{\CS}{$\mathcal{C}\kern-.1667em\lower.5ex%
158 \hbox{$\mathcal{S}$}\kern-.075em $}
159 \def\Dash{\unskip\nobreak\thinspace---\thinspace\ignorespaces}
160 \def\dvicopy{\cmdname{dvicopy}}
161 \def\dvidvi{\cmdname{dvidvi}}
162 \def\dvips{\cmdname{dvips}}
163 \def\eTeX{$\varepsilon$-\TeX}
164 \def\fpTeX{\textrm{fp}\TeX\xspace}
165 \def\GFtoDVI{\cmdname{GFtoDVI}\null}
166 \def\GFtoPK{\cmdname{GFtoPK}\null}
167 \def\GFtype{\cmdname{GFtype}}
168 \def\GUI{\acro{GUI}\xspace}
169 \def\KPS{Kpathsea}
170 % This code % is hacked from its definition of \cs{LaTeX}; it allows
171 % slants (for example) to propagate into the raised (small) `A':
172 \newcommand{\La}%
173 {L\kern-.36em
174 {\setbox0\hbox{T}%
175 \vbox to\ht0{\hbox{$\m@th$%
176 \csname S@\f@size\endcsname
177 \fontsize\sf@size\z@
178 \math@fontsfalse\selectfont
179 A}%
180 \vss}%
181 }}
182 \def\OMEGA{$\Omega$}
183 \def\OzMF{OzMF}
184 \def\OzMP{OzMP}
185 \def\OzTeX{O\kern-.03em z\kern-.15em\TeX}
186 \def\PKtype{\cmdname{PKtype}}
187 \def\PLtoTF{\cmdname{PLtoTF}\null}
188 \def\ProTeXt{pro\TeX t}
189 \def\teTeX{\textrm{te}\TeX\xspace}
190 \def\TeXLive{\TeX{} Live\xspace}
191 \def\TFtoPL{\cmdname{TFtoPL}\null}
192 \def\TK{\TeX\ Collection}
193 \let\TL=\TeXLive
194 \def\TypeI{Type~1}
195 \def\VFtoVP{\cmdname{VFtoVP}\null}
196 \def\VPtoVF{\cmdname{VPtoVF}\null}
197 \def\Thanh{H\`an~Th\ifx % get Unicode char in tex4ht's HTML output
198 \HCode\UnDef\^e\llap{\raise 0.5ex\hbox{\'{}}}\else
199 \HCode{\string&\#x1EBF;}\fi~Th\`anh}
200 \def\XEmTeX{\textrm{XEm}\TeX\xspace}
201 \def\XEmacs{\textrm{XEmacs}\xspace}
202 \def\XeTeX{Xe\TeX}
203 \def\Webc{Web2C}
204 \providecommand*{\CD}{\acro{CD}\xspace}
205 \providecommand*{\CTAN}{\acro{CTAN}\xspace}
206 \providecommand*{\DVD}{\texorpdfstring{\acro{DVD}}{DVD}\xspace}
207 \providecommand*{\GNU}{\acro{GNU}\xspace}
208 \providecommand*{\HTML}{\acro{HTML}\xspace}
209 \providecommand*{\ISO}{\acro{ISO}\xspace}
210 \providecommand*{\MacOSX}{Mac\,\acro{OS\,X}\xspace}
211 \providecommand*{\PS}{Post\-Script\xspace}
212 \providecommand*{\TDS}{\acro{TDS}\xspace}
213 \providecommand*{\dvi}{\acro{DVI}\xspace}
214 \providecommand*{\web}{\texttt{WEB}\xspace}
215
216 % Include an image.
217 % #1 - name of image (pictures/#1.jpg, always .jpg please)
218 % #2 - bb for html
219 % #3 - width for TeX
220 %
221 \def\tlimage#1#2#3{%
222 \ifnum \Status=2 % html, want relative path in output
223 \includegraphics[#2]{../../general/texlive-common/pictures/#1.jpg}
224 \else % not html, handled by TEXINPUTS in Makefile
225 \includegraphics[width=#3]{pictures/#1.jpg}
226 \fi
227 \\[5mm]
228 }
229
230 \def\tlpng#1#2{%
231 \ifnum \Status=2 % html, want relative path in output
232 \includegraphics[bb=0 0 1 1]{#1.png}%
233 \else % not html, handled by TEXINPUTS in Makefile
234 \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 % read our config file, live4ht.cfg; q.v., for more definitions.
330 % hyperref load must come after the tex4ht load.
331 \RequirePackage[live4ht]{tex4ht}
332 \RequirePackage[tex4ht]{hyperref} \hyperlinkfileprefix{}
333 % definitions need simplifying for TeX4ht to make relative paths work.
334 \def\CDref#1#2{\href{../../../../#1}{#2}}
335 \def\OnCD#1{\href{../../../../#1}{#1}}
336 \def\htmlanchor#1{\HCode{<a id="#1"></a>}}
337 \or
338 % \Status = 3
339 \typeout{TeX Live documentation as a Baskerville issue}
340 \@ifundefined{Fonts}%
341 {\RequirePackage{ae}}%
342 {\RequirePackage[T1]{\Fonts}}
343 \RequirePackage{bvoutln}% outline of baskerville
344 \SingleColumnfalse
345 \RequirePackage{multicol}
346 \or
347 % \Status = 4
348 \typeout{TeX Live documentation as a TUB article}
349 \@ifundefined{Fonts}%
350 {\RequirePackage{ae}}%
351 {\RequirePackage[T1]{\Fonts}}
352 \SingleColumnfalse
353 \newenvironment{multicols}[1]{}{}
354 \fi
355 %
356 \ifnum \Status=4
357 \else
358 \RequirePackage{texnames}
359 \providecommand\TeXXeT{\TeX-{}-%
360 \kern-.1emX\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@}
361 \def\MP{MetaPost}
362 \let\mf\MF
363 \newcommand\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
364 \newcommand\MIKTEX{MiK\kern-.025em \TeX}% per www.miktex.org
365 % from pictex.tex:
366 \ifx\PiC\undefined \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \fi
367 \ifx\PiCTeX\undefined \def\PiCTeX{\PiC\kern-.11em\TeX} \fi
368 \fi
369 %
370 % hacking at sections etc., to pay attention to baskerville status
371 \newcommand{\@condend@multicols}{%
372 \ifSingleColumn
373 \else
374 \def\@tempa{multicols}%
375 \ifx\@tempa\@currenvir
376 \end{multicols}%
377 \fi
378 \fi
379 }
380 \let\Section\section
381 \renewcommand{\section}{%
382 \@ifstar
383 {\Section*}%
384 {%
385 \@condend@multicols
386 \@dblarg\@full@section
387 }%
388 }
389 \def\@full@section[#1]#2{%
390 \Section[#1]{#2}%
391 \ifSingleColumn\else\begin{multicols}{2}\fi
392 }
393 \let\SubSection\subsection
394 \renewcommand{\subsection}{%
395 \@ifstar{\SubSection*}%
396 {%
397 \@condend@multicols
398 \@dblarg\@full@subsection
399 }
400 }
401 \def\@full@subsection[#1]#2{%
402 \SubSection[#1]{#2}%
403 \ifSingleColumn\else\begin{multicols}{2}\fi
404 }
405
406 % calm things down a bit if we're in a multiple-column version
407 \ifSingleColumn
408 \else
409 \def\@listI{\leftmargin\leftmargini
410 \parsep \z@
411 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
412 \itemsep \z@ \@plus .1\p@
413 }
414 \let\@listi\@listI
415 \@listi
416 \def\@listii{\leftmargin\leftmarginii
417 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
418 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
419 \parsep \z@
420 \itemsep \z@ \@plus .1\p@
421 }
422 \def\@listiii{\leftmargin\leftmarginiii
423 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
424 \topsep 1\p@ \@plus 1\p@ \@minus 1\p@
425 \parsep \z@
426 \partopsep \z@
427 \itemsep \topsep
428 }
429 \def\@listiv{\leftmargin\leftmarginiv
430 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
431 }
432 \def\@listv{\leftmargin\leftmarginv
433 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
434 }
435 \def\@listvi{\leftmargin\leftmarginvi
436 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
437 }
438 \fi
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