Debian Codegraph @

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

raw
1 % $Id: tex-live.sty 15704 2009-10-08 22:57:44Z 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=\scriptsize,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 \newcommand*{\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 is currently for any other reference to a file or directory in
125 % the distribution. PDF readers only open .pdf files, though, so we
126 % should change this to only use \href for those. Or more likely use
127 % different macros in the source.
128 \def\OnCD#1{\href{../../../../#1}{\path{#1}}}
129 %
130 % \href incorrectly appends .pdf to anything without an extension; these
131 % definitions using \hyper@linkurl do not, but they fail for .pdf
132 % references -- which are the only ones that work anyway. So this is
133 % useless, in practice.
134 %\def\CDref#1#2{\hyper@linkurl{#2}{../../../../#1}}
135 %\def\OnCD#1{\hyper@linkurl{\path{#1}}{../../../../#1}}
136
137 % GUI menu/button/tab sequence:
138 \def\guiseq#1{\textsf{#1}}
139 \def\arw{\unskip$\rightarrow$\ignorespaces}
140 %
141 % Special names.
142 \def\dpi{$\,$dpi\xspace}
143 \def\bs{{\protect\normalfont\ttfamily\char'134}}
144 \DeclareRobustCommand{\cs}[1]{{\normalfont\ttfamily\char`\\#1}}
145 \def\Q#1{\par\vskip6pt\leftline{#1}\par}
146 \def\hyph{-}
147 %
148 % many abbreviations.
149 \def\AllTeX{(\La\kern-.075em)\kern-.075em\TeX}
150 \def\AFMtoTFM{\cmdname{AFM2TFM}\null}
151 \def\bv{\emph{Baskerville}}
152 \let\BV=\bv
153 \newcommand{\CS}{$\mathcal{C}\kern-.1667em\lower.5ex%
154 \hbox{$\mathcal{S}$}\kern-.075em $}
155 \def\Dash{\unskip\nobreak\thinspace---\thinspace\ignorespaces}
156 \def\dvicopy{\cmdname{dvicopy}}
157 \def\dvidvi{\cmdname{dvidvi}}
158 \def\dvips{\cmdname{dvips}}
159 \def\eTeX{$\varepsilon$-\TeX}
160 \def\fpTeX{\textrm{fp}\TeX\xspace}
161 \def\GFtoDVI{\cmdname{GFtoDVI}\null}
162 \def\GFtoPK{\cmdname{GFtoPK}\null}
163 \def\GFtype{\cmdname{GFtype}}
164 \def\GUI{\acro{GUI}\xspace}
165 \def\KPS{Kpathsea}
166 % This code % is hacked from its definition of \cs{LaTeX}; it allows
167 % slants (for example) to propagate into the raised (small) `A':
168 \newcommand{\La}%
169 {L\kern-.36em
170 {\setbox0\hbox{T}%
171 \vbox to\ht0{\hbox{$\m@th$%
172 \csname S@\f@size\endcsname
173 \fontsize\sf@size\z@
174 \math@fontsfalse\selectfont
175 A}%
176 \vss}%
177 }}
178 \def\OMEGA{$\Omega$}
179 \def\OzMF{OzMF}
180 \def\OzMP{OzMP}
181 \def\OzTeX{O\kern-.03em z\kern-.15em\TeX}
182 \def\PKtype{\cmdname{PKtype}}
183 \def\PLtoTF{\cmdname{PLtoTF}\null}
184 \def\ProTeXt{pro\TeX t}
185 \def\teTeX{\textrm{te}\TeX\xspace}
186 \def\TeXLive{\TeX{} Live\xspace}
187 \def\TFtoPL{\cmdname{TFtoPL}\null}
188 \def\TK{\TeX\ Collection}
189 \let\TL=\TeXLive
190 \def\TypeI{Type~1}
191 \def\VFtoVP{\cmdname{VFtoVP}\null}
192 \def\VPtoVF{\cmdname{VPtoVF}\null}
193 \def\Thanh{H\`an~Th\ifx % get Unicode char in tex4ht's HTML output
194 \HCode\UnDef\^e\llap{\raise 0.5ex\hbox{\'{}}}\else
195 \HCode{\string&\#x1EBF;}\fi~Th\`anh}
196 \def\XEmTeX{\textrm{XEm}\TeX\xspace}
197 \def\XEmacs{\textrm{XEmacs}\xspace}
198 \def\XeTeX{Xe\TeX\xspace}
199 \def\Webc{Web2C}
200 \providecommand*{\CD}{\acro{CD}\xspace}
201 \providecommand*{\CTAN}{\acro{CTAN}\xspace}
202 \providecommand*{\DVD}{\texorpdfstring{\acro{DVD}}{DVD}\xspace}
203 \providecommand*{\GNU}{\acro{GNU}\xspace}
204 \providecommand*{\HTML}{\acro{HTML}\xspace}
205 \providecommand*{\ISO}{\acro{ISO}\xspace}
206 \providecommand*{\MacOSX}{Mac\,\acro{OS\,X}\xspace}
207 \providecommand*{\PS}{Post\-Script\xspace}
208 \providecommand*{\TDS}{\acro{TDS}\xspace}
209 \providecommand*{\dvi}{\acro{DVI}\xspace}
210 \providecommand*{\web}{\texttt{WEB}\xspace}
211
212 % Include an image.
213 % #1 - name of image (pictures/#1.jpg, always .jpg please)
214 % #2 - bb for html
215 % #3 - width for TeX
216 %
217 \def\tlimage#1#2#3{%
218 \ifnum \Status=2 % html, want relative path in output
219 \includegraphics[#2]{../../general/texlive-common/pictures/#1.jpg}
220 \else % not html, handled by TEXINPUTS in Makefile
221 \includegraphics[width=#3]{pictures/#1.jpg}
222 \fi
223 \\[5mm]
224 }
225
226 \def\tlpng#1#2{%
227 \ifnum \Status=2 % html, want relative path in output
228 \includegraphics[bb=0 0 1 1]{#1.png}%
229 \else % not html, handled by TEXINPUTS in Makefile
230 \includegraphics[width=#2]{#1.png}%
231 \fi
232 }
233 %
234 % description-like environment that uses tt instead of bf, and doesn't
235 % go to the left margin. Without the \hfil, get an underfull box.
236 % Don't know why \descriptionlabel doesn't.
237 %
238 \newenvironment{ttdescription}
239 {\begin{list}{label must be supplied}{%
240 \itemsep=0pt % these lists tend to have short descriptions
241 \parindent=0pt
242 \let\makelabel=\ttdescriptionlabel}}%
243 {\end{list}}
244 \newcommand*\ttdescriptionlabel[1]{\hspace\labelsep
245 \normalfont\ttfamily #1\hfil}
246 %
247 % Likewise, for commands using sans serif.
248 \newenvironment{cmddescription}
249 {\begin{list}{label must be supplied}{%
250 \itemsep=0pt
251 \let\makelabel=\cmddescriptionlabel}}%
252 {\end{list}}
253 \newcommand*\cmddescriptionlabel[1]{\hspace\labelsep
254 \normalfont\sffamily #1\hfil}
255
256 % General squeezed itemize/enumerate.
257 \newenvironment{itemize*}%
258 {\begin{itemize}%
259 \setlength{\itemsep}{0pt}%
260 \setlength{\parskip}{0pt}}%
261 {\end{itemize}}
262
263 \newenvironment{enumerate*}%
264 {\begin{enumerate}%
265 \setlength{\itemsep}{0pt}%
266 \setlength{\parskip}{0pt}}%
267 {\end{enumerate}}
268
269 \newsavebox{\wbox}
270 \newenvironment{warningbox}
271 {\begin{lrbox}{\wbox}
272 \begin{minipage}{.95\textwidth}}
273 {\end{minipage}\end{lrbox}\fbox{\usebox{\wbox}}}
274 %
275 % lrbox is used as a representation marking. I changed it to
276 % lrBox in tne source file, to get closer to logical marking
277 \newsavebox{\mylrbox}
278 \newenvironment{lrBox}
279 {\begin{lrbox}{\mylrbox}}
280 {\end{lrbox}}
281
282
283 % emacs-page output setup
284 %
285 \ifx \HCode\UnDef
286 \providecommand{\Status}{0}% running TeX
287 \else
288 \providecommand{\Status}{2}% running TeX4ht
289 \fi
290 %\typeout{Status is \Status}
291 %
292 \newif\ifSingleColumn
293 %
294 % By default, we won't be creating hyperlinks.
295 \def\href#1#2{#2}
296 \def\hypertarget#1#2{}
297 \def\email#1{\href{mailto:#1}{\path{#1}}} % \path comes from url
298 \def\htmlanchor#1{}
299 %
300 \definecolor{hypercolor}{rgb}{0.5,0.0,0.5} % purplish external links.
301 %
302 %
303 \ifcase\Status
304 % \Status = 0
305 \typeout{TeX Live documentation in DVI format}
306 \SingleColumntrue
307 \newenvironment{multicols}[1]{}{}
308 \or
309 % \Status = 1
310 \typeout{TeX Live documentation in PDF format}
311 \RequirePackage[breaklinks,
312 colorlinks,linkcolor=hypercolor,citecolor=hypercolor,
313 urlcolor=hypercolor,filecolor=hypercolor,
314 bookmarksopen,
315 %pdfstartview={FitBH -320000}, % fails with acrobat7
316 hyperindex]
317 {hyperref}
318 \SingleColumntrue
319 \newenvironment{multicols}[1]{}{}
320 \or
321 % \Status = 2
322 \typeout{TeX Live documentation in HTML format}
323 \SingleColumntrue
324 \newenvironment{multicols}[1]{}{}
325 % read our config file, live4ht.cfg; q.v., for more definitions.
326 % hyperref load must come after the tex4ht load.
327 \RequirePackage[live4ht]{tex4ht}
328 \RequirePackage[tex4ht]{hyperref} \hyperlinkfileprefix{}
329 % definitions need simplifying for TeX4ht to make relative paths work.
330 \def\CDref#1#2{\href{../../../../#1}{#2}}
331 \def\OnCD#1{\href{../../../../#1}{#1}}
332 \def\htmlanchor#1{\HCode{<a id="#1"></a>}}
333 \or
334 % \Status = 3
335 \typeout{TeX Live documentation as a Baskerville issue}
336 \@ifundefined{Fonts}%
337 {\RequirePackage{ae}}%
338 {\RequirePackage[T1]{\Fonts}}
339 \RequirePackage{bvoutln}% outline of baskerville
340 \SingleColumnfalse
341 \RequirePackage{multicol}
342 \or
343 % \Status = 4
344 \typeout{TeX Live documentation as a TUB article}
345 \@ifundefined{Fonts}%
346 {\RequirePackage{ae}}%
347 {\RequirePackage[T1]{\Fonts}}
348 \SingleColumnfalse
349 \newenvironment{multicols}[1]{}{}
350 \fi
351 %
352 \ifnum \Status=4
353 \else
354 \RequirePackage{texnames}
355 \providecommand\TeXXeT{\TeX-{}-%
356 \kern-.1emX\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@}
357 \def\MP{MetaPost}
358 \let\mf\MF
359 \newcommand\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
360 \newcommand\MIKTEX{MiK\kern-.025em \TeX}% per www.miktex.org
361 % from pictex.tex:
362 \ifx\PiC\undefined \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \fi
363 \ifx\PiCTeX\undefined \def\PiCTeX{\PiC\kern-.11em\TeX} \fi
364 \fi
365 %
366 % hacking at sections etc., to pay attention to baskerville status
367 \newcommand{\@condend@multicols}{%
368 \ifSingleColumn
369 \else
370 \def\@tempa{multicols}%
371 \ifx\@tempa\@currenvir
372 \end{multicols}%
373 \fi
374 \fi
375 }
376 \let\Section\section
377 \renewcommand{\section}{%
378 \@ifstar
379 {\Section*}%
380 {%
381 \@condend@multicols
382 \@dblarg\@full@section
383 }%
384 }
385 \def\@full@section[#1]#2{%
386 \Section[#1]{#2}%
387 \ifSingleColumn\else\begin{multicols}{2}\fi
388 }
389 \let\SubSection\subsection
390 \renewcommand{\subsection}{%
391 \@ifstar{\SubSection*}%
392 {%
393 \@condend@multicols
394 \@dblarg\@full@subsection
395 }
396 }
397 \def\@full@subsection[#1]#2{%
398 \SubSection[#1]{#2}%
399 \ifSingleColumn\else\begin{multicols}{2}\fi
400 }
401
402 % calm things down a bit if we're in a multiple-column version
403 \ifSingleColumn
404 \else
405 \def\@listI{\leftmargin\leftmargini
406 \parsep \z@
407 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
408 \itemsep \z@ \@plus .1\p@
409 }
410 \let\@listi\@listI
411 \@listi
412 \def\@listii{\leftmargin\leftmarginii
413 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
414 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
415 \parsep \z@
416 \itemsep \z@ \@plus .1\p@
417 }
418 \def\@listiii{\leftmargin\leftmarginiii
419 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
420 \topsep 1\p@ \@plus 1\p@ \@minus 1\p@
421 \parsep \z@
422 \partopsep \z@
423 \itemsep \topsep
424 }
425 \def\@listiv{\leftmargin\leftmarginiv
426 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
427 }
428 \def\@listv{\leftmargin\leftmarginv
429 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
430 }
431 \def\@listvi{\leftmargin\leftmarginvi
432 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
433 }
434 \fi
435 %
436 % array package stuff
437 \def\arraybackslash{\let\\=\@arraycr}
438 \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
439 %
440 % shaded rows (using facilities of colortbl)
441 %
442 \definecolor{pale}{gray}{.9}
443 \newcount\colrow
444 \gdef\RowColor{pale}
445 \def\SetRowColor{%
446 \rowcolor{\RowColor}%
447 \global\advance\colrow by1\relax
448 \ifodd\colrow
449 \gdef\RowColor{pale}%
450 \else
451 \gdef\RowColor{white}%
452 \fi
453 }
454 % redefine to hack up a reference even though we don't need it...
455 \renewcommand\@bibitem[1]{\if@filesw \immediate\write\@auxout
456 {\string\bibcite{#1}{?}}\fi\ignorespaces}
457 %
458 % \unknownTeXlive is a dummy texlive entry for the biblio
459 \newcommand\unknownTeXlive[2][\relax]{\textbf{\textsc{unknown}}%
460 \global\@all@unknown\expandafter{\the\@all@unknown{#2}}%
461 }
462 \newtoks\@all@unknown
463 \global\@all@unknown{}
464 \AtEndDocument{\@message@unknowns}
465 \def\@message@unknowns{\edef\@tempa{\the\@all@unknown}%
466 \ifx\@tempa\@empty
467 \else
468 \def\@tempa{*** TeX Live package location of }%
469 \expandafter\@output@unknowns\the\@all@unknown\@empty
470 \fi
471 }
472 \def\@output@unknowns#1{\edef\@tempb{#1}%
473 \ifx\@tempb\@empty
474 \typeout{ unknown}%
475 \else
476 \message{\@tempa#1,}%
477 \def\@tempa{}%
478 \expandafter\@output@unknowns
479 \fi
480 }
481
482
483 % Silence font warnings about no bold typewriter in LM.
484 \def\@font@warning#1{}%
485
486 % Silence hyperref warnings about \kern.
487 \def\HyPsd@Warning#1{}%
488
489 \endinput