About
Shop
LaTeX
Free Software
Books
News
Contact
Blog
Recent news (2017-03-24): texosquery v1.2 released.

Feature Request Tracker

ID 2
Status Closed (Implemented)
Category glossaries
Summary Specifying glossary preambles and postambles in an alternative way

Report

In documents with several glossaries, it would be perhaps more convenient to specify glossary preambles and postambles on a per-glossary basis (e.g. using commands \setglossarypreamble and \setglossarypostamble) instead of repeatedly redefining \glossarypreamble and \glossarypostamble.

Here's my proposal for \setglossarypreamble:

\makeatletter

%% \setglossarypreamble[<type>]{<text>}
\newcommand{\setglossarypreamble}[2][\glsdefaulttype]{%
  \ifglossaryexists{#1}{%
    \csgdef{@glossarypreamble@#1}{#2}%
  }{%
    \PackageWarning{glossaries}{%
      Glossary `#1' is not defined%
    }%
  }%
}

\renewcommand*{\glossarypreamble}{%
  \csuse{@glossarypreamble@\currentglossary}%
}

\makeatother
So what do you think about this?

Best regards,
Michael Pock

Evaluation

Added to version 3.07. Thanks.

Watch This Request

If you would like to be notified whenever updates are made to this feature request, please fill in your email address in the box below and click on "Notify Me of Changes". (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

Comments

If you would like to add a comment regarding this feature request, please fill in the form below, but don't use it for a different bug or feature request, even if it's related. Instead fill out a new bug report or feature request.

Name (Optional)
Comment

I'm sorry, some spammers have cracked the captcha, so here's an extra test to check if you're human.
Please enter the ID number of this report in the confirm key box below the captcha.

Confirm key:


Note: the free software provided here (including my class files and packages on CTAN) are funded by my book sales. While I'm keen to improve my code, book production has to take priority, so please don't expect a rapid response.

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Site Map FAQs