Debian Codegraph @

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

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