Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID69
StatusClosed (Fixed)
Categoryglossaries
Version4.11
Summary\glsadd cancels effect of \nobreak

Report

\glsadd doesn't add any text at that point in the document as advertised, but it can add a possible page break, still altering the output. This happens whenever I use vertical space that cannot be broken across pages, followed by \glsadd (which is still in vertical mode), followed by the start of the next paragraph. Somehow \glsadd in vertical mode must add either an empty box followed by glue or a penalty larger than -10000.

Eelco de Groot

MWE

 % This is a minimal file for testing and debugging
 % the glossaries package. Change the class file as
 % desired, and add the relevant package options to
 % both the class file and the glossaries package.
 % Change the sample glossary entry and acronym if
 % required. If the problem occurs with an additional
 % glossary, add in the relevant \newglossary command
 % and a sample entry.
 %
 % Only add extra packages or commands if they
 % contribute to whatever problem you are trying to
 % test.
 %
 % Remember that the document will not be complete
 % until you have successfully completed all of the
 % following steps:
 % 1. latex minimalgls
 % 2. makeglossaries minimalgls (note no extension)
 % 3. latex minimalgls
 % A further run through LaTeX will be required to ensure that
 % the table of contents is up to date if the toc option
 % is used.
\documentclass{article}
\listfiles
\usepackage[T1]{fontenc}
\usepackage[xindy]{glossaries}

\makeglossaries

\newglossaryentry{bread}{name={bread},description={A popular kind of food}}
\newglossaryentry{danishbread}{name={danish bread},description={\nopostdesc},see={brod}}
\newglossaryentry{brod}{name={br\o d},sort={brod},description={Bread like one eats it in Denmark}}


\begin{document}
People eat \gls{bread}. Danish peaple are like ordinary people, so they eat danish bread.
Danish bread is also called \gls{brod}.

\vspace{8cm plus 1cm minus 1cm}

We need some glue on this page. It's rather stretchable glue, to demonstrate what is going wrong. The
goal is to fill the page to the end, where we will quote a letter.

\vspace{7cm plus 1cm minus 1cm}

We have come close to the bottom of the page now, so it's time to quote the letter.

\vspace{2cm plus 1cm minus 0.8cm}

\noindent Dear Mr\@. Baker,\par
\nobreak%
\vspace{1cm plus 0.4cm minus 0.3cm}%
%Remove both \glsadd commands and a page break here will be properly prevented
%What also works is putting \indent or \noindent in front of \glsadd to move it into the horizontal
%material of the paragraph, instead of in the vertical material just before it.
\glsadd[format=(]{bread}%
The bread delivered today was again old and moldy. This has happened on previous occasions zeven times
in the past month. Therefore I wish to terminate my contract for daily deliveries of bread. I hope to
have you informed adequately in this letter.\glsadd[format=)]{bread}

\nobreak\vspace{1cm plus 0.4cm minus 0.3cm}
\noindent Sincerely, Mr\@. Smith\\
4 Adelaide Road\\
Bletchley\\
XY1-234

\vspace{2cm plus 1cm minus 0.8cm}
That was an angry letter about bread.
\printglossaries
\end{document}

Evaluation

Fixed in version 4.12

Add comment.

Watch This Report

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

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 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 Cookies Site Map FAQs