diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-09 23:44:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-09 23:44:57 +0000 |
commit | b4ddb0e04d17bd28752d66b3fc94b5613d10335e (patch) | |
tree | 75ecde30e419937b22f59ae81593c376feced620 /Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex | |
parent | d58e09051eed105b7c4b93a513e0fd02ae2dfd4b (diff) |
glossaries-extra (9nov17)
git-svn-id: svn://tug.org/texlive/trunk@45733 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex | 102 |
1 files changed, 93 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex index b3e18e05929..8bb21a52cf5 100644 --- a/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex +++ b/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex @@ -210,13 +210,13 @@ styles (glossaries):>#1={\protect\ttfamily#1}|main}} \DeleteShortVerb{\|} \MakeShortVerb{"} - \title{glossaries-extra.sty v1.21: + \title{glossaries-extra.sty v1.22: an extension to the glossaries package} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} - \date{2017-11-03} + \date{2017-11-08} \maketitle \begin{abstract} @@ -975,6 +975,21 @@ after \ics{makenoidxglossaries}. \chapter{Modifications to Existing Commands and Styles} \label{sec:modifications} +The \styfmt{glossaries} package provides \ics{nopostdesc} +which may be used in the \gloskey{description} to suppress +the post-description hook. The \styfmt{glossaries-extra} package +provides another command +\begin{definition}[\DescribeMacro\glsxtrnopostpunc] +\cs{glsxtrnopostpunc} +\end{definition} +which has a similar function but only suppresses the +post-description punctuation. It doesn't suppress the use of +\cs{glsxtrpostdescription} which allows the use of +category-dependent post-description hooks. (Note that the +punctuation, which is in the original base hook \cs{glspostdescription}, +comes after the extended post-description hook +\cs{glsxtrpostdescription} not before.) + The \styfmt{glossaries} package provides \begin{definition}[\DescribeMacro\glsseeitemformat] \cs{glsseeitemformat}\marg{label} @@ -995,7 +1010,7 @@ command to its original behaviour, but to take account of abbreviations \styfmt{glossaries-extra} redefines this as: \begin{verbatim} \renewcommand*{\glsseeitemformat}[1]{% - \glsifregular{#1}{\glsaccessname{#1}}{\glsaccesstext{#1}}% + \ifglshasshort{\glslabel}{\glsaccesstext{#1}}{\glsaccessname{#1}}% } \end{verbatim} If you want to restore the \styfmt{glossaries} v3.0+ definition just do: @@ -2528,7 +2543,7 @@ where \meta{label} is the entry's label. This checks if the \texttt{location} field has been set. If it has, it does \begin{verbatim} -\ifglsnopostdot,\fi\glsxtrprelocation +,\glsxtrprelocation \end{verbatim} otherwise it just does \cs{glsxtrprelocation} (which defaults to \cs{space}). If you're not using @@ -2761,6 +2776,19 @@ modified to take into account the \catattr{glossname}, This means you can make simple case-changing modifications to the name and description without defining a new glossary style. +If you want to adapt a style to use another field instead +of \gloskey{name}, you can use +\begin{definition}[\DescribeMacro\glossentrynameother] +\cs{glossentrynameother}\marg{label}\marg{field} +\end{definition} +This behaves just like \cs{glossentryname} (that is, it obeys +\catattr{glossname}, \catattr{glossnamefont} or \cs{glsnamefont} and uses the post-name +hook) but it uses the given \meta{field} instead of \gloskey{name}. +The \meta{field} argument must be the internal field name +(for example \texttt{desc} rather than \texttt{description}). +See the key to field mappings table in the \styfmt{glossaries} +user manual. + There is a hook after \ics{glossentryname} and \ics{Glossentryname}: \begin{definition}[\DescribeMacro\glsxtrpostnamehook] @@ -7804,7 +7832,7 @@ matter) which can be the target for all glossary references and then just use \cs{printunsrtglossaryunit} for a quick summary at the start of a section etc. -\section{Standalone Definitions} +\section{Standalone Entry Items} \label{sec:glossentry} It may be that you don't want a list but would rather display @@ -7877,6 +7905,46 @@ in \cs{glsentryitem} and \cs{glssubentryitem}. the style from category attributes such as \catattr{glossnamefont}. \end{itemize} +If you have used \ics{nopostdesc} or \ics{glsxtrnopostpunc} +in any of your description fields, you can use +\begin{definition}[\DescribeMacro\glsxtractivatenopost] +\cs{glsxtractivatenopost} +\end{definition} +to make these commands behave as they normally do within a glossary. +This needs to be placed before +\begin{alltt} +\cs{glossentrydesc}\marg{label}\cs{glspostdescription} +\end{alltt} +and scoped. Note that \cs{glsnonextpages} and \cs{glsnextpages} have no +effect outside of the glossary and are not intended for use in a +standalone context. + +It's also possible to select a different field (rather than +using \gloskey{name}): +\begin{definition}[\DescribeMacro\glsxtrglossentryother] +\cs{glsxtrglossentryother}\marg{header}\marg{label}\marg{field} +\end{definition} +The \meta{field} must be given using its internal field label +which may not be the same as the key used to set the field. +See the key to field mappings table in the \styfmt{glossaries} +user manual. The \meta{header} argument is the code +to pass to the third argument of \cs{glsxtrtitleorpdforheading}. +It may be left empty in which case the default is determined as follows: +\begin{itemize} +\item If \cs{glsxtrhead\meta{field}} is defined, then \meta{header} +is \cs{glsxtrhead\meta{field}}\marg{label}. +\item Otherwise \meta{header} is simply the field value. +\end{itemize} +The \cs{glsxtrglossentryother} command internally uses +\cs{glossentrynameother}\marg{label}\marg{field} instead of +\cs{glossentryname}\marg{label}. If you are using the +\sty{glossaries-accsupp} package (through the \pkgopt{accsupp} +option) then accessibility support will be provided if +there's a corresponding command +\begin{alltt} +\cs{gls\meta{field}accessdisplay}\marg{text}\marg{label} +\end{alltt} +(for example, \cs{glssymbolaccessdisplay}). This means that my custom command can be changed to: \begin{verbatim} @@ -7887,8 +7955,9 @@ This means that my custom command can be changed to: \par\medskip } \end{verbatim} -If you wanted numbered definitions, then use the -package option \sty{entrycounter} and remove the colon: +If I want numbered definitions, then I can use the +package options \sty{entrycounter} or \sty{subentrycounter} +and remove the colon: \begin{verbatim} \newcommand{\displayterm}[1]{% \par\medskip\par\noindent @@ -7900,12 +7969,27 @@ package option \sty{entrycounter} and remove the colon: The counter label uses a dot after the number by default but this can be changed to a colon: \begin{verbatim} -\renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space}% +\renewcommand*{\glsentrycounterlabel}{\theglossaryentry:\space} \end{verbatim} -You can now not only use \cs{gls} to link back to the +It's now possible to not only use \cs{gls} to link back to the definition but also use \cs{glsrefentry} to reference the counter and \cs{glsxtrpageref} to reference the page number. +If I want the description to behave more like it does +in a glossary in need to make the following modification: +\begin{verbatim} +\newcommand{\displayterm}[1]{% + \par\medskip\par\noindent + Definition \glsxtrglossentry{#1}.\par + \begingroup + \glsxtractivatenopost + \glossentrydesc{#1}\glspostdescription + \endgroup + \par\medskip +} +\end{verbatim} +(Note the grouping to localise \cs{glsxtractivatenopost}.) + You can also use \cs{glsxtrglossentry} within section headings. For example: \begin{verbatim} |