Latest news 2021-06-05: New blog post: Dickimaw Books Site Account.

Bug Tracker

ID 146🔗
Date: 2020-01-30 12:12:04
Status Closed (Duplicate)
Category glossaries
Version v4.42
Summary Inserting \null breaks legit use case
Cross Ref 102

Sign in to subscribe to notifications about this report.


Hi Nicola,

this is a report on the border line between a bug report and a feature request but since it breaks my intended behavior and I think it needs to be fixed in the core I put it here.

My problem is that I want to use an "invisible" \printglossary to count the number of acronyms used in the text AtBeginDocument via a custom style (cf. glossaries: count the number of used abbreviations (i.e. those to be output by \printacronyms)). Unfortunately this inserts a \null if there are no abbreviations used that breaks the layout of my slides (I am using beamer, which is the reason why I need to count the number of abbreviations in the first place :).

From reading the documentation I do not completely understand why the \nulls are a feature and not a bug (cf. [TeX.SX Link]) but in any case it would be nice to make it optional (or at least provide a way to turn it off).



Download (1.04K)







\begin{frame}{1. slide}



Duplicate of \printglossary outputs extra empty pages when there is no glossary file yet.

The use of \null is mentioned in the user manual. (I will add a more detailed note in the next release.) The reason for it is hidden away in the documented code:

If the glossary file doesn't exist, do \null. (This ensures that the page is shipped out and all write commands are done.) This might produce an empty page, but at this point the document isn't complete, so it shouldn't matter.

This had to be added in response to an earlier bug report, so I'm not keen to revert it. Once the external glossary files have been created, \null is no longer used, so this shouldn't affect the document once a full build has been performed.

If you want to count the number entries that have been used in the document it would be simpler to just use \forallglsentries combined with \ifglsused at the end of the document and save the result in the aux file to be read in on the next run.



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.


You can use the following markup:


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

In line:

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

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

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

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

Page permalink: