Debian Codegraph @

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

raw
1 % $Id: tex-live.sty-2004 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}[2004/11/07 v1.0 TeX Live documentation style]
7 %
8 \RequirePackage{alltt}
9 \RequirePackage{array}
10 \RequirePackage{colortbl}
11 \RequirePackage{comment}
12 \RequirePackage{graphicx}
13 \RequirePackage{here}
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 \newif\ifSingleColumn
227 \providecommand{\Status}{0}
228 %\typeout{Status is \Status}
229 %
230 % By default, we won't be creating hyperlinks.
231 \def\href#1#2{#2}
232 \def\hypertarget#1#2{}
233 \def\email#1{\href{mailto:#1}{\path{#1}}} % \path comes from url
234 %
235 \definecolor{hypercolor}{rgb}{0.5,0.0,0.5} % purplish external links.
236 %
237 %
238 \ifcase\Status
239 % \Status = 0
240 \typeout{TeX Live documentation in DVI format}
241 \SingleColumntrue
242 \newenvironment{multicols}[1]{}{}
243 \or
244 % \Status = 1
245 \typeout{TeX Live documentation in PDF format}
246 \RequirePackage[breaklinks,
247 colorlinks,linkcolor=hypercolor,citecolor=hypercolor,
248 pagecolor=hypercolor,urlcolor=hypercolor,
249 filecolor=hypercolor,
250 bookmarksopen,pdfstartview={FitBH -320000},hyperindex]
251 {hyperref}
252 \SingleColumntrue
253 \newenvironment{multicols}[1]{}{}
254 \or
255 % \Status = 2
256 \typeout{TeX Live documentation in HTML format}
257 \SingleColumntrue
258 \newenvironment{multicols}[1]{}{}
259 % read our config file, live4ht.cfg; q.v., for more definitions.
260 % hyperref load must come after the tex4ht load.
261 \RequirePackage[live4ht]{tex4ht}
262 \RequirePackage[tex4ht]{hyperref} \hyperlinkfileprefix{}
263 % definitions need simplifying for TeX4ht to make relative paths work.
264 \def\CDref#1#2{\href{../../../../#1}{#2}}
265 \def\OnCD#1{\href{../../../../#1}{#1}}
266 \or
267 % \Status = 3
268 \typeout{TeX Live documentation as a Baskerville issue}
269 \@ifundefined{Fonts}%
270 {\RequirePackage{ae}}%
271 {\RequirePackage[T1]{\Fonts}}
272 \RequirePackage{bvoutln}% outline of baskerville
273 \SingleColumnfalse
274 \RequirePackage{multicol}
275 \or
276 % \Status = 4
277 \typeout{TeX Live documentation as a TUB article}
278 \@ifundefined{Fonts}%
279 {\RequirePackage{ae}}%
280 {\RequirePackage[T1]{\Fonts}}
281 \SingleColumnfalse
282 \newenvironment{multicols}[1]{}{}
283 \fi
284 %
285 \ifnum \Status=4
286 \else
287 \RequirePackage{texnames}
288 \providecommand\TeXXeT{\TeX-{}-%
289 \kern-.1emX\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@}
290 \def\MP{MetaPost}
291 \let\mf\MF
292 \newcommand\ConTeXt{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
293 \newcommand\MIKTEX{MiK\kern-.025em \TeX}% per www.miktex.org
294 % from pictex.tex:
295 \ifx\PiC\undefined \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \fi
296 \ifx\PiCTeX\undefined \def\PiCTeX{\PiC\kern-.11em\TeX} \fi
297 \fi
298 %
299 % hacking at sections etc., to pay attention to baskerville status
300 \newcommand{\@condend@multicols}{%
301 \ifSingleColumn
302 \else
303 \def\@tempa{multicols}%
304 \ifx\@tempa\@currenvir
305 \end{multicols}%
306 \fi
307 \fi
308 }
309 \let\Section\section
310 \renewcommand{\section}{%
311 \@ifstar
312 {\Section*}%
313 {%
314 \@condend@multicols
315 \@dblarg\@full@section
316 }%
317 }
318 \def\@full@section[#1]#2{%
319 \Section[#1]{#2}%
320 \ifSingleColumn\else\begin{multicols}{2}\fi
321 }
322 \let\SubSection\subsection
323 \renewcommand{\subsection}{%
324 \@ifstar{\SubSection*}%
325 {%
326 \@condend@multicols
327 \@dblarg\@full@subsection
328 }
329 }
330 \def\@full@subsection[#1]#2{%
331 \SubSection[#1]{#2}%
332 \ifSingleColumn\else\begin{multicols}{2}\fi
333 }
334
335 % calm things down a bit if we're in a multiple-column version
336 \ifSingleColumn
337 \else
338 \def\@listI{\leftmargin\leftmargini
339 \parsep \z@
340 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
341 \itemsep \z@ \@plus .1\p@
342 }
343 \let\@listi\@listI
344 \@listi
345 \def\@listii{\leftmargin\leftmarginii
346 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
347 \topsep 2\p@ \@plus 1\p@ \@minus 1\p@
348 \parsep \z@
349 \itemsep \z@ \@plus .1\p@
350 }
351 \def\@listiii{\leftmargin\leftmarginiii
352 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
353 \topsep 1\p@ \@plus 1\p@ \@minus 1\p@
354 \parsep \z@
355 \partopsep \z@
356 \itemsep \topsep
357 }
358 \def\@listiv{\leftmargin\leftmarginiv
359 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
360 }
361 \def\@listv{\leftmargin\leftmarginv
362 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
363 }
364 \def\@listvi{\leftmargin\leftmarginvi
365 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
366 }
367 \fi
368 %
369 % array package stuff
370 \def\arraybackslash{\let\\=\@arraycr}
371 \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
372 %
373 % shaded rows (using facilities of colortbl)
374 %
375 \definecolor{pale}{gray}{.9}
376 \newcount\colrow
377 \gdef\RowColor{pale}
378 \def\SetRowColor{%
379 \rowcolor{\RowColor}%
380 \global\advance\colrow by1\relax
381 \ifodd\colrow
382 \gdef\RowColor{pale}%
383 \else
384 \gdef\RowColor{white}%
385 \fi
386 }
387 % redefine to hack up a reference even though we don't need it...
388 \renewcommand\@bibitem[1]{\if@filesw \immediate\write\@auxout
389 {\string\bibcite{#1}{?}}\fi\ignorespaces}
390 %
391 % \unknownTeXlive is a dummy texlive entry for the biblio
392 \newcommand\unknownTeXlive[2][\relax]{\textbf{\textsc{unknown}}%
393 \global\@all@unknown\expandafter{\the\@all@unknown{#2}}%
394 }
395 \newtoks\@all@unknown
396 \global\@all@unknown{}
397 \AtEndDocument{\@message@unknowns}
398 \def\@message@unknowns{\edef\@tempa{\the\@all@unknown}%
399 \ifx\@tempa\@empty
400 \else
401 \def\@tempa{*** TeX live package location of }%
402 \expandafter\@output@unknowns\the\@all@unknown\@empty
403 \fi
404 }
405 \def\@output@unknowns#1{\edef\@tempb{#1}%
406 \ifx\@tempb\@empty
407 \typeout{ unknown}%
408 \else
409 \message{\@tempa#1,}%
410 \def\@tempa{}%
411 \expandafter\@output@unknowns
412 \fi
413 }
414
415
416 % Silence font warnings about no bold typewriter in LM.
417 \def\@font@warning#1{}%
418
419 % Silence hyperref warnings about \kern.
420 \def\HyPsd@Warning#1{}%
421
422 \endinput