I'm new to Latex and just started using it for writing my thesis.
I got a nice working template from my professor but the issue is that he was using \KOMAoptions{twoside = false}
in the middle of the document what occurred in a typearea changed warning. I was continuing researching for options and google came up with the geometry package.
So I tried the following:
\thispagestyle{plain}
\newgeometry{
\KOMAoptions{twoside = false} }
\begin{titlepage}
\begin{center}
\Huge{\textbf{Titel}}\\[3ex]
\Large{\textbf{Untertitel der Arbeit}}\\[4ex]
\Large{\textbf{Bachelor/Master-Thesis}}\\[1ex]
\Large{Fakultät Elektrotechnik und Informatik}\\[4ex]
\includegraphics[width=8cm]{images/hswgt.pdf}\\[4ex]
\Large{zur Erlangung des akademischen Grades}\\[1ex]
\Large{\textbf{Bachelor/Master of Science}}\\[3ex]
\normalsize
\begin{tabular}{rl}\\
vorgelegt von: & \quad Max Mustermann\\[1.2ex]
Studiengang: & \quad Wirtschaftsinformatik\\[1.2ex]
Matrikelnummer: & \quad 12345\\[1.2ex]
Erstgutachter: & \quad Prof. Dr. Max Mustermann\\[1.2ex]
Zweitgutachter: & \quad Prof. Dr. Max Mustermann\\[3ex]
\end{tabular}
\end{center}
\end{titlepage}
\advance\oddsidemargin by 0.5cm % Text verschieben
\advance\evensidemargin by -0.5cm % Text verschieben
\restoregeometry
Unfortunately, this brought up two new errors. Please see the attached screenshot of the errors.
This is my root document (sorry probably not the right name but I guess thats what you guys want to see)
\documentclass[12pt,pdftex,a4paper,parskip=half]{scrbook} % Haupteinstellungen
\usepackage{ngerman} % Deutsche Sprachdatei
\usepackage[utf8]{inputenc} % Deutsche Umlaute
\usepackage[T1]{fontenc} % Schriftart
\usepackage{graphicx} % Grafiken einbinden
\usepackage{amsmath, amsthm, amssymb} % Mathematische Formeln
\usepackage{mathtools} % Mathematische Formeln
\usepackage{setspace} % Zeilenabstand
\usepackage{lmodern} % Vektorschriftart Modern
\usepackage[hyphens]{url} % Trennung URLs
\usepackage{acronym} % Abkürzungsverzeichnis
\usepackage{listings} % Code
\usepackage{geometry} % Ermöglicht lokale Layout-Änderungen
\usepackage{booktabs} % Schöne Tabellen
\usepackage{tabularx} % Tabellen
\usepackage{scrhack} % Deprecated Methoden unterdrücken
\usepackage[backend=biber]{biblatex} % Gebraucht für BibStyle\documentclass[10pt]{•}
\DeclareNameAlias{default}{last-first/first-last} % Erst Nachname im Literaturverzeichnis
\addbibresource{bib/Literatur.bib}
\newenvironment{itemize*}%
{\begin{itemize}%
\setlength{\itemsep}{2pt}%
\setlength{\parskip}{2pt}}%
{\end{itemize}}
\newenvironment{enumerate*}%
{\begin{enumerate}%
\setlength{\itemsep}{2pt}%
\setlength{\parskip}{2pt}}%
{\end{enumerate}}
\deffootnote{1em}{1em}{ %Einrueckung der Fussnoten wird korrigiert
\textsuperscript{\thefootnotemark\ }
}
\lstset{%
language=[LaTeX]TeX, % Sprache des Quellcodes ist TeX
stepnumber=1, % Jede Zeile nummerieren.
numbersep=5pt, % 5pt Abstand zum Quellcode
numberstyle=\tiny, % Zeichengrösse 'tiny' für die Nummern.
breaklines=true, % Zeilen umbrechen wenn notwendig.
breakautoindent=true, % Nach dem Zeilenumbruch Zeile einrücken.
postbreak=\space, % Bei Leerzeichen umbrechen.
tabsize=2, % Tabulatorgrösse 2
basicstyle=\ttfamily\footnotesize, % Nichtproportionale Schrift, klein für den Quellcode
showspaces=false, % Leerzeichen nicht anzeigen.
showstringspaces=false, % Leerzeichen auch in Strings ('') nicht anzeigen.
extendedchars=true % Alle Zeichen vom Latin1 Zeichensatz anzeigen.
} % Hintergrundfarbe des Quellcodes setzen.
%Trennung von Wörtern
\hyphenation{Such-er-geb-nis-se}
\hyphenation{Such-er-geb-nis-sen}
\pdfminorversion 6 % PDF-Version 1.6
\onehalfspacing % Zeilenabstand 1,5
\begin{document}
\pagestyle{plain} % Keine Kopfzeilen
\input{Titelseite} % Titelseite
\input{Erklaerung} % Eidesstattliche Erklärung
\input{Vorwort} % Vorwort
\input{Abstract} % Abstract\tableofcontents % Inhaltsverzeichnis
\clearpage % Neue Seite
\input{Abkuerzungsverzeichnis} % Abkürzungsverzeichnis
\cleardoublepage % Neue Seite
\addcontentsline{toc}{chapter}{Abbildungsverzeichnis} % Überschrift Abbildungsverzeichnis
\listoffigures % Abbildungsverzeichnis
\cleardoublepage % Neue Seite
\addcontentsline{toc}{chapter}{Tabellenverzeichnis} % Überschrift Tabellenverzeichnis
\listoftables % Tabellenverzeichnis
\tableofcontents % Inhaltsverzeichnis
\input{Kapitel1}
\input{Kapitel2}
\input{Kapitel3}
\input{Kapitel4}
\input{Kapitel5}
\cleardoublepage
\addcontentsline{toc}{chapter}{Literaturverzeichnis}
\printbibliography[title=Literaturverzeichnis]
\appendix
\input{Anhang}
\end{document}
\typearea
inside the document is only becausetypearea
needs to use internals of the LaTeX kernel so that there is no guaranty that it works and that it works for all possible backend drivers. But currently it does work for decades. So I would recommend to ignore the warning.\newgeometry
allows only options ofgeometry
.\documentclass
and ends with\end{document}
and that produces the errors that you show above.\newgeometry{\KOMAoptions{twoside = false}}
. You just can't do that.\newgeometry
expects keywords regarding the margins etc, but not the macro\KOMAoptions
which has to be used outside of\newgeometry
.\KOMAoptions{twoside=false}
into\newgeometry
. I'm not sure what approach should be made (or what you do mean by that). Did your professor include thegeometry
-package?