I want to use with amsmath und glossaries an equation index and align all equations at &=. But I can't just put the & in the equation that is saved in my glossaries file.

How to handle this?

I will put my shorter example here, even so its maybe not minimal.

\documentclass[ captions=tableheading, chapterprefix, BCOR=4mm, cdfont=false]{tudscrreprt}  

\usepackage{amsmath}                    % Mathematik
%==================================== Abkürzungs-, Symbol-, Formelverzeichnis ================================================
\usepackage[nomain, xindy, nopostdot,style=super,nonumberlist,toc]{glossaries}

%Glossaries package (Abkürzungs-, Symbol-, Formelverzeichnis), 
%nonumberlist=keine Seitenzahlen
%\GLsSetXdyLanguage{german}         % sets to German 




% -- Glossary-Style -- %%
        \textbf{Zeichen} & \textbf{Einheit} & \textbf{Beschreibung} \bigskip 
                \ifstr{##1}{G}{griechische Symbole}{%
                    \ifstr{##1}{L}{lateinische Symbole}{%
                        andere Symbole (##1)}%
    %\renewcommand*{\glossaryentryfield}[5]{%<-- veraltet
    %\glsentryitem{##1}\glstarget{##1}{##2} & ##4 & ##3  \\}%
        \glstarget{##1}{\glossentryname{##1}} & \glossentrysymbol{##1} & 

\makeglossaries                         % Generate glossaries
%\loadglsentries{Verzeichnisse.tex}     %Lade Einträge der Abkürzungs-, Symbol-, Formelverzeichnisse

    description={Widerstandbeiwert (Rohrbögen)},

%Formelverzeichnis: Einträge
\newglossaryentry{For:Druckverlust_Rohr}{type=For, name=\ensuremath{\gls{Symb:zetau} = 1}, 
    description={Druckverlust bei Rohrströmung}


        \label{eg:Druckverlust_Rohr} \\
        a &= 123434234      

  • 1
    Sadly I don't that is possible. The parser for align will probably never be able to see any & inside \gls{For:Druckverlust_Rohr} even if you were able to get & in there. You should be able to use \gls{Symb:zetau} &= 1 and then use the non printing equivalent to \gls{For:Druckverlust_Rohr} (I've forgotten the name)
    – daleif
    May 25 at 14:22
  • Your idea is aceptable workaround. Only I can't find \gls non printing in en.wikibooks.org/wiki/LaTeX/Glossary#Using_defined_terms, google search or CTAN Manual with search for non-printing. Somebody anyidea what the command is called?
    – Mash
    May 26 at 9:42
  • Read the manual for glossaries not some wiki page of questionable quality. All packages are required to have a manual. If you don't already have the manual on your system you can also find them at texdoc.net
    – daleif
    May 26 at 9:46
  • I was looking for the wrong command. Its called " Adding an Entry to the Glossary WithoutGenerating Text" instead of non printing.
    – Mash
    May 26 at 10:34

As dalaif pointed out, I can use an Entry to the Glossary WithoutGenerating Text and putting then the eqution again and aligning it. See on page 144: https://ctan.kako-dev.de/macros/latex/contrib/glossaries/glossaries-user.pdf


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.