| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% File: hypdoc.dtx |
| 4 |
% Version: 2023-10-26 v1.19 |
| 5 |
% Info: Hyper extensions for doc.sty |
| 6 |
% |
| 7 |
% Copyright (C) |
| 8 |
% 2002, 2006, 2007, 2009-2011 Heiko Oberdiek |
| 9 |
% 2016-2023 Oberdiek Package Support Group |
| 10 |
% https://github.com/ho-tex/hypdoc/issues |
| 11 |
% |
| 12 |
% This work may be distributed and/or modified under the |
| 13 |
% conditions of the LaTeX Project Public License, either |
| 14 |
% version 1.3c of this license or (at your option) any later |
| 15 |
% version. This version of this license is in |
| 16 |
% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 17 |
% and the latest version of this license is in |
| 18 |
% https://www.latex-project.org/lppl.txt |
| 19 |
% and version 1.3 or later is part of all distributions of |
| 20 |
% LaTeX version 2005/12/01 or later. |
| 21 |
% |
| 22 |
% This work has the LPPL maintenance status "maintained". |
| 23 |
% |
| 24 |
% The Current Maintainers of this work are |
| 25 |
% Heiko Oberdiek and the Oberdiek Package Support Group |
| 26 |
% https://github.com/ho-tex/hypdoc/issues |
| 27 |
% |
| 28 |
% This work consists of the main source file hypdoc.dtx |
| 29 |
% and the derived files |
| 30 |
% hypdoc.sty, hypdoc.pdf, hypdoc.ins, hypdoc.drv. |
| 31 |
% |
| 32 |
% Distribution: |
| 33 |
% CTAN:macros/latex/contrib/hypdoc/hypdoc.dtx |
| 34 |
% CTAN:macros/latex/contrib/hypdoc/hypdoc.pdf |
| 35 |
% |
| 36 |
% Unpacking: |
| 37 |
% (a) If hypdoc.ins is present: |
| 38 |
% tex hypdoc.ins |
| 39 |
% (b) Without hypdoc.ins: |
| 40 |
% tex hypdoc.dtx |
| 41 |
% (c) If you insist on using LaTeX |
| 42 |
% latex \let\install=y\input{hypdoc.dtx} |
| 43 |
% (quote the arguments according to the demands of your shell) |
| 44 |
% |
| 45 |
% Documentation: |
| 46 |
% (a) If hypdoc.drv is present: |
| 47 |
% latex hypdoc.drv |
| 48 |
% (b) Without hypdoc.drv: |
| 49 |
% latex hypdoc.dtx; ... |
| 50 |
% The class ltxdoc loads the configuration file ltxdoc.cfg |
| 51 |
% if available. Here you can specify further options, e.g. |
| 52 |
% use A4 as paper format: |
| 53 |
% \PassOptionsToClass{a4paper}{article} |
| 54 |
% |
| 55 |
% Programm calls to get the documentation (example): |
| 56 |
% pdflatex hypdoc.dtx |
| 57 |
% makeindex -s gind.ist hypdoc.idx |
| 58 |
% pdflatex hypdoc.dtx |
| 59 |
% makeindex -s gind.ist hypdoc.idx |
| 60 |
% pdflatex hypdoc.dtx |
| 61 |
% |
| 62 |
% Installation: |
| 63 |
% TDS:tex/latex/hypdoc/hypdoc.sty |
| 64 |
% TDS:doc/latex/hypdoc/hypdoc.pdf |
| 65 |
% TDS:source/latex/hypdoc/hypdoc.dtx |
| 66 |
% |
| 67 |
%<*ignore> |
| 68 |
\begingroup |
| 69 |
\catcode123=1 % |
| 70 |
\catcode125=2 % |
| 71 |
\def\x{LaTeX2e}% |
| 72 |
\expandafter\endgroup |
| 73 |
\ifcase 0\ifx\install y1\fi\expandafter |
| 74 |
\ifx\csname processbatchFile\endcsname\relax\else1\fi |
| 75 |
\ifx\fmtname\x\else 1\fi\relax |
| 76 |
\else\csname fi\endcsname |
| 77 |
%</ignore> |
| 78 |
%<*install> |
| 79 |
\input docstrip.tex |
| 80 |
\Msg{************************************************************************} |
| 81 |
\Msg{* Installation} |
| 82 |
\Msg{* Package: hypdoc 2023-10-26 v1.19 Hyper extensions for doc.sty (HO)} |
| 83 |
\Msg{************************************************************************} |
| 84 |
|
| 85 |
\keepsilent |
| 86 |
\askforoverwritefalse |
| 87 |
|
| 88 |
\let\MetaPrefix\relax |
| 89 |
\preamble |
| 90 |
|
| 91 |
This is a generated file. |
| 92 |
|
| 93 |
Project: hypdoc |
| 94 |
Version: 2023-10-26 v1.19 |
| 95 |
|
| 96 |
Copyright (C) |
| 97 |
2002, 2006, 2007, 2009-2011 Heiko Oberdiek |
| 98 |
2016-2023 Oberdiek Package Support Group |
| 99 |
|
| 100 |
This work may be distributed and/or modified under the |
| 101 |
conditions of the LaTeX Project Public License, either |
| 102 |
version 1.3c of this license or (at your option) any later |
| 103 |
version. This version of this license is in |
| 104 |
https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 105 |
and the latest version of this license is in |
| 106 |
https://www.latex-project.org/lppl.txt |
| 107 |
and version 1.3 or later is part of all distributions of |
| 108 |
LaTeX version 2005/12/01 or later. |
| 109 |
|
| 110 |
This work has the LPPL maintenance status "maintained". |
| 111 |
|
| 112 |
The Current Maintainers of this work are |
| 113 |
Heiko Oberdiek and the Oberdiek Package Support Group |
| 114 |
https://github.com/ho-tex/hypdoc/issues |
| 115 |
|
| 116 |
|
| 117 |
This work consists of the main source file hypdoc.dtx |
| 118 |
and the derived files |
| 119 |
hypdoc.sty, hypdoc.pdf, hypdoc.ins, hypdoc.drv. |
| 120 |
|
| 121 |
\endpreamble |
| 122 |
\let\MetaPrefix\DoubleperCent |
| 123 |
|
| 124 |
\generate{% |
| 125 |
\file{hypdoc.ins}{\from{hypdoc.dtx}{install}}% |
| 126 |
\file{hypdoc.drv}{\from{hypdoc.dtx}{driver}}% |
| 127 |
\usedir{tex/latex/hypdoc}% |
| 128 |
\file{hypdoc.sty}{\from{hypdoc.dtx}{package}}% |
| 129 |
} |
| 130 |
|
| 131 |
\catcode32=13\relax% active space |
| 132 |
\let =\space% |
| 133 |
\Msg{************************************************************************} |
| 134 |
\Msg{*} |
| 135 |
\Msg{* To finish the installation you have to move the following} |
| 136 |
\Msg{* file into a directory searched by TeX:} |
| 137 |
\Msg{*} |
| 138 |
\Msg{* hypdoc.sty} |
| 139 |
\Msg{*} |
| 140 |
\Msg{* To produce the documentation run the file `hypdoc.drv'} |
| 141 |
\Msg{* through LaTeX.} |
| 142 |
\Msg{*} |
| 143 |
\Msg{* Happy TeXing!} |
| 144 |
\Msg{*} |
| 145 |
\Msg{************************************************************************} |
| 146 |
|
| 147 |
\endbatchfile |
| 148 |
%</install> |
| 149 |
%<*ignore> |
| 150 |
\fi |
| 151 |
%</ignore> |
| 152 |
%<*driver> |
| 153 |
\NeedsTeXFormat{LaTeX2e} |
| 154 |
\ProvidesFile{hypdoc.drv}% |
| 155 |
[2023-10-26 v1.19 Hyper extensions for doc.sty (HO)]% |
| 156 |
\PassOptionsToPackage{numbered}{hypdoc} |
| 157 |
\documentclass{ltxdoc} |
| 158 |
\usepackage{holtxdoc}[2011/11/22] |
| 159 |
\begin{document} |
| 160 |
\DocInput{hypdoc.dtx}% |
| 161 |
\end{document} |
| 162 |
%</driver> |
| 163 |
% \fi |
| 164 |
% |
| 165 |
% |
| 166 |
% |
| 167 |
% \GetFileInfo{hypdoc.drv} |
| 168 |
% |
| 169 |
% \title{The \xpackage{hypdoc} package} |
| 170 |
% \date{2023-10-26 v1.19} |
| 171 |
% \author{Heiko Oberdiek\thanks |
| 172 |
% {Please report any issues at \url{https://github.com/ho-tex/hypdoc/issues}}} |
| 173 |
% |
| 174 |
% \maketitle |
| 175 |
% |
| 176 |
% \begin{abstract} |
| 177 |
% This package adds hyper features to the package |
| 178 |
% \xpackage{doc} that is used in the documentation |
| 179 |
% system of \LaTeXe. Bookmarks are added and references |
| 180 |
% are linked as far as possible. |
| 181 |
% \end{abstract} |
| 182 |
% |
| 183 |
% \tableofcontents |
| 184 |
% |
| 185 |
% \section{Features} |
| 186 |
% |
| 187 |
% The package adds the following features: |
| 188 |
% \begin{description} |
| 189 |
% \item[Bookmarks:] |
| 190 |
% For supporting bookmarks package \verb|hyperref| is loaded. |
| 191 |
% Some \TeX\ code inside section titles can cause problems |
| 192 |
% during bookmark processing; these can be warnings, ugly |
| 193 |
% bookmark titles or even errors. With the help of |
| 194 |
% \verb|\pdfstringdefDisableCommands| or \verb|\texorpdfstring| |
| 195 |
% you can manage these things, see \verb|hyperref|'s package |
| 196 |
% documentation. |
| 197 |
% \item[Additional bookmarks:] |
| 198 |
% Unnumbered bookmark entries are generated for: |
| 199 |
% \begin{itemize} |
| 200 |
% \item Table of contents |
| 201 |
% \item List of figures |
| 202 |
% \item List of tables |
| 203 |
% \item Index |
| 204 |
% \item Glossary |
| 205 |
% \end{itemize} |
| 206 |
% Option \texttt{numbered} controls, whether these section or |
| 207 |
% chapters should be numbered. The exception is the table |
| 208 |
% of contents if this it would be the first numbered |
| 209 |
% section. Then just a bookmark is added. |
| 210 |
% \item[Metadata:] |
| 211 |
% The loaded package \verb|hyperref|, enforced by |
| 212 |
% option \verb|pdfusetitle|, tries to detect \verb|\title| |
| 213 |
% and \verb|\author| and sets the corresponding PDF |
| 214 |
% information fields. In case of problems see the previous |
| 215 |
% item about bookmarks. |
| 216 |
% These entries can be overwritten or new ones added by |
| 217 |
% \verb|\hypersetup| after the packages is loaded, see |
| 218 |
% documentation of package \verb|hyperref|. |
| 219 |
% \item[References, links:] Because of package \verb|\hyperref| |
| 220 |
% |\ref| become links, also \verb|\url|, footnote referencing |
| 221 |
% are supported. |
| 222 |
% \item[Index:] |
| 223 |
% The main part of this package deals with index links in order |
| 224 |
% to support the kind of index that package \verb|doc| provides. |
| 225 |
% \item[Thumbnails:] |
| 226 |
% Package \verb|thumbpdf| may additionally be loaded for the case that the |
| 227 |
% PDF file also should contain thumbnails, see the documentation |
| 228 |
% of this package. But thumbnail embedding is not really |
| 229 |
% necessary, because nowadays AcrobatReader is able to |
| 230 |
% generate and view thumbnails on the fly. |
| 231 |
% \end{description} |
| 232 |
% |
| 233 |
% \section{Usage} |
| 234 |
% |
| 235 |
% The purpose of this packages is to add PDF features to |
| 236 |
% the documentation of LaTeX packages. Thus just load |
| 237 |
% the package in the driver file that generates the |
| 238 |
% documentation: |
| 239 |
% \begin{quote} |
| 240 |
% \verb|\usepackage{hypdoc}| |
| 241 |
% \end{quote} |
| 242 |
% Package \verb|doc| is loaded by \verb|hypdoc|, thus you |
| 243 |
% also can replace a \verb|\usepackage{doc}| with this line. |
| 244 |
% At any case, the package must be loaded before macros of |
| 245 |
% package \verb|doc| such as \verb|\CodelineIndex| or |
| 246 |
% \verb|\PageIndex| are used. |
| 247 |
% |
| 248 |
% If the class \verb|ltxdoc| is used, you can also use |
| 249 |
% the configuration file for this class to add |
| 250 |
% package \verb|hypdoc|. Add the following line |
| 251 |
% to the file \verb|ltxdoc.cfg| (or create a new one): |
| 252 |
% \begin{quote} |
| 253 |
%\begin{verbatim} |
| 254 |
%\AtEndOfClass{\RequirePackage{hypdoc}} |
| 255 |
%\end{verbatim} |
| 256 |
% \end{quote} |
| 257 |
% |
| 258 |
% \subsection{Options} |
| 259 |
% |
| 260 |
% There is one option \texttt{numbered}. It controls, |
| 261 |
% whether the starred versions of section or chapter |
| 262 |
% inside \cs{tableofcontents}, \cs{listoffigures}, \dots |
| 263 |
% should be replaced by the non-star versions. |
| 264 |
% |
| 265 |
% \subsection{Simple example} |
| 266 |
% Example of a simple driver file \verb|foobar.drv| |
| 267 |
% of a package \verb|foobar|. Often the driver file |
| 268 |
% is packed in the file \verb|foobar.dtx| and can |
| 269 |
% be extracted by docstrip or if an instruction file |
| 270 |
% for docstrip is provided by: |
| 271 |
% \begin{quote} |
| 272 |
% \verb|tex foobar.ins| |
| 273 |
% \end{quote} |
| 274 |
% Note that although docstrip doesn't rely on \LaTeX, |
| 275 |
% sometimes you need to run the \verb|.ins| file through |
| 276 |
% \LaTeX. Oddly enough, often the only \LaTeX\ feature |
| 277 |
% in use is \verb|\NeedsTeXFormat{LaTeX2e}| in the first line. |
| 278 |
% \begin{quote} |
| 279 |
%\begin{verbatim} |
| 280 |
%\documentclass{ltxdoc} |
| 281 |
%\usepackage{hypdoc} |
| 282 |
%\RecordChanges |
| 283 |
%\EnableCrossrefs |
| 284 |
%\CodelineIndex |
| 285 |
%\begin{document} |
| 286 |
%\title{Title for package \texttt{foobar}} |
| 287 |
%\author{Author of package \texttt{foobar}} |
| 288 |
%\date{...} |
| 289 |
%\maketitle |
| 290 |
%\tableofcontents |
| 291 |
%\DocInput{foobar.dtx} |
| 292 |
%\PrintChanges |
| 293 |
%\PrintIndex |
| 294 |
%\end{document} |
| 295 |
%\end{verbatim} |
| 296 |
% \end{quote} |
| 297 |
% |
| 298 |
% Then compile it, for example with pdf\LaTeX. |
| 299 |
% \begin{quote} |
| 300 |
%\begin{verbatim} |
| 301 |
%pdflatex foobar.drv |
| 302 |
%makeindex -s gind.ist foobar.idx |
| 303 |
%makeindex -s gglo.ist -o foobar.gls foobar.glo |
| 304 |
%pdflatex foobar.drv |
| 305 |
%\end{verbatim} |
| 306 |
% \end{quote} |
| 307 |
% You will need several cycles until the cross references |
| 308 |
% and similar things are correct. |
| 309 |
% |
| 310 |
% \subsection{Example \texttt{source2e.tex}} |
| 311 |
% |
| 312 |
% The source code of the base of \LaTeX\ is available as |
| 313 |
% a bunch of \verb|.dtx| files. \LaTeX\ provides the file |
| 314 |
% \verb|source2e.tex| to merge them all together. |
| 315 |
% |
| 316 |
% Now you can either load package \verb|hypdoc| in a private copy |
| 317 |
% of this file (please, respect the LPPL) or use the configuration |
| 318 |
% file \verb|ltxdoc.cfg|. Example that also sets A4 paper size: |
| 319 |
% \begin{quote} |
| 320 |
%\begin{verbatim} |
| 321 |
%\PassOptionsToClass{a4paper}{article} |
| 322 |
%\AtEndOfClass{\RequirePackage{hypdoc}} |
| 323 |
%\end{verbatim} |
| 324 |
% \end{quote} |
| 325 |
% |
| 326 |
% Then \verb|source2e.tex| can be compiled by pdf\TeX, for example: |
| 327 |
% \begin{quote} |
| 328 |
%\begin{verbatim} |
| 329 |
%pdflatex source2e |
| 330 |
%makeindex -s gind.ist source2e.idx |
| 331 |
%makeindex -s gglo.ist -o source2e.glo source2e.gls |
| 332 |
%pdflatex source2e |
| 333 |
%makeindex -s gind.ist source2e.idx |
| 334 |
%makeindex -s gglo.ist -o source2e.glo source2e.gls |
| 335 |
%pdflatex source2e |
| 336 |
%\end{verbatim} |
| 337 |
% \end{quote} |
| 338 |
% |
| 339 |
% \StopEventually{ |
| 340 |
% } |
| 341 |
% |
| 342 |
% \section{Implementation} |
| 343 |
% |
| 344 |
% \begin{macrocode} |
| 345 |
%<*package> |
| 346 |
\NeedsTeXFormat{LaTeX2e} |
| 347 |
\ProvidesPackage{hypdoc}% |
| 348 |
[2023-10-26 v1.19 Hyper extensions for doc.sty (HO)]% |
| 349 |
% \end{macrocode} |
| 350 |
% The package identification is done at the top of the |.dtx| file |
| 351 |
% in order to use only one identification string. |
| 352 |
% |
| 353 |
% For unique command names this package uses |HD@| as prefix |
| 354 |
% |
| 355 |
% \subsection{Options} |
| 356 |
% |
| 357 |
% \begin{macro}{\ifHD@numbered} |
| 358 |
% \begin{macrocode} |
| 359 |
\newif\ifHD@numbered |
| 360 |
% \end{macrocode} |
| 361 |
% \end{macro} |
| 362 |
% \begin{macrocode} |
| 363 |
\DeclareOption{numbered}{\HD@numberedtrue} |
| 364 |
\ProcessOptions*\relax |
| 365 |
% \end{macrocode} |
| 366 |
% |
| 367 |
% \subsection{Package loading} |
| 368 |
% |
| 369 |
% \begin{macrocode} |
| 370 |
\RequirePackage{atveryend}[2010/03/24] |
| 371 |
\RequirePackage{doc} |
| 372 |
% \end{macrocode} |
| 373 |
% \begin{macrocode} |
| 374 |
\ifx\numexpr\@undefined |
| 375 |
\RequirePackage{calc}% |
| 376 |
\fi |
| 377 |
% \end{macrocode} |
| 378 |
% \begin{macrocode} |
| 379 |
\@ifpackageloaded{hyperref} |
| 380 |
{ |
| 381 |
\ifHy@hyperindex |
| 382 |
\PackageWarning{hypdoc}{% |
| 383 |
hyperref has been loaded before with option 'hyperindex' enabled.\MessageBreak |
| 384 |
The index will not work properly.} |
| 385 |
\fi |
| 386 |
\ifHy@pdfusetitle\else |
| 387 |
\PackageInfo{hypdoc}{% |
| 388 |
hyperref has been loaded before with option 'pdfusetitle' disabled.} |
| 389 |
\fi |
| 390 |
} |
| 391 |
{\RequirePackage[% |
| 392 |
hyperindex=false,% |
| 393 |
pdfusetitle,% |
| 394 |
]{hyperref}[2002/05/09]% |
| 395 |
} |
| 396 |
\hypersetup{% |
| 397 |
colorlinks,% |
| 398 |
plainpages=false,% |
| 399 |
bookmarksopen,% |
| 400 |
bookmarksnumbered,% |
| 401 |
bookmarksopenlevel=0,% |
| 402 |
pdfstartview={FitBH \hypercalcbp{% |
| 403 |
\paperheight-\topmargin-1in-\headheight-\headsep |
| 404 |
}},% |
| 405 |
} |
| 406 |
% \end{macrocode} |
| 407 |
% |
| 408 |
% \begin{macrocode} |
| 409 |
\newcounter{HD@unique} |
| 410 |
% \end{macrocode} |
| 411 |
% \begin{macro}{\theHD@unique} |
| 412 |
% \begin{macrocode} |
| 413 |
\renewcommand{\theHD@unique}{% |
| 414 |
\number\value{HD@unique}% |
| 415 |
} |
| 416 |
% \end{macrocode} |
| 417 |
% \end{macro} |
| 418 |
% |
| 419 |
% \begin{macrocode} |
| 420 |
\g@addto@macro\Hy@UseMaketitleInfos{% |
| 421 |
\@ifundefined{fileinfo}{}{% |
| 422 |
\ifx\@pdfsubject\@empty |
| 423 |
\hypersetup{pdfsubject={\fileinfo}}% |
| 424 |
\fi |
| 425 |
}% |
| 426 |
} |
| 427 |
% \end{macrocode} |
| 428 |
% |
| 429 |
% \begin{macrocode} |
| 430 |
\pdfstringdefDisableCommands{% |
| 431 |
\let\thanks\@gobble |
| 432 |
\let\footnote\@gobble |
| 433 |
\def\cs#1{\textbackslash #1}% |
| 434 |
\let\normalfont\@empty |
| 435 |
\let\scshape\@empty |
| 436 |
\def\and{and }% |
| 437 |
} |
| 438 |
% \end{macrocode} |
| 439 |
% |
| 440 |
% |
| 441 |
% \subsection{Bookmarks} |
| 442 |
% |
| 443 |
% \begin{macro}{\HD@sectionpatch} |
| 444 |
% \begin{macrocode} |
| 445 |
\def\HD@sectionpatch{% |
| 446 |
\ifHD@numbered |
| 447 |
\HD@@sectionpatch{section}% |
| 448 |
\HD@@sectionpatch{chapter}% |
| 449 |
\else |
| 450 |
\let\Hy@writebookmark\HD@disable@writebookmark |
| 451 |
\fi |
| 452 |
} |
| 453 |
% \end{macrocode} |
| 454 |
% \end{macro} |
| 455 |
% \begin{macro}{\HD@@sectionpatch} |
| 456 |
% \begin{macrocode} |
| 457 |
\def\HD@@sectionpatch#1{% |
| 458 |
\expandafter\let\csname HDorg@@#1\expandafter\endcsname |
| 459 |
\csname #1\endcsname |
| 460 |
\@namedef{#1}{% |
| 461 |
\@ifstar{\@nameuse{HDorg@@#1}}{\@nameuse{HDorg@@#1}}% |
| 462 |
}% |
| 463 |
} |
| 464 |
% \end{macrocode} |
| 465 |
% \end{macro} |
| 466 |
% \begin{macro}{\HD@disable@writebookmark} |
| 467 |
% \begin{macrocode} |
| 468 |
\def\HD@disable@writebookmark#1#2#3#4#5{} |
| 469 |
% \end{macrocode} |
| 470 |
% \end{macro} |
| 471 |
% |
| 472 |
% \begin{macro}{\HD@guesstoclevel} |
| 473 |
% A wild guessing of the toclevel. There is the hope, that |
| 474 |
% the macro |#1| starts with a sectioning command. |
| 475 |
% \begin{macrocode} |
| 476 |
\def\HD@guesstoclevel#1{% |
| 477 |
\expandafter\HD@@guesstoclevel#1\section\HD@end |
| 478 |
} |
| 479 |
% \end{macrocode} |
| 480 |
% \end{macro} |
| 481 |
% \begin{macro}{\HD@@guesstoclevel} |
| 482 |
% \begin{macrocode} |
| 483 |
\long\def\HD@@guesstoclevel#1#2\HD@end{% |
| 484 |
\@ifundefined{toclevel@\expandafter\@gobble\string#1\@empty}{% |
| 485 |
1% |
| 486 |
}{% |
| 487 |
\@nameuse{toclevel@\expandafter\@gobble\string#1\@empty}% |
| 488 |
}% |
| 489 |
} |
| 490 |
% \end{macrocode} |
| 491 |
% \end{macro} |
| 492 |
% |
| 493 |
% \subsection{\cs{tableofcontents}} |
| 494 |
% |
| 495 |
% \begin{macro}{\HDorg@tableofcontents} |
| 496 |
% \begin{macrocode} |
| 497 |
\let\HDorg@tableofcontents\tableofcontents |
| 498 |
% \end{macrocode} |
| 499 |
% \end{macro} |
| 500 |
% \begin{macro}{\tableofcontents} |
| 501 |
% As first section the table of contents shouldn't |
| 502 |
% go into the toc itself. Also a number looks too funny then. |
| 503 |
% Just a bookmark is enough in this case. |
| 504 |
% \begin{macrocode} |
| 505 |
\def\tableofcontents{% |
| 506 |
\begingroup |
| 507 |
\@ifundefined{c@section}{% |
| 508 |
\def\c@section{0}% |
| 509 |
}{}% |
| 510 |
\expandafter\endgroup |
| 511 |
\ifcase\c@section |
| 512 |
\stepcounter{HD@unique}% |
| 513 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@tableofcontents}]% |
| 514 |
{\contentsname}{toc\theHD@unique}% |
| 515 |
\HDorg@tableofcontents |
| 516 |
\else |
| 517 |
\ifHD@numbered |
| 518 |
\else |
| 519 |
\stepcounter{HD@unique}% |
| 520 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@tableofcontents}]% |
| 521 |
{\contentsname}{toc\theHD@unique}% |
| 522 |
\fi |
| 523 |
\begingroup |
| 524 |
\HD@sectionpatch |
| 525 |
\HDorg@tableofcontents |
| 526 |
\endgroup |
| 527 |
\fi |
| 528 |
} |
| 529 |
% \end{macrocode} |
| 530 |
% \end{macro} |
| 531 |
% |
| 532 |
% \subsection{\cs{listoffigures}} |
| 533 |
% |
| 534 |
% \begin{macro}{\HDorg@listoffigures} |
| 535 |
% \begin{macrocode} |
| 536 |
\let\HDorg@listoffigures\listoffigures |
| 537 |
% \end{macrocode} |
| 538 |
% \end{macro} |
| 539 |
% \begin{macro}{\listoffigures} |
| 540 |
% \begin{macrocode} |
| 541 |
\def\listoffigures{% |
| 542 |
\ifHD@numbered |
| 543 |
\else |
| 544 |
\stepcounter{HD@unique}% |
| 545 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@listoffigures}]% |
| 546 |
{\listfigurename}{toc\theHD@unique}% |
| 547 |
\fi |
| 548 |
\begingroup |
| 549 |
\HD@sectionpatch |
| 550 |
\HDorg@listoffigures |
| 551 |
\endgroup |
| 552 |
} |
| 553 |
% \end{macrocode} |
| 554 |
% \end{macro} |
| 555 |
% |
| 556 |
% \subsection{\cs{listoftables}} |
| 557 |
% |
| 558 |
% \begin{macro}{\HDorg@listoftables} |
| 559 |
% \begin{macrocode} |
| 560 |
\let\HDorg@listoftables\listoftables |
| 561 |
% \end{macrocode} |
| 562 |
% \end{macro} |
| 563 |
% \begin{macro}{\listoftables} |
| 564 |
% \begin{macrocode} |
| 565 |
\def\listoftables{% |
| 566 |
\ifHD@numbered |
| 567 |
\else |
| 568 |
\stepcounter{HD@unique}% |
| 569 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@listoftables}]% |
| 570 |
{\listtablename}{toc\theHD@unique}% |
| 571 |
\fi |
| 572 |
\begingroup |
| 573 |
\HD@sectionpatch |
| 574 |
\HDorg@listoftables |
| 575 |
\endgroup |
| 576 |
} |
| 577 |
% \end{macrocode} |
| 578 |
% \end{macro} |
| 579 |
% |
| 580 |
% \subsection{\cs{thebibliography}} |
| 581 |
% |
| 582 |
% \begin{macro}{\HDorg@thebibliography} |
| 583 |
% \begin{macrocode} |
| 584 |
\let\HDorg@thebibliography\thebibliography |
| 585 |
% \end{macrocode} |
| 586 |
% \end{macro} |
| 587 |
% \begin{macro}{\thebibliography} |
| 588 |
% \begin{macrocode} |
| 589 |
\def\thebibliography{% |
| 590 |
\ifHD@numbered |
| 591 |
\else |
| 592 |
\stepcounter{HD@unique}% |
| 593 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@thebibliography}]% |
| 594 |
{\@ifundefined{chapter}{\refname}{\bibname}}{bib\theHD@unique}% |
| 595 |
\fi |
| 596 |
\HD@sectionpatch |
| 597 |
\HDorg@thebibliography |
| 598 |
} |
| 599 |
% \end{macrocode} |
| 600 |
% \end{macro} |
| 601 |
% |
| 602 |
% \subsection{\cs{theindex}} |
| 603 |
% |
| 604 |
% \begin{macro}{\HDorg@theindex} |
| 605 |
% \begin{macrocode} |
| 606 |
\let\HDorg@theindex\theindex |
| 607 |
% \end{macrocode} |
| 608 |
% \end{macro} |
| 609 |
% \begin{macro}{\theindex} |
| 610 |
% \begin{macrocode} |
| 611 |
\def\theindex{% |
| 612 |
\let\HDorg@index@prologue\index@prologue |
| 613 |
\let\HDorg@writebookmark\Hy@writebookmark |
| 614 |
\HD@sectionpatch |
| 615 |
\g@addto@macro\IndexParms{% |
| 616 |
\ifHD@numbered |
| 617 |
\else |
| 618 |
\let\Hy@writebookmark\HDorg@writebookmark |
| 619 |
\fi |
| 620 |
\let\bfseries\HD@bfseries |
| 621 |
}% |
| 622 |
\edef\HD@toclevel@index{\HD@guesstoclevel{\index@prologue}}% |
| 623 |
\begingroup |
| 624 |
\count@=\HD@toclevel@index\relax |
| 625 |
\advance\count@ by 1 % |
| 626 |
\xdef\HD@toclevel@subindex{\the\count@}% |
| 627 |
\endgroup |
| 628 |
\def\index@prologue{% |
| 629 |
\ifHD@numbered |
| 630 |
\else |
| 631 |
\begingroup |
| 632 |
\stepcounter{HD@unique}% |
| 633 |
\let\Hy@writebookmark\HDorg@writebookmark |
| 634 |
\pdfbookmark[\HD@toclevel@index]% |
| 635 |
{\indexname}{index\theHD@unique}% |
| 636 |
\endgroup |
| 637 |
\fi |
| 638 |
\HDorg@index@prologue |
| 639 |
}% |
| 640 |
\HDorg@theindex |
| 641 |
} |
| 642 |
% \end{macrocode} |
| 643 |
% \end{macro} |
| 644 |
% \begin{macro}{\HDorg@bfseries} |
| 645 |
% \begin{macrocode} |
| 646 |
\let\HDorg@bfseries\bfseries |
| 647 |
% \end{macrocode} |
| 648 |
% \end{macro} |
| 649 |
% \begin{macro}{\HD@bfseries} |
| 650 |
% \begin{macrocode} |
| 651 |
\def\HD@bfseries{\futurelet\HD@hfil\HD@@bfseries}% |
| 652 |
% \end{macrocode} |
| 653 |
% \end{macro} |
| 654 |
% \begin{macro}{\HD@@bfseries} |
| 655 |
% \begin{macrocode} |
| 656 |
\def\HD@@bfseries{% |
| 657 |
\HDorg@bfseries |
| 658 |
\ifx\HD@hfil\hfil |
| 659 |
\expandafter\HD@@@bfseries |
| 660 |
\fi |
| 661 |
} |
| 662 |
% \end{macrocode} |
| 663 |
% \end{macro} |
| 664 |
% \begin{macro}{\HD@@@bfseries} |
| 665 |
% \begin{macrocode} |
| 666 |
\def\HD@@@bfseries\hfil#1\hfil{% |
| 667 |
\ifx\\#1\\% |
| 668 |
\else |
| 669 |
\raisebox{\baselineskip}[0pt]{% |
| 670 |
\kern-\HD@margin\relax |
| 671 |
\pdfbookmark[\HD@toclevel@subindex]{#1}{HD.#1}% |
| 672 |
\kern\HD@margin\relax |
| 673 |
}% |
| 674 |
\fi |
| 675 |
\hfil#1\hfil |
| 676 |
}% |
| 677 |
% \end{macrocode} |
| 678 |
% \end{macro} |
| 679 |
% \begin{macro}{\HD@margin} |
| 680 |
% \begin{macrocode} |
| 681 |
\def\HD@margin{1mm} |
| 682 |
% \end{macrocode} |
| 683 |
% \end{macro} |
| 684 |
% |
| 685 |
% \subsection{\cs{theglossary}} |
| 686 |
% |
| 687 |
% \begin{macro}{\HDorg@theglossary} |
| 688 |
% \begin{macrocode} |
| 689 |
\let\HDorg@theglossary\theglossary |
| 690 |
% \end{macrocode} |
| 691 |
% \end{macro} |
| 692 |
% \begin{macro}{\theglossary} |
| 693 |
% \begin{macrocode} |
| 694 |
\def\theglossary{% |
| 695 |
\let\HDorg@glossary@prologue\glossary@prologue |
| 696 |
\let\HDorg@writebookmark\Hy@writebookmark |
| 697 |
\HD@sectionpatch |
| 698 |
\def\glossary@prologue{% |
| 699 |
\ifHD@numbered |
| 700 |
\else |
| 701 |
\begingroup |
| 702 |
\let\Hy@writebookmark\HDorg@writebookmark |
| 703 |
\stepcounter{HD@unique}% |
| 704 |
\pdfbookmark[\HD@guesstoclevel{\HDorg@glossary@prologue}]% |
| 705 |
{\changehistoryname}{glossary\theHD@unique}% |
| 706 |
\endgroup |
| 707 |
\fi |
| 708 |
\HDorg@glossary@prologue |
| 709 |
}% |
| 710 |
\HDorg@theglossary |
| 711 |
} |
| 712 |
% \end{macrocode} |
| 713 |
% \end{macro} |
| 714 |
% \begin{macro}{\glossaryname} |
| 715 |
% \begin{macrocode} |
| 716 |
\providecommand*{\glossaryname}{Change History} |
| 717 |
% \end{macrocode} |
| 718 |
% \end{macro} |
| 719 |
% |
| 720 |
% \begin{macro}{\glossaryname} |
| 721 |
% \begin{macrocode} |
| 722 |
\providecommand*{\changehistoryname}{\glossaryname} |
| 723 |
% \end{macrocode} |
| 724 |
% \end{macro} |
| 725 |
% |
| 726 |
% \subsection{Index} |
| 727 |
% |
| 728 |
% \begin{macrocode} |
| 729 |
\newcounter{HD@hypercount} |
| 730 |
% \end{macrocode} |
| 731 |
% \begin{macro}{\HD@helplength} |
| 732 |
% \begin{macrocode} |
| 733 |
\newlength{\HD@helplength} |
| 734 |
% \end{macrocode} |
| 735 |
% \end{macro} |
| 736 |
% \begin{macro}{\ifHD@savedest} |
| 737 |
% \begin{macrocode} |
| 738 |
\newif\ifHD@savedest |
| 739 |
\HD@savedesttrue |
| 740 |
% \end{macrocode} |
| 741 |
% \end{macro} |
| 742 |
% \begin{macrocode} |
| 743 |
\AtBeginDocument{% |
| 744 |
\HD@savedest@init |
| 745 |
} |
| 746 |
% \end{macrocode} |
| 747 |
% \begin{macrocode} |
| 748 |
\RequirePackage{rerunfilecheck}[2009/12/10] |
| 749 |
% \end{macrocode} |
| 750 |
% \begin{macro}{\HD@savedest@init} |
| 751 |
% \begin{macrocode} |
| 752 |
\begingroup |
| 753 |
\catcode`\^^M=\active |
| 754 |
\@firstofone{\endgroup |
| 755 |
\def\HD@savedest@init{% |
| 756 |
\ifHD@savedest |
| 757 |
\let\HDorg@tilde~% |
| 758 |
\let~\HD@savedest@entry |
| 759 |
\edef\HDorg@catcodeM{\the\catcode`\^^M}% |
| 760 |
\let\HDorg@M^^M% |
| 761 |
\catcode`\^^M=\active |
| 762 |
\def^^M{}% |
| 763 |
\InputIfFileExists{\jobname.hd}{}{}% |
| 764 |
\let~\HDorg@tilde |
| 765 |
\let^^M\HDorg@M |
| 766 |
\catcode`\^^M=\HDorg@catcodeM\relax |
| 767 |
\newwrite\HD@savedest@out |
| 768 |
\RerunFileCheck{\jobname.hd}{% |
| 769 |
\immediate\closeout\HD@savedest@out |
| 770 |
}{}% |
| 771 |
\immediate\openout\HD@savedest@out=\jobname.hd\relax |
| 772 |
\else |
| 773 |
\let\HD@savedest@add\@gobble |
| 774 |
\fi |
| 775 |
}% |
| 776 |
% \end{macrocode} |
| 777 |
% \end{macro} |
| 778 |
% \begin{macro}{\HD@savedest@entry} |
| 779 |
% \begin{macrocode} |
| 780 |
\def\HD@savedest@entry#1^^M{% |
| 781 |
\@namedef{HD.#1}{}% |
| 782 |
}% |
| 783 |
} |
| 784 |
% \end{macrocode} |
| 785 |
% \end{macro} |
| 786 |
% \begin{macro}{\HD@savedest@add} |
| 787 |
% \begin{macrocode} |
| 788 |
\def\HD@savedest@add#1{% |
| 789 |
\immediate\write\HD@savedest@out{\string~#1}% |
| 790 |
} |
| 791 |
% \end{macrocode} |
| 792 |
% \end{macro} |
| 793 |
% \begin{macro}{\ifHD@targetraise} |
| 794 |
% \begin{macrocode} |
| 795 |
\newif\ifHD@targetraise |
| 796 |
\HD@targetraisetrue |
| 797 |
% \end{macrocode} |
| 798 |
% \end{macro} |
| 799 |
% \begin{macro}{\HD@target} |
| 800 |
% \begin{macrocode} |
| 801 |
\def\HD@target{% |
| 802 |
\ifHD@targetraise |
| 803 |
\ifhmode |
| 804 |
\settoheight{\HD@helplength}{[H]}% |
| 805 |
\addtolength{\HD@helplength}{0.4ex}% |
| 806 |
\raisebox{\HD@helplength}[0pt][0pt]{% |
| 807 |
\HD@maketarget |
| 808 |
}% |
| 809 |
\else |
| 810 |
\HD@maketarget |
| 811 |
\fi |
| 812 |
\else |
| 813 |
\HD@maketarget |
| 814 |
\fi |
| 815 |
} |
| 816 |
% \end{macrocode} |
| 817 |
% \end{macro} |
| 818 |
% \begin{macro}{\HD@maketarget} |
| 819 |
% \begin{macrocode} |
| 820 |
\def\HD@maketarget{% |
| 821 |
\stepcounter{HD@hypercount}% |
| 822 |
\def\HD@next{% |
| 823 |
\leavevmode |
| 824 |
\llap{\hypertarget{HD.\the\c@HD@hypercount}{}\,}% |
| 825 |
}% |
| 826 |
\ifHD@savedest |
| 827 |
\expandafter\ifx\csname HD.\the\c@HD@hypercount\endcsname\@empty |
| 828 |
\else |
| 829 |
\let\HD@next\relax |
| 830 |
\fi |
| 831 |
\fi |
| 832 |
\HD@next |
| 833 |
} |
| 834 |
% \end{macrocode} |
| 835 |
% \end{macro} |
| 836 |
% |
| 837 |
% \begin{macro}{\CodelineIndex} |
| 838 |
% \begin{macrocode} |
| 839 |
\g@addto@macro\CodelineIndex{% |
| 840 |
\let\special@index\HD@codeline@wrindex |
| 841 |
} |
| 842 |
% \end{macrocode} |
| 843 |
% \end{macro} |
| 844 |
% \begin{macro}{\PageIndex} |
| 845 |
% \begin{macrocode} |
| 846 |
\g@addto@macro\PageIndex{% |
| 847 |
\let\special@index\HD@page@wrindex |
| 848 |
} |
| 849 |
% \end{macrocode} |
| 850 |
% \end{macro} |
| 851 |
% |
| 852 |
% \begin{macro}{\HD@codeline@wrindex} |
| 853 |
% \begin{macrocode} |
| 854 |
\def\HD@codeline@wrindex#1{% |
| 855 |
\begingroup |
| 856 |
\let\HDorg@encapchar\encapchar |
| 857 |
\def\encapchar##1\encapchar##2\@nil{% |
| 858 |
\HDorg@encapchar |
| 859 |
hdclindex{\the\c@HD@hypercount}{##1}% |
| 860 |
}% |
| 861 |
\codeline@wrindex{% |
| 862 |
#1\encapchar\encapchar\@nil |
| 863 |
}% |
| 864 |
\endgroup |
| 865 |
} |
| 866 |
% \end{macrocode} |
| 867 |
% \end{macro} |
| 868 |
% \begin{macro}{\HD@page@wrindex} |
| 869 |
% \begin{macrocode} |
| 870 |
\def\HD@page@wrindex#1{% |
| 871 |
\begingroup |
| 872 |
\let\HDorg@encapchar\encapchar |
| 873 |
\def\encapchar##1\encapchar##2\@nil{% |
| 874 |
\HDorg@encapchar |
| 875 |
hdpindex{##1}% |
| 876 |
}% |
| 877 |
\HDorg@index{#1\encapchar\encapchar\@nil}% |
| 878 |
\endgroup |
| 879 |
} |
| 880 |
% \end{macrocode} |
| 881 |
% \end{macro} |
| 882 |
% |
| 883 |
% \begin{macro}{\hdclindex} |
| 884 |
% \begin{macrocode} |
| 885 |
\def\hdclindex#1#2#3{% |
| 886 |
\csname\ifx\\#2\\relax\else#2\fi\endcsname{% |
| 887 |
\hyperlink{HD.#1}{#3}% |
| 888 |
\HD@savedest@add{#1}% |
| 889 |
}% |
| 890 |
} |
| 891 |
% \end{macrocode} |
| 892 |
% \end{macro} |
| 893 |
% \begin{macro}{\hdpindex} |
| 894 |
% \begin{macrocode} |
| 895 |
\def\hdpindex#1#2{% |
| 896 |
\csname\ifx\\#1\\relax\else#1\fi\endcsname{% |
| 897 |
\hyperpage{#2}% |
| 898 |
}% |
| 899 |
} |
| 900 |
% \end{macrocode} |
| 901 |
% \end{macro} |
| 902 |
% |
| 903 |
% \subsection{\cs{PrintDescribeMacro}} |
| 904 |
% |
| 905 |
% \begin{macro}{\HDorg@PrintDescribeMacro} |
| 906 |
% \begin{macrocode} |
| 907 |
\let\HDorg@PrintDescribeMacro\PrintDescribeMacro |
| 908 |
% \end{macrocode} |
| 909 |
% \end{macro} |
| 910 |
% \begin{macro}{\PrintDescribeMacro} |
| 911 |
% \begin{macrocode} |
| 912 |
\renewcommand\PrintDescribeMacro[1]{% |
| 913 |
\begingroup |
| 914 |
\let\HDorg@MacroFont\MacroFont |
| 915 |
\def\MacroFont{% |
| 916 |
\HD@target |
| 917 |
\HDorg@MacroFont |
| 918 |
}% |
| 919 |
\HDorg@PrintDescribeMacro{#1}% |
| 920 |
\endgroup |
| 921 |
} |
| 922 |
% \end{macrocode} |
| 923 |
% \end{macro} |
| 924 |
% |
| 925 |
% \subsection{\cs{PrintMacroName}} |
| 926 |
% |
| 927 |
% \begin{macro}{\HDorg@PrintMacroName} |
| 928 |
% \begin{macrocode} |
| 929 |
\let\HDorg@PrintMacroName\PrintMacroName |
| 930 |
% \end{macrocode} |
| 931 |
% \end{macro} |
| 932 |
% \begin{macro}{\PrintMacroName} |
| 933 |
% \begin{macrocode} |
| 934 |
\renewcommand\PrintMacroName[1]{% |
| 935 |
\begingroup |
| 936 |
\let\HDorg@MacroFont\MacroFont |
| 937 |
\def\MacroFont{% |
| 938 |
\HD@target |
| 939 |
\HDorg@MacroFont |
| 940 |
}% |
| 941 |
\HDorg@PrintMacroName{#1}% |
| 942 |
\endgroup |
| 943 |
} |
| 944 |
% \end{macrocode} |
| 945 |
% \end{macro} |
| 946 |
% |
| 947 |
% \subsection{\cs{theCodelineNo}} |
| 948 |
% |
| 949 |
% \begin{macro}{\HDorg@theCodelineNo} |
| 950 |
% \begin{macrocode} |
| 951 |
\let\HDorg@theCodelineNo\theCodelineNo |
| 952 |
% \end{macrocode} |
| 953 |
% \end{macro} |
| 954 |
% \begin{macro}{\theCodelineNo} |
| 955 |
% \begin{macrocode} |
| 956 |
\renewcommand*\theCodelineNo{% |
| 957 |
\settowidth{\HD@helplength}{\HDorg@theCodelineNo\ }% |
| 958 |
\ifdim\HD@helplength<\MacroIndent |
| 959 |
\addtolength{\HD@helplength}{-\MacroIndent}% |
| 960 |
\llap{% |
| 961 |
\begingroup\HD@target\endgroup |
| 962 |
\hspace*{-\HD@helplength}% |
| 963 |
}% |
| 964 |
\else |
| 965 |
\HD@target |
| 966 |
\fi |
| 967 |
\HDorg@theCodelineNo |
| 968 |
} |
| 969 |
% \end{macrocode} |
| 970 |
% \end{macro} |
| 971 |
% |
| 972 |
% \begin{macro}{\HDorg@index} |
| 973 |
% \begin{macrocode} |
| 974 |
\AtBeginDocument{% |
| 975 |
\let\HDorg@index\index |
| 976 |
} |
| 977 |
% \end{macrocode} |
| 978 |
% \end{macro} |
| 979 |
% |
| 980 |
% \subsection{\cs{SpecialUsageIndex}} |
| 981 |
% |
| 982 |
% \begin{macro}{\HDorg@SpecialUsageIndex} |
| 983 |
% \begin{macrocode} |
| 984 |
\let\HDorg@SpecialUsageIndex\SpecialUsageIndex |
| 985 |
\renewcommand*\SpecialUsageIndex[1]{% |
| 986 |
\@bsphack |
| 987 |
\begingroup |
| 988 |
\HD@target |
| 989 |
\let\index\HDorg@index |
| 990 |
\let\HDorg@encapchar\encapchar |
| 991 |
\edef\encapchar usage{% |
| 992 |
\HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% |
| 993 |
}% |
| 994 |
\HDorg@SpecialUsageIndex{#1}% |
| 995 |
\endgroup |
| 996 |
\@esphack |
| 997 |
} |
| 998 |
% \end{macrocode} |
| 999 |
% \end{macro} |
| 1000 |
% |
| 1001 |
% \subsection{\cs{autoindex}} |
| 1002 |
% |
| 1003 |
% \begin{macrocode} |
| 1004 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 1005 |
\expandafter\ifx\csname autoindex\endcsname\relax |
| 1006 |
\else |
| 1007 |
% \end{macrocode} |
| 1008 |
% \begin{macro}{\HDorg@autoindex} |
| 1009 |
% \begin{macrocode} |
| 1010 |
\let\HDorg@autoindex\autoindex |
| 1011 |
% \end{macrocode} |
| 1012 |
% \end{macro} |
| 1013 |
% \begin{macro}{\autoindex} |
| 1014 |
% \begin{macrocode} |
| 1015 |
\renewcommand*\autoindex[1]{% |
| 1016 |
\@bsphack |
| 1017 |
\begingroup |
| 1018 |
\HD@target |
| 1019 |
\let\index\HDorg@index |
| 1020 |
\let\HDorg@encapchar\encapchar |
| 1021 |
\edef\encapchar usage{% |
| 1022 |
\HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% |
| 1023 |
}% |
| 1024 |
\HDorg@autoindex{#1}% |
| 1025 |
\endgroup |
| 1026 |
\@esphack |
| 1027 |
}% |
| 1028 |
\pdfstringdefDisableCommands{\let\autoindex\@gobble } |
| 1029 |
\fi |
| 1030 |
% \end{macrocode} |
| 1031 |
% \end{macro} |
| 1032 |
% |
| 1033 |
% \subsection{\cs{SpecialEnvIndex}} |
| 1034 |
% |
| 1035 |
% \begin{macro}{\HDorg@SpecialEnvIndex} |
| 1036 |
% \begin{macrocode} |
| 1037 |
\let\HDorg@SpecialEnvIndex\SpecialEnvIndex |
| 1038 |
% \end{macrocode} |
| 1039 |
% \end{macro} |
| 1040 |
% \begin{macro}{\SpecialEnvIndex} |
| 1041 |
% \begin{macrocode} |
| 1042 |
\renewcommand*\SpecialEnvIndex[1]{% |
| 1043 |
\@bsphack |
| 1044 |
\begingroup |
| 1045 |
\HD@target |
| 1046 |
\let\HDorg@encapchar\encapchar |
| 1047 |
\edef\encapchar usage{% |
| 1048 |
\HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% |
| 1049 |
}% |
| 1050 |
\HDorg@SpecialEnvIndex{#1}% |
| 1051 |
\endgroup |
| 1052 |
\@esphack |
| 1053 |
} |
| 1054 |
% \end{macrocode} |
| 1055 |
% \end{macro} |
| 1056 |
% |
| 1057 |
% \subsection{\cs{SortIndex}} |
| 1058 |
% |
| 1059 |
% \begin{macro}{\HDorg@SortIndex} |
| 1060 |
% \begin{macrocode} |
| 1061 |
\let\HDorg@SortIndex\SortIndex |
| 1062 |
% \end{macrocode} |
| 1063 |
% \end{macro} |
| 1064 |
% \begin{macro}{\SortIndex} |
| 1065 |
% \begin{macrocode} |
| 1066 |
\renewcommand*{\SortIndex}[2]{% |
| 1067 |
\@bsphack |
| 1068 |
\begingroup |
| 1069 |
\let\index\HD@page@wrindex |
| 1070 |
\HDorg@SortIndex{#1}{#2}% |
| 1071 |
\endgroup |
| 1072 |
\@esphack |
| 1073 |
} |
| 1074 |
% \end{macrocode} |
| 1075 |
% \end{macro} |
| 1076 |
% |
| 1077 |
% \subsection{\cs{@wrglossary}} |
| 1078 |
% |
| 1079 |
% \begin{macro}{\HDorg@wrglossary} |
| 1080 |
% \begin{macrocode} |
| 1081 |
\let\HDorg@wrglossary\@wrglossary |
| 1082 |
% \end{macrocode} |
| 1083 |
% \end{macro} |
| 1084 |
% \begin{macro}{\@wrglossary} |
| 1085 |
% \begin{macrocode} |
| 1086 |
\def\@wrglossary#1{% |
| 1087 |
\let\HDorg@encapchar\encapchar |
| 1088 |
\def\encapchar##1\encapchar##2\@nil{% |
| 1089 |
\HDorg@encapchar |
| 1090 |
hdpindex{##1}% |
| 1091 |
}% |
| 1092 |
\HDorg@wrglossary{#1\encapchar\encapchar\@nil}% |
| 1093 |
} |
| 1094 |
% \end{macrocode} |
| 1095 |
% \end{macro} |
| 1096 |
% |
| 1097 |
% \subsection{\cs{MacroIndent}} |
| 1098 |
% |
| 1099 |
% \cs{MacroIndent} automatically calculated. |
| 1100 |
% \begin{macrocode} |
| 1101 |
\AfterLastShipout{% |
| 1102 |
\if@filesw |
| 1103 |
\immediate\write\@auxout{% |
| 1104 |
\string\providecommand\string\HD@SetMacroIndent[1]{}% |
| 1105 |
}% |
| 1106 |
\immediate\write\@auxout{% |
| 1107 |
\string\HD@SetMacroIndent{\number\value{CodelineNo}}% |
| 1108 |
}% |
| 1109 |
\fi |
| 1110 |
} |
| 1111 |
% \end{macrocode} |
| 1112 |
% \begin{macro}{\HD@SetMacroIndent} |
| 1113 |
% \begin{macrocode} |
| 1114 |
\def\HD@SetMacroIndent#1{% |
| 1115 |
\begingroup |
| 1116 |
\value{CodelineNo}=#1\relax |
| 1117 |
\settowidth{\MacroIndent}{\HDorg@theCodelineNo\ }% |
| 1118 |
\global\MacroIndent\MacroIndent |
| 1119 |
\endgroup |
| 1120 |
} |
| 1121 |
% \end{macrocode} |
| 1122 |
% \end{macro} |
| 1123 |
% |
| 1124 |
% \begin{macrocode} |
| 1125 |
%</package> |
| 1126 |
% \end{macrocode} |
| 1127 |
% |
| 1128 |
% \section{Installation} |
| 1129 |
% |
| 1130 |
% \subsection{Download} |
| 1131 |
% |
| 1132 |
% \paragraph{Package.} This package is available on |
| 1133 |
% CTAN\footnote{\CTANpkg{hypdoc}}: |
| 1134 |
% \begin{description} |
| 1135 |
% \item[\CTAN{macros/latex/contrib/hypdoc/hypdoc.dtx}] The source file. |
| 1136 |
% \item[\CTAN{macros/latex/contrib/hypdoc/hypdoc.pdf}] Documentation. |
| 1137 |
% \end{description} |
| 1138 |
% |
| 1139 |
% |
| 1140 |
% \subsection{Package installation} |
| 1141 |
% |
| 1142 |
% The best is to install the package with the package manager of your \TeX{} |
| 1143 |
% distribution. If a manual installation is needed: |
| 1144 |
% |
| 1145 |
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting |
| 1146 |
% \docstrip\ archive. The files are extracted by running the |
| 1147 |
% \xfile{.dtx} through \plainTeX: |
| 1148 |
% \begin{quote} |
| 1149 |
% \verb|tex hypdoc.dtx| |
| 1150 |
% \end{quote} |
| 1151 |
% |
| 1152 |
% \paragraph{TDS.} Now the different files must be moved into |
| 1153 |
% the different directories in your installation TDS tree |
| 1154 |
% (also known as \xfile{texmf} tree): |
| 1155 |
% \begin{quote} |
| 1156 |
% \def\t{^^A |
| 1157 |
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} |
| 1158 |
% hypdoc.sty & tex/latex/hypdoc/hypdoc.sty\\ |
| 1159 |
% hypdoc.pdf & doc/latex/hypdoc/hypdoc.pdf\\ |
| 1160 |
% hypdoc.dtx & source/latex/hypdoc/hypdoc.dtx\\ |
| 1161 |
% \end{tabular}^^A |
| 1162 |
% }^^A |
| 1163 |
% \sbox0{\t}^^A |
| 1164 |
% \ifdim\wd0>\linewidth |
| 1165 |
% \begingroup |
| 1166 |
% \advance\linewidth by\leftmargin |
| 1167 |
% \advance\linewidth by\rightmargin |
| 1168 |
% \edef\x{\endgroup |
| 1169 |
% \def\noexpand\lw{\the\linewidth}^^A |
| 1170 |
% }\x |
| 1171 |
% \def\lwbox{^^A |
| 1172 |
% \leavevmode |
| 1173 |
% \hbox to \linewidth{^^A |
| 1174 |
% \kern-\leftmargin\relax |
| 1175 |
% \hss |
| 1176 |
% \usebox0 |
| 1177 |
% \hss |
| 1178 |
% \kern-\rightmargin\relax |
| 1179 |
% }^^A |
| 1180 |
% }^^A |
| 1181 |
% \ifdim\wd0>\lw |
| 1182 |
% \sbox0{\small\t}^^A |
| 1183 |
% \ifdim\wd0>\linewidth |
| 1184 |
% \ifdim\wd0>\lw |
| 1185 |
% \sbox0{\footnotesize\t}^^A |
| 1186 |
% \ifdim\wd0>\linewidth |
| 1187 |
% \ifdim\wd0>\lw |
| 1188 |
% \sbox0{\scriptsize\t}^^A |
| 1189 |
% \ifdim\wd0>\linewidth |
| 1190 |
% \ifdim\wd0>\lw |
| 1191 |
% \sbox0{\tiny\t}^^A |
| 1192 |
% \ifdim\wd0>\linewidth |
| 1193 |
% \lwbox |
| 1194 |
% \else |
| 1195 |
% \usebox0 |
| 1196 |
% \fi |
| 1197 |
% \else |
| 1198 |
% \lwbox |
| 1199 |
% \fi |
| 1200 |
% \else |
| 1201 |
% \usebox0 |
| 1202 |
% \fi |
| 1203 |
% \else |
| 1204 |
% \lwbox |
| 1205 |
% \fi |
| 1206 |
% \else |
| 1207 |
% \usebox0 |
| 1208 |
% \fi |
| 1209 |
% \else |
| 1210 |
% \lwbox |
| 1211 |
% \fi |
| 1212 |
% \else |
| 1213 |
% \usebox0 |
| 1214 |
% \fi |
| 1215 |
% \else |
| 1216 |
% \lwbox |
| 1217 |
% \fi |
| 1218 |
% \else |
| 1219 |
% \usebox0 |
| 1220 |
% \fi |
| 1221 |
% \end{quote} |
| 1222 |
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's |
| 1223 |
% TDS installing feature, then some files can already be in the right |
| 1224 |
% place, see the documentation of \docstrip. |
| 1225 |
% |
| 1226 |
% \subsection{Refresh file name databases} |
| 1227 |
% |
| 1228 |
% If your \TeX~distribution |
| 1229 |
% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh |
| 1230 |
% these. For example, \TeX\,Live\ users run \verb|texhash| or |
| 1231 |
% \verb|mktexlsr|. |
| 1232 |
% |
| 1233 |
% \subsection{Some details for the interested} |
| 1234 |
% |
| 1235 |
% \paragraph{Unpacking with \LaTeX.} |
| 1236 |
% The \xfile{.dtx} chooses its action depending on the format: |
| 1237 |
% \begin{description} |
| 1238 |
% \item[\plainTeX:] Run \docstrip\ and extract the files. |
| 1239 |
% \item[\LaTeX:] Generate the documentation. |
| 1240 |
% \end{description} |
| 1241 |
% If you insist on using \LaTeX\ for \docstrip\ (really, |
| 1242 |
% \docstrip\ does not need \LaTeX), then inform the autodetect routine |
| 1243 |
% about your intention: |
| 1244 |
% \begin{quote} |
| 1245 |
% \verb|latex \let\install=y\input{hypdoc.dtx}| |
| 1246 |
% \end{quote} |
| 1247 |
% Do not forget to quote the argument according to the demands |
| 1248 |
% of your shell. |
| 1249 |
% |
| 1250 |
% \paragraph{Generating the documentation.} |
| 1251 |
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate |
| 1252 |
% the documentation. The process can be configured by the |
| 1253 |
% configuration file \xfile{ltxdoc.cfg}. For instance, put this |
| 1254 |
% line into this file, if you want to have A4 as paper format: |
| 1255 |
% \begin{quote} |
| 1256 |
% \verb|\PassOptionsToClass{a4paper}{article}| |
| 1257 |
% \end{quote} |
| 1258 |
% An example follows how to generate the |
| 1259 |
% documentation with pdf\LaTeX: |
| 1260 |
% \begin{quote} |
| 1261 |
%\begin{verbatim} |
| 1262 |
%pdflatex hypdoc.dtx |
| 1263 |
%makeindex -s gind.ist hypdoc.idx |
| 1264 |
%pdflatex hypdoc.dtx |
| 1265 |
%makeindex -s gind.ist hypdoc.idx |
| 1266 |
%pdflatex hypdoc.dtx |
| 1267 |
%\end{verbatim} |
| 1268 |
% \end{quote} |
| 1269 |
% |
| 1270 |
% \begin{History} |
| 1271 |
% \begin{Version}{2002/05/10 v1.0} |
| 1272 |
% \item |
| 1273 |
% First standalone version. |
| 1274 |
% \end{Version} |
| 1275 |
% \begin{Version}{2006/02/20 v1.1} |
| 1276 |
% \item |
| 1277 |
% Option \xoption{numbered} added. |
| 1278 |
% \item |
| 1279 |
% \cs{HD@savedest@init} fixed (empty \xext{hd} file triggered |
| 1280 |
% first page with fl ligature). |
| 1281 |
% \item |
| 1282 |
% Bookmarks for \cs{listoffigures} and \cs{listoftables}. |
| 1283 |
% \item |
| 1284 |
% Documentation: features and usage added. |
| 1285 |
% \item |
| 1286 |
% LPPL 1.3. |
| 1287 |
% \end{Version} |
| 1288 |
% \begin{Version}{2006/04/27 v1.2} |
| 1289 |
% \item |
| 1290 |
% \cs{HD@target} fixed (\xfile{multicol.dtx}). |
| 1291 |
% \end{Version} |
| 1292 |
% \begin{Version}{2006/06/01 v1.3} |
| 1293 |
% \item |
| 1294 |
% Support for package \xpackage{amsdtx}'s \cs{autoindex} added. |
| 1295 |
% \end{Version} |
| 1296 |
% \begin{Version}{2006/06/02 v1.4} |
| 1297 |
% \item |
| 1298 |
% Bookmark fixed if there are several table of contents, |
| 1299 |
% bibliographies, glossaries, \dots |
| 1300 |
% \end{Version} |
| 1301 |
% \begin{Version}{2007/04/11 v1.5} |
| 1302 |
% \item |
| 1303 |
% Line ends sanitized. |
| 1304 |
% \end{Version} |
| 1305 |
% \begin{Version}{2007/11/12 v1.6} |
| 1306 |
% \item |
| 1307 |
% Bug fix in \cs{listoffigures} (Axel Sommerfeldt). |
| 1308 |
% \item |
| 1309 |
% Markup added in implementation section. |
| 1310 |
% \end{Version} |
| 1311 |
% \begin{Version}{2009/12/10 v1.7} |
| 1312 |
% \item |
| 1313 |
% Use of package \xpackage{rerunfilecheck}. |
| 1314 |
% \end{Version} |
| 1315 |
% \begin{Version}{2010/02/03 v1.8} |
| 1316 |
% \item |
| 1317 |
% Fix for bug latex/4096 added. |
| 1318 |
% \end{Version} |
| 1319 |
% \begin{Version}{2010/03/26 v1.9} |
| 1320 |
% \item |
| 1321 |
% Definition of \cs{HD@SetMacroIndex} is provided in the \xext{aux} file. |
| 1322 |
% \end{Version} |
| 1323 |
% \begin{Version}{2011/05/05 v1.10} |
| 1324 |
% \item |
| 1325 |
% \cs{raisebox} in \cs{HD@target} with height and depth of \texttt{0pt} |
| 1326 |
% (request of GL). |
| 1327 |
% \end{Version} |
| 1328 |
% \begin{Version}{2011/08/19 v1.11} |
| 1329 |
% \item |
| 1330 |
% Latest comma in option list for hyperref removed to avoid option clash |
| 1331 |
% because of \hologo{LaTeX} 2011/06/27 with the new \cs{in@}. |
| 1332 |
% \end{Version} |
| 1333 |
% \begin{Version}{2016/05/16 v1.12} |
| 1334 |
% \item |
| 1335 |
% Documentation updates. |
| 1336 |
% \end{Version} |
| 1337 |
% \begin{Version}{2016/10/02 v1.13} |
| 1338 |
% \item |
| 1339 |
% Fixes to bookmarknames, also introduce \cs{changehistoryname} |
| 1340 |
% \end{Version} |
| 1341 |
% \begin{Version}{2018/09/07 v1.14} |
| 1342 |
% \item |
| 1343 |
% Do not load \xpackage{thumpdf}. |
| 1344 |
% \end{Version} |
| 1345 |
% \begin{Version}{2021-11-15 v1.15} |
| 1346 |
% \item removed an old, unneeded patch for latex/4096 |
| 1347 |
% \item added a \cs{pdfstringdefDisableCommands} setting for \cs{autoindex} |
| 1348 |
% \end{Version} |
| 1349 |
% \begin{Version}{2022-06-14 v1.16} |
| 1350 |
% \item Avoid to load hyperref if has been already loaded, issue \#1 |
| 1351 |
% \end{Version} |
| 1352 |
% \begin{Version}{2022-07-03 v1.17} |
| 1353 |
% \item Restore defintion of active control-m (issue 3) |
| 1354 |
% \end{Version} |
| 1355 |
% \begin{Version}{2023-01-23 v1.18} |
| 1356 |
% \item made an internal command long for compability with natbib, issue \#6 |
| 1357 |
% \end{Version} |
| 1358 |
% \begin{Version}{2023-10-26 v1.19} |
| 1359 |
% \item Switch to hmode in \cs{HD@maketarget}, issue \#7 |
| 1360 |
% \item Check options of previously loaded hyperref more explicitly, issue \#4 and \#5. |
| 1361 |
% \end{Version} |
| 1362 |
% \end{History} |
| 1363 |
% |
| 1364 |
% \PrintIndex |
| 1365 |
% |
| 1366 |
% \Finale |
| 1367 |
\endinput |