Use the name
key to specify the appearance in the list of acronyms.
\documentclass{scrbook}
\usepackage[style=altlist,acronym]{glossaries}
\makeglossaries
\newacronym[description={set of tags for use in developing hypertext documents},%
name={html -- Hyper Text Markup Language}]{html}{html}{Hyper Text Markup Language}
\begin{document}
Empty document that does not use \gls{html}, because \gls{html} needs contents.
\printglossaries
\end{document}
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
Best Answer
If you only want the short entry use
\acs{key}
instead. You could say\let\ac\acs
to make\ac
equivalent to\acs
, but this might cause trouble. Better is to search&replace existing\ac
with\acs
.