latex-templates/phd/thesisehess.sty
2026-02-26 17:01:09 +01:00

65 lines
2.0 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{thesisehess}
% Required Packages
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{fix-cm}
\RequirePackage[english]{babel}
\RequirePackage{graphicx}
\RequirePackage{geometry}
\RequirePackage{xcolor}
\RequirePackage{titling}
\RequirePackage{titlesec}
\RequirePackage{fancyhdr}
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage{caption}
\RequirePackage{lipsum}
\RequirePackage{blindtext}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{bibunits}
\RequirePackage{afterpage}
% Page layout settings
\geometry{a4paper, margin=2.5cm}
\hypersetup{
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=black,
linktoc=all
}
% Chapter title page style separate page with: "Chapter" and number (top left) and chapter title
\titleformat{\chapter}[display]
{\huge\bfseries} % Size of "Chapter" label
{\chaptertitlename\ \thechapter} % "Chapter" label and chapter number
{20pt} % Space between chapter label and chapter title
{\Huge\raggedright} % Size of chapter title
% Section styles
\titleformat{\section}
{\normalfont\huge\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\Large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\large\bfseries}{\thesubsubsection}{1em}{}
% Headers and centered page numbers
\usepackage{fancyhdr}
\fancypagestyle{plain_center}{
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.8pt} % Set header rule line width
\fancyhead[R]{\nouppercase{\rightmark}} % Set header with chapter title at the top right
}
\pagestyle{plain_center} % Add both headers and page numbers
\fancypagestyle{noheader}{
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
% Spacing adjustments
\setlength{\headheight}{14.61858pt} % Fixes fancyhdr warning about headheight being too small
\addtolength{\topmargin}{-2.61858pt} % Compensates for the increased headheight to keep the text area unchanged
% Line spacing 1.5
\usepackage{setspace}
\setstretch{1.5}
\endinput