Add glossary example (#263)

This commit is contained in:
Karl Yngve Lervåg 2015-12-17 22:41:54 +01:00
parent e982722e89
commit 20e4f23a89
3 changed files with 83 additions and 1 deletions

View File

@ -0,0 +1,53 @@
\newglossary[gla]{gloss}{glb}{glc}{Glossar}
\newglossary[sya]{symbols}{syb}{syc}{Symbolverzeichnis}
\makeglossaries
\newglossaryentry{kv}
{
type=gloss,
name=KV,
description={Kontrollvolumen}
}
\newglossaryentry{dgl}
{
type=gloss,
name=DGL,
description={Differentialgleichung}
}
\newglossaryentry{agl}
{
type=gloss,
name=AGL,
description={Algebraische Gleichung}
}
\newglossaryentry{dichte}
{
sort=1171,
type=symbols,
name={\ensuremath{\varrho}},
description={
Dichte, $[\varrho] = \frac{kg}{m^3}$
}
}
\newglossaryentry{c}
{
sort=0031,
type=symbols,
name={\ensuremath{c}},
description={
spezifische Wärmekapazität, $[c] = \frac{J}{kg\cdot K}$
}
}
\newglossaryentry{C}
{
sort=0030,
type=symbols,
name={\ensuremath{C_{th}}},
description={
Wärmekapazität, $[C_{th}] = \frac{J}{K}$
}
}

View File

@ -0,0 +1,9 @@
add_cus_dep( 'glc', 'glb', 1, 'makeglc2glb' );
add_cus_dep( 'syc', 'syb', 1, 'makesyc2syb' );
sub makeglc2glb {
system( "makeindex -s \"$_[0].ist\" -t \"$_[0].gla\" -o \"$_[0].glb\" \"$_[0].glc\"" );
}
sub makesyc2syb {
system( "makeindex -s \"$_[0].ist\" -t \"$_[0].sya\" -o \"$_[0].syb\" \"$_[0].syc\"" );
}

View File

@ -1,9 +1,14 @@
\documentclass{article}
\usepackage{biblatex}
\usepackage{amsmath}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\addbibresource{local1.bib}
\addbibresource{~/.vim/bundle/vim-latex/test/completion/local2.bib}
\usepackage[nonumberlist,acronymlists={gloss,symbolslist}]{glossaries}
\input{glossary.tex}
\begin{document}
To test label completion you need to compile the document first!
@ -78,4 +83,19 @@ To test label completion you need to compile the document first!
\end{align}
\end{subequations}
\newpage
\glsaddall
\printglossary[
type=gloss,
style=long,
title={Glossary},
toctitle={Glossary}
]
\printglossary[
type=symbols,
style=long,
title={List of Symbols},
toctitle={List of Symbols}
]
\end{document}