0

I am currently writing my PhD thesis, and have been looking for a solution of the two stated problem below for hours, when I finally decided to ask the question in front of the "pros". :) Example, CLS-file and log-file are attached.

I have used a LaTex template as a start, and adapted it at various ends to my needs.

The float package problem Now, I am running into the problem of using the figure specifier [H] with the usagepackage[float]. Whenever I specify a figure environment with H, it is not recognized by the autoref, ref or cref functions anymore, and I get an error message that figure XYZ is undefined in line XYZ. How is that possible? I have played around several times with the autoref and cref package (see example below) because I wanted to abbreviate "Fig." and make the colourlink RoyalBlue (like in a scientific paper). In the end, I did not use cref anymore because I figured out that autoref works fine as well. I also tried to reload the hyperref package twice, but also loading it just once does not work. Apart from the H figure error, and some other problems (will discuss later), the document is running "okay-ish". Hence, do you have any idea, what could cause this error? Below you can also find the (adapted) CLS file.

Two column problem As indicated in the log file, I get some additional errors (apart from the maaaaany "too large XYZ on page XYZ" errors (don't know where they come from!?) that the multicol package should be used and not the "twocolumn" option in the preamble. Could it be that the twocolumn option causes various problems, including the one above?

Other errors Further errors, that I encounter are:

  • Overfull \hbox (5.32167pt too wide), occurring various times
  • Underfull \hbox (badness 1348), occurring various times
  • warning: 46 characters of junk seen at toplevel
  • Also, I am not sure whether it really follows the "two-side" option, as the binder offsets look the same on all pages!? I have implemented a pdf page in the beginning as the first title page (required formatting by university). Maybe that is the reason? Could this be solved with the multicol package instead?

In the end, I would like to have a LaTex document that runs without any (red or orange) errors or (blue) comments in the message logs, and I would highly appreciate your support.

Thank you

My document:

\documentclass[
10pt, % The default document font size, options: 10pt, 11pt, 12pt
twoside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
ngerman,french,english, % ngerman for German
onehalfspacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
%nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
twocolumn,
liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents
toctotoc, % Uncomment to add the main table of contents to the table of contents
%parhttps://de.overleaf.com/project/5f3b9ed1290b980001858a92skip,  
hyperref,% Uncomment to add space between paragraphs % Uncomment to not load the hyperref package
headsepline, % Uncomment to get a line under the header
chapterinoneline, % Uncomment to place the chapter title next to the number on one line
consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{MastersDoctoralThesis} % The class file specifying the document structure

\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage{float}
\usepackage{parskip}
\usepackage{tabularx}
\usepackage{textcomp}
\usepackage{ragged2e}
\usepackage{wrapfig}
\usepackage{verbatim}
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{blindtext}
\usepackage{rotating}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{array}
\usepackage{ltablex,array}
%\usepackage{multicol}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{multirow}
\usepackage[stable]{footmisc}
\usepackage{subcaption}
\renewcommand\arraystretch{1.5} % Stretches tables vertically to have more white space between rows
\usepackage{glossaries}
\usepackage{isotope}
\newcommand{\cmmnt}[1]{}
\usepackage{xcolor}
\usepackage{hyperref}
%\usepackage{cleveref}

%\crefformat{figure}{#2{\color{RoyalBlue}#1}#3}
%\Crefformat{figure}{#2{\color{RoyalBlue}#1}#3}
%\renewcommand{\figureautorefname}{Fig.}
%\renewcommand{\tableautorefname}{Table}

\makeatletter
\def\p@figure{\color{RoyalBlue}}
%\def\p@section{\color{RoyalBlue}}
%\def\p@table{\color{RoyalBlue}}
%\def\p@chapter{\color{RoyalBlue}}
%\def\p@equation{\itshape\color{RoyalBlue}}
\makeatother

\addto\extrasenglish{\def\figureautorefname{Fig.}}

%\usepackage[english]{nomencl}


%\makenomenclature
%\usepackage{sectsty}% http://ctan.org/pkg/sectsty
%\usepackage{titlecaps}% http://ctan.org/pkg/titlecaps
%\chapterfont{\MakeUppercase}


%Remove the dots in the Table of Contents with the following two lines
%\usepackage[titles]{tocloft}
%\renewcommand{\cftdot}{}

% Multicolumns for ToC / Figures / Tables
%\usepackage[toc,lof,lot]{multitoc}
%\renewcommand*{\multicolumntoc}{2}
%\setlength{\columnsep}{0.8cm} % used for space separator between two-column style
%\setlength{\parindent}{0pt}
%\addto\captionsenglish{% Replace "english" with the language you use
%  \renewcommand{\contentsname}%
%    {Table of Contents}}%

% FONTS
%\setmainfont{Arial}
%\usepackage{helvet} % Use the Helvetica font for main body text
% Specify different font for section headings
%\usepackage{titlesec}
%\usepackage{ebgaramond} % use Garamond for headings font
%\titleformat{\chapter}[display]
%  {\normalfont\sffamily\huge\bfseries\color{black}}
%  {\chaptertitlename\ \thechapter}{20pt}{\Huge}

\fontfamily{phv}\fontseries{mc}\selectfont

\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography
\usepackage[backend=biber,style=authoryear-comp,uniquename=false,giveninits=true,url=false,maxbibnames=9]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)
\DeclareFieldFormat*{title}{#1}
\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\renewbibmacro{in:}{}
\addbibresource{references.bib} % The filename of the bibliography

\newenvironment{poliabstract}[1]
  {\renewcommand{\abstractname}{#1}\begin{abstract}}
  {\end{abstract}}

%----------------------------------------------------------------------------------------
%   MARGIN SETTINGS
%----------------------------------------------------------------------------------------

\geometry{
    paper=a4paper, % Change to letterpaper for US letter
    inner=1.1cm, % Inner margin
    outer=1.3cm, % Outer margin
    bindingoffset=0.3cm, % Binding offset
    top=1.8cm, % Top margin
    bottom=1.3cm, % Bottom margin
    %showframe, % Uncomment to show how the type block is set on the page
}

\begin{document}
bla blub
\end{document}

CLS-file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Masters/Doctoral Thesis 
% Class File
% Version 1.6 (27/8/17)
%
% This class was downloaded from:
% http://www.LaTeXTemplates.com
%
% Authors:
% Vel (vel@latextemplates.com)
% Johannes Böttcher
%
% Notes:
% 1) This class file defines the structure and layout of the template file (main.tex).
% 2) It has been written in such a way that under most circumstances you should not need
% to edit it; updating it to a newer version will be harder. If you do make changes, please change the name of
% the file and add comments to make your changes more visible.
%
% Class license:
% LPPL v1.3c (http://www.latex-project.org/lppl)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   CLASS DEFINITION AND PARAMETERS
%----------------------------------------------------------------------------------------

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\newcommand{\classname}{MastersDoctoralThesis}
\ProvidesClass{\classname}[2016/11/22 v1.5 LaTeXTemplates.com]
\providecommand{\baseclass}{book}
\RequirePackage{etoolbox}
\RequirePackage{xparse}
\newbool{nolistspace}
\newbool{chapteroneline}
\newbool{listtoc}
\newbool{toctoc}
\newbool{parskip}
\newbool{hyperrefsupport}
\booltrue{hyperrefsupport}
\newbool{headsepline}
\newbool{consistentlayout}

\DeclareOption{nohyperref}{\boolfalse{hyperrefsupport}}
\DeclareOption{nolistspacing}{\booltrue{nolistspace}}
\DeclareOption{liststotoc}{\booltrue{listtoc}}
\DeclareOption{chapterinoneline}{\booltrue{chapteroneline}}
\DeclareOption{toctotoc}{\booltrue{toctoc}}
\DeclareOption{parskip}{\booltrue{parskip}}
\DeclareOption{headsepline}{\booltrue{headsepline}}
\DeclareOption{consistentlayout}{\booltrue{consistentlayout}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}

\ProcessOptions\relax

\LoadClass{\baseclass}

%  Simple interface for the user  to customize the chapter titles 
\ProvideDocumentCommand{\abovechapterskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\chapterbelowskip}{}{\vspace*{40pt}}
\ProvideDocumentCommand{\chapterinbetweenskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\autodot}{}{}
\ProvideDocumentCommand{\mdtChapapp}{}{}
\ProvideDocumentCommand{\chapteralign}{}{\raggedright}
\ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries}
\ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries}
\DeclareDocumentCommand{\@makechapterhead}{ m }{%
    \abovechapterskip
    {\parindent \z@ \chapteralign \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
        \ifbool{chapteroneline}{%
            \chapterfont \mdtChapapp\thechapter\autodot\enspace
        }{%
            \chapterprefixfont \@chapapp\space \thechapter
            \par\nobreak
            \chapterinbetweenskip
        }%
        \fi
        \fi
        \interlinepenalty\@M%
        \chapterfont #1\par\nobreak
        \chapterbelowskip
    }
    \thispagestyle{\chapter@p@gestyle}
}
\def\@makeschapterhead#1{%
    \abovechapterskip
    {\parindent \z@ \chapteralign
        \normalfont
        \interlinepenalty\@M
        \chapterfont  #1\par\nobreak
        \chapterbelowskip
    }
    \thispagestyle{\chapter@p@gestyle}
}


% Addchap provides unnumbered chapters with an entry in the table of contents as well as an updated header
\ProvideDocumentCommand{\addchap}{ s o m }{%
    \chapter*{#3}%
    \markboth{}{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addchaptertocentry{#3}%
            \markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}%
        }{%
            \addchaptertocentry{#2}%
            \markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}%
        }%
    }%
}%

\ProvideDocumentCommand{\addsec}{ s o m }{%
    \section*{#3}%
    \markright{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addcontentsline{toc}{section}{#3}%
            \markright{\MakeMarkcase{#3}}%%
        }{%
            \addcontentsline{toc}{section}{#2}%
            \markright{\MakeMarkcase{#2}}%
        }%
    }%
}%

%----------------------------------------------------------------------------------------
%   CLASS OPTIONS
%----------------------------------------------------------------------------------------

\ifbool{parskip}{\RequirePackage{parskip}} % If the parskip option is passed to the class, require the parskip package 


\ifbool{listtoc}{% If the liststotoc option has been passed to the class, add the lists to the table of contents
    \patchcmd{\listoftables}{\@starttoc{lot}}{%
        \addchaptertocentry{\listtablename}\@starttoc{lot}%
    }{}{}%
    \patchcmd{\listoffigures}{\@starttoc{lof}}{%
        \addchaptertocentry{\listfigurename}\@starttoc{lof}%
    }{}{}%
}

\ifbool{toctoc}{% If the toctotoc options has been passed to the class, add the table of contents to the table of contents
    \patchcmd{\tableofcontents}{\@starttoc{toc}%
}{%
    \addchaptertocentry{\contentsname}\@starttoc{toc}}{}{}%
}

\patchcmd{\tableofcontents}{\MakeUppercase}{\MakeMarkcase}{}{}
\patchcmd{\tableofcontents}{\MakeUppercase}{\MakeMarkcase}{}{}
\patchcmd{\listoffigures}{\MakeUppercase}{\MakeMarkcase}{}{}
\patchcmd{\listoffigures}{\MakeUppercase}{\MakeMarkcase}{}{}
\patchcmd{\listoftables}{\MakeUppercase}{\MakeMarkcase}{}{}
\patchcmd{\listoftables}{\MakeUppercase}{\MakeMarkcase}{}{}

% If the option `nolistspacing' is given, the spacing in the different lists is reduced to single spacing. This option is only useful, if the spacing of the document has been changed to onehalfspacing or doublespacing.
\ifbool{nolistspace}{
    \patchcmd{\listoffigures}{%
        \@starttoc{lof}
    }{%
        \begingroup%
        \singlespace\@starttoc{lof}\endgroup%
    }{}{}%
    \patchcmd{\listoftables}{%
        \@starttoc{lot}
    }{%
        \begingroup%
        \singlespace\@starttoc{lot}\endgroup%
    }{}{}%
    \patchcmd{\tableofcontents}{%
        \@starttoc{toc}
    }{%
        \begingroup%
        \singlespace\@starttoc{toc}\endgroup%
    }{}{}%
}{}


%----------------------------------------------------------------------------------------
%   REQUIRED PACKAGES
%----------------------------------------------------------------------------------------

\RequirePackage{babel} % Required for automatically changing names of document elements to languages besides english

\RequirePackage{scrbase} % Required for handling language-dependent names of sections/document elements

\RequirePackage{scrhack} % Loads fixes for various packages

\RequirePackage{setspace} % Required for changing line spacing

\RequirePackage{longtable} % Required for tables that span multiple pages (used in the symbols, abbreviations and physical constants pages)

\RequirePackage{siunitx} % Required for \SI commands

\RequirePackage{graphicx} % Required to include images
\graphicspath{{Figures/}{./}} % Specifies where to look for included images

\RequirePackage{booktabs} % Required for better table rules

\RequirePackage{caption} % Required for customising the captions
\captionsetup[table]{justification=centerlast,labelformat=default,labelfont=bf,labelsep=colon,name={Table}}
\captionsetup[figure]{justification=centerlast,labelformat=default,labelfont=bf,labelsep=colon,name={Fig.}}
\captionsetup[subfigure]{format=default}

%----------------------------------------------------------------------------------------
%   DEFINE CUSTOM THESIS INFORMATION COMMANDS
%----------------------------------------------------------------------------------------

\NewDocumentCommand{\thesistitle} { o m }{%
 \IfValueTF{#1}{\def\shorttitle{#1}}{\def\shorttitle{#2}}%
 \def\@title{#2}%
 \def\ttitle{#2}%
}
\DeclareDocumentCommand{\author}{m}{\newcommand{\authorname}{#1}\renewcommand{\@author}{#1}}
\NewDocumentCommand{\supervisor}{m}{\newcommand{\supname}{#1}}
\NewDocumentCommand{\examiner}{m}{\newcommand{\examname}{#1}}
\NewDocumentCommand{\degree}{m}{\newcommand{\degreename}{#1}}
\NewDocumentCommand{\addresses}{m}{\newcommand{\addressname}{#1}}
\NewDocumentCommand{\university}{m}{\newcommand{\univname}{#1}}
\NewDocumentCommand{\department}{m}{\newcommand{\deptname}{#1}}
\NewDocumentCommand{\group}{m}{\newcommand{\groupname}{#1}}
\NewDocumentCommand{\faculty}{m}{\newcommand{\facname}{#1}}
\NewDocumentCommand{\subject}{m}{\newcommand{\subjectname}{#1}}
\NewDocumentCommand{\keywords}{m}{\newcommand{\keywordnames}{#1}}

\newcommand{\checktoopen}{% New command to move content to the next page which prints to the next odd page if twosided mode is active  
    \if@openright\cleardoublepage\else\clearpage\fi
    \ifdef{\phantomsection}{\phantomsection}{}% The \phantomsection command is necessary for hyperref to jump to the correct page
}

\NewDocumentCommand{\bhrule}{}{\typeout{--------------------}}
\NewDocumentCommand{\tttypeout}{m}{\bhrule\typeout{\space #1}\bhrule}

\newcommand{\HRule}{\rule{.9\linewidth}{.6pt}} % New command to make the lines in the title page
\newcommand{\decoRule}{\rule{.8\textwidth}{.4pt}} % New command for a rule to be used under figures

\setcounter{tocdepth}{3} % The depth to which the document sections are printed to the table of contents
\ProvideDocumentCommand{\addchaptertocentry}{ m }{%
    \addcontentsline{toc}{chapter}{#1}%
}

%----------------------------------------------------------------------------------------
%   COLOURS
%----------------------------------------------------------------------------------------

\usepackage[dvipsnames]{xcolor} % Required for specifying custom colours

\colorlet{mdtRed}{red!50!black}

%----------------------------------------------------------------------------------------
%   MARGINS
%----------------------------------------------------------------------------------------

\RequirePackage{geometry}
\geometry{
    headheight=4ex,
    includehead,
    includefoot
}

\raggedbottom

%----------------------------------------------------------------------------------------
%   PENALTIES
%----------------------------------------------------------------------------------------

\doublehyphendemerits=10000 % No consecutive line hyphens
\brokenpenalty=10000 % No broken words across columns/pages
\widowpenalty=9999 % Almost no widows at bottom of page
\clubpenalty=9999 % Almost no orphans at top of page
\interfootnotelinepenalty=9999 % Almost never break footnotes

%----------------------------------------------------------------------------------------
%   HEADERS AND FOOTERS
%----------------------------------------------------------------------------------------

\RequirePackage[markcase=used]{scrlayer-scrpage}
\providepairofpagestyles{thesisSimple}{%
    \clearpairofpagestyles%
    \automark[chapter]{chapter}
    \ihead{\headmark}% Inner header
    \ohead[\pagemark]{\pagemark}% Outer header
}
\ifoot{}% Inner footer
\ofoot{}% Outer footer
\pagestyle{thesisSimple}
\providepairofpagestyles[thesisSimple]{thesis}{%
    \automark*[section]{}%
}
\providepairofpagestyles[thesisSimple]{review}{%
    \ofoot[\shorttitle/\authorname]{\shorttitle/\authorname}
    \ifoot[\today]{\today}
}
\pagestyle{thesis}
\ifbool{headsepline}{\KOMAoption{headsepline}{true}}{}
\PreventPackageFromLoading[\ClassError{\classname}{Package `fancyhdr' is
incompatible\MessageBreak with this class}{The pagesyles are defined 
    using package `scrlayer-scrpage', please consult the\MessageBreak 
KOMA-script documentation for details.}]{fancyhdr}


\newcommand{\blank@p@gestyle}{empty}
\newcommand{\chapter@p@gestyle}{plain}
\NewDocumentCommand{\blankpagestyle}{ m }{%
    \ClassWarning{\classname}{\string\blankpagestyle\space is
    obsolete,\MessageBreak use \string\setblankpagestyle \space  instead}\renewcommand{\blank@p@gestyle}{}{#1}
}
\NewDocumentCommand{\setblankpagestyle}{ m }{\renewcommand{\blank@p@gestyle}{#1}}
\NewDocumentCommand{\setchapterpagestyle}{ m }{\renewcommand{\chapter@p@gestyle}{#1}}

\DeclareDocumentCommand\cleardoublepage{}{\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}
    \thispagestyle{\blank@p@gestyle}
    \newpage
    \if@twocolumn\hbox{}\newpage\fi\fi\fi%
}

%----------------------------------------------------------------------------------------
%   ABBREVIATIONS PAGE DESIGN
%----------------------------------------------------------------------------------------

\newcommand{\abbrevname}{List of Abbreviations}
\providecaptionname{english,british,american}{\abbrevname}{List of Abbreviations}
\providecaptionname{ngerman,german,austrian,naustrian}{\abbrevname}{Abk\"urzungsverzeichnis}
\NewDocumentEnvironment{abbreviations}{ m }{%
    \ifbool{nolistspace}{\begingroup\singlespacing}{}
    \ifbool{listtoc}{\addchap{\abbrevname}}{\addchap*{\abbrevname}}
    \begin{longtable}{#1}
    }{%
    \end{longtable}
    \addtocounter{table}{-1}% Don't count this table as one of the document tables
    \ifbool{nolistspace}{\endgroup}{}
}

%----------------------------------------------------------------------------------------
%   ABSTRACT PAGE DESIGN
%----------------------------------------------------------------------------------------

\DeclareDocumentCommand{\abstractauthorfont}{}{}
\DeclareDocumentCommand{\abstracttitlefont}{}{}
%\newcommand{\byname}{by}
\newcommand{\abstractname}{Abstract}
\providecaptionname{german,ngerman,austrian,naustrian}{\byname}{von}
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish}{\byname}{by}
\ifbool{consistentlayout}{
    \DeclareDocumentEnvironment{abstract}{ O{} }{%
        \addchap*{\abstractname}%
        %{\chapteralign\normalsize\abstractauthorfont \authorname \par} % Author name
        %\vspace{\baselineskip}
        %{\chapteralign\parbox{.7\linewidth}{\chapteralign\normalsize\itshape\abstracttitlefont\@title}\par}% Thesis title
        %\bigskip\noindent\ignorespaces
    }%
    {}%end alt-abstract
}{%
    \DeclareDocumentEnvironment{abstract}{ O{\null\vfill} }{
        \checktoopen
        \tttypeout{\abstractname}
        #1%added to be able to have abstract more than one page long
        \thispagestyle{plain}
        \begin{center}
            {\normalsize \MakeUppercase{\univname} \par} % University name in capitals
            \bigskip
            {\huge\textit{\abstractname} \par}
            \bigskip
            {\normalsize \facname \par} % Faculty name
            {\normalsize \deptname \par} % Department name
            \bigskip
            {\normalsize \degreename\par} % Degree name
            \bigskip
            {\normalsize\bfseries \@title \par} % Thesis title
            \medskip
            {\normalsize \byname{} \authorname \par} % Author name
            \bigskip
        \end{center}
    }
    {
        \vfill\null
    }
}

\DeclareDocumentEnvironment{extraAbstract}{ O{\null\vfill} }{
    \checktoopen
    \tttypeout{\abstractname}
    #1%added to be able to have abstract more than one page long
    \thispagestyle{empty}
    \begin{center}
        {\normalsize \MakeUppercase{\univname} \par}% University name in capitals
        \bigskip
        {\huge\textit{\abstractname} \par}
        \bigskip
        {\normalsize \facname \par}% Faculty name
        {\normalsize \deptname \par}% Department name
        \bigskip
        {\normalsize \degreename\par}% Degree name
        \bigskip
        {\normalsize\bfseries \@title \par}% Thesis title
        \medskip
        {\normalsize \byname{} \authorname \par}% Author name
        \bigskip
    \end{center}
}
{
    \vfill\null
}

%----------------------------------------------------------------------------------------
%   ACKNOWLEDGEMENTS PAGE DESIGN
%----------------------------------------------------------------------------------------

\usepackage{xcolor}
\colorlet{mdtRed}{red!50!black}
\newcommand{\acknowledgementname}{Acknowledgements}
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish} {\acknowledgementname}{Acknowledgements} % Acknowledgement text for English countries
\providecaptionname{german,ngerman,austrian,naustrian}{\acknowledgementname}{Danksagung} % Acknowledgement text for Germanic countries

\ifbool{consistentlayout}{
    \DeclareDocumentEnvironment{acknowledgements}{}{%
        \tttypeout{\acknowledgementname}
        \addchap*{\acknowledgementname}
    }
}
{
    \DeclareDocumentEnvironment{acknowledgements}{}{%
        \checktoopen
        \tttypeout{\acknowledgementname}
        \thispagestyle{plain}
        \begin{center}{\huge\textit{\acknowledgementname}\par}\end{center}
    }
    {
        \vfil\vfil\null
    }
}

%----------------------------------------------------------------------------------------
%   DECLARATION PAGE DESIGN
%----------------------------------------------------------------------------------------

\newcommand{\authorshipname}{Declaration of Authorship}
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish}{\authorshipname}{Declaration of Authorship} % Declaration of Authorship text for English countries
\providecaptionname{german,ngerman,austrian,naustrian}{\authorshipname}{Eidesstattliche Erkl\"arung} % Declaration of Authorship text for Germanic countries

\ifbool{consistentlayout}{
    \DeclareDocumentEnvironment{declaration}{}{
        \addchap*{\authorshipname}
        }{}%
}{
    \DeclareDocumentEnvironment{declaration}{}{
        \checktoopen
        \tttypeout{\authorshipname}
        \thispagestyle{plain}
        \null\vfil
        {\noindent\huge\bfseries\authorshipname\par\vspace{10pt}}
    }{}
}

%----------------------------------------------------------------------------------------
%   DEDICATION PAGE DESIGN
%----------------------------------------------------------------------------------------

\ifbool{consistentlayout}{
    \DeclareDocumentCommand{\dedicatory}{
        m O{\vspace*{.7\textheight} }  }{
            \checktoopen\tttypeout{Dedicatory}
            \markboth{}{}
            #2
            {\hfill\parbox{.4\textwidth}{\flushright#1\par}}
        }
}{
    \newcommand\dedicatory[1]{
        \checktoopen
        \tttypeout{Dedicatory}
        \null\vfil
        \thispagestyle{plain}
        \begin{center}{\Large\slshape #1}\end{center}
        \vfil\null
    }
}


%----------------------------------------------------------------------------------------
%   PHYSICAL CONSTANTS PAGE DESIGN
%----------------------------------------------------------------------------------------

\newcommand{\constantsname}{Physical Constants}
\providecaptionname{english,british,american}{\constantsname}{Physical Constants}
\providecaptionname{ngerman,german,austrian,naustrian}{\constantsname}{Physikalische Konstanten}

\NewDocumentEnvironment{constants}{ m }{%
    \ifbool{nolistspace}{\begingroup\singlespacing}{}
    \ifbool{listtoc}{\addchap{\constantsname}}{\addchap*{\constantsname}}
    \begin{longtable}{#1}
    }{%
    \end{longtable}
    \addtocounter{table}{-1}% Don't count this table as one of the document tables
    \ifbool{nolistspace}{\endgroup}{}
}

%----------------------------------------------------------------------------------------
%   SYMBOLS PAGE DESIGN
%----------------------------------------------------------------------------------------

\newcommand{\symbolsname}{List of Symbols}
\providecaptionname{english,british,american}{\symbolsname}{List of Symbols}
\providecaptionname{ngerman,german,austrian,naustrian}{\symbolsname}{Symbolverzeichnis}

\NewDocumentEnvironment{symbols}{ m }{%
    \ifbool{nolistspace}{\begingroup\singlespacing}{}
    \ifbool{listtoc}{\addchap{\symbolsname}}{\addchap*{\symbolsname}}
    \begin{longtable}{#1}
    }{%
    \end{longtable}
    \addtocounter{table}{-1}% Don't count this table as one of the document tables
    \ifbool{nolistspace}{\endgroup}{}
}

%----------------------------------------------------------------------------------------

\ifbool{hyperrefsupport}{% If the nohyperref class option has not been specified
\AtEndPreamble{\RequirePackage{hyperref}
\hypersetup{pdfpagemode={UseOutlines},
    %plainpages=false,       % needed if Roman numbers in frontpages
    %pdfpagelabels=true,     % adds page number as label in Acrobat's page count
    %bookmarks=true,         % show bookmarks bar?
    %unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    %pdftoolbar=true,        % show Acrobat’s toolbar?
    %pdfmenubar=true,        % show Acrobat’s menu?
    %pdffitwindow=false,     % window fit to page when opened
    %pdfstartview={FitH},    % fits the width of the page to the window
    %pdftitle={uWaterloo\ LaTeX\ Thesis\ Template},    % title: CHANGE THIS TEXT!
    %pdfnewwindow=true,      % links in new window
    colorlinks=true,        % false: boxed links; true: colored links
    linkcolor=RoyalBlue,    % color of internal links
    citecolor=RoyalBlue,        % color of links to bibliography
    filecolor=black,      % color of file links
    urlcolor=RoyalBlue      % color of external links
}

\pdfstringdefDisableCommands{% If there is an explicit linebreak in a section heading (or anything printed to the pdf-bookmarks), it is replaced by a space
    \let\\\space%
}
    }
}{%nothing
}

%----------------------------------------------------------------------------------------

\endinput
% lazyLizardTracer
9
  • 1
    Since the body of the test document conists of bla blub, it doesn't generate any of the isssues you say you're experiencing. Please provide test code that actually generates some problem behavior.
    – Mico
    Apr 23 at 9:41
  • Should I upload the whole document? I have various tech-files (chapters), references etc., and the thesis is not published yet. Hence, I am not sure whether I should upload the whole text here?
    – MaxPy
    Apr 23 at 11:21
  • No, please post just enough code to generate the problem behavior you wish to fix.
    – Mico
    Apr 23 at 11:45
  • Hmm, that is the issue. I do not know which tex-files (chapters) or code could cause the problem. Should I screenshot the error message log?
    – MaxPy
    Apr 23 at 12:49
  • 2
    One of the best ways to locate a problem is to delete things until the problem goes away. If you won't do it, why should we? Apr 23 at 14:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.