将方程式对齐于 = 处并使用方程式索引

将方程式对齐于 = 处并使用方程式索引

我想使用 和方程amsmath索引glossaries并将所有方程对齐到&=。但我不能只将 放入&保存在词汇表中的方程中。

如何处理?

我将在这里给出一个较短的例子,尽管它可能不是最小的。

\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}

答案1

正如 dalaif 指出的那样,我可以使用不生成文本的词汇表条目,然后再次输入等式并对齐它。参见第 144 页:https://ctan.kako-dev.de/macros/latex/contrib/glossaries/glossaries-user.pdf

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

相关内容