From 29f032ad38798708a8fd692713619c9c2a459599 Mon Sep 17 00:00:00 2001
From: xvrabcov <xvrabcov@fi.muni.cz>
Date: Mon, 22 Mar 2021 16:33:06 +0100
Subject: [PATCH] Put glossary package into example.dtx

---
 example/mu/example.dtx | 41 +++++++++--------------------------------
 fithesis.dtx           | 26 --------------------------
 2 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/example/mu/example.dtx b/example/mu/example.dtx
index 65c01ba..70f3510 100644
--- a/example/mu/example.dtx
+++ b/example/mu/example.dtx
@@ -102,8 +102,6 @@
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used 
 %   by thesis@bibEntry and thesis@titlePage: field, fieldEn
 %   departmentEn. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 
 \thesissetup{
@@ -136,7 +134,6 @@
       span multiple paragraphs.
     },
     bib                = example.bib,
-    dict               = example-terms-abbrs.tex,
     %% Uncomment the following line (by removing the %% at the
     %% beginning) and replace `assignment.pdf` with the filename
     %% of your scanned thesis assignment.
@@ -170,8 +167,6 @@
 %    \end{macrocode}
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used
 %   by thesis@titlePage: field, department. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date        = \the\year/\the\month/\the\day,
@@ -198,7 +193,6 @@
       span multiple paragraphs.
     },
     bib         = example.bib,
-    dict        = example-terms-abbrs.tex,
     %% Uncomment the following line (by removing the %% at the
     %% beginning) and replace `assignment.pdf` with the filename
     %% of your scanned thesis assignment.
@@ -211,8 +205,6 @@
 %   by thesis@bibEntry and thesis@titlePage: field, fieldEn,
 %   department, departmentEn, titleEn, TeXtitleEn, keywords, 
 %   keywordsEn, TeXkeywords, TeXkeywordsEn. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date          = \the\year/\the\month/\the\day,
@@ -231,7 +223,6 @@
     keywords      = {keyword1, keywords2, ...},
     TeXkeywords   = {keyword1, keywords2, \ldots},
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -248,8 +239,6 @@
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used
 %   by thesis@bibEntry and thesis@titlePage: field, fieldEn,
 %   department, departmentEn, titleEn, TeXtitleEn. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date          = \the\year/\the\month/\the\day,
@@ -277,7 +266,6 @@
       span multiple paragraphs.
     },
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -300,8 +288,6 @@
 %    \end{macrocode}
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used
 %   by thesis@titlePage: field [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date          = \the\year/\the\month/\the\day,
@@ -329,7 +315,6 @@
       span multiple paragraphs.
     },
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -343,10 +328,6 @@
 }
 %</law>
 %<*med>
-%    \end{macrocode}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
-%    \begin{macrocode}
 \thesissetup{
     date          = \the\year/\the\month/\the\day,
     university    = mu,
@@ -375,7 +356,6 @@
       span multiple paragraphs.
     },
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -393,8 +373,6 @@
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used
 %   by thesis@bibEntry and thesis@titlePage: field, fieldEn,
 %   departmentEn, titleEn, TeXtitleEn. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date          = \the\year/\the\month/\the\day,
@@ -423,7 +401,6 @@
       span multiple paragraphs.
     },
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -447,8 +424,6 @@
 % \changes{v1.0.0}{2021/03/04}{Added elements that are used
 %   by thesis@bibEntry and thesis@titlePage: fieldEn, departmentEn,
 %   titleEn, TeXtitleEn, keywordsEn, TeXkeywordsEn, abstractEn. [TV]}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
 %    \begin{macrocode}
 \thesissetup{
     date        = \the\year/\the\month/\the\day,
@@ -472,7 +447,6 @@
       span multiple paragraphs.
     },
     bib        = example.bib,
-    dict       = example-terms-abbrs.tex,
     %% The following keys are only useful, when you're using a
     %% locale other than English. You can safely omit them in an
     %% English thesis.
@@ -501,10 +475,6 @@
 }
 %</phil>
 %<*sci>
-%    \end{macrocode}
-% \changes{v1.0.0}{2021/03/22}{Added key dict for printing
-%   glossaries. [TV]}
-%    \begin{macrocode}
 \thesissetup{
     date            = \the\year/\the\month/\the\day,
     university      = mu,
@@ -534,15 +504,22 @@
       span multiple paragraphs.
     },
     bib           = example.bib,
-    dict          = example-terms-abbrs.tex,
     %% Uncomment the following line (by removing the %% at the
     %% beginning) and replace `assignment.pdf` with the filename
     %% of your scanned thesis assignment.
 %%    assignment         = assignment.pdf,
 }
 %</sci>
+%    \end{macrocode}
+% \changes{v1.0.0}{2021/03/22}{Added \textsf{glossaries} package.
+%    [TV]}
+%    \begin{macrocode}
 \usepackage{makeidx}      %% The `makeidx` package contains
 \makeindex                %% helper commands for index typesetting.
+\usepackage[acronym]{glossaries}          %% The `glossaries` package
+\nenewcommand*\glspostdescription{\hfill} %% contains helper commands
+\makeglossaries                           %% for dict and loa
+\input{example-terms-abbrv}               %% typesetting.
 %% These additional packages are used within the document:
 \usepackage{paralist} %% Compact list environments
 \usepackage{amsmath}  %% Mathematics
@@ -583,7 +560,7 @@
 %% and to print out List of Abbreviations and/or Dictionary in your
 %% document. Titles for these tables can be changed by replacing the
 %% titles `Abbreviations` and `Dictionary`, respectively.
-
+\clearpage
 \printglossary[title={Abbreviations}, type=\acronymtype]
 \printglossary[title={Dictionary}]
 
diff --git a/fithesis.dtx b/fithesis.dtx
index 3ba97d4..e3fd80d 100644
--- a/fithesis.dtx
+++ b/fithesis.dtx
@@ -18,7 +18,6 @@
 \usepackage{ragged2e}
 \usepackage{paralist}
 \usepackage{multicol}
-\usepackage[acronym]{glossaries}
 
 
 % Making paragraphs numbered
@@ -31,13 +30,6 @@
 \setcounter{secnumdepth}{4} % how many sectioning levels to assign
 \setcounter{tocdepth}{4}    % how many sectioning levels to show
 
-% Aligning page numbers of occurences of terms and abbreviation
-% to the right
-\makeatletter
-\renewcommand*\glspostdescription{\hfill}
-\makeatother
-\makeglossaries
-
 % ltxdoc class options
 \CodelineIndex
 \MakeShortVerb{|}
@@ -70,8 +62,6 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-% \changes{v1.0.0}{2021/03/22}{Added package glossaries for printing
-%   out Dictionary and List of Abbreviations. [TV]}
 % ^^A Since 0.3.45, all changes are documented at the change sites.
 % \changes{v0.3.44}  {2017/05/18}{Fixed the color in the logo of FI
 %   MU. [VN]}
@@ -1286,22 +1276,6 @@
 % When the |\thesis@bibFiles| macro is defined and non-empty, the
 % style files should take that as a cue that the user wishes to
 % typeset the bibliography.
-% \changes{v1.0.0}{2021/03/22}{Added \texttt{dict} key for printing
-%   glossaries. [TV]}
-% \begin{macro}{\thesis@dictFiles}
-% \subsubsection{The \texttt{dict} key}
-% The \marg{\texttt{dict}=list} pair sets the comma-delimited
-% list of paths to the TeX files containing the Dictionary and
-% List of Abbreviations databases to \textit{list}. The \textit{list}
-% is stored within the |\thesis@dictFiles| macro.
-%    \begin{macrocode}
-\define@key{thesis}{dict}{%
-  \def\thesis@dictFiles{#1}}
-%    \end{macrocode}
-% \end{macro}
-% When the |\thesis@dictFiles| macro is defined and non-empty, the
-% style files should take that as a cue that the user wishes to
-% typeset the dictionary and list of abbreviations.
 % \begin{macro}{\ifthesis@auto}
 % \subsubsection{The \texttt{autoLayout} key}
 % The \marg{\texttt{autoLayout}=bool} pair either enables,
-- 
GitLab