[Tex/LaTex] \printglossary is not printing anything in Overleaf

glossariesoverleaf

I made this simple code to try to print a glossary, but it doesn't works. The strange things is that the code is just like the one on the Overleaf website:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[margin=1in,letterpaper]{geometry}
\usepackage{cite} 
\usepackage[final]{hyperref}

\usepackage[acronym, toc]{glossaries}
\makeglossaries
\input{glossario.tex}

\begin{document}

\section{Glossario}
\parindent=0em

\printglossary

\end{document}

And this is my glossario.tex file:

    \newglossaryentry{latex}
{
    name=latex,
    description={Is a mark up language specially suited for scientific documents}
}

\newglossaryentry{maths}
{
    name=mathematics,
    description={Mathematics is what mathematicians do}
}

\newglossaryentry{formula}
{
    name=formula,
    description={A mathematical expression}
}

\newacronym{gcd}{GCD}{Greatest Common Divisor}

\newacronym{lcm}{LCM}{Least Common Multiple}

Best Answer

To resolve this issue, in general, assuming a clean compile, add \glsaddall before \printglossary. This adds all glossary entries and all should be printed.

If this does not resolve the issue in Overleaf, try clearing the cache by clicking the Logs and output files button next to Recompile and then click the trash can. See instructions here.