Skip to content

Commit

Permalink
Merge pull request #2 from kkiesling/glossaries
Browse files Browse the repository at this point in the history
added glossaries package
  • Loading branch information
kkiesling authored Nov 19, 2021
2 parents 8b5e1af + 119dd77 commit a926c68
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 59 deletions.
4 changes: 2 additions & 2 deletions content/background/sample-section.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\section{Monte Carlo Radiation Transport}
\label{sec:bg:mc}

Blah blah blah.. background information in a section with equations and a reference to \ac{mcnp} \cite{mcnp5-theory}.
Also we used the $\backslash ac \{ \}$ command to write \ac{mcnp}.
Blah blah blah.. background information in a section with equations and a reference to \gls{mcnp} \cite{mcnp5-theory}.
Also we used the $\backslash gls \{ \}$ command to write \gls{mcnp}.
Now we will also refer to \cref{bg:eq:fom} without having to actually type out the word ``Equation" by using $\backslash cref \{ \}$.
We can do the same for referring to \cref{sec:bg:vr} that appears below this.
Also try clicking on the section number in the last sentence.
Expand Down
6 changes: 3 additions & 3 deletions content/intro/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ \chapter{Introduction}
First example of content is this introduction.
It is listed as a chapter and included in the main .tex document.

Let's use some acronyms just so they appear in our list in the
frontmatter. I work with the Direct Accelerated Geometry Monte Carlo
(\ac{dagmc}) toolkit. It couples with the Monte Carlo N-Particle (\ac{mcnp}) code and it uses oriented bounding boxes (\ac{obb}s).
Let's use some acronyms just so they appear in our list in the frontmatter.
I work with the \gls{dagmc} toolkit.
It couples with the \gls{mcnp} code and it uses \gls{obb}.
Binary file modified example-thesis.pdf
Binary file not shown.
25 changes: 4 additions & 21 deletions frontmatter/acronyms.tex
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
\acsetup{first-style=short}
\DeclareInstance{acro-title}{empty}{sectioning}{name-format =}
% Sample acronyms that are declared and appear in the nomenclature list

%% Sample acronyms that are declared and appear in the list of acronyms

\DeclareAcronym{mcnp}{
short = MCNP ,
long = Monte Carlo N-Particle transport code ,
class = abbrev
}

\DeclareAcronym{dagmc}{
short = DAGMC ,
long = Direct Accelerated Geometry Monte Carlo ,
class = abbrev
}

\DeclareAcronym{obb}{
short = OBB ,
long = oriented bounding box ,
class = abbrev
}
\newacronym{mcnp}{MCNP}{Monte Carlo N-Particle transport code}
\newacronym{dagmc}{DAGMC}{Direct Accelerated Geometry Monte Carlo}
\newacronym{obb}{OBB}{oriented bounding box}
6 changes: 2 additions & 4 deletions frontmatter/frontmatter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@
\clearpage
\listoffigures

% add list of acronyms here
\clearpage
\begin{nomenclature}
\printacronyms[heading=none] %[include-classes=abbrev]
\end{nomenclature}
\input{frontmatter/acronyms}
\printglossary[title={Nomenclature}, nonumberlist, nopostdot]

\clearpage

Expand Down
4 changes: 3 additions & 1 deletion includes/preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
\usepackage{amsthm} % can write math theorem type of things

%% acronyms and glossaries
\usepackage{acro} % use acronyms
\usepackage{glossaries}
\glstoctrue
\makeglossaries

% clever referencing package must be loaded LAST otherwise it will not work
\usepackage[noabbrev, capitalize]{cleveref} % for clever referencing \cref{} without having to manually write the word "Figure", etc.
Expand Down
27 changes: 0 additions & 27 deletions includes/thesisdefs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,6 @@
All Rights Reserved
\end{center}}


%=============================================================================
% GLOSSARY
%=============================================================================
% The glossary environment must do the following:
% - produce the table of contents entry for the glossary
% - start a new page with GLOSSARY centered two inches from the top
%=============================================================================
\def\glossary{
\chapter*{GLOSSARY}
\addcontentsline{toc}{chapter}{Glossary}}
\def\endglossary{\par\newpage}

%=============================================================================
% NOMENCLATURE
%=============================================================================
% The nomenclature environment must do the following:
% - produce the table of contents entry for the nomenclature section
% - start a new page with NOMENCLATURE centered two inches from the top
%=============================================================================
\def\nomenclature{%\separatorpage{DISCARD THIS PAGE}
\chapter*{Nomenclature}
\addcontentsline{toc}{chapter}{Nomenclature}}
\input{frontmatter/acronyms}
\def\endnomenclature{\par\newpage}


%=============================================================================
% LIST OF SYMBOLS
%=============================================================================
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ quick: $(manuscript).tex
all-via-pdf: $(manuscript).tex
mkdir -p build
pdflatex $(latexopt) $(manuscript)
# makeglossaries -d build $(manuscript)
makeglossaries -d build $(manuscript)
bibtex build/$(manuscript)
pdflatex $(latexopt) $(manuscript)
pdflatex $(latexopt) $(manuscript)
Expand Down

0 comments on commit a926c68

Please sign in to comment.