Search code examples
latexoverleaf

Unable to show the glossary with \printglossary in latex


I was given a Latex project as template and I decided to add a glossary on it, however, \printglossary is not working. I can add and use different entries so I guess that the glossary creation is not the problem.

I am using Overleaf and if I try a completely new project with only the glossary (code bellow) \printglossary works fine.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[acronym, toc]{glossaries}

\makeglossaries
\input{Bibliocosas/glossary.tex}

\begin{document}

\tableofcontents

\section{First Section}

The \Gls{latex} typesetting markup language is specially suitable for documents that include \gls{maths}. \Glspl{formula} are rendered properly an easily once one gets used to the commands.


\clearpage

\section{Second Section}

\vspace{5mm}

Given a set of numbers, there are elementary methods to compute its \acrlong{gcd}, which is abbreviated \acrshort{gcd}. This process is similar to that used for the \acrfull{lcm}.


\clearpage

\printglossary

\clearpage

\printglossary[type=\acronymtype]

\end{document}

I am using chapters intead of sections in the given project, is that the the cause of the problem?


Solution

  • Using \makenoidxglossaries and \printnoidxglossaries seems to apparently solve the problem.

    I thought that I had already tried them but I guess I was wrong. However, I still don't know why the previous code does not work in the given project.