Debian Codegraph @

texmf-dist/doc/pdftex/tests/38-interword-space-at-font-switch/tex-live.sty

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