diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-08 22:31:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-08 22:31:19 +0000 |
commit | fec3a5740e195359a7666cf8d39eace242c8f939 (patch) | |
tree | 0b62b75993b536c3af036d7bcb83fc171bd4bc67 /Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex | |
parent | 8ef99cf53c6d05b5d88a4e8fe8a00222d358659e (diff) |
glossaries (8may16)
git-svn-id: svn://tug.org/texlive/trunk@40959 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex index 54223c8dc9a..c955082e67c 100644 --- a/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex +++ b/Master/texmf-dist/doc/latex/glossaries/glossaries-user.tex @@ -388,11 +388,11 @@ and~\hyperlink{option#2}{#2}} \MakeShortVerb{"} \DeleteShortVerb{\|} - \title{User Manual for glossaries.sty v4.22} + \title{User Manual for glossaries.sty v4.23} \author{Nicola L.C. Talbot\\% \url{http://www.dickimaw-books.com/}} - \date{2016-04-19} + \date{2016-04-30} \maketitle \begin{abstract} @@ -470,7 +470,7 @@ package. \item[\url{glossaries-code.pdf}] Advanced users wishing to know more about the inner workings of all the packages provided in the \styfmt{glossaries} bundle should read -\qt{Documented Code for glossaries v4.22}. +\qt{Documented Code for glossaries v4.23}. \item[INSTALL] Installation instructions. @@ -10969,18 +10969,33 @@ This checks if the \gloskey{description} field has been set to just There is no check for the existence of \meta{label}. For all other fields you can use: -\begin{definition} +\begin{definition}[\DescribeMacro\ifglshasfield] \cs{ifglshasfield}\marg{field}\marg{label}\marg{true part}\marg{false part} \end{definition} -This checks if the field given by \meta{field} for the entry -identified by \meta{label} is empty. If it is, \meta{true part} is -performed, otherwise \meta{false part}. If the field supplied is -unrecognised \meta{false part} +This tests the value of the field given by \meta{field} for the entry +identified by \meta{label}. If the value is empty \emph{or the default +value}, then \meta{false part} is performed, otherwise \meta{true +part} is performed. If the field supplied is unrecognised \meta{false part} is performed and a warning is issued. Unlike the above commands, such as \cs{ifglshasshort}, an error occurs if the entry is undefined. +As from version 4.23, within \meta{true part} you can use +\begin{definition}[\DescribeMacro\glscurrentfieldvalue] +\cs{glscurrentfieldvalue} +\end{definition} +to access the field value. This command is +initially defined to nothing but has +no relevance outside \meta{true part}. This saves re-accessing the +field if the test is true. For example: +\begin{verbatim} +\ifglshasfield{useri}{sample}{, \glscurrentfieldvalue}{} +\end{verbatim} +will insert a comma, space and the field value if the +\gloskey{user1} key has been set for +the entry whose label is \texttt{sample}. + You can test if the value of the field is equal to a given string using: \begin{definition}[\DescribeMacro\ifglsfieldeq] |