Debian Codegraph @

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

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