2

Hi guys I'm having issues with the recently implemented Glossary in my sharelatex package. When using the glossary tags it works fine in the text but at the end the glossary won't get printed. I have to use a file from my university:

%
% University of Berne
%
% Bachelor thesis template
% Thomas Staub 14.04.2005
%

\documentclass[11pt,a4paper,twoside,openright]{rvsbachelor}

\usepackage[utf8]{inputenc}
\usepackage{graphicx}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[a4paper,twoside]{geometry}

\sloppy

%% Additional packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% for source code highlighting
% \usepackage{listings}
% \lstloadlanguages{tcl, Perl}
% \lstset{language=tcl, commentstyle=\it, basicstyle=\tiny, keywordstyle=\bf,     breaklines=true, frame=single}

% multiple figures with same general caption
\usepackage{subfigure}
\setcounter{lofdepth}{2}  

% offers more possibilities in captions
\usepackage{caption}

% Commands for package caption
% - caption
\renewcommand{\captionfont}{\small}
\renewcommand{\captionlabelfont}{\bfseries}

% offers rotation of figures, ...
\usepackage{rotating}

% to support correct hyphenaten, add words with -
% \hyphenation{test-case}

% If a page has no content, make it an empty page (without page numbers ....)
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{empty}
\newpage
\fi\fi}
\makeatother

% check whether we are running pdflatex
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse % we are not running pdflatex
\DeclareGraphicsExtensions{.eps}
\else
\pdfoutput=1 % we are running pdflatex
\pdfcompresslevel=9     % compression level for text and image;
\pdftrue
\DeclareGraphicsExtensions{.pdf}
\fi
\ifpdf
%to make table of contents and index appear in bookmarks
\usepackage{tocbibind}
%refs also as links
\usepackage[pdftex,plainpages=false]{hyperref}
%plainpages=false: enable links although page numbering is reset after title
%backref, pagebackref]{hyperref}
%\usepackage[pdftex]{color}
%\usepackage[pdftex]{thumbpdf}
\else
%url must be escaped. (this works fine in dvi)
\usepackage{url}
\fi

\usepackage[nomain, acronym, toc]{glossaries}

\author{Adrian Kurt}
\title{title of the thesis}
\date{2014}

\makeglossaries
\input{acronyms}


% document start
\begin{document}
\maketitle
\thispagestyle{empty}
\mbox{}

\newpage
\pagenumbering{roman}
\tableofcontents{}
\listoffigures{}
\listoftables{}

\cleardoublepage
\setcounter{page}{1}    % Reset page numbering to 1
\pagenumbering{arabic}  % Arabic page numbers

% Advice: split up your thesis in multiple files, i.e. one file for one section
\input{intro}
\input{theory}
\input{practical}
\input{discussion}


\input{th_bibliography}
\printglossary[title=List of Terms,toctitle=Terms and abbreviations]
\printglossary[title=some title, type=\acronymtype]
% no output here of the glossary

\end{document}

any ideas what the problem could be?

4

Thanks to the help of the good fellows over at ShareLatex I could solve the issue. Apparently you shouldn't have your files in a folder and don't use the nomain package option. It's not needed.

  • The nomain issue isn't related to ShareLaTeX, but is a separate issue. (You're effectively saying "don't create the main (default) glossary" but then you try to access it.) – Nicola Talbot May 2 '14 at 22:16
  • I also managed to fix the problem by moving the files from a folder into the sharelatex project root. Although, I'm using the following definition: \usepackage[acronym, toc]{glossaries} And the Gloassary is now printed and is shown on Table of Contents (toc), but twice... I would like to have the Glossary and the Acronyms list split and both shown on toc. Can anyone help? – osemka Jul 27 '14 at 17:14
  • @user59763 I converted your answer into a comment, seems to match better. Actually it looks like a question, so it may be good if you would create a new question instead of putting it into an answer. – Stefan Kottwitz Jul 27 '14 at 17:18
  • @user59763 As Stefan suggested, you really need to create a new question. (You can use the "Ask Question" link at the top of the page.) It doesn't sound like your problem is specifically related to ShareLaTeX, so just add a minimal working example (MWE) that illustrates your problem. – Nicola Talbot Jul 28 '14 at 10:32
  • I had the same problem. I had a pretty big project with multiple folder and files. Putting Main.tex in root folder solved the issue. – Starlord Feb 11 '18 at 12:41
0

I'm adding here the most current work around (June 2, 2017) for this issue as discussed in ShareLatex Github first in https://github.com/sharelatex/sharelatex/issues/171 and finally in https://github.com/sharelatex/sharelatex-docker-image/issues/6.

1) Add a .latexmkrc file into your project root folder 2) place the code:

add_cus_dep('glo', 'gls', 0, 'makeglo2gls'); sub makeglo2gls {
    system("makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo"); }

add_cus_dep('acn', 'acr', 0, 'makeacn2acr'); sub makeacn2acr {
    system("makeindex -s \"$_[0].ist\" -t \"$_[0].alg\" -o \"$_[0].acr\" \"$_[0].acn\""); }

3) compile twice (in my case I used LaTex compiler)

This seems to solve the issue for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.