Latest news 2021-09-06: new blog post "Legacy Documents and TeX Live Docker Images".

Bug Tracker

ID 69🔗
Date: 2014-10-03 15:13:38
Status Closed (Fixed)
Category glossaries
Version 4.11
Summary \glsadd cancels effect of \nobreak

Sign in to subscribe to notifications about this report.

Description

\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.

MWE

Download (2.54K)

 % 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

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=69