Debian Codegraph @

texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex

raw
1 %%
2 %% This is file `hep-acronym-documentation.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hep-acronym-implementation.dtx (with options: `documentation')
8 %% This is a generated file.
9 %% Copyright (C) 2019-2025 by Jan Hajer
10 %% This file may be distributed and/or modified under the
11 %% conditions of the LaTeX Project Public License, either
12 %% version 1.3c of this license or (at your option) any later
13 %% version. The latest version of this license is in:
14 %% http://www.latex-project.org/lppl.txt
15 %% and version 1.3c or later is part of all distributions of
16 %% LaTeX version 2005/12/01 or later.
17 \ProvidesFile{hep-acronym-documentation.tex}[2025/09/01 v1.4 hep-acronym documentation]
18 \RequirePackage[l2tabu, orthodox]{nag}
19 \documentclass{ltxdoc}
20
21 \renewcommand*\theCodelineNo{\rmfamily\tstyle\footnotesize\arabic{CodelineNo}}
22 \AtBeginEnvironment{macrocode}{\renewcommand*{\ttdefault}{clmt}}
23 \renewcommand*{\MacroFont}{\codestyle}
24 \AtBeginDocument{\DeleteShortVerb{\|}}
25 \AtBeginDocument{\MakeShortVerb{\"}}
26 \EnableCrossrefs
27 \CodelineIndex
28 \RecordChanges
29
30 \usepackage{hologo}
31
32 \usepackage[parskip,oldstyle,font=10pt]{hep-paper}
33 \bibliography{bibliography}
34 \acronym{PDF}{portable document format}
35
36 \GetFileInfo{hep-acronym.sty}
37
38 \title{The \software{hep-acronym} package\thanks{This document corresponds to \software{hep-acronym}~\fileversion.}}
39 \subtitle{An acronym extension for glossaries}
40 \author{Jan Hajer \email{[email protected]}}
41 \date{\filedate}
42
43 \begin{document}
44
45 \newgeometry{vscale=.8, vmarginratio=3:4, includeheadfoot, left=11em, marginparwidth=4.6cm, marginparsep=3mm, right=7em}
46
47 \maketitle
48
49 \begin{abstract}
50 The \software{hep-acronym} package provides an acronym macro based on the \software{glossaries} package.
51 \end{abstract}
52
53 Acronyms are implemented using the \software{glossaries-extra} package \cite{glossaries-extra} which is an extension of the \software{glossaries} package \cite{glossaries} and must be loaded after the \software{hyperref} package \cite{hyperref}.
54 It can be loaded using "\usepackage{hep-acronym}".
55
56 \DescribeMacro{\acronym}
57 The "\acronym"\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural definition} macro generates the singular "\"\meta{abbreviation} and plural "\"\meta{abbreviation}"s" macros.
58
59 The first star prevents the addition of an \enquote{s} to the abbreviation plural.
60 The second star restores the \hologo{TeX} default of swallowing subsequent white space.
61 The long form is only shown at the first appearance of these macros, later appearances generate the abbreviation with a hyperlink to the long form.
62 Capitalisation at the beginning of paragraphs and sentences is (mostly) ensured.
63 The long form is never used in math mode which can be exploited to enforce the short form.
64 In order to enforce the long form use "\"\meta{abbreviation}"long".
65 As there can be no fixed rule whether to use the long form or the short form in section headers the user is left to their own devices \eg "\glsdesc"\marg{abbreviation}, "\Glsdesc"\marg{abbreviation}.
66 \DescribeMacro{\sentence}
67 The "\sentence" macro ensures that the directly following abbreviation is capitalised.
68
69 \DescribeMacro{\shortacronym}
70 \DescribeMacro{\longacronym}
71 The "\shortacronym" and "\longacronym" macros are drop-in replacements of the "\acronym" macro showing only the short or long form of their acronym.
72
73 \DescribeMacro{\resetacronym}
74 The first use form of the acronym can be enforced by resetting the acronym counter with "\resetacronym"\marg{key}.
75
76 \DescribeMacro{\dummyacronym}
77 If the acronym counter equals one at the end of the document the short form of the acronym is not introduced.
78 Placing a "\dummyacronym"\marg{key} at the end of the document ensures that the short form is introduced.
79
80 \DescribeMacro{warning}
81 In order to reduce the number of potentially conflicting packages the \software{glossaries} package is loaded without any glossary style.
82 In the case that the glossary should be printed additional packages must be loaded via \eg "\usepackage{glossary-list}".
83
84 \printbibliography
85
86 \end{document}
87
88 \endinput
89 %%
90 %% End of file `hep-acronym-documentation.tex'.