Skip to content

Instantly share code, notes, and snippets.

@tairun tairun/MWE_auto_eq
Created May 14, 2013

Embed
What would you like to do?
Semi automatic to manual equation legend in LaTeX with glossaries
\documentclass[leqno]{scrartcl}
\usepackage{lipsum}
\usepackage[]{glossaries}
\newglossary[slg]{symbols}{slm}{sbl}{List of Symbols}
% IMPORTANT -----------------------------------------------------------------------------------
% add [makeindex.exe -s "%tm.ist" -t "%tm.slg" -o "%tm.slm" "%tm.sbl"] to your compile run ------
%----------------------------------------------------------------------------------------------
\newglossaryentry{sym:deg}{
type=symbols,
name={$\dot{D}$},
description={Prozentuale jährliche Abnahme des Wirkungsgrades},
user1={\%/a},
sort=deg
}
\newglossaryentry{sym:etadegr}{
type=symbols,
name={$\eta_{Deg,r}$},
description={Verbleibender Wirkungsgrad bezogen auf den ursprünglichen Wirkungsgrad},
user1=\%,
sort=eta deg rest
}
\newglossaryentry{sym:tau}{
type=symbols,
name={$\tau$},
description={Lebenszyklus / Einsatzdauer des betrachteten Systems},
user1=a,
sort=tau
}
%Command
\newcommand{\items}[1]{\glstext*{#1} & \glsdesc*{#1} [\glsuseri*{#1}] \\}
%--------------------------------------------------------------------------
\begin{document}
\lipsum[1]
This is equation \ref{eq:deg}
\begin{align}
\dot{D} = \frac{1-\eta_{Deg,r}}{\tau} \label{eq:deg}
\end{align}
\lipsum[1]
This is the corresponding legend.\\
%Legend Environment
\begin{tabular}{@{} p{1cm} p{0.9 \textwidth}}
\items{sym:deg}
\items{sym:etadegr}
\items{sym:tau}
\end{tabular} \\
\lipsum[1]
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.