Skip to content

Commit

Permalink
Use glossaries package
Browse files Browse the repository at this point in the history
  • Loading branch information
clbarnes committed Nov 20, 2018
1 parent de7690a commit 471e67e
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ thesis.run.xml*
*run.xml*
*.latexmkrc*
*_latexmk*

# glossary/ acronyms

*.acr
*.alg
*.acn
*.glg
*.gls
10 changes: 6 additions & 4 deletions Chapter1/chapter1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ \section{What is loren ipsum? Title with math \texorpdfstring{$\sigma$}{[sigma]}
CIF: \hspace*{5mm}F_0^j(a) = \frac{1}{2\pi \iota} \oint_{\gamma} \frac{F_0^j(z)}{z - a} dz
\end{align}

\nomenclature[z-cif]{$CIF$}{Cauchy's Integral Formula} % first letter Z is for Acronyms
\nomenclature[z-cif]{$CIF$}{Cauchy's Integral Formula} % first letter Z is for Acronyms
\nomenclature[a-F]{$F$}{complex function} % first letter A is for Roman symbols
\nomenclature[g-p]{$\pi$}{ $\simeq 3.14\ldots$} % first letter G is for Greek Symbols
\nomenclature[g-i]{$\iota$}{unit imaginary number $\sqrt{-1}$} % first letter G is for Greek Symbols
Expand Down Expand Up @@ -76,8 +76,7 @@ \section{Where does it come from?} %Section - 1.3
\nomenclature[z-BEM]{BEM}{Boundary Element Method}
\nomenclature[z-MPM]{MPM}{Material Point Method}
\nomenclature[z-LBM]{LBM}{Lattice Boltzmann Method}
\nomenclature[z-MRT]{MRT}{Multi-Relaxation
Time}
\nomenclature[z-MRT]{MRT}{Multi-Relaxation Time}
\nomenclature[z-RVE]{RVE}{Representative Elemental Volume}
\nomenclature[z-GPU]{GPU}{Graphics Processing Unit}
\nomenclature[z-SH]{SH}{Savage Hutter}
Expand All @@ -97,4 +96,7 @@ \section{Where does it come from?} %Section - 1.3
\nomenclature[z-USL]{USL}{Update Stress Last}
\nomenclature[s-crit]{crit}{Critical state}
\nomenclature[z-DKT]{DKT}{Draft Kiss Tumble}
\nomenclature[z-PPC]{PPC}{Particles per cell}
\nomenclature[z-PPC]{PPC}{Particles per cell}

While nomenclature is all well and good, sometimes you need a real \gls{glossary}.
But to get a real understanding if what it's all about, you should just \gls{rtft}.
11 changes: 11 additions & 0 deletions Glossary/glossary.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%!TEX root = ../thesis.tex

\usepackage[acronym,toc,nonumberlist]{glossaries}
\makeglossaries

\newglossaryentry{glossary}{
name=glossary,
description={A place to define commonly-used jargon}
}

\newacronym{rtft}{RTFT}{Read The Final Thesis}
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fileinfo := LaTeX Makefile
author := Chris Monson
version := 2.2.1-alpha10
#
.DEFAULT_GOAL := all
.DEFAULT_GOAL := all-gls
# Note that the user-global version is imported *after* the source directory,
# so that you can use stuff like ?= to get proper override behavior.
.PHONY: Makefile GNUmakefile Makefile.ini $(HOME)/.latex-makefile/Makefile.ini
Expand Down Expand Up @@ -4241,3 +4241,6 @@ endef
hooks:
./hooks/install.sh

.PHONY: all-gls
all-gls: all
makeglossaries thesis; $(MAKE) all;
1 change: 1 addition & 0 deletions compile-thesis-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ makeindex "%FILENAME%.idx"
makeindex "%FILENAME%.nlo" -s nomencl.ist -o "%FILENAME%".nls
pdflatex -interaction=nonstopmode "%FILENAME%.tex"
makeindex "%FILENAME%.nlo" -s nomencl.ist -o "%FILENAME%".nls
makeglossaries %FILENAME%
pdflatex -interaction=nonstopmode "%FILENAME%.tex"


Expand Down
1 change: 1 addition & 0 deletions compile-thesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ elif [ $1 = $compile ]; then
makeindex $filename.nlo -s nomencl.ist -o $filename.nls
pdflatex -interaction=nonstopmode $filename.tex
makeindex $filename.nlo -s nomencl.ist -o $filename.nls
makeglossaries $filename
pdflatex -interaction=nonstopmode $filename.tex
echo "Success!"
exit
Expand Down
Binary file modified thesis.pdf
Binary file not shown.
9 changes: 8 additions & 1 deletion thesis.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% ******************************* PhD Thesis Template **************************
% Please have a look at the README.md file for info on how to use the template

\documentclass[a4paper,12pt,times,numbered,print,index]{PhDThesisPSnPDF}
\documentclass[a4paper,12pt,times,numbered,print]{PhDThesisPSnPDF}

% ******************************************************************************
% ******************************* Class Options ********************************
Expand Down Expand Up @@ -106,6 +106,8 @@
\includeonly{Chapter3/chapter3}
\fi

\input{Glossary/glossary}

% ******************************** Front Matter ********************************
\begin{document}

Expand All @@ -126,6 +128,11 @@

\listoftables

% Only one of glossary (including acronyms) and nomenclature should be used, for clarity

\printglossary[title=Glossary]
\printglossary[type=\acronymtype]

% \printnomenclature[space] space can be set as 2em between symbol and description
%\printnomenclature[3em]

Expand Down

0 comments on commit 471e67e

Please sign in to comment.