diff options
Diffstat (limited to 'support/bib2gls/src/bib2gls-begin.tex')
-rw-r--r-- | support/bib2gls/src/bib2gls-begin.tex | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/support/bib2gls/src/bib2gls-begin.tex b/support/bib2gls/src/bib2gls-begin.tex index f30604e4ba..e9327b04ea 100644 --- a/support/bib2gls/src/bib2gls-begin.tex +++ b/support/bib2gls/src/bib2gls-begin.tex @@ -81,6 +81,11 @@ \newcommand{\texparserdefnote}{} +\newcommand*{\longargfmt}[1]{% + \texorpdfstring{\texttt{\longswitch #1}}% + {\string-\string-#1}% +} + \GlsXtrLoadResources[ src={bib2gls}, max-loc-diff=3, @@ -354,11 +359,6 @@ \newrobustcmd{\longswitch}{\string-{}\string-} -\newcommand*{\longargfmt}[1]{% - \texorpdfstring{\texttt{\longswitch #1}}% - {\string-\string-#1}% -} - \newcommand*{\shortargfmt}[1]{% \texorpdfstring{\texttt{\string-#1}}% {\string-#1}% @@ -419,7 +419,10 @@ \pagestyle{headings} \newcommand{\glossarytitle}{Index} +\let\orgbibcite\bibcite +\renewcommand{\bibcite}[2]{} \externaldocument{bib2gls} +\let\bibcite\orgbibcite \newcommand{\addr}[1]{\\\href{https://www.#1/}{\nolinkurl{#1}}} \title{\styfmt{glossaries-extra} and \bibgls: An Introductory Guide} @@ -1290,25 +1293,10 @@ will produce \field{name} = sample , \field{description} = \marg{an example} } \end{codeenv} -However, spaces at the start or end of the value if it's been -enclosed in braces aren't ignored. For example, if the entry is now -defined as: -\begin{codeenv} -\gls{newglossaryentry}\marg{sample} -\marg{ - \field{name} = \marg{ sample } , \field{description} = {an example}\incorrect -} -\end{codeenv} -then: -\begin{codeenv} -/\gls{gls}\marg{sample}/ -\end{codeenv} -produces: -\begin{result} -/ sample / -\end{result} -The spaces in this case have been retained. The unstarred version of -\gls{longnewglossaryentry} appends extra code to the end of the +However, spaces at the start or end of the value that's provided as +an argument (rather than in a \keyvallist) often aren't ignored. + +The unstarred version of \gls{longnewglossaryentry} appends extra code to the end of the description, which removes any trailing spaces (and also the \gls{postdescriptionhook}). The starred version \gls{longnewglossaryentry*} (only available with \sty{glossaries-extra}) |