0

When I use the stylish article template class by M. Legrange (see https://www.latextemplates.com/template/stylish-article), I encounter two problems using this class together with the glossaries or glossaries-extra package(s). The second one is described in this question.

I have pinned the issue down to a conflict with the lastpage package. When this package is loaded - it doesn't have to be used in the document - glossaries-extra does produce a filled *.glo file, but fails to compile it into a *.gls file generating the actual glossary.

I suspect it has something to do with the calculation of the actual last page of a document. Strangly enough this does not occur using the biblatex package. Both biblatex and glossaries-extra add pages to the document when there are a lot of references and/or glossary terms defined.

I am using TeXStudio 2.12.22 with MiKTeX 2.9.74 (uptodate) on Windows 10 X64 and compile using PDFLatex engine in TeXStudio.

The MWE below shows what (does not) happen:

\documentclass[a4paper,12pt,twoside]{article}

%----- taal/font pakketten
\usepackage[dutch]{babel}
\usepackage[tracking]{microtype}

\usepackage[
    typeface=gfsartemisia,
    sanstypeface=tgheros:scale:0.93,
    mathtypeface=mathdesign:charter,
    monotypeface=tgcursor,
    textcomp=dontload,
    ]{typeface}

\usepackage{lastpage}

%----- bibliografie -----
\usepackage[automake=true,translate=babel]{glossaries-extra}

%----- Glossary items -----
\makeglossary

%----- Parents -----
\newglossaryentry{covbind}
    {name={covalente binding},description={verzamelnaam voor atoombinding en polaire atoombinding}}
\newglossaryentry{valentie}
    {name={valentie},description={het aantal elektronen, dat een element kan delen of uitwisselen. Bij uitwisselen ontstaat er een ion met een lading gelijk aan het aantal uitgewisselde elektronen.}}
\newglossaryentry{koolstofverbinding}
    {name={koolstofverbinding},plural={koolstofverbindingen},description={moleculen met een koolstofskelet, waarin naast waterstof ook andere elementen, zoals zuurstof, stikstof en zwavel voorkomen.}}
\newglossaryentry{koolwaterstof}
    {name={koolwaterstof},plural={koolwaterstoffen},parent={koolstofverbinding},description={moleculen met een koolstofskelet, waarin naast koolstof uitsluitend waterstof en/of een halogeen voorkomt.}}

%----- Childs / Entries -----
\newglossaryentry{alkaan}
    {name={alkaan},plural={alkanen},parent={koolwaterstof},description={koolstofverbinding waarin alleen enkelvoudige bindingen tussen de koolstofatomen aanwezig zijn.}}
\newglossaryentry{aromaat}
    {name={aromaat},plural={aromaten},parent={koolwaterstof},description={koolstofverbindingen waarin gedelocaliseerde bindingen tussen koolstofatomen voorkomen, die met een ring weergegeven kunnen worden.}}
\newglossaryentry{atoombinding}
    {name={atoombinding},plural={atoombindingen},parent={covbind},description={binding tussen twee atomen, waarbij elk een elektron in de vorming van het het bindende elektronenpaar bijdraagt.}}
\newglossaryentry{coval}
    {name={covalentie},parent={valentie},description={het aantal bindingen dat een niet-metaal atoomsoort aan kan gaan om dezelfde elektronen omringing als het dichtsbijzijnde edelgas te krijgen.}}
\newglossaryentry{edelconf}
    {name={edelgas configuratie},description={de naam voor de elektronen omringing in edelgassen, waarbij het \textit{p}-orbitaal volledig bezet is.}}

\begin{document}

\tableofcontents

\clearpage
\section{Atoomtheorie}

\subsection{Atoombouw}

\subsection{Atoommodellen}

\subsection{Bindingen}

\subsection{Covalentie}
\Gls{coval} geeft aan hoeveel bindingen een atoomsoort kan aangaan met andere atomen. De basis voor \gls{coval} is het streven naar een \gls{edelconf} 

\section{Koolstofverbindingen}

\subsection{Naamgeving}

\Glspl{alkaan}, en \glspl{aromaat} zijn voorbeelden van \glspl{koolwaterstof} \\

\clearpage
%----------------------------------------------------------------------------------------
%   GLOSSARY
%----------------------------------------------------------------------------------------

\printglossary

\end{document}
alchemist
  • 1,761
  • how are you compiling? – Ulrike Fischer Apr 30 '20 at 13:43
  • move lastpage behind glossaries-extra. – Ulrike Fischer Apr 30 '20 at 13:55
  • 1
    The problem is that glossaries tries to call a \write18 command but can't do this when it encounters the relevant command after the last page and is on a completely empty page. Try as suggested here automake=immediate: https://tex.stackexchange.com/a/468877/2388 – Ulrike Fischer Apr 30 '20 at 14:07
  • Both options worked @Ulrike Fisher , but since the class uses \RequirePackage{lastpage} in its definition, I will use the option [automake=immediate]. How did you find that suggestion? I have been looking for something like that for two days. Guess I used the wrong keywords ... – alchemist Apr 30 '20 at 14:33
  • If you look at the question I linked to, you can see that I answered it too. Beside this I'm just discussing in another place about delayed writes and so had the topic in my mind anyway. – Ulrike Fischer Apr 30 '20 at 15:03

0 Answers0