0

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.

Can anyone help me fix that? enter image description here

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}
10
  • 2
    The warning about using \typearea inside the document is only because typearea 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 of geometry. Commented Apr 3, 2017 at 13:38
  • 1
    Welcome to TeX.SE! Please provide a complete document that starts with \documentclass and ends with \end{document} and that produces the errors that you show above.
    – gernot
    Commented Apr 3, 2017 at 13:41
  • Thank you for the first feedback guys - If nobody has a different approach I'll just have to live with the warning Commented Apr 3, 2017 at 13:49
  • 1
    The problem is not the warnings but the errors that you show above. They are caused by the line \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.
    – gernot
    Commented Apr 3, 2017 at 13:54
  • You must not enclose \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 the geometry-package?
    – Skillmon
    Commented Apr 3, 2017 at 13:55

1 Answer 1

1

Since KOMA-Script release 3.23 changing page size or size of typing area or option twoside or another parameter that results in recalculation of typing area and margins does not longer result in a warning message but only in an info (shown only in the log file), e.g.:

\documentclass[twoside]{scrartcl}
\usepackage{blindtext}

\begin{document}
\Blindtext[3]

\KOMAoptions{twoside=false}
\Blindtext[3]
\end{document}

does not longer show a warning on the terminal:

(/usr/local/texlive/2017/texmf-dist/tex/latex/tools/xspace.sty)) (./test.aux)
[1] [2] (./test.aux) )
Output written on test.pdf (2 pages).

but only:

[1

]
Package typearea Info: These are the values describing the layout:
(typearea)             DIV  = 10
(typearea)             BCOR = 0.0pt
(typearea)             \paperwidth      = 597.50793pt
(typearea)              \textwidth      = 418.25555pt
(typearea)              DIV departure   = -6%
(typearea)              \evensidemargin = 17.3562pt
(typearea)              \oddsidemargin  = 17.3562pt
(typearea)             \paperheight     = 845.04694pt
(typearea)              \textheight     = 595.80026pt
(typearea)              \topmargin      = -25.16531pt
(typearea)              \headheight     = 17.0pt
(typearea)              \headsep        = 20.40001pt
(typearea)              \topskip        = 11.0pt
(typearea)              \footskip       = 47.6pt
(typearea)              \baselineskip   = 13.6pt
(typearea)              on input line 7.
Package typearea Info: Using dirty hack to recalculate internal output
(typearea)             dimensions of LaTeX on input line 7.
 [2

]

in the log file.

So the problem with the unwanted warning should be solved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .