% ============================================================================
% Dissertation main.tex
% Target: PDF/A-1b compliance per requirements A1-A10, D1, D2, D4-D7
% Companion file required: main.xmpdata (metadata for A1, A6, D6)
% Filename rule (A4): no umlauts, spaces, or special characters
% ============================================================================
\documentclass[
a4paper, % A5: DIN A4 page format
twoside, % A7: double-sided layout
BCOR=25mm, % A7: binding correction, inner margin >= 25mm
DIV=16, % A7: could also be "calc" -> equals 10-12 -> wider margins
open=right, % chapters start on recto pages (double-sided convention)
]{scrreprt}
% ----------------------------------------------------------------------------
% PDF/A-1b compliance
% Loads hyperref internally. Reads metadata from main.xmpdata.
% Covers: A1 (title/author), A2 (no security), A3 (font embedding),
% A6 (language), A10 (color profile), D6 (keywords)
% ----------------------------------------------------------------------------
\usepackage[a-1b]{pdfx}
% ----------------------------------------------------------------------------
% Hyperref configuration
% pdfx already loaded hyperref; configure behavior here.
% plainpages=false and pdfpagelabels=true prevent PDF viewer page-label
% conflicts when mixing roman and arabic numbering.
% ----------------------------------------------------------------------------
\hypersetup{
bookmarksnumbered = true, % A8: numbered bookmarks mirror TOC
bookmarksopen = true, % A9: bookmark panel open on load
bookmarksopenlevel = 0, % A9: collapsed to first level (chapters)
bookmarksdepth = 3, % A8: bookmarks include sections/subsections
pdfpagemode = UseOutlines, % A9: open bookmark panel on load
pdfstartview = Fit, % A9: fit page to window on open
plainpages = false, % needed for roman+arabic numbering
pdfpagelabels = true, % PDF viewer shows correct labels (i, ii, 1, 2)
colorlinks = true, % PDF/A-1b safe: colored text, no boxes, no transparency
linkcolor = black, % internal links (TOC, cross-refs) - D4, D5
citecolor = black, % bibliography links - D2
urlcolor = black, % external URLs
filecolor = black,
}
% ----------------------------------------------------------------------------
% Language (A6)
% Must match \Language in main.xmpdata.
% main=english sets document default; ngerman available via \selectlanguage.
% ----------------------------------------------------------------------------
\usepackage[main=english,ngerman]{babel}
% ----------------------------------------------------------------------------
% Typography
% ----------------------------------------------------------------------------
\usepackage{microtype} % improved typography, PDF/A compatible
% ----------------------------------------------------------------------------
% Graphics and alt text (D1)
% \pdftooltip{\includegraphics{...}}{alt text description}
% ----------------------------------------------------------------------------
\usepackage{graphicx}
\usepackage{pdfcomment}
% ----------------------------------------------------------------------------
% Footer with reprint notice an page number
% ----------------------------------------------------------------------------
\usepackage[automark,headsepline=false, footsepline=false]{scrlayer-scrpage}
\newcommand{\currentreprint}{} % placeholder
\defpairofpagestyles{reprint}{%
\clearpairofpagestyles% no header, no footer by default
\ofoot*{\pagemark}% page number in outer footer
\cfoot*{\footnotesize\currentreprint}% centered footer, all pages
}
% ----------------------------------------------------------------------------
% References
% ----------------------------------------------------------------------------
\usepackage{cleveref}
% ----------------------------------------------------------------------------
% Captions (D7)
% Default caption format produces "Figure X:" / "Table X:" labels.
% ----------------------------------------------------------------------------
\usepackage{caption}
%\includepdf[pages={1}]{myfile.pdf}
%\includepdf[pages={1,3,5}]{myfile2.pdf}
%\includepdf[pages=-]{myfile3.pdf} -> for all pages
% ----------------------------------------------------------------------------
% pdfpages to include papers
% ----------------------------------------------------------------------------
\usepackage{pdfpages}
% ----------------------------------------------------------------------------
% Bibliography (D2)
% ----------------------------------------------------------------------------
\usepackage{csquotes}
\usepackage[backend=biber, hyperref=true]{biblatex}
\addbibresource{references.bib}
% ----------------------------------------------------------------------------
% Partial compilation with \includeonly
%
% HOW IT WORKS
% \includeonly{...} restricts which \include{...} chapters are typeset,
% while preserving cross-references and page numbers from the .aux files
% of excluded chapters.
%
% USAGE
% 1. Run ONE full build first so every chapter's .aux file exists.
% 2. Uncomment \includeonly below and list only the chapter(s) you edit.
% 3. Before final build: COMMENT OUT \includeonly or include all chapters.
%
% NOTES
% - Paths match \include arguments exactly, no .tex extension.
% - Works only with \include, not \input.
% - Run biber + pdflatex twice after changing \includeonly.
% ----------------------------------------------------------------------------
%\includeonly{
% contribution,
% %chapters/chapter_4/chapter_4
% declaration
%}
% ============================================================================
\begin{document}
% ---- Frontmatter: roman page numbers (i, ii, iii, ...) ----
% Title page is unnumbered (\thispagestyle{empty} inside titlepage.tex).
% \pagenumbering is set AFTER the title page so roman numbering starts
% with the TOC at page i.
\input{titlepage}
\pagenumbering{roman}
\setcounter{page}{1}
\input{dedication}
\input{abstract}
\tableofcontents
\listoffigures % D5
\listoftables % D5
\cleardoublepage
% ---- Main matter: arabic page numbers (1, 2, 3, ...) ----
\pagenumbering{arabic}
\setcounter{page}{1}
\include{contribution}
\include{chapters/010/chapter_010}
% if you like you can also add parts
%\part{Part I}
%\label{part1}
\include{chapters/020/chapter_020}
%\part{Part II}
%\label{part2}
\include{chapters/030/chapter_030}
%\part{Part II}
%\label{part3}
\include{chapters/040/chapter_040}
\include{chapters/050/chapter_050}
\include{chapters/060/chapter_060}
% ---- Backmatter: continues arabic numbering ----
\printbibliography
\include{declaration}
\end{document}