0

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 
\GlsSetXdyCodePage{duden-utf8}

%Abkürzungsverzeichnis
\newglossary[taa]{Abk}{tab}{tac}{Abkürzungen}

%Formelverzeichnis 
\newglossary[tfa]{For}{tfb}{tfc}{Formeln}

%Symbolverzeichnis
\newglossary[tsa]{Symb}{tsb}{tsc}{Symbole}

% -- Glossary-Style -- %%
\newglossarystyle{symbol}{%
    \setglossarystyle{long3colheader}%
    \renewenvironment{theglossary}
    {\begin{longtable}[l]{@{}lp{2cm}p{\glsdescwidth}@{}}}
        {\end{longtable}}%
    \renewcommand*\glossaryheader{%
        \textbf{Zeichen} & \textbf{Einheit} & \textbf{Beschreibung} \bigskip 
        \\}%
    \renewcommand*\glsgroupheading[1]{%
        \multicolumn{3}{@{}l}{%
            \textbf{%
                \ifstr{##1}{G}{griechische Symbole}{%
                    \ifstr{##1}{L}{lateinische Symbole}{%
                        andere Symbole (##1)}%
                }%
            }%
        }%
        \tabularnewline
    }%
    %\renewcommand*{\glossaryentryfield}[5]{%<-- veraltet
    %\glsentryitem{##1}\glstarget{##1}{##2} & ##4 & ##3  \\}%
    \renewcommand*\glossentry[2]{%
        \glstarget{##1}{\glossentryname{##1}} & \glossentrysymbol{##1} & 
        \glossentrydesc{##1}\tabularnewline
    }%
}


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



\newglossaryentry{Symb:zetau}{
    name=\ensuremath{\zeta_{u}},
    description={Widerstandbeiwert (Rohrbögen)},
    symbol=\si{},
    sort=gr:zetau,
    type=Symb
}




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



\begin{document}

\begin{subequations}
    \begin{align}
        \gls{For:Druckverlust_Rohr}     
        \label{eg:Druckverlust_Rohr} \\
        a &= 123434234      
        \label{eg:othereq}
    \end{align}
\end{subequations}


\end{document}
4
  • 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
0

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

\glsadd[〈options〉]{〈label〉}
0

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.