mirror of
https://sharelatex.tu-darmstadt.de/git/681e0e7a3a9c7c9c6b8bb298
synced 2025-12-07 21:27:59 +00:00
32 lines
1.1 KiB
TeX
32 lines
1.1 KiB
TeX
% !TeX root = ./Thesis.tex
|
|
|
|
\newcommand{\ie}{i.\,e.}
|
|
\newcommand{\Ie}{I.\,e.}
|
|
\newcommand{\eg}{e.\,g.}
|
|
\newcommand{\Eg}{E.\,g.}
|
|
|
|
% for use in unnumbered chapters in the front and back matter that should appear in ToC
|
|
\newcommand{\chapterExtra}[1]{%
|
|
\phantomsection%
|
|
\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}%
|
|
\addcontentsline{toc}{chapter}{\texorpdfstring{\tocEntry{#1}}{#1}}%
|
|
\chapter*{#1}%
|
|
}
|
|
|
|
% When using \part{}, the generated PDF bookmark has a leading whitespace for unknown reasons.
|
|
% Using hyperref's \texorpdfstring within \part{} does not fix the problem.
|
|
% The following command provides a workaround:
|
|
% First, manually add a PDF bookmark (without a leading whitespace).
|
|
% Then, disable the generation of PDF bookmarks temporarily to prevent
|
|
% the creation of a PDF bookmark with a leading whitespace.
|
|
% Then, start the new part and restore the automatic generation of PDF bookmarks.
|
|
\newcommand{\partExtra}[1]{%
|
|
\phantomsection%
|
|
\pdfbookmark[-1]{#1}{#1}%
|
|
\hypersetup{bookmarksdepth=-2}%
|
|
\part{#1}%
|
|
\hypersetup{bookmarksdepth}%
|
|
}
|
|
|
|
\newcommand{\shorturl}[2]{\href{#1}{\nolinkurl{#2}}} % useful for typesetting DOIs and URNs
|