Enable glossaries for a Glossary, Acronyms, and Index
authorTobias Pape <tobias@netshed.de>
Fri, 17 Jan 2014 10:27:20 +0000 (11:27 +0100)
committerTobias Pape <tobias@netshed.de>
Sun, 6 Apr 2014 18:51:27 +0000 (20:51 +0200)
src/Makefile
src/applied-crypto-hardening.tex
src/common/commands.tex
src/common/style.tex
src/common/system.tex

index fbf7649..d29f889 100644 (file)
@@ -12,6 +12,8 @@ pdf:
        ./update-metadata-for-gitinfo
        ${LATEX} applied-crypto-hardening
        bibtex applied-crypto-hardening
+       makeglossaries applied-crypto-hardening
+       pdflatex applied-crypto-hardening
        while grep -s "Rerun to get cross-references right" \
         applied-crypto-hardening.log ; do \
            ${LATEX} applied-crypto-hardening ; \
@@ -50,6 +52,10 @@ clean:
             applied-crypto-hardening.blg applied-crypto-hardening.dvi   \
             applied-crypto-hardening.log applied-crypto-hardening.pdf   \
             applied-crypto-hardening.toc applied-crypto-hardening.markdown \
+            applied-crypto-hardening.glo applied-crypto-hardening.glg \
+            applied-crypto-hardening.gls applied-crypto-hardening.ind \
+            applied-crypto-hardening.ilg applied-crypto-hardening.ist \
+            applied-crypto-hardening.idx applied-crypto-hardening.lol \
                        applied-crypto-hardening.out
        rm -rf applied-crypto-hardening/
        rm -rf gitHeadInfo.gin
index cb3a30a..9820f4f 100644 (file)
 \input{acknowledgements}
 \input{abstract}
 \tableofcontents
+\printglossary[style=listgroup,nogroupskip,nonumberlist]
 \lstlistoflistings
+
 \chapter{Introduction}
 \label{chapter:Intro}
 \input{whoshouldread}
 \input{related_publications}
 \input{howtoread}
 \input{disclaimer}
+
 \input{motivation}
 \input{methods}
 \input{conventions}
@@ -57,6 +60,8 @@
 %\input{reviewers}
 \input{bib}
 
+\printindex[style=achindex]
+
 \end{document}
 %%% Local Variables: 
 %%% mode: latex
index d5468da..13a9dd0 100644 (file)
     \texttt{#1}%
 }}}
 
+\newcommand*\doindex[2][]{%
+  \newterm[name={#2},#1]{index-#2}%
+}
+\catcode`|=\active
+\makeatletter
+\def\idxopt[#1]#2|{\idx[#1]{#2}\xspace}
+\def\idxnorm#1|{%
+  \def\tempa{#1}%
+  \ifx\tempa\@empty%
+    \textbar\relax%
+  \else%
+    \idx{#1}\xspace% 
+  \fi%
+}
+\def|{\@ifnextchar[{\idxopt}{\idxnorm}%]
+}
+\makeatother
+\newcommand*\idx[2][]{\gls[#1]{index-#2}}
+\newcommand*\Idx[2][]{\Gls[#1]{index-#2}}
+\newcommand*\IDX[2][]{\GLS[#1]{index-#2}}
+\newcommand*\idxpl[2][]{\glspl[#1]{index-#2}}
+\newcommand*\Idxpl[2][]{\Glspl[#1]{index-#2}}
+\newcommand*\IDXpl[2][]{\GLSpl[#1]{index-#2}}
+\newcommand*\alsoidx[1]{\glsadd{index-#1}}
 
 %%% Local Variables: 
 %%% mode: latex
index 6b2c555..733daee 100644 (file)
 }
 \urlstyle{same}
 
+% Glossary
+\setupglossaries{shortcuts,index,nohypertypes={index}}
+\glstoctrue
+\setacronymstyle{long-sc-short}
+% as per documentation
+\newglossarystyle{achindex}{%
+ \setglossarystyle{mcolindex}%
+\renewcommand*{\glsnamefont}[1]{\textmd{##1}}
+ \renewcommand*{\glsgroupheading}[1]{%
+    \item\textbf{\glsgetgrouptitle{##1}}\item{}\space}%
+  \renewcommand*{\glsgroupskip}{%
+    \ifglsnogroupskip\else%
+    \newline\relax%
+    \fi}%
+}
+
 % Bibliography
 \bibliographystyle{alphalink}
 
index c23d291..6d00b63 100644 (file)
 \usepackage{catchfile}
 \usepackage{marginnote}
 \usepackage{hyperref}
+\usepackage[xindy]{glossaries}
+\usepackage{glossary-mcols}
+\AtEndPreamble{%
+  \makeglossaries%
+  \input{common/names}%
+}
 
 % for development
 \usepackage{ifdraft}