aboutsummaryrefslogtreecommitdiff
path: root/projdoc.cls
diff options
context:
space:
mode:
Diffstat (limited to 'projdoc.cls')
-rw-r--r--projdoc.cls30
1 files changed, 25 insertions, 5 deletions
diff --git a/projdoc.cls b/projdoc.cls
index 388f901..c0257ca 100644
--- a/projdoc.cls
+++ b/projdoc.cls
@@ -119,6 +119,16 @@
itemsep=\dimexpr\style@itemsep-\style@parsep\relax,
parsep=\style@parsep,
}
+\def\projdoc@setdescriptionstyle{%
+ \renewcommand\makelabel[1]{%
+ {\bfseries ##1}:%
+ }%
+}
+\setdescription{
+ before={\projdoc@setdescriptionstyle},
+ leftmargin=3em,
+ labelindent=3ex,
+}
\makeatother
% create a label using \customlabel[<creftype>]{<refname>}{<reftext>} that displays
@@ -206,19 +216,29 @@
\thispagestyle{empty}
\end{titlepage}
}
-\newbool{projdoc@cited}
-\apptocmd{\abx@aux@cite}{\global\booltrue{projdoc@cited}}{}{}
+\newbool{projdoc@used@cite}
+\newbool{projdoc@used@gls}
+\apptocmd{\abx@aux@cite}{\global\booltrue{projdoc@used@cite}}{}{}
+\apptocmd{\glsxtr@record}{\global\booltrue{projdoc@used@gls}}{}{}
\def\projdoc@trailer{
% bibliography (if citations used)
- \ifbool{projdoc@cited}{\printbibliography}{}%
+ \ifbool{projdoc@used@cite}{%
+ \hfuzz=50pt% reduce overfull hbox warnings for bibliography (mostly URLs)
+ \printbibliography%
+ }{}%
% glossary
- \ifcsundef{printunsrtglossary}{}{%
+ \ifbool{projdoc@used@gls}{%
+ \setdescription{
+ before={\projdoc@setdescriptionstyle},
+ leftmargin=2ex,
+ labelindent=0pt,
+ }%
\section*{Glossary}%
\begin{multicols}{2}%
\renewcommand{\glossarysection}[2][]{}%
\printunsrtglossary%
\end{multicols}%
- }%
+ }{}%
}
\AtBeginDocument{\projdoc@header}
\AtEndDocument{\projdoc@trailer}