5

I'm using the glossaries package, with both a Glossary and List of acronyms. I'd like to make some general comments in the Glossary before the entries begin. Something like:

Many of the definitions echo those in Reference A, B. Readers are 
referred to these works for additional information about the terminology
used here.

Is there a command I can redefine in order to get access to the space between the heading and the first entry? I can't find anything in glossaries-user.pdf about it. I'd be happy to use glossaries-extra if that helps.

A MWE:

\documentclass{article}
\usepackage{hyperref}
\usepackage{glossaries}

\makeglossaries

\newglossaryentry{Blackbox}
{
  name=Blackbox models,
  sort=blackbox,
  description={--- In system identification, the term \emph{blackbox} modelling refers to the process of modelling a system through non-parametric techniques.}
}

\begin{document}

A reference to \gls{Blackbox}.

\newpage

\printglossary[title={Glossary}]

% Would like:

% Glossary
%
% Many of the definitions echo those in Reference A, B. Readers are 
% referred to these works for additional information about the terminology
% used here.
% 
% Blackbox models — In system identification, the term blackbox modelling 
%    refers to the process of modelling a system through non-parametric techniques, 
%    without knowledge of physical inner workings of the system, resulting 
%    in an empirical model. 1
%

\end{document}
  • Welcome to TeX.SX! Please provide a compilable document, minimal as possible, with the relevant packages (i.e. with glossaries) -- we don't like to start from scratch! – user31729 May 2 '16 at 20:27
  • You can redefine \glossarypreamble before \printglossaries. This will affect all glossaries. For an individual glossary you can do, for example, \setglossarypreamble[acronym]{preamble text here}. – Nicola Talbot May 2 '16 at 20:28
  • Thanks! I should have been able to figure that out. Maybe preamble is a weird word choice, given its special meaning in LaTeX! – Danny May 2 '16 at 20:43
  • Not so weird if you consider the meaning of the word preamble "a preliminary or preparatory statement; an introduction" :-) – Nicola Talbot May 3 '16 at 9:38
  • It fits the lay meaning of the term, I agree, but it's unrelated to the LaTeX preamble, which is why I got confused. Thanks for the package though, Nicola! Next stop is to play around with glossaries-extra! – Danny May 7 '16 at 7:42
6

Use \setglossarypreamble[main]{Your text} or \setglossarypreamble[acronym]{Some other text}.

\documentclass{article}
\usepackage{hyperref}
\usepackage{glossaries}

\makeglossaries

\setglossarypreamble[acronym]{foo foo}

\setglossarypreamble[main]{Many of the definitions echo those in Reference A, B. Readers are 
  referred to these works for additional information about the terminology
  used here.}


\newglossaryentry{Blackbox}
{
  name=Blackbox models,
  sort=blackbox,
  description={--- In system identification, the term \emph{blackbox} modelling refers to the process of modelling a system through non-parametric techniques.}
}

\begin{document}

A reference to \gls{Blackbox}.


\clearpage
\printglossary%[title={Glossary}]

\end{document}

enter image description here

  • This works. Also, I really appreciate the nearly instant response, and the edits to conform to the MWE. Thanks. – Danny May 2 '16 at 20:45
  • @Danny: You're welcome. In the very moment I was writing my comment above I remembered \setglossarypreamble command. (it's a little bit hidden -- see the section Displaying Glossaries – user31729 May 2 '16 at 20:48
  • Yep, I had a look just now. I had searched the document for introduction, header, heading, etc, but preamble didn't come to mind. Live and learn! – Danny May 2 '16 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.