• No results found

Index of /CTAN/macros/latex/contrib/hypdoc

N/A
N/A
Protected

Academic year: 2022

Share "Index of /CTAN/macros/latex/contrib/hypdoc"

Copied!
20
0
0

Full text

(1)

The hypdoc package

Heiko Oberdiek

2022-07-03 v1.17

Abstract

This package adds hyper features to the packagedocthat is used in the documentation system of LATEX 2ε. Bookmarks are added and references are linked as far as possible.

Contents

1 Features 2

2 Usage 3

2.1 Options . . . 3

2.2 Simple example . . . 3

2.3 Examplesource2e.tex . . . 4

3 Implementation 4 3.1 Options . . . 4

3.2 Package loading . . . 4

3.3 Bookmarks . . . 5

3.4 \tableofcontents . . . 6

3.5 \listoffigures . . . 6

3.6 \listoftables . . . 7

3.7 \thebibliography . . . 7

3.8 \theindex. . . 7

3.9 \theglossary. . . 9

3.10 Index . . . 9

3.11 \PrintDescribeMacro . . . 12

3.12 \PrintMacroName . . . 12

3.13 \theCodelineNo . . . 12

3.14 \SpecialUsageIndex . . . 13

3.15 \autoindex . . . 13

3.16 \SpecialEnvIndex . . . 13

3.17 \SortIndex . . . 14

3.18 \@wrglossary. . . 14

3.19 \MacroIndent. . . 14

4 Installation 15 4.1 Download . . . 15

4.2 Package installation . . . 15

4.3 Refresh file name databases . . . 15

4.4 Some details for the interested . . . 15

Please report any issues athttps://github.com/ho-tex/hypdoc/issues

(2)

5 History 16

[2002/05/10 v1.0] . . . 16

[2006/02/20 v1.1] . . . 16

[2006/04/27 v1.2] . . . 16

[2006/06/01 v1.3] . . . 16

[2006/06/02 v1.4] . . . 16

[2007/04/11 v1.5] . . . 16

[2007/11/12 v1.6] . . . 17

[2009/12/10 v1.7] . . . 17

[2010/02/03 v1.8] . . . 17

[2010/03/26 v1.9] . . . 17

[2011/05/05 v1.10] . . . 17

[2011/08/19 v1.11] . . . 17

[2016/05/16 v1.12] . . . 17

[2016/10/02 v1.13] . . . 17

[2018/09/07 v1.14] . . . 17

[2021-11-15 v1.15] . . . 17

[2022-06-14 v1.16] . . . 17

[2022-07-03 v1.17] . . . 17

6 Index 18

1 Features

The package adds the following features:

Bookmarks: For supporting bookmarks packagehyperrefis loaded. Some TEX code inside section titles can cause problems during bookmark processing;

these can be warnings, ugly bookmark titles or even errors. With the help of \pdfstringdefDisableCommandsor \texorpdfstring you can manage these things, seehyperref’s package documentation.

Additional bookmarks: Unnumbered bookmark entries are generated for:

• Table of contents

• List of figures

• List of tables

• Index

• Glossary

Optionnumberedcontrols, whether these section or chapters should be num- bered. The exception is the table of contents if this it would be the first numbered section. Then just a bookmark is added.

Metadata: The loaded packagehyperref, enforced by optionpdfusetitle, tries to detect\titleand\authorand sets the corresponding PDF information fields. In case of problems see the previous item about bookmarks. These entries can be overwritten or new ones added by \hypersetup after the packages is loaded, see documentation of packagehyperref.

References, links: Because of package\hyperref \refbecome links, also\url, footnote referencing are supported.

Index: The main part of this package deals with index links in order to support the kind of index that packagedocprovides.

(3)

Thumbnails: Package thumbpdf may additionally be loaded for the case that the PDF file also should contain thumbnails, see the documentation of this package. But thumbnail embedding is not really necessary, because nowa- days AcrobatReader is able to generate and view thumbnails on the fly.

2 Usage

The purpose of this packages is to add PDF features to the documentation of LaTeX packages. Thus just load the package in the driver file that generates the documentation:

\usepackage{hypdoc}

Packagedocis loaded byhypdoc, thus you also can replace a\usepackage{doc}

with this line. At any case, the package must be loaded before macros of package docsuch as\CodelineIndexor\PageIndex are used.

If the classltxdocis used, you can also use the configuration file for this class to add packagehypdoc. Add the following line to the fileltxdoc.cfg (or create a new one):

\AtEndOfClass{\RequirePackage{hypdoc}}

2.1 Options

There is one optionnumbered. It controls, whether the starred versions of section or chapter inside\tableofcontents, \listoffigures, . . . should be replaced by the non-star versions.

2.2 Simple example

Example of a simple driver filefoobar.drvof a packagefoobar. Often the driver file is packed in the file foobar.dtx and can be extracted by docstrip or if an instruction file for docstrip is provided by:

tex foobar.ins

Note that although docstrip doesn’t rely on LATEX, sometimes you need to run the.insfile through LATEX. Oddly enough, often the only LATEX feature in use is

\NeedsTeXFormat{LaTeX2e}in the first line.

\documentclass{ltxdoc}

\usepackage{hypdoc}

\RecordChanges

\EnableCrossrefs

\CodelineIndex

\begin{document}

\title{Title for package \texttt{foobar}}

\author{Author of package \texttt{foobar}}

\date{...}

\maketitle

\tableofcontents

\DocInput{foobar.dtx}

\PrintChanges

\PrintIndex

\end{document}

Then compile it, for example with pdfLATEX.

(4)

pdflatex foobar.drv

makeindex -s gind.ist foobar.idx

makeindex -s gglo.ist -o foobar.gls foobar.glo pdflatex foobar.drv

You will need several cycles until the cross references and similar things are correct.

2.3 Example source2e.tex

The source code of the base of LATEX is available as a bunch of.dtxfiles. LATEX provides the filesource2e.tex to merge them all together.

Now you can either load packagehypdocin a private copy of this file (please, respect the LPPL) or use the configuration fileltxdoc.cfg. Example that also sets A4 paper size:

\PassOptionsToClass{a4paper}{article}

\AtEndOfClass{\RequirePackage{hypdoc}}

Thensource2e.texcan be compiled by pdfTEX, for example:

pdflatex source2e

makeindex -s gind.ist source2e.idx

makeindex -s gglo.ist -o source2e.glo source2e.gls pdflatex source2e

makeindex -s gind.ist source2e.idx

makeindex -s gglo.ist -o source2e.glo source2e.gls pdflatex source2e

3 Implementation

1⟨∗package⟩

2\NeedsTeXFormat{LaTeX2e}

3\ProvidesPackage{hypdoc}%

4 [2022-07-03 v1.17 Hyper extensions for doc.sty (HO)]%

The package identification is done at the top of the.dtxfile in order to use only one identification string.

For unique command names this package usesHD@as prefix

3.1 Options

\ifHD@numbered

5\newif\ifHD@numbered

6\DeclareOption{numbered}{\HD@numberedtrue}

7\ProcessOptions*\relax

3.2 Package loading

8\RequirePackage{atveryend}[2010/03/24]

9\RequirePackage{doc}

10\ifx\numexpr\@undefined

11 \RequirePackage{calc}%

12\fi

13\@ifpackageloaded{hyperref}

14 {\PackageWarning{hypdoc}{hyperref has been loaded before. Check the options!}}

15 {\RequirePackage[%

16 hyperindex=false,%

(5)

17 pdfusetitle,%

18 pdfpagelabels%

19 ]{hyperref}[2002/05/09]%

20 }

21\hypersetup{%

22 colorlinks,%

23 plainpages=false,%

24 bookmarksopen,%

25 bookmarksnumbered,%

26 bookmarksopenlevel=0,%

27 pdfstartview={FitBH \hypercalcbp{%

28 \paperheight-\topmargin-1in-\headheight-\headsep

29 }},%

30}

31\newcounter{HD@unique}

\theHD@unique

32\renewcommand{\theHD@unique}{%

33 \number\value{HD@unique}%

34}

35\g@addto@macro\Hy@UseMaketitleInfos{%

36 \@ifundefined{fileinfo}{}{%

37 \ifx\@pdfsubject\@empty

38 \hypersetup{pdfsubject={\fileinfo}}%

39 \fi

40 }%

41}

42\pdfstringdefDisableCommands{%

43 \let\thanks\@gobble

44 \let\footnote\@gobble

45 \def\cs#1{\textbackslash #1}%

46 \let\normalfont\@empty

47 \let\scshape\@empty

48 \def\and{and }%

49}

3.3 Bookmarks

\HD@sectionpatch

50\def\HD@sectionpatch{%

51 \ifHD@numbered

52 \HD@@sectionpatch{section}%

53 \HD@@sectionpatch{chapter}%

54 \else

55 \let\Hy@writebookmark\HD@disable@writebookmark

56 \fi

57}

\HD@@sectionpatch

58\def\HD@@sectionpatch#1{%

59 \expandafter\let\csname HDorg@@#1\expandafter\endcsname

60 \csname #1\endcsname

61 \@namedef{#1}{%

62 \@ifstar{\@nameuse{HDorg@@#1}}{\@nameuse{HDorg@@#1}}%

63 }%

64}

(6)

\HD@disable@writebookmark

65\def\HD@disable@writebookmark#1#2#3#4#5{}

\HD@guesstoclevel A wild guessing of the toclevel. There is the hope, that the macro#1starts with a sectioning command.

66\def\HD@guesstoclevel#1{%

67 \expandafter\HD@@guesstoclevel#1\section\HD@end

68}

\HD@@guesstoclevel

69\def\HD@@guesstoclevel#1#2\HD@end{%

70 \@ifundefined{toclevel@\expandafter\@gobble\string#1\@empty}{%

71 1%

72 }{%

73 \@nameuse{toclevel@\expandafter\@gobble\string#1\@empty}%

74 }%

75}

3.4 \tableofcontents

\HDorg@tableofcontents

76\let\HDorg@tableofcontents\tableofcontents

\tableofcontents As first section the table of contents shouldn’t go into the toc itself. Also a number looks too funny then. Just a bookmark is enough in this case.

77\def\tableofcontents{%

78 \begingroup

79 \@ifundefined{c@section}{%

80 \def\c@section{0}%

81 }{}%

82 \expandafter\endgroup

83 \ifcase\c@section

84 \stepcounter{HD@unique}%

85 \pdfbookmark[\HD@guesstoclevel{\HDorg@tableofcontents}]%

86 {\contentsname}{toc\theHD@unique}%

87 \HDorg@tableofcontents

88 \else

89 \ifHD@numbered

90 \else

91 \stepcounter{HD@unique}%

92 \pdfbookmark[\HD@guesstoclevel{\HDorg@tableofcontents}]%

93 {\contentsname}{toc\theHD@unique}%

94 \fi

95 \begingroup

96 \HD@sectionpatch

97 \HDorg@tableofcontents

98 \endgroup

99 \fi

100}

3.5 \listoffigures

\HDorg@listoffigures

101\let\HDorg@listoffigures\listoffigures

(7)

\listoffigures

102\def\listoffigures{%

103 \ifHD@numbered

104 \else

105 \stepcounter{HD@unique}%

106 \pdfbookmark[\HD@guesstoclevel{\HDorg@listoffigures}]%

107 {\listfigurename}{toc\theHD@unique}%

108 \fi

109 \begingroup

110 \HD@sectionpatch

111 \HDorg@listoffigures

112 \endgroup

113}

3.6 \listoftables

\HDorg@listoftables

114\let\HDorg@listoftables\listoftables

\listoftables

115\def\listoftables{%

116 \ifHD@numbered

117 \else

118 \stepcounter{HD@unique}%

119 \pdfbookmark[\HD@guesstoclevel{\HDorg@listoftables}]%

120 {\listtablename}{toc\theHD@unique}%

121 \fi

122 \begingroup

123 \HD@sectionpatch

124 \HDorg@listoftables

125 \endgroup

126}

3.7 \thebibliography

\HDorg@thebibliography

127\let\HDorg@thebibliography\thebibliography

\thebibliography

128\def\thebibliography{%

129 \ifHD@numbered

130 \else

131 \stepcounter{HD@unique}%

132 \pdfbookmark[\HD@guesstoclevel{\HDorg@thebibliography}]%

133 {\@ifundefined{chapter}{\refname}{\bibname}}{bib\theHD@unique}%

134 \fi

135 \HD@sectionpatch

136 \HDorg@thebibliography

137}

3.8 \theindex

\HDorg@theindex

138\let\HDorg@theindex\theindex

(8)

\theindex

139\def\theindex{%

140 \let\HDorg@index@prologue\index@prologue

141 \let\HDorg@writebookmark\Hy@writebookmark

142 \HD@sectionpatch

143 \g@addto@macro\IndexParms{%

144 \ifHD@numbered

145 \else

146 \let\Hy@writebookmark\HDorg@writebookmark

147 \fi

148 \let\bfseries\HD@bfseries

149 }%

150 \edef\HD@toclevel@index{\HD@guesstoclevel{\index@prologue}}%

151 \begingroup

152 \count@=\HD@toclevel@index\relax

153 \advance\count@ by 1 %

154 \xdef\HD@toclevel@subindex{\the\count@}%

155 \endgroup

156 \def\index@prologue{%

157 \ifHD@numbered

158 \else

159 \begingroup

160 \stepcounter{HD@unique}%

161 \let\Hy@writebookmark\HDorg@writebookmark

162 \pdfbookmark[\HD@toclevel@index]%

163 {\indexname}{index\theHD@unique}%

164 \endgroup

165 \fi

166 \HDorg@index@prologue

167 }%

168 \HDorg@theindex

169}

\HDorg@bfseries

170\let\HDorg@bfseries\bfseries

\HD@bfseries

171\def\HD@bfseries{\futurelet\HD@hfil\HD@@bfseries}%

\HD@@bfseries

172\def\HD@@bfseries{%

173 \HDorg@bfseries

174 \ifx\HD@hfil\hfil

175 \expandafter\HD@@@bfseries

176 \fi

177}

\HD@@@bfseries

178\def\HD@@@bfseries\hfil#1\hfil{%

179 \ifx\\#1\\%

180 \else

181 \raisebox{\baselineskip}[0pt]{%

182 \kern-\HD@margin\relax

183 \pdfbookmark[\HD@toclevel@subindex]{#1}{HD.#1}%

184 \kern\HD@margin\relax

185 }%

186 \fi

187 \hfil#1\hfil

(9)

188}%

\HD@margin

189\def\HD@margin{1mm}

3.9 \theglossary

\HDorg@theglossary

190\let\HDorg@theglossary\theglossary

\theglossary

191\def\theglossary{%

192 \let\HDorg@glossary@prologue\glossary@prologue

193 \let\HDorg@writebookmark\Hy@writebookmark

194 \HD@sectionpatch

195 \def\glossary@prologue{%

196 \ifHD@numbered

197 \else

198 \begingroup

199 \let\Hy@writebookmark\HDorg@writebookmark

200 \stepcounter{HD@unique}%

201 \pdfbookmark[\HD@guesstoclevel{\HDorg@glossary@prologue}]%

202 {\changehistoryname}{glossary\theHD@unique}%

203 \endgroup

204 \fi

205 \HDorg@glossary@prologue

206 }%

207 \HDorg@theglossary

208}

\glossaryname

209\providecommand*{\glossaryname}{Change History}

\glossaryname

210\providecommand*{\changehistoryname}{\glossaryname}

3.10 Index

211\newcounter{HD@hypercount}

\HD@helplength

212\newlength{\HD@helplength}

\ifHD@savedest

213\newif\ifHD@savedest

214\HD@savedesttrue

215\AtBeginDocument{%

216 \HD@savedest@init

217}

218\RequirePackage{rerunfilecheck}[2009/12/10]

\HD@savedest@init

219\begingroup

220 \catcode‘\^^M=\active

221\@firstofone{\endgroup

222 \def\HD@savedest@init{%

(10)

223 \ifHD@savedest

224 \let\HDorg@tilde~%

225 \let~\HD@savedest@entry

226 \edef\HDorg@catcodeM{\the\catcode‘\^^M}%

227 \let\HDorg@M^^M%

228 \catcode‘\^^M=\active

229 \def^^M{}%

230 \InputIfFileExists{\jobname.hd}{}{}%

231 \let~\HDorg@tilde

232 \let^^M\HDorg@M

233 \catcode‘\^^M=\HDorg@catcodeM\relax

234 \newwrite\HD@savedest@out

235 \RerunFileCheck{\jobname.hd}{%

236 \immediate\closeout\HD@savedest@out

237 }{}%

238 \immediate\openout\HD@savedest@out=\jobname.hd\relax

239 \else

240 \let\HD@savedest@add\@gobble

241 \fi

242 }%

\HD@savedest@entry

243 \def\HD@savedest@entry#1^^M{%

244 \@namedef{HD.#1}{}%

245 }%

246}

\HD@savedest@add

247\def\HD@savedest@add#1{%

248 \immediate\write\HD@savedest@out{\string~#1}%

249}

\ifHD@targetraise

250\newif\ifHD@targetraise

251\HD@targetraisetrue

\HD@target

252\def\HD@target{%

253 \ifHD@targetraise

254 \ifhmode

255 \settoheight{\HD@helplength}{[H]}%

256 \addtolength{\HD@helplength}{0.4ex}%

257 \raisebox{\HD@helplength}[0pt][0pt]{%

258 \HD@maketarget

259 }%

260 \else

261 \HD@maketarget

262 \fi

263 \else

264 \HD@maketarget

265 \fi

266}

\HD@maketarget

267\def\HD@maketarget{%

268 \stepcounter{HD@hypercount}%

269 \def\HD@next{%

270 \llap{\hypertarget{HD.\the\c@HD@hypercount}{}\,}%

(11)

271 }%

272 \ifHD@savedest

273 \expandafter\ifx\csname HD.\the\c@HD@hypercount\endcsname\@empty

274 \else

275 \let\HD@next\relax

276 \fi

277 \fi

278 \HD@next

279}

\CodelineIndex

280\g@addto@macro\CodelineIndex{%

281 \let\special@index\HD@codeline@wrindex

282}

\PageIndex

283\g@addto@macro\PageIndex{%

284 \let\special@index\HD@page@wrindex

285}

\HD@codeline@wrindex

286\def\HD@codeline@wrindex#1{%

287 \begingroup

288 \let\HDorg@encapchar\encapchar

289 \def\encapchar##1\encapchar##2\@nil{%

290 \HDorg@encapchar

291 hdclindex{\the\c@HD@hypercount}{##1}%

292 }%

293 \codeline@wrindex{%

294 #1\encapchar\encapchar\@nil

295 }%

296 \endgroup

297}

\HD@page@wrindex

298\def\HD@page@wrindex#1{%

299 \begingroup

300 \let\HDorg@encapchar\encapchar

301 \def\encapchar##1\encapchar##2\@nil{%

302 \HDorg@encapchar

303 hdpindex{##1}%

304 }%

305 \HDorg@index{#1\encapchar\encapchar\@nil}%

306 \endgroup

307}

\hdclindex

308\def\hdclindex#1#2#3{%

309 \csname\ifx\\#2\\relax\else#2\fi\endcsname{%

310 \hyperlink{HD.#1}{#3}%

311 \HD@savedest@add{#1}%

312 }%

313}

\hdpindex

314\def\hdpindex#1#2{%

315 \csname\ifx\\#1\\relax\else#1\fi\endcsname{%

(12)

316 \hyperpage{#2}%

317 }%

318}

3.11 \PrintDescribeMacro

\HDorg@PrintDescribeMacro

319\let\HDorg@PrintDescribeMacro\PrintDescribeMacro

\PrintDescribeMacro

320\renewcommand\PrintDescribeMacro[1]{%

321 \begingroup

322 \let\HDorg@MacroFont\MacroFont

323 \def\MacroFont{%

324 \HD@target

325 \HDorg@MacroFont

326 }%

327 \HDorg@PrintDescribeMacro{#1}%

328 \endgroup

329}

3.12 \PrintMacroName

\HDorg@PrintMacroName

330\let\HDorg@PrintMacroName\PrintMacroName

\PrintMacroName

331\renewcommand\PrintMacroName[1]{%

332 \begingroup

333 \let\HDorg@MacroFont\MacroFont

334 \def\MacroFont{%

335 \HD@target

336 \HDorg@MacroFont

337 }%

338 \HDorg@PrintMacroName{#1}%

339 \endgroup

340}

3.13 \theCodelineNo

\HDorg@theCodelineNo

341\let\HDorg@theCodelineNo\theCodelineNo

\theCodelineNo

342\renewcommand*\theCodelineNo{%

343 \settowidth{\HD@helplength}{\HDorg@theCodelineNo\ }%

344 \ifdim\HD@helplength<\MacroIndent

345 \addtolength{\HD@helplength}{-\MacroIndent}%

346 \llap{%

347 \begingroup\HD@target\endgroup

348 \hspace*{-\HD@helplength}%

349 }%

350 \else

351 \HD@target

352 \fi

353 \HDorg@theCodelineNo

354}

(13)

\HDorg@index

355\AtBeginDocument{%

356 \let\HDorg@index\index

357}

3.14 \SpecialUsageIndex

\HDorg@SpecialUsageIndex

358\let\HDorg@SpecialUsageIndex\SpecialUsageIndex

359\renewcommand*\SpecialUsageIndex[1]{%

360 \@bsphack

361 \begingroup

362 \HD@target

363 \let\index\HDorg@index

364 \let\HDorg@encapchar\encapchar

365 \edef\encapchar usage{%

366 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%

367 }%

368 \HDorg@SpecialUsageIndex{#1}%

369 \endgroup

370 \@esphack

371}

3.15 \autoindex

372\begingroup\expandafter\expandafter\expandafter\endgroup

373\expandafter\ifx\csname autoindex\endcsname\relax

374\else

\HDorg@autoindex

375 \let\HDorg@autoindex\autoindex

\autoindex

376 \renewcommand*\autoindex[1]{%

377 \@bsphack

378 \begingroup

379 \HD@target

380 \let\index\HDorg@index

381 \let\HDorg@encapchar\encapchar

382 \edef\encapchar usage{%

383 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%

384 }%

385 \HDorg@autoindex{#1}%

386 \endgroup

387 \@esphack

388 }%

389\pdfstringdefDisableCommands{\let\autoindex\@gobble }

390\fi

3.16 \SpecialEnvIndex

\HDorg@SpecialEnvIndex

391\let\HDorg@SpecialEnvIndex\SpecialEnvIndex

\SpecialEnvIndex

392\renewcommand*\SpecialEnvIndex[1]{%

393 \@bsphack

(14)

394 \begingroup

395 \HD@target

396 \let\HDorg@encapchar\encapchar

397 \edef\encapchar usage{%

398 \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%

399 }%

400 \HDorg@SpecialEnvIndex{#1}%

401 \endgroup

402 \@esphack

403}

3.17 \SortIndex

\HDorg@SortIndex

404\let\HDorg@SortIndex\SortIndex

\SortIndex

405\renewcommand*{\SortIndex}[2]{%

406 \@bsphack

407 \begingroup

408 \let\index\HD@page@wrindex

409 \HDorg@SortIndex{#1}{#2}%

410 \endgroup

411 \@esphack

412}

3.18 \@wrglossary

\HDorg@wrglossary

413\let\HDorg@wrglossary\@wrglossary

\@wrglossary

414\def\@wrglossary#1{%

415 \let\HDorg@encapchar\encapchar

416 \def\encapchar##1\encapchar##2\@nil{%

417 \HDorg@encapchar

418 hdpindex{##1}%

419 }%

420 \HDorg@wrglossary{#1\encapchar\encapchar\@nil}%

421}

3.19 \MacroIndent

\MacroIndentautomatically calculated.

422\AfterLastShipout{%

423 \if@filesw

424 \immediate\write\@auxout{%

425 \string\providecommand\string\HD@SetMacroIndent[1]{}%

426 }%

427 \immediate\write\@auxout{%

428 \string\HD@SetMacroIndent{\number\value{CodelineNo}}%

429 }%

430 \fi

431}

(15)

\HD@SetMacroIndent

432\def\HD@SetMacroIndent#1{%

433 \begingroup

434 \value{CodelineNo}=#1\relax

435 \settowidth{\MacroIndent}{\HDorg@theCodelineNo\ }%

436 \global\MacroIndent\MacroIndent

437 \endgroup

438}

439⟨/package⟩

4 Installation

4.1 Download

Package. This package is available on CTAN1:

CTAN:macros/latex/contrib/hypdoc/hypdoc.dtx The source file.

CTAN:macros/latex/contrib/hypdoc/hypdoc.pdf Documentation.

4.2 Package installation

The best is to install the package with the package manager of your TEX distri- bution. If a manual installation is needed:

Unpacking. The .dtx file is a self-extracting docstrip archive. The files are extracted by running the.dtxthrough plain TEX:

tex hypdoc.dtx

TDS. Now the different files must be moved into the different directories in your installation TDS tree (also known astexmftree):

hypdoc.sty→tex/latex/hypdoc/hypdoc.sty hypdoc.pdf→doc/latex/hypdoc/hypdoc.pdf hypdoc.dtx→source/latex/hypdoc/hypdoc.dtx

If you have adocstrip.cfgthat configures and enablesdocstrip’s TDS installing feature, then some files can already be in the right place, see the documentation of docstrip.

4.3 Refresh file name databases

If your TEX distribution (TEX Live, MiKTEX, . . . ) relies on file name databases, you must refresh these. For example, TEX Live users runtexhashormktexlsr.

4.4 Some details for the interested

Unpacking with LATEX. The.dtxchooses its action depending on the format:

plain TEX: Rundocstripand extract the files.

LATEX: Generate the documentation.

1CTAN:pkg/hypdoc

(16)

If you insist on using LATEX for docstrip (really, docstrip does not need LATEX), then inform the autodetect routine about your intention:

latex \let\install=y\input{hypdoc.dtx}

Do not forget to quote the argument according to the demands of your shell.

Generating the documentation. You can use both the.dtx or the .drv to generate the documentation. The process can be configured by the configuration fileltxdoc.cfg. For instance, put this line into this file, if you want to have A4 as paper format:

\PassOptionsToClass{a4paper}{article}

An example follows how to generate the documentation with pdfLATEX:

pdflatex hypdoc.dtx

makeindex -s gind.ist hypdoc.idx pdflatex hypdoc.dtx

makeindex -s gind.ist hypdoc.idx pdflatex hypdoc.dtx

5 History

[2002/05/10 v1.0]

• First standalone version.

[2006/02/20 v1.1]

• Optionnumberedadded.

• \HD@savedest@initfixed (empty.hdfile triggered first page with fl ligature).

• Bookmarks for\listoffiguresand\listoftables.

• Documentation: features and usage added.

• LPPL 1.3.

[2006/04/27 v1.2]

• \HD@targetfixed (multicol.dtx).

[2006/06/01 v1.3]

• Support for packageamsdtx’s\autoindexadded.

[2006/06/02 v1.4]

• Bookmark fixed if there are several table of contents, bibliographies, glossaries, . . .

[2007/04/11 v1.5]

• Line ends sanitized.

(17)

[2007/11/12 v1.6]

• Bug fix in\listoffigures(Axel Sommerfeldt).

• Markup added in implementation section.

[2009/12/10 v1.7]

• Use of packagererunfilecheck.

[2010/02/03 v1.8]

• Fix for bug latex/4096 added.

[2010/03/26 v1.9]

• Definition of \HD@SetMacroIndexis provided in the.auxfile.

[2011/05/05 v1.10]

• \raiseboxin \HD@targetwith height and depth of 0pt(request of GL).

[2011/08/19 v1.11]

• Latest comma in option list for hyperref removed to avoid option clash because of LATEX 2011/06/27 with the new\in@.

[2016/05/16 v1.12]

• Documentation updates.

[2016/10/02 v1.13]

• Fixes to bookmarknames, also introduce\changehistoryname

[2018/09/07 v1.14]

• Do not loadthumpdf.

[2021-11-15 v1.15]

• removed an old, unneeded patch for latex/4096

• added a\pdfstringdefDisableCommandssetting for\autoindex

[2022-06-14 v1.16]

• Avoid to load hyperref if has been already loaded, issue #1

[2022-07-03 v1.17]

• Restore defintion of active control-m (issue 3)

(18)

6 Index

Numbers written in italic refer to the page where the corresponding entry is de- scribed; numbers underlined refer to the code line of the definition; plain numbers refer to the code lines where the entry is used.

Symbols

\, . . . 270

\@auxout . . . 424,427

\@bsphack . . . 360,377,393,406

\@empty . . . 37,46,47,70,73,273

\@esphack . . . 370,387,402,411

\@firstofone . . . 221

\@gobble . . . 43,44,70,73,240,389

\@ifpackageloaded . . . 13

\@ifstar . . . 62

\@ifundefined . . . 36,70,79,133

\@namedef . . . 61,244

\@nameuse . . . 62,73

\@nil . . . 289,294,301,305,416,420

\@pdfsubject . . . 37

\@undefined . . . 10

\@wrglossary . . . 413,414

\\ . . . 179,309,315

\␣ . . . 343,435

\^ . . . 220,226,228,233 A

\active . . . 220,228

\addtolength . . . 256,345

\advance . . . 153

\AfterLastShipout . . . 422

\and . . . 48

\AtBeginDocument . . . 215,355

\autoindex . . . 375,376 B

\baselineskip . . . 181

\bfseries . . . 148,170

\bibname . . . 133 C

\c@HD@hypercount . . . . . . . 270,273,291,366,383,398

\c@section . . . 80,83

\catcode . . . 220,226,228,233

\changehistoryname . . . 202,210

\closeout . . . 236

\codeline@wrindex . . . 293

\CodelineIndex . . . 280

\contentsname . . . 86,93

\count@ . . . 152,153,154

\cs . . . 45

\csname . . . 59,60,273,309,315,373 D

\DeclareOption . . . 6

E

\encapchar . . . 288,289, 294, 300, 301, 305, 364, 365, 381, 382, 396, 397, 415, 416, 420

\endcsname . . 59,60,273,309,315,373 F

\fileinfo . . . 38

\footnote . . . 44

\futurelet . . . 171 G

\g@addto@macro . . . 35,143,280,283

\glossary@prologue . . . 192,195

\glossaryname . . . 209,210 H

\HD@@@bfseries . . . 175,178

\HD@@bfseries . . . 171,172

\HD@@guesstoclevel . . . 67,69

\HD@@sectionpatch . . . 52,53,58

\HD@bfseries . . . 148,171

\HD@codeline@wrindex . . . 281,286

\HD@disable@writebookmark . . . . 55,65

\HD@end . . . 67,69

\HD@guesstoclevel . . . . 66,85,92,106,119,132,150,201

\HD@helplength . . . 212, 255, 256, 257, 343, 344, 345, 348

\HD@hfil . . . 171,174

\HD@maketarget . . . . 258,261,264,267

\HD@margin . . . 182,184,189

\HD@next . . . 269,275,278

\HD@numberedtrue . . . 6

\HD@page@wrindex . . . 284,298,408

\HD@savedest@add . . . 240,247,311

\HD@savedest@entry . . . 225,243

\HD@savedest@init . . . 216,219

\HD@savedest@out . . 234,236,238,248

\HD@savedesttrue . . . 214

\HD@sectionpatch . . . . . . . 50,96,110,123,135,142,194

\HD@SetMacroIndent . . . . 425,428,432

\HD@target . . . 252, 324, 335, 347, 351, 362, 379, 395

\HD@targetraisetrue . . . 251

\HD@toclevel@index . . . . 150,152,162

\HD@toclevel@subindex . . . 154,183

\hdclindex . . . 308

\HDorg@autoindex . . . 375,385

\HDorg@bfseries . . . 170,173

\HDorg@catcodeM . . . 226,233

(19)

\HDorg@encapchar . . . . . . . 288,290,300,302,364, 366, 381, 383, 396, 398, 415, 417

\HDorg@glossary@prologue 192,201,205

\HDorg@index . . . 305,355,363,380

\HDorg@index@prologue . . . 140,166

\HDorg@listoffigures . . 101,106,111

\HDorg@listoftables . . . 114,119,124

\HDorg@M . . . 227,232

\HDorg@MacroFont . . 322,325,333,336

\HDorg@PrintDescribeMacro . . 319,327

\HDorg@PrintMacroName . . . 330,338

\HDorg@SortIndex . . . 404,409

\HDorg@SpecialEnvIndex . . . . 391,400

\HDorg@SpecialUsageIndex . . . 358

\HDorg@tableofcontents . . . . . . . 76,85,87,92,97 \HDorg@thebibliography 127,132,136 \HDorg@theCodelineNo 341,343,353,435 \HDorg@theglossary . . . 190,207 \HDorg@theindex . . . 138,168 \HDorg@tilde . . . 224,231 \HDorg@wrglossary . . . 413,420 \HDorg@writebookmark . . . . . . . 141,146,161,193,199 \hdpindex . . . 314

\headheight . . . 28

\headsep . . . 28

\hfil . . . 174,178,187 \hspace . . . 348

\Hy@UseMaketitleInfos . . . 35

\Hy@writebookmark . . . . . . . 55,141,146,161,193,199 \hypercalcbp . . . 27

\hyperlink . . . 310

\hyperpage . . . 316

\hypersetup . . . 21,38 \hypertarget . . . 270

I \if@filesw . . . 423

\ifcase . . . 83

\ifdim . . . 344

\ifHD@numbered . . . 5,

51,89,103,116,129,144,157,196 \ifHD@savedest . . . 213,223,272 \ifHD@targetraise . . . 250,253 \ifhmode . . . 254

\ifx . 10,37,174,179,273,309,315,373 \immediate . . . 236,238,248,424,427 \index . . . 356,363,380,408 \index@prologue . . . 140,150,156 \indexname . . . 163

\IndexParms . . . 143

\InputIfFileExists . . . 230

J \jobname . . . 230,235,238 K \kern . . . 182,184 L \listfigurename . . . 107

\listoffigures . . . 101,102 \listoftables . . . 114,115 \listtablename . . . 120

\llap . . . 270,346 M \MacroFont . . . 322,323,333,334 \MacroIndent . . . 344,345,435,436 N \NeedsTeXFormat . . . 2

\newcounter . . . 31,211 \newif . . . 5,213,250 \newlength . . . 212

\newwrite . . . 234

\normalfont . . . 46

\number . . . 33,428 \numexpr . . . 10

O \openout . . . 238

P \PackageWarning . . . 14

\PageIndex . . . 283

\paperheight . . . 28

\pdfbookmark . . . 85,

92, 106, 119, 132, 162, 183, 201 \pdfstringdefDisableCommands 42,389 \PrintDescribeMacro . . . 319,320 \PrintMacroName . . . 330,331 \ProcessOptions . . . 7

\providecommand . . . 209,210,425 \ProvidesPackage . . . 3

R \raisebox . . . 181,257 \refname . . . 133

\renewcommand . . . 32,

320, 331, 342, 359, 376, 392, 405 \RequirePackage . . . . 8,9,11,15,218 \RerunFileCheck . . . 235

S \scshape . . . 47

\section . . . 67

\settoheight . . . 255

\settowidth . . . 343,435 \SortIndex . . . 404,405 \special@index . . . 281,284 \SpecialEnvIndex . . . 391,392 \SpecialUsageIndex . . . 358,359 \stepcounter . . . 84,

91, 105, 118, 131, 160, 200, 268

(20)

T

\tableofcontents . . . 76,77

\textbackslash . . . 45

\thanks . . . 43

\the 154,226,270,273,291,366,383,398

\thebibliography . . . 127,128

\theCodelineNo . . . 341,342

\theglossary . . . 190,191

\theHD@unique . . . .

32,86,93,107,120,133,163,202

\theindex . . . 138,139

\topmargin . . . 28 V

\value . . . 33,428,434 W

\write . . . 248,424,427

References

Related documents

Le lieu et le titre sont mis en premier dans la seconde colonne, chacun dans la bonne fonte, et en les faisant suivre d’un point. Ensuite, on ajoute, si elle existe,

The latex8 option instructs IEEEconf to violate the IEEE Computer Society Press guidelines in the same manner that the latex8 package provided by the IEEE Computer Society

M AGNETICS formats present a difficulty in that compsoc and transmag journal (but not compsoc conference) papers place the abstract and index terms sections in single column format

The package consists of a preprocessor that converts an indented list tree format into L A TEX input (plain TEX doesn’t seem to work), and some macro files which lay out the trees

\nodeconnect takes the same arguments as in tree-dvips, with a final optional [ ] argument taking PSTricks graphics parameters:.. (4) \nodeconnect[from loc]{from node}[to

Certain derived units have been given special names and symbols, and these special names and symbols may themselves be used in combination with those for base and other derived units

We define a macro for the external massaging of the ABC files and another one for the case the user doesn’t trust or have available the \write18 trick; the second one spits out a

If you use more than one cusp within your hbrace speci, you can separate scripts using &amp; which will place them above/below subsequent brace cusps, similar to separating

• titlepage class option: The abstract heading (i.e., value of \abstractname) is typeset centered in a bold font; the text is set in the normal font and to the normal width..

Wie bereits gesagt, sind die Enden von Absätzen nicht wirklich zuverlässig erkennbar, so dass häufig erst bei dem Beginn einer neuen Struktur auf ein Ende geschlossen werden kann.

The package does nothing if the super option has not been given to natbib. This means that the source can be written without needing to decide where citations will to appear, with

We are unlocking land and enabling the delivery of over 400,000 homes across the state, fast-tracking infrastructure, providing property tax reform, offering shared equity

public void add(int index, Object item) public void remove(int index). public Object get(int index)

For example, suppose you are using the indextools package and you want a general index and a scripture index, you can do something

This is based on the revenue of economic activities in 14 marine industry sub-sectors, including water-based transport, domestic and international tourism, marinas

colorwebfull.pdf meta-comments, User Documentation, Package Installer, Documentation Driver, Documenta- tion Style, File Descriptions, Implementation, Change History, and Index

The package introduces a sort entry for chemical names that are preceded by numbers and other prefixes to ensure a correct ordering in the index..

The preexisting macro from the doc package is redefined to create hyperlinked index entries, include an optional class, and also to place an ‘Env’ tag in front of the name in

The hep-text package extends L A TEX lists using the enumitem package and provides some text macros... The package can be loaded by

Package xcolor provides macros for extracting color values and converting color data to other color models.. If this package is loaded, the full range of color specifications

Finally, the \printindex command is used in your L A TEX document to indicate where the file foo.idx should be inserted, i.e., where the index should appear in your document.. The

This package provides hyperlink support for the doc package. I have included it in this list to remind me that cross-referencing between documentation and implementation of methods

An empirically developed weighted disclosure index known as the Intellectual Capital Disclosure index (ICD index) was constructed in collaboration with a local government