[Tex/LaTex] Display long form (first-use like) entries of non-acronym-type entries

glossaries

I was searching for 2 hours straight now and I must say the package documentation is extensive but not very clear – frustrating. I'm looking for a way to manually display the first use form (long form) of non-acronym-type entries without resetting the counter. Can somebody help me?

I've learned so far there are indeed commands for acronyms which do exactly that. But used on an entry in a different glossary (main or custom) produces no text.

Edit: First, I like to thank mafp for his answer so far. I should maybe elaborate on my problem some more. I am currently writing on my Bachelor thesis. Since I introduced a good amount of formulas what i would like is to have a glossary for the symbols with a brief description of what they stand for. Additionally, I am thinking about inserting the same definition underneath each formula. One of my entries looks like the following:

\newglossaryentry{degvi}{type=symbols,
name=$\Delta E_{GP,i}$,
symbol={MJ},
sort=energie differenz grau verbrauch,
description={Differenz graue Energie und Verbrauch zu Produktion des betrachteten Systems}}

which produces an output like this:

Visualizing the code

Honestly, I would like to see the same output below the equation without typing everything twice. Maybe this isn't the best approach, but I like the idea of having the database of symbols with the automatic glossary creation for reference (e.g., if I'm trying to find an equation with a specific symbol).

Best Answer

The appropriate command is \glsfirst{...}. Use it like this:

\documentclass{article}
\usepackage{glossaries}
\makeglossaries

\newglossaryentry{A}{%
name={foo},%
description={bar},%
first={first},%
}

\begin{document}
\gls{A}, \gls{A}, \glsfirst{A}

\printglossary

\end{document}

Edit:

Regarding your updated question, I am concerned with your usage of the symbol field, for what you give as a symbol seems to be a unit. Maybe this answer can point into a better direction.

That being said, if you want to use the glossary entries the way you defined them, you can mimic the output of the glossary like I did here with a description environment under the equation. The crucial point is that the format of the output of \gls{...} can be set by redefining \glsdisplayfirst and \glsdisplay. Here, I redefine \glsdisplayfirst to show the name, the symbol in parentheses, and the description. If \gls{degvi} is used for the first time under equation, the output will be like in the glossary. I also set up a glossary style that mimics your output example, you can ignore that and keep what you currently have.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{glossaries}

\newglossary[slg]{symbols}{sls}{slo}{Symbolverzeichnis}
\makeglossaries

\newglossaryentry{degvi}{%
type=symbols,
name=$\Delta E_{GP,i}$,
symbol={MJ},
sort=energie differenz grau verbrauch,
description={Differenz graue Energie und Verbrauch zu Produktion des betrachteten Systems}%
}

\newglossaryentry{eg}{%
type=symbols,
name=$E_{GP}$,
symbol={MJ},
sort=energie grau verbrauch,
description={Graue Energie des Gebäudes}%
}

%% what should \gls{...} show on first usage
\renewcommand{\glsdisplayfirst}[4]{#1 (#3) #2}

\newglossarystyle{senseistyle}{%
  \renewenvironment{theglossary}%
    {\begin{description}}%
    {\end{description}}%
  \renewcommand*{\glossaryentryfield}[5]{%
      \item[\glsentryitem{##1}\glstarget{##1}{##2}]
      \space (##4)% the symbol in parentheses
      \space ##3% description
  }%
  % No heading between groups:
  \renewcommand*{\glsgroupheading}[1]{}%
  % Nothing between groups:
  \renewcommand*{\glsgroupskip}{}%
}

%% makeindex -s sensei.ist -o sensei.sls -t sensei.slg sensei.slo
\begin{document}
\begin{equation}
  \Delta E_{GP,i} = E_{GP} - ...
\end{equation}
\begin{description}
  \item \gls{degvi}
  \item \gls{eg}
\end{description}

\printglossary[type=symbols,style=senseistyle]
\end{document}

gives

sample output

Related Question