[Tex/LaTex] Adding a glossary with ShareLaTeX

glossariessharelatex

I'm trying to add a glossary to an article in ShareLaTeX but It seems the whole \makeglossariescommand doesn't work if you don't use the makeglossaries document_namewhen compiling (as it says
here).

Is there any way to force the compiler to execute that (I mean the shareLaTeX online compiler)?

EDIT:

6 days ago, I received a newsletter from the ShareLaTeX team where they explain the latest additions they've made into their compiler; among which is the possibility of use the glossaries package, without shell-calling makeglossaries so I gave it a try:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{glossaries}
\title{EjGlos}
\newglossaryentry{bitcoin}
{
  name=Bitcoin,
  description={(\btc)  is a peer-to-peer payment system and digital currency introduced as open source software in 2009 by pseudonymous developer Satoshi Nakamoto. It is a cryptocurrency, so-called because it uses cryptography to control the creation and transfer of money}
}
\makeglossaries
\begin{document}
\maketitle
\section{How does Bitcoin work?}
From a user perspective, \gls{bitcoin} is nothing more than a mobile app or computer program that provides a personal Bitcoin wallet and allows a user to send and receive bitcoins with them. This is how Bitcoin works for most users.
\printglossaries
\end{document}

And it seems to work properly:

ShareLaTeX_glossaries

Best Answer

The ShareLaTeX wiki says:

ShareLaTeX does not currently support Glossaries, this is planned to change in the near future.

Until this change happens, you can't generate glossaries in ShareLaTeX using an external indexing application. You can, however, use TeX to perform the sorting and collating without having to invoke an external indexing application. This can be done using datagidx. Example:

\documentclass{article}

\usepackage{datagidx}

\newgidx{glossary}{Glossary}
\DTLgidxSetDefaultDB{glossary}

\newterm[description={a collection of objects}]{set}
\newterm[description={number of objects in a set}]{cardinality}

\begin{document}

% page 1:
\gls{set}.

\newpage
% page 2:
\gls{set}, \gls{cardinality}.

\newpage
% page 3:
\gls{set}.

\newpage
% page 4:
\gls{cardinality}.

\printterms[columns=1,style=align]

\end{document}

Glossary appears as:

Image of resulting glossary

Since the sorting and collating is performed by TeX, there is no need to worry about shell escapes and so can be used in documents on ShareLaTeX.

Further reading:

Edit:

You can now also use TeX to perform the sorting and collating with the glossaries package:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{glossaries}

\makenoidxglossaries

\title{EjGlos}
\newglossaryentry{bitcoin}
{
  name=Bitcoin,
  description={a peer-to-peer payment system and digital
currency introduced as open source software in 2009 by pseudonymous
developer Satoshi Nakamoto. It is a cryptocurrency, so-called
because it uses cryptography to control the creation and transfer of
money}
}

\begin{document}
\maketitle
\section{How does Bitcoin work?}
From a user perspective, \gls{bitcoin} is nothing more than a mobile
app or computer program that provides a personal Bitcoin wallet and
allows a user to send and receive bitcoins with them. This is how
Bitcoin works for most users.

\printnoidxglossaries
\end{document}

This requires at least version 4.04 of glossaries. (This is the "Option 1" described in introduction section of the glossaries user guide.)