# glossary problem [closed]

I have the following code that works fine:

\documentclass[10pt,a4paper]{report}
\usepackage[paper=a4paper,twoside=true,lmargin=2.5cm,rmargin=2.5cm, tmargin=2.5cm, bmargin=2.5cm, bindingoffset=0cm]{geometry}

\usepackage[nonumberlist, toc]{glossaries}

\makeglossaries

\newglossaryentry{smr}{name=SMR, description={Steam methane reforming}}
\newglossaryentry{x}{name=x, description={Percentage of Cerium in $Ce_{x}Zr_{1-x}O_{2}$}}
\newglossaryentry{op}{name={OP},description={Oh Porra!}}

\begin{document}

\pagestyle{plain}

\pagenumbering{roman}

\tableofcontents
\cleardoublepage %for openright
\listoffigures
\cleardoublepage %for openright
\listoftables

\cleardoublepage
\printglossaries

\chapter{Introduction}
\label{chapter:Introduction}

\section{Motivation}
\label{section:motivation}
%Relevance of the subject...

The production of hydrogen has been growing and one of the reasons is the fact that hydrogen has a key role in the future production of sustainable energy, fuel cells which eliminate toxic emissions and have higher efficiency than internal combustion engines for converting chemical energy of the fuel to electrical energy. Although, it's important to mention that the bigger source for the production of hydrogen is fossil fuels. The most used method is the steam methane reforming (SMR), that uses methane ($\mathrm{CH_{4}}$) which comes from natural gas.

\end{document}


Then I do makeindex and appears:

This is makeindex, version 2.15 [MiKTeX 2.9 64-bit] (kpathsea + Thai support). Scanning style file ./Teste.ist.............................done (29 attributes redefined, 0 ignored). Scanning input file Teste.glo...done (0 entries accepted, 0 rejected). Nothing written in Teste.gls. Transcript written in Teste.ilg.

After this I run my file but the glossary still doesn't appear and I don't know what i'm doing wrong.

## closed as unclear what you're asking by user31729, Svend Tveskæg, ienissei, Stefan Pinnow, Romain PicotMay 26 '16 at 12:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SX! You don't use a \gls{op} command to add the description or a \glsaddall (to add them all at once without displaying it inline) – user31729 May 23 '16 at 9:47
• Please consider the usage of mhchem package for a better display of chemical formulae. – user31729 May 23 '16 at 9:49
• @ChristianHupfer Even if I use \glsaddall, it still doesn't work – Raquel Gomes May 23 '16 at 9:51
• Did you run the makeglossaries script instead of makeindex? – user31729 May 23 '16 at 9:53

Without using a \gls{...} for a specific entry that should displayed in place or \glsaddall (for invisible adding) at all the glossary will be empty.

Make sure to run the makeglossaries script after compilation and recompile (twice, at best) after the script!

Unrelated: I used mhchem package and the \ce command to provide a better support for displaying chemical formulas.

\documentclass[10pt,a4paper]{report}
\usepackage[paper=a4paper,twoside=true,lmargin=2.5cm,rmargin=2.5cm, tmargin=2.5cm, bmargin=2.5cm, bindingoffset=0cm]{geometry}
\usepackage[version=4]{mhchem}
\usepackage[nonumberlist, toc]{glossaries}

\makeglossaries

\newglossaryentry{smr}{name=SMR, description={Steam methane reforming}}
\newglossaryentry{x}{name=x, description={Percentage of Cerium in \ce{Ce_{x}Zr_{1-x}O2}}}
\newglossaryentry{op}{name={OP},description={Oh Porra!}}

\begin{document}

\pagestyle{plain}

\pagenumbering{roman}

\tableofcontents
\cleardoublepage %for openright
\listoffigures
\cleardoublepage %for openright
\listoftables

\cleardoublepage
\printglossaries

\chapter{Introduction}
\label{chapter:Introduction}

\section{Motivation}
\label{section:motivation}
%Relevance of the subject...

The production of hydrogen has been growing and one of the reasons is the fact that hydrogen has a key role in the future production of sustainable energy, fuel cells which eliminate toxic emissions and have higher efficiency than internal combustion engines for converting chemical energy of the fuel to electrical energy. Although, it's important to mention that the bigger source for the production of hydrogen is fossil fuels. The most used method is the steam methane reforming (SMR), that uses methane (\ce{CH4}) which comes from natural gas.

\end{document}