Debian Codegraph @

texmf-dist/source/latex/gettitlestring/gettitlestring.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: gettitlestring.dtx
4 % Version: 2019/12/15 v1.6
5 % Info: Cleanup title references
6 %
7 % Copyright (C)
8 % 2009, 2010 Heiko Oberdiek
9 % 2016-2019 Oberdiek Package Support Group
10 % https://github.com/ho-tex/gettitlestring/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/gettitlestring/issues
27 %
28 % The Base Interpreter refers to any `TeX-Format',
29 % because some files are installed in TDS:tex/generic//.
30 %
31 % This work consists of the main source file gettitlestring.dtx
32 % and the derived files
33 % gettitlestring.sty, gettitlestring.pdf, gettitlestring.ins,
34 % gettitlestring.drv, gettitlestring-test1.tex,
35 % gettitlestring-test2.tex.
36 %
37 % Distribution:
38 % CTAN:macros/latex/contrib/gettitlestring/gettitlestring.dtx
39 % CTAN:macros/latex/contrib/gettitlestring/gettitlestring.pdf
40 %
41 % Unpacking:
42 % (a) If gettitlestring.ins is present:
43 % tex gettitlestring.ins
44 % (b) Without gettitlestring.ins:
45 % tex gettitlestring.dtx
46 % (c) If you insist on using LaTeX
47 % latex \let\install=y\input{gettitlestring.dtx}
48 % (quote the arguments according to the demands of your shell)
49 %
50 % Documentation:
51 % (a) If gettitlestring.drv is present:
52 % latex gettitlestring.drv
53 % (b) Without gettitlestring.drv:
54 % latex gettitlestring.dtx; ...
55 % The class ltxdoc loads the configuration file ltxdoc.cfg
56 % if available. Here you can specify further options, e.g.
57 % use A4 as paper format:
58 % \PassOptionsToClass{a4paper}{article}
59 %
60 % Programm calls to get the documentation (example):
61 % pdflatex gettitlestring.dtx
62 % makeindex -s gind.ist gettitlestring.idx
63 % pdflatex gettitlestring.dtx
64 % makeindex -s gind.ist gettitlestring.idx
65 % pdflatex gettitlestring.dtx
66 %
67 % Installation:
68 % TDS:tex/generic/gettitlestring/gettitlestring.sty
69 % TDS:doc/latex/gettitlestring/gettitlestring.pdf
70 % TDS:source/latex/gettitlestring/gettitlestring.dtx
71 %
72 %<*ignore>
73 \begingroup
74 \catcode123=1 %
75 \catcode125=2 %
76 \def\x{LaTeX2e}%
77 \expandafter\endgroup
78 \ifcase 0\ifx\install y1\fi\expandafter
79 \ifx\csname processbatchFile\endcsname\relax\else1\fi
80 \ifx\fmtname\x\else 1\fi\relax
81 \else\csname fi\endcsname
82 %</ignore>
83 %<*install>
84 \input docstrip.tex
85 \Msg{************************************************************************}
86 \Msg{* Installation}
87 \Msg{* Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)}
88 \Msg{************************************************************************}
89
90 \keepsilent
91 \askforoverwritefalse
92
93 \let\MetaPrefix\relax
94 \preamble
95
96 This is a generated file.
97
98 Project: gettitlestring
99 Version: 2019/12/15 v1.6
100
101 Copyright (C)
102 2009, 2010 Heiko Oberdiek
103 2016-2019 Oberdiek Package Support Group
104
105 This work may be distributed and/or modified under the
106 conditions of the LaTeX Project Public License, either
107 version 1.3c of this license or (at your option) any later
108 version. This version of this license is in
109 https://www.latex-project.org/lppl/lppl-1-3c.txt
110 and the latest version of this license is in
111 https://www.latex-project.org/lppl.txt
112 and version 1.3 or later is part of all distributions of
113 LaTeX version 2005/12/01 or later.
114
115 This work has the LPPL maintenance status "maintained".
116
117 The Current Maintainers of this work are
118 Heiko Oberdiek and the Oberdiek Package Support Group
119 https://github.com/ho-tex/gettitlestring/issues
120
121
122 The Base Interpreter refers to any `TeX-Format',
123 because some files are installed in TDS:tex/generic//.
124
125 This work consists of the main source file gettitlestring.dtx
126 and the derived files
127 gettitlestring.sty, gettitlestring.pdf, gettitlestring.ins,
128 gettitlestring.drv, gettitlestring-test1.tex,
129 gettitlestring-test2.tex.
130
131 \endpreamble
132 \let\MetaPrefix\DoubleperCent
133
134 \generate{%
135 \file{gettitlestring.ins}{\from{gettitlestring.dtx}{install}}%
136 \file{gettitlestring.drv}{\from{gettitlestring.dtx}{driver}}%
137 \usedir{tex/generic/gettitlestring}%
138 \file{gettitlestring.sty}{\from{gettitlestring.dtx}{package}}%
139 }
140
141 \catcode32=13\relax% active space
142 \let =\space%
143 \Msg{************************************************************************}
144 \Msg{*}
145 \Msg{* To finish the installation you have to move the following}
146 \Msg{* file into a directory searched by TeX:}
147 \Msg{*}
148 \Msg{* gettitlestring.sty}
149 \Msg{*}
150 \Msg{* To produce the documentation run the file `gettitlestring.drv'}
151 \Msg{* through LaTeX.}
152 \Msg{*}
153 \Msg{* Happy TeXing!}
154 \Msg{*}
155 \Msg{************************************************************************}
156
157 \endbatchfile
158 %</install>
159 %<*ignore>
160 \fi
161 %</ignore>
162 %<*driver>
163 \NeedsTeXFormat{LaTeX2e}
164 \ProvidesFile{gettitlestring.drv}%
165 [2019/12/15 v1.6 Cleanup title references (HO)]%
166 \documentclass{ltxdoc}
167 \usepackage{holtxdoc}[2011/11/22]
168 \begin{document}
169 \DocInput{gettitlestring.dtx}%
170 \end{document}
171 %</driver>
172 % \fi
173 %
174 %
175 %
176 % \GetFileInfo{gettitlestring.drv}
177 %
178 % \title{The \xpackage{gettitlestring} package}
179 % \date{2019/12/15 v1.6}
180 % \author{Heiko Oberdiek\thanks
181 % {Please report any issues at \url{https://github.com/ho-tex/gettitlestring/issues}}}
182 %
183 % \maketitle
184 %
185 % \begin{abstract}
186 % The \LaTeX\ package addresses packages that are dealing with
187 % references to titles (\cs{section}, \cs{caption}, \dots).
188 % The package tries to remove \cs{label} and other
189 % commands from title strings.
190 % \end{abstract}
191 %
192 % \tableofcontents
193 %
194 % \section{Documentation}
195 %
196 % \subsection{Macros}
197 %
198 % \begin{declcs}{GetTitleStringSetup} \M{key value list}
199 % \end{declcs}
200 % The options are given as comma separated key value pairs.
201 % See section \ref{sec:options}.
202 %
203 % \begin{declcs}{GetTitleString} \M{text}\\
204 % \cs{GetTitleStringExpand} \M{text}\\
205 % \cs{GetTitleStringNonExpand} \M{text}
206 % \end{declcs}
207 % Macro \cs{GetTitleString} tries to remove unwanted stuff from \meta{text}
208 % the result is stored in Macro \cs{GetTitleStringResult}.
209 % Two methods are available:
210 % \begin{description}
211 % \item[\cs{GetTitleStringExpand}:]
212 % The \meta{text} is expanded in a context where the unwanted
213 % macros are redefined to remove themselves.
214 % This is the method used in packages \xpackage{titleref}~\cite{titleref},
215 % \xpackage{zref-titleref}~\cite{zref}
216 % or class \xclass{memoir}~\cite{memoir}.
217 % \cs{protect} is supported, but fragile material might break.
218 % \item[\cs{GetTitleStringNonExpand}:]
219 % The \meta{text} is not expanded. Thus the removal of unwanted
220 % material is more difficult. It is especially removed at the
221 % start of the \meta{text} and spaces are removed from the end.
222 % Currently only \cs{label} is removed in the whole string,
223 % if it is not hidden inside curly braces or part of macro
224 % definitions. Thus the removal of unwanted stuff might not be
225 % complete, but fragile material will not break.
226 % (But the result string can break at a later time, of course).
227 % \end{description}
228 % Option \xoption{expand} controls which method is used by
229 % macro \cs{GetTitleString}.
230 %
231 % \begin{declcs}{GetTitleStringDisableCommands} \M{code}
232 % \end{declcs}
233 % The \meta{code} is called right before the
234 % text is expanded in \cs{GetTitleStringExpand}.
235 % Additional definitions can be given for macros that
236 % should be removed.
237 % Keep in mind that expansion means that the definitions
238 % must work in expandable context. Macros like
239 % \cs{@ifstar} or \cs{@ifnextchar} or optional arguments
240 % will not work. The macro names in \meta{code} may contain
241 % the at sign |@|, it has catcode 11 (letter).
242 %
243 % \subsection{Options}\label{sec:options}
244 %
245 % \begin{description}
246 % \item[\xoption{expand}:] Boolean option, takes values |true| or |false|.
247 % No value means |true|. The option specifies the method to remove
248 % unwanted stuff from the title string, see below.
249 % \end{description}
250 % Options can be set at the following places:
251 % \begin{itemize}
252 % \item \cs{usepackage}
253 % \item Configuration file \xfile{gettitlestring.cfg}.
254 % \item \cs{GetTitleStringSetup}
255 % \end{itemize}
256 %
257 % \StopEventually{
258 % }
259 %
260 % \section{Implementation}
261 % \begin{macrocode}
262 %<*package>
263 % \end{macrocode}
264 % Reload check, especially if the package is not used with \LaTeX.
265 % \begin{macrocode}
266 \begingroup\catcode61\catcode48\catcode32=10\relax%
267 \catcode13=5 % ^^M
268 \endlinechar=13 %
269 \catcode35=6 % #
270 \catcode39=12 % '
271 \catcode44=12 % ,
272 \catcode45=12 % -
273 \catcode46=12 % .
274 \catcode58=12 % :
275 \catcode64=11 % @
276 \catcode123=1 % {
277 \catcode125=2 % }
278 \expandafter\let\expandafter\x\csname [email protected]\endcsname
279 \ifx\x\relax % plain-TeX, first loading
280 \else
281 \def\empty{}%
282 \ifx\x\empty % LaTeX, first loading,
283 % variable is initialized, but \ProvidesPackage not yet seen
284 \else
285 \expandafter\ifx\csname PackageInfo\endcsname\relax
286 \def\x#1#2{%
287 \immediate\write-1{Package #1 Info: #2.}%
288 }%
289 \else
290 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
291 \fi
292 \x{gettitlestring}{The package is already loaded}%
293 \aftergroup\endinput
294 \fi
295 \fi
296 \endgroup%
297 % \end{macrocode}
298 % Package identification:
299 % \begin{macrocode}
300 \begingroup\catcode61\catcode48\catcode32=10\relax%
301 \catcode13=5 % ^^M
302 \endlinechar=13 %
303 \catcode35=6 % #
304 \catcode39=12 % '
305 \catcode40=12 % (
306 \catcode41=12 % )
307 \catcode44=12 % ,
308 \catcode45=12 % -
309 \catcode46=12 % .
310 \catcode47=12 % /
311 \catcode58=12 % :
312 \catcode64=11 % @
313 \catcode91=12 % [
314 \catcode93=12 % ]
315 \catcode123=1 % {
316 \catcode125=2 % }
317 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
318 \def\x#1#2#3[#4]{\endgroup
319 \immediate\write-1{Package: #3 #4}%
320 \xdef#1{#4}%
321 }%
322 \else
323 \def\x#1#2[#3]{\endgroup
324 #2[{#3}]%
325 \ifx#1\@undefined
326 \xdef#1{#3}%
327 \fi
328 \ifx#1\relax
329 \xdef#1{#3}%
330 \fi
331 }%
332 \fi
333 \expandafter\x\csname [email protected]\endcsname
334 \ProvidesPackage{gettitlestring}%
335 [2019/12/15 v1.6 Cleanup title references (HO)]%
336 % \end{macrocode}
337 %
338 % \begin{macrocode}
339 \begingroup\catcode61\catcode48\catcode32=10\relax%
340 \catcode13=5 % ^^M
341 \endlinechar=13 %
342 \catcode123=1 % {
343 \catcode125=2 % }
344 \catcode64=11 % @
345 \def\x{\endgroup
346 \expandafter\edef\csname GTS@AtEnd\endcsname{%
347 \endlinechar=\the\endlinechar\relax
348 \catcode13=\the\catcode13\relax
349 \catcode32=\the\catcode32\relax
350 \catcode35=\the\catcode35\relax
351 \catcode61=\the\catcode61\relax
352 \catcode64=\the\catcode64\relax
353 \catcode123=\the\catcode123\relax
354 \catcode125=\the\catcode125\relax
355 }%
356 }%
357 \x\catcode61\catcode48\catcode32=10\relax%
358 \catcode13=5 % ^^M
359 \endlinechar=13 %
360 \catcode35=6 % #
361 \catcode64=11 % @
362 \catcode123=1 % {
363 \catcode125=2 % }
364 \def\TMP@EnsureCode#1#2{%
365 \edef\GTS@AtEnd{%
366 \GTS@AtEnd
367 \catcode#1=\the\catcode#1\relax
368 }%
369 \catcode#1=#2\relax
370 }
371 \TMP@EnsureCode{42}{12}% *
372 \TMP@EnsureCode{44}{12}% ,
373 \TMP@EnsureCode{45}{12}% -
374 \TMP@EnsureCode{46}{12}% .
375 \TMP@EnsureCode{47}{12}% /
376 \TMP@EnsureCode{91}{12}% [
377 \TMP@EnsureCode{93}{12}% ]
378 \edef\GTS@AtEnd{\GTS@AtEnd\noexpand\endinput}
379 % \end{macrocode}
380 %
381 % \subsection{Options}
382 %
383 % \begin{macrocode}
384 \RequirePackage{kvoptions}[2009/07/17]
385 \SetupKeyvalOptions{%
386 family=gettitlestring,%
387 prefix=GTS@%
388 }
389 \newcommand*{\GetTitleStringSetup}{%
390 \setkeys{gettitlestring}%
391 }
392 \DeclareBoolOption{expand}
393 \InputIfFileExists{gettitlestring.cfg}{}{}
394 \ProcessKeyvalOptions*\relax
395 % \end{macrocode}
396 %
397 % \subsection{\cs{GetTitleString}}
398 %
399 % \begin{macro}{\GetTitleString}
400 % \begin{macrocode}
401 \newcommand*{\GetTitleString}{%
402 \ifGTS@expand
403 \expandafter\GetTitleStringExpand
404 \else
405 \expandafter\GetTitleStringNonExpand
406 \fi
407 }
408 % \end{macrocode}
409 % \end{macro}
410 % \begin{macro}{\GetTitleStringExpand}
411 % \begin{macrocode}
412 \newcommand{\GetTitleStringExpand}[1]{%
413 \def\GetTitleStringResult{#1}%
414 \begingroup
415 \GTS@DisablePredefinedCmds
416 \GTS@DisableHook
417 \edef\x{\endgroup
418 \noexpand\def\noexpand\GetTitleStringResult{%
419 \GetTitleStringResult
420 }%
421 }%
422 \x
423 }
424 % \end{macrocode}
425 % \end{macro}
426 % \begin{macro}{\GetTitleString}
427 % \begin{macrocode}
428 \newcommand{\GetTitleStringNonExpand}[1]{%
429 \def\GetTitleStringResult{#1}%
430 \global\let\GTS@GlobalString\GetTitleStringResult
431 \begingroup
432 \GTS@RemoveLeft
433 \GTS@RemoveRight
434 \endgroup
435 \let\GetTitleStringResult\GTS@GlobalString
436 }
437 % \end{macrocode}
438 % \end{macro}
439 %
440 % \subsubsection{Expand method}
441 %
442 % \begin{macro}{\GTS@DisablePredefinedCmds}
443 % \begin{macrocode}
444 \def\GTS@DisablePredefinedCmds{%
445 \let\label\@gobble
446 \let\zlabel\@gobble
447 \let\zref@label\@gobble
448 \let\zref@labelbylist\@gobbletwo
449 \let\zref@labelbyprops\@gobbletwo
450 \let\index\@gobble
451 \let\glossary\@gobble
452 \let\markboth\@gobbletwo
453 \let\@mkboth\@gobbletwo
454 \let\markright\@gobble
455 \let\phantomsection\@empty
456 \def\addcontentsline{\expandafter\@gobble\@gobbletwo}%
457 \let\raggedright\@empty
458 \let\raggedleft\@empty
459 \let\centering\@empty
460 \let\protect\@unexpandable@protect
461 \let\enit@format\@empty % package enumitem
462 }
463 % \end{macrocode}
464 % \end{macro}
465 %
466 % \begin{macro}{\GTS@DisableHook}
467 % \begin{macrocode}
468 \providecommand*{\GTS@DisableHook}{}
469 % \end{macrocode}
470 % \end{macro}
471 % \begin{macro}{\GetTitleStringDisableCommands}
472 % \begin{macrocode}
473 \def\GetTitleStringDisableCommands{%
474 \begingroup
475 \makeatletter
476 \GTS@DisableCommands
477 }
478 % \end{macrocode}
479 % \end{macro}
480 % \begin{macro}{\GTS@DisableCommands}
481 % \begin{macrocode}
482 \long\def\GTS@DisableCommands#1{%
483 \toks0=\expandafter{\GTS@DisableHook}%
484 \toks2={#1}%
485 \xdef\GTS@GlobalString{\the\toks0 \the\toks2}%
486 \endgroup
487 \let\GTS@DisableHook\GTS@GlobalString
488 }
489 % \end{macrocode}
490 % \end{macro}
491 %
492 % \subsubsection{Non-expand method}
493 %
494 % \begin{macrocode}
495 \def\GTS@RemoveLeft{%
496 \toks@\expandafter\expandafter\expandafter{%
497 \expandafter\GTS@Car\GTS@GlobalString{}{}{}{}\GTS@Nil
498 }%
499 \edef\GTS@Token{\the\toks@}%
500 \GTS@PredefinedLeftCmds
501 \expandafter\futurelet\expandafter\GTS@Token
502 \expandafter\GTS@TestLeftSpace\GTS@GlobalString\GTS@Nil
503 \GTS@End
504 }
505 \def\GTS@End{}
506 \long\def\GTS@TestLeft#1#2{%
507 \def\GTS@temp{#1}%
508 \ifx\GTS@temp\GTS@Token
509 \toks@\expandafter\expandafter\expandafter{%
510 \expandafter#2\GTS@GlobalString\GTS@Nil
511 }%
512 \expandafter\GTS@TestLeftEnd
513 \fi
514 }
515 \long\def\GTS@TestLeftEnd#1\GTS@End{%
516 \xdef\GTS@GlobalString{\the\toks@}%
517 \GTS@RemoveLeft
518 }
519 \long\def\GTS@Car#1#2\GTS@Nil{#1}
520 \long\def\GTS@Cdr#1#2\GTS@Nil{#2}
521 \long\def\GTS@CdrTwo#1#2#3\GTS@Nil{#3}
522 \long\def\GTS@CdrThree#1#2#3#4\GTS@Nil{#4}
523 \long\def\GTS@CdrFour#1#2#3#4#5\GTS@Nil{#5}
524 \long\def\GTS@TestLeftSpace#1\GTS@Nil{%
525 \ifx\GTS@Token\@sptoken
526 \toks@\expandafter{%
527 \romannumeral-0\GTS@GlobalString
528 }%
529 \expandafter\GTS@TestLeftEnd
530 \fi
531 }
532 % \end{macrocode}
533 % \begin{macro}{\GTS@PredefinedLeftCmds}
534 % \begin{macrocode}
535 \def\GTS@PredefinedLeftCmds{%
536 \GTS@TestLeft\Hy@phantomsection\GTS@Cdr
537 \GTS@TestLeft\Hy@SectionAnchor\GTS@Cdr
538 \GTS@TestLeft\Hy@SectionAnchorHref\GTS@CdrTwo
539 \GTS@TestLeft\label\GTS@CdrTwo
540 \GTS@TestLeft\zlabel\GTS@CdrTwo
541 \GTS@TestLeft\index\GTS@CdrTwo
542 \GTS@TestLeft\glossary\GTS@CdrTwo
543 \GTS@TestLeft\markboth\GTS@CdrThree
544 \GTS@TestLeft\@mkboth\GTS@CdrThree
545 \GTS@TestLeft\addcontentsline\GTS@CdrFour
546 \GTS@TestLeft\enit@format\GTS@Cdr % package enumitem
547 }
548 % \end{macrocode}
549 % \end{macro}
550 %
551 % \begin{macrocode}
552 \def\GTS@RemoveRight{%
553 \toks@{}%
554 \expandafter\GTS@TestRightLabel\GTS@GlobalString
555 \label{}\GTS@Nil\@nil
556 \GTS@RemoveRightSpace
557 }
558 \begingroup
559 \def\GTS@temp#1{\endgroup
560 \def\GTS@RemoveRightSpace{%
561 \expandafter\GTS@TestRightSpace\GTS@GlobalString
562 \GTS@Nil#1\GTS@Nil\@nil
563 }%
564 }%
565 \GTS@temp{ }
566 \def\GTS@TestRightSpace#1 \GTS@Nil#2\@nil{%
567 \ifx\relax#2\relax
568 \else
569 \gdef\GTS@GlobalString{#1}%
570 \expandafter\GTS@RemoveRightSpace
571 \fi
572 }
573 \def\GTS@TestRightLabel#1\label#2#3\GTS@Nil#4\@nil{%
574 \def\GTS@temp{#3}%
575 \ifx\GTS@temp\@empty
576 \expandafter\gdef\expandafter\GTS@GlobalString\expandafter{%
577 \the\toks@
578 #1%
579 }%
580 \expandafter\@gobble
581 \else
582 \expandafter\@firstofone
583 \fi
584 {%
585 \toks@\expandafter{\the\toks@#1}%
586 \GTS@TestRightLabel#3\GTS@Nil\@nil
587 }%
588 }
589 % \end{macrocode}
590 %
591 % \begin{macrocode}
592 \GTS@AtEnd%
593 %</package>
594 % \end{macrocode}
595 %% \section{Installation}
596 %
597 % \subsection{Download}
598 %
599 % \paragraph{Package.} This package is available on
600 % CTAN\footnote{\CTANpkg{gettitlestring}}:
601 % \begin{description}
602 % \item[\CTAN{macros/latex/contrib/gettitlestring/gettitlestring.dtx}] The source file.
603 % \item[\CTAN{macros/latex/contrib/gettitlestring/gettitlestring.pdf}] Documentation.
604 % \end{description}
605 %
606 %
607 % \paragraph{Bundle.} All the packages of the bundle `oberdiek'
608 % are also available in a TDS compliant ZIP archive. There
609 % the packages are already unpacked and the documentation files
610 % are generated. The files and directories obey the TDS standard.
611 % \begin{description}
612 % \item[\CTANinstall{install/macros/latex/contrib/gettitlestring.tds.zip}]
613 % \end{description}
614 % \emph{TDS} refers to the standard ``A Directory Structure
615 % for \TeX\ Files'' (\CTANpkg{tds}). Directories
616 % with \xfile{texmf} in their name are usually organized this way.
617 %
618 % \subsection{Bundle installation}
619 %
620 % \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
621 % TDS tree (also known as \xfile{texmf} tree) of your choice.
622 % Example (linux):
623 % \begin{quote}
624 % |unzip oberdiek.tds.zip -d ~/texmf|
625 % \end{quote}
626 %
627 % \subsection{Package installation}
628 %
629 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
630 % \docstrip\ archive. The files are extracted by running the
631 % \xfile{.dtx} through \plainTeX:
632 % \begin{quote}
633 % \verb|tex gettitlestring.dtx|
634 % \end{quote}
635 %
636 % \paragraph{TDS.} Now the different files must be moved into
637 % the different directories in your installation TDS tree
638 % (also known as \xfile{texmf} tree):
639 % \begin{quote}
640 % \def\t{^^A
641 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
642 % gettitlestring.sty & tex/generic/gettitlestring/gettitlestring.sty\\
643 % gettitlestring.pdf & doc/latex/gettitlestring/gettitlestring.pdf\\
644 % gettitlestring.dtx & source/latex/gettitlestring/gettitlestring.dtx\\
645 % \end{tabular}^^A
646 % }^^A
647 % \sbox0{\t}^^A
648 % \ifdim\wd0>\linewidth
649 % \begingroup
650 % \advance\linewidth by\leftmargin
651 % \advance\linewidth by\rightmargin
652 % \edef\x{\endgroup
653 % \def\noexpand\lw{\the\linewidth}^^A
654 % }\x
655 % \def\lwbox{^^A
656 % \leavevmode
657 % \hbox to \linewidth{^^A
658 % \kern-\leftmargin\relax
659 % \hss
660 % \usebox0
661 % \hss
662 % \kern-\rightmargin\relax
663 % }^^A
664 % }^^A
665 % \ifdim\wd0>\lw
666 % \sbox0{\small\t}^^A
667 % \ifdim\wd0>\linewidth
668 % \ifdim\wd0>\lw
669 % \sbox0{\footnotesize\t}^^A
670 % \ifdim\wd0>\linewidth
671 % \ifdim\wd0>\lw
672 % \sbox0{\scriptsize\t}^^A
673 % \ifdim\wd0>\linewidth
674 % \ifdim\wd0>\lw
675 % \sbox0{\tiny\t}^^A
676 % \ifdim\wd0>\linewidth
677 % \lwbox
678 % \else
679 % \usebox0
680 % \fi
681 % \else
682 % \lwbox
683 % \fi
684 % \else
685 % \usebox0
686 % \fi
687 % \else
688 % \lwbox
689 % \fi
690 % \else
691 % \usebox0
692 % \fi
693 % \else
694 % \lwbox
695 % \fi
696 % \else
697 % \usebox0
698 % \fi
699 % \else
700 % \lwbox
701 % \fi
702 % \else
703 % \usebox0
704 % \fi
705 % \end{quote}
706 % If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
707 % TDS installing feature, then some files can already be in the right
708 % place, see the documentation of \docstrip.
709 %
710 % \subsection{Refresh file name databases}
711 %
712 % If your \TeX~distribution
713 % (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
714 % these. For example, \TeX\,Live\ users run \verb|texhash| or
715 % \verb|mktexlsr|.
716 %
717 % \subsection{Some details for the interested}
718 %
719 % \paragraph{Unpacking with \LaTeX.}
720 % The \xfile{.dtx} chooses its action depending on the format:
721 % \begin{description}
722 % \item[\plainTeX:] Run \docstrip\ and extract the files.
723 % \item[\LaTeX:] Generate the documentation.
724 % \end{description}
725 % If you insist on using \LaTeX\ for \docstrip\ (really,
726 % \docstrip\ does not need \LaTeX), then inform the autodetect routine
727 % about your intention:
728 % \begin{quote}
729 % \verb|latex \let\install=y\input{gettitlestring.dtx}|
730 % \end{quote}
731 % Do not forget to quote the argument according to the demands
732 % of your shell.
733 %
734 % \paragraph{Generating the documentation.}
735 % You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
736 % the documentation. The process can be configured by the
737 % configuration file \xfile{ltxdoc.cfg}. For instance, put this
738 % line into this file, if you want to have A4 as paper format:
739 % \begin{quote}
740 % \verb|\PassOptionsToClass{a4paper}{article}|
741 % \end{quote}
742 % An example follows how to generate the
743 % documentation with pdf\LaTeX:
744 % \begin{quote}
745 %\begin{verbatim}
746 %pdflatex gettitlestring.dtx
747 %makeindex -s gind.ist gettitlestring.idx
748 %pdflatex gettitlestring.dtx
749 %makeindex -s gind.ist gettitlestring.idx
750 %pdflatex gettitlestring.dtx
751 %\end{verbatim}
752 % \end{quote}
753 %
754 % \begin{thebibliography}{9}
755 %
756 % \bibitem{memoir}
757 % Peter Wilson, Lars Madsen:
758 % \textit{The Memoir Class};
759 % 2009/11/17 v1.61803398c;
760 % \CTANpkg{memoir}
761 %
762 % \bibitem{titleref}
763 % Donald Arsenau:
764 % \textit{Titleref.sty};
765 % 2001/04/05 ver 3.1;
766 % \CTANpkg{titleref}
767 %
768 % \bibitem{zref}
769 % Heiko Oberdiek:
770 % \textit{The \xpackage{zref} package};
771 % 2009/12/08 v2.7;
772 % \CTANpkg{zref}
773 %
774 % \end{thebibliography}
775 %
776 % \begin{History}
777 % \begin{Version}{2009/12/08 v1.0}
778 % \item
779 % The first version.
780 % \end{Version}
781 % \begin{Version}{2009/12/12 v1.1}
782 % \item
783 % Short info shortened.
784 % \end{Version}
785 % \begin{Version}{2009/12/13 v1.2}
786 % \item
787 % Forgotten third argument for \cs{InputIfFileExists} added.
788 % \end{Version}
789 % \begin{Version}{2009/12/18 v1.3}
790 % \item
791 % \cs{Hy@SectionAnchorHref} added for filtering
792 % (hyperref 2009/12/18 v6.79w).
793 % \end{Version}
794 % \begin{Version}{2010/12/03 v1.4}
795 % \item
796 % Support of package \xpackage{enumitem}: removing
797 % \cs{enit@format} from title string (problem report by GL).
798 % \end{Version}
799 % \begin{Version}{2016/05/16 v1.5}
800 % \item
801 % Documentation updates.
802 % \end{Version}
803 % \begin{Version}{2019/12/15 v1.6}
804 % \item
805 % Documentation updates.
806 % \end{Version}
807 % \end{History}
808 %
809 % \PrintIndex
810 %
811 % \Finale
812 \endinput