Skip to content

Instantly share code, notes, and snippets.

@tairun
Created May 14, 2013 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tairun/5575285 to your computer and use it in GitHub Desktop.
Save tairun/5575285 to your computer and use it in GitHub Desktop.
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