summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx122
1 files changed, 86 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx b/Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx
index a5526be5fe8..08b7f3352f2 100644
--- a/Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx
+++ b/Master/texmf-dist/source/latex/fithesis/style/mu/base.dtx
@@ -7,7 +7,7 @@
% after \texttt{style/fithesis-base.sty}, regardless of the value
% of the |\thesis@style| macro.
% \begin{macrocode}
-\ProvidesPackage{fithesis/style/mu/fithesis-base}[2016/04/18]
+\ProvidesPackage{fithesis/style/mu/fithesis-base}[2016/06/06]
\NeedsTeXFormat{LaTeX2e}
% \end{macrocode}
% The file recognizes the following options: \begin{itemize}
@@ -150,10 +150,18 @@
% \end{macrocode}
% \item\texttt{digital}, \texttt{printed} -- These macrooptions
% set the options that are appropriate for either the printed or
-% for the digital version of the document, respectively.
+% for the digital version of the document, respectively. The
+% \DescribeMacro{\ifthesis@digital@}|\ifthesis@digital@|
+% conditional is set to \texttt{true} or \texttt{false},
+% respectively.
% \begin{macrocode}
-\DeclareOption{digital}{\ExecuteOptions{color,cover}}
-\DeclareOption{printed}{\ExecuteOptions{monochrome,nocover}}
+\newif\ifthesis@digital@
+\DeclareOption{digital}{%
+ \ExecuteOptions{color,cover}%
+ \thesis@digital@true}
+\DeclareOption{printed}{%
+ \ExecuteOptions{monochrome,nocover}%
+ \thesis@digital@false}
% \end{macrocode}
% \end{itemize}
% These are the default options:
@@ -889,52 +897,93 @@
\end{alwayssingle}}%
\fi}
% \end{macrocode}
+% \end{macro}\begin{macro}{\thesis@rewind}
+% The |\thesis@rewind| macro rewinds the page numbers by either one
+% or two pages, depending on whether one-side or two-side
+% typesetting is enabled, respectively.
+% \begin{macrocode}
+\def\thesis@rewind{%
+ \addtocounter{page}{-\ifthesis@twoside@2\else1\fi}}
+% \end{macrocode}
% \end{macro}\begin{macro}{\thesis@blocks@assignment}
-% The |\thesis@blocks@assignment| macro either:
-% \begin{itemize}
-% \item Produces no output, when the expansion of
-% |\thesis@|\discretionary{}{}{}|assignmentFiles| yields an empty
-% token list or when the |\ifthesis@blocks@assignment@|
-% conditional is \texttt{false}.
-% \item Typesets a placeholder page to be replaced with the
-% official thesis assignment, when |\thesis@assignmentFiles|
-% is undefined and the |\ifthesis@blocks|\discretionary{}{}^^A
-% {}|@assignment@| conditional is \texttt{true}.
-% \item Injects the PDF file(s) specified within the
-% |\thesis@assignmentFiles| macro, when |\thesis@assignmentFiles|
-% is defined, its expansion yields a non-empty token list and
-% the |\ifthesis@blocks@assignment@| conditional is
-% \texttt{true}.
-% \end{itemize}
-% The default value of the \DescribeMacro{\ifthesis@blocks@assig^^A
-% nment@}|\ifthesis@blocks@assignment@| conditional is
+% The |\thesis@blocks@assignment| macro produces a different output
+% depending on the values of the |\thesis@assignmentFiles|.
+% |\ifthesis@blocks@assignment@|,
+% |\ifthesis@blocks@assignment@hideIfDigital@|, and
+% |\ifthesis@digital| macros.
+%
+% The default value of the
+% \DescribeMacro{\ifthesis@blocks@assignment@}^^A
+% |\ifthesis@blocks@assignment@| and
+% \DescribeMacro{\ifthesis@blocks@assignment@hideIfDigital}^^A
+% |\ifthesis@blocks@assignment@hideIfDigital@| conditionals is
% \texttt{true}.
% \begin{macrocode}
\newif\ifthesis@blocks@assignment@
\thesis@blocks@assignment@true
+\newif\ifthesis@blocks@assignment@hideIfDigital@
+\thesis@blocks@assignment@hideIfDigital@true
\def\thesis@blocks@assignment{%
+% \end{macrocode}
+% If the |\ifthesis@blocks@assignment@| conditional is
+% \textsf{true} and the |\thesis@assignmentFiles| macro is
+% undefined, then typeset a placeholder page.
+% \begin{macrocode}
\ifthesis@blocks@assignment@
\ifx\thesis@assignmentFiles\undefined
- % Typeset a placeholder page.
+ % Rewind the pages and typeset a placeholder page.
\thesis@blocks@clear
\begin{alwayssingle}%
- \thispagestyle{empty}%
- \addtocounter{page}{-\ifthesis@twoside@2\else1\fi}%
+ \thispagestyle{empty}\thesis@rewind
\noindent\textit{\thesis@@{assignment}}%
\end{alwayssingle}%
\else
+% \end{macrocode}
+% Locally define \DescribeMacro{\@inject}|\@inject| as our routine
+% for injecting lists of PDF documents.
+% \begin{macrocode}
{\edef\@pdfList{\thesis@assignmentFiles}%
+ \let\ea\expandafter
+ % Injects the specified PDF documents.
+ \def\@inject##1,{\thesis@blocks@clear
+ \def\@args{##1}\def\@relax{\relax}%
+ \ifx\@args\@relax\else
+ % Trim leading spaces.
+ \edef\@trimmed{\romannumeral-`\.##1}%
+ % Rewind the pages and include the PDF.
+ \thesis@rewind\includepdf[pages=-]\@trimmed
+ \ea\@inject\fi}%
+% \end{macrocode}
+% If the |\ifthesis@blocks@assignment@| conditional is
+% \textsf{true} and the |\thesis@assignmentFiles| macro is neither
+% undefined nor empty, then typeset a placeholder page, if the
+% |\ifthesis@digital@| conditional is \textsf{true} and the
+% |\ifthesis@blocks@assignmane@hideIfDigital@| conditional is
+% \textsf{true}
+% \begin{macrocode}
\ifx\@pdfList\empty\else
- \let\ea\expandafter
- % Inject the specified PDF documents.
- \def\@inject##1,{\thesis@blocks@clear
- \def\@args{##1}\def\@relax{\relax}%
- \ifx\@args\@relax\else
- % Trim leading spaces.
- \edef\@trimmed{\romannumeral-`\.##1}%
- \includepdf[pages=-]\@trimmed
- \ea\@inject\fi}%
- \ea\@inject\@pdfList,\relax,%
+ \ifthesis@digital@
+ \ifthesis@blocks@assignment@hideIfDigital@
+ \thesis@blocks@clear
+ \begin{alwayssingle}%
+ \thispagestyle{empty}\thesis@rewind
+ \noindent\textit{\thesis@@{assignment}}%
+ \end{alwayssingle}%
+% \end{macrocode}
+% If the |\ifthesis@blocks@assignment@| conditional is
+% \textsf{true} and the |\thesis@assignmentFiles| macro is neither
+% undefined nor empty, then inject the PDF documents specified in
+% the |\thesis@assignmentFiles|, if the |\ifthesis@digital@|
+% conditional is \textsf{false} or the
+% |\ifthesis@blocks@assignment@hideIfDigital@| conditional is
+% \textsf{false}.
+% \begin{macrocode}
+ \else
+ \ea\@inject\@pdfList,\relax,%
+ \fi
+ \else
+ \ea\@inject\@pdfList,\relax,%
+ \fi
\fi}%
\fi
\fi}
@@ -980,7 +1029,8 @@
\ifthesis@bibliography@loaded@
\ifthesis@bibliography@included@\else
\thesis@blocks@clear
- \printbibliography[heading=bibintoc]%
+ {\emergencystretch=3em%
+ \printbibliography[heading=bibintoc]}%
\fi
\fi}
% \end{macrocode}