I have a tex document which renders glossaries just fine when compiled locally. However, when using overleaf the entries defined as \newacronym are linked, but the summary of the glossary entries is not output even though \printglossaries is called.

Are there some hidden settings in the overleaf compiler to enable glossaries?

The basic document

\newacronym{isp}{ISP}{internet service provider}

A dummy glossary not showing up \gls{isp}.


doesn't produce a glossary when placed inside a folder within the Overleaf project.

  • Overleaf uses latexmk to automatically compile your document. In my very limited experience with glossary-related matters latexmk does not always run all required tools (not sure if that is me or latexmk's configurations). If you document needs many makeglossaries/... calls, you may have to set up some custom rules in a latexmkrc file: overleaf.com/learn/latex/Articles/…
    – moewe
    May 3, 2020 at 5:49
  • 1
    Interesting. I just found tex.stackexchange.com/questions/481399/… however, their solution does not work for me. May 3, 2020 at 5:58
  • @moewe: I am not really familiar with latexmk, as I use TexPad locally. Which commans would be required to force overleaf to run the make clossaries twice? May 3, 2020 at 5:59
  • 1
    Any chance you can post the code here? Not everyone has an Overleaf account and external links may become stale. In principle it should be possible to minimise code examples that they comfortably fit the character limit for questions here.
    – moewe
    May 3, 2020 at 6:12
  • 1
    It would be very useful in that case to post the minimised example as it avoids any distractions with the document class and all the stuff it comes with
    – moewe
    May 3, 2020 at 6:33

3 Answers 3


The support of overleaf told me that it should work as desired, but if and only if my tex document resides in the root folder - and not in sub-directories.


try using \printglossaries (https://www.overleaf.com/learn/latex/Glossaries)

  • Welcome to TeX:SE!
    – Zarko
    Apr 5, 2022 at 10:10
  • OP already has this command.
    – Teepeemm
    Aug 21, 2023 at 15:21

As the previous poster suggested, this is due to the main file not sitting in the root folder. I added a .latexmkrc file in the root folder as a workaround for me. With this file, I can still keep my files organized in subfolders and the glossaries are rendered correctly. Please adapt according to your needs.

Disclaimer: I am not an expert, but this works for me.

# Specify the main files
@default_files = ('paper.tex');

$pdflatex = 'pdflatex %O -interaction=nonstopmode -shell-escape %S';

# Specify the bibliography
$bibtex = 'bibtex %O %B';
$makeglossaries = 'makeglossaries %O %B';

# Continuous preview mode
$continuous_mode = 1;

# Output to PDF
$pdf_mode = 1;

# Keep auxiliary files
$clean_ext = "";

add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' );
add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
$clean_ext .= " acr acn alg glo gls glg";

sub makeglossaries {
    my ($base_name, $path) = fileparse( $_[0] );
    my @args = ( "-q", "-d", $path, $base_name );
    if ($silent) { unshift @args, "-q"; }
    return system "makeglossaries", "-d", $path, $base_name; 

# Silence warnings
$silent = 1;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .