# Bug Tracker

ID 102🔗 2015-11-30 16:44:56 Closed (Can Not Implement) glossaries 4.18 \printglossary outputs extra empty pages when there is no glossary file yet

## Description

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,

## MWE

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


## Evaluation

The reason for this is given in the documented code (PDF) (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 10:21:27

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)?

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.

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

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

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

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.

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

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.

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.

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.