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

Bug Tracker

ID102
StatusClosed (Can Not Implement)
Categoryglossaries
Version4.18
Summary\printglossary outputs extra empty pages when there is no glossary file yet

Report

Hello, when glossary files are not ready yet, there are extra empty pages due to use of \null in
  \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}%
  {}%
  {\null}%
Is there some reason to use \null instead of \relax? It seems to work correctly with \relax instead of \null as far as I tried. Regards,

Andrzej Giniewicz

MWE

\documentclass{book}
\usepackage{glossaries}
\makeglossary
\begin{document}
\printglossary
\cleardoublepage
\end{document}

Evaluation

The reason for this is given in the documented code (section 1.16):
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.
I think this is a feature rather than a bug. It's more important that the external files are completed and closed in the event that the glossary occurs right at the end of the document otherwise the glossary may not be properly generated by makeindex/xindy.

Comment from anonymous
Date: 2015-12-01 04:21:27 CST

Would it then be possible to make the behaviour consistent with table of contents (output chapter or section text in that case, so the page is not empty)?

Comment from Nicola Talbot
Date: 2015-12-03 15:55:00 GMT

I can't do this without breaking backward-compatibility. There are users who will do something like:

\documentclass{article}

\usepackage[acronym]{glossaries-extra}

\makeglossaries

\newacronym{laser}{laser}{light amplification by stimulated
emission of radiation}

\begin{document}

\gls{laser}

\printglossaries

\end{document}
and then just run makeindex on the acronym file. The proposed modification would insert an empty section for the "main" glossary. (Of course, the simple fix is to add the "nomain" option to the package list, but people tend to get upset if the default behaviour suddenly changes.)

However, I have added it as the default (along with explanatory text) to the glossaries-extra package, which is currently still under development.

Comment from Nicola Talbot
Date: 2016-04-30 16:40:00 BST

The glosssaries-extra package is now on CTAN, so I'm closing this as "Can Not Implement" as it can't be implemented in glossaries, but you can use glossaries-extra instead.

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