%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Read the /ReadMeFirst/ReadMeFirst.tex for an introduction. Check out the accompanying book "Better Books with LaTeX" for a discussion of the template and step-by-step instructions. The template was originally created by Clemens Lode, LODE Publishing (www.lode.de), mail@lode.de, 8/17/2018. Feel free to use this template for your book project!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Hack to fix incompatibility between tex4ht and TeXLive2019
%This breaks the pdfLaTeX PDF output, but the HTML output as well as the XeLaTeX PDF output is fine!
\ifdefined\HCode
\AtBeginDocument{\def\pagestyle#1{\edef\currentpagestyle{#1}}}
\fi
% Selecting document class scrbook to be in the two-page mode and accommodate for the binding of a printed book.
% The bibliography receives an entry in the table of contents but no number.
\documentclass[pagesize=auto,bibliography=totocnumbered]{scrbook}
\title{Clemens Lode's LaTeX Book Template}
% activate babelEN
\usepackage[american]{babel}
% activate babelDE
%\usepackage[ngerman]{babel}
% add a list of words to enforce a certain hyphenation for them.
%\usepackage[T1]{fontenc}
\usepackage{xspace}
\usepackage{hyphenat}
\hyphenation{}
% German abbreviations
%\newcommand{\zB}{\mbox{z.\,B.}\xspace}
%\renewcommand{\dh}{\mbox{d.\,h.}\xspace}
%\newcommand{\va}{\mbox{v.\,a.}\xspace}
%\newcommand{\ua}{\mbox{u.\,a.}\xspace}
% load additional LaTeX libraries.
\input{lib/packages}
% Activate externalization (for tex4ht output: do not generate graphics, only load them). This code needs to be in the main file.
\ifxetex
\else
\ifx\HCode\undefined
\tikzexternalize
\else
\tikzexternalize[mode=only graphics]
\fi
\fi
% load the actual book.
\input{main/main.tex}