5

I'm writing with TeXStudio, and create pdfs with "pdflatex.exe -synctex=1 -interaction=nonstopmode "Fallout Equestria - Torn Skies".tex"

I updated with the MikTex. Before everything went just fine. Now I keep getting these errors:

Missing number, treated as zero. \subsection{Preface +} Illegal unit of measure (pt inserted). \subsection{Preface +} Missing number, treated as zero. \subsection{Preface +} Illegal unit of measure (pt inserted). \subsection{Preface +}

The Main file looks like this:

\input{FormatDigital.tex}
\input{header.tex}
\input{definition.tex}

\begin{document}
    \AddToShipoutPicture*{\BackgroundPic}
    \fontfamily{\familydefault}
    \null
    \thispagestyle{empty}
    \addtocounter{page}{-1}
    \newpage
    \setcounter{page}{0}
    \tableofcontents
    \pagebreak
    \setcounter{chapter}{-1}
    With the usual slight crackling static of Old World Technology, the Holotape player comes to life, lighting up controls, buttons and the Screen of a Stable-Tec terminal. After the usual boot screen, instructions flare up:\\
    \terminalscreen{    
        \termline{Files marked with a - are pure text.}
        \termline{Files marked with a + are audio recordings.}
        \termline{Files marked with a * are audio-visual recordings.}
        \termline{Files marked with a \# are Rapid Inject Memory Recordings (R.I.M.R.).}
        \termline{}
        \termline{Always make sure to use the proper interface for the different file types.}
        \termline{Please keep the R.I.M.R. interface properly maintained and sanitary}
        \termline{to prevent infections, injuries and fatal brain damage.}
        \termline{}
        \termline{Enjoy!}
    }
    \renewcommand{\chaptername}{Directory}
    \chapter{Introduction}
        \section{Preface +}
            \input{Content/Vorwort.tex}
...
\vfill
Last Edit: \today
\end{document}

FormatDigital:

\documentclass[11pt,a4paper,oneside,titlepage,emulatestandardclasses]{scrbook}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\renewcommand{\familydefault}{\sfdefault}

header:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[autostyle=true]{csquotes}
%Ancors in der Inhaltsangabe
\usepackage[pdftex,
    pdfauthor={Silver Fire},
    pdftitle={Fallout Equestria - Torn Skies},
    pdfsubject={},
    pdfkeywords={Fallout Equestria, sidefic, gore, grimdark, alternate universe},
    pdfproducer={Latex with hyperref},
    pdfcreator={pdflatex}]{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}
%Titelbild
\usepackage{graphicx}
\usepackage{eso-pic}
%Alle sections auf neuen Seiten anfangen
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}


% Schusterjungen und Hurenkinder vermeiden
\clubpenalty = 10000
\widowpenalty = 10000 
\displaywidowpenalty = 10000

and definition:

\author{Silver Fire}
\title{Fallout Equestria}
\subtitle{Torn Skies}
\date{}%entfernt das datum aus dem titel

\renewcommand{\>}{\textgreater}

\newcommand{\termline}[1]{\>\space #1\\}

\newcommand{\terminalscreen}[1]
{
    \begin{quote}
        #1
    \end{quote}
}

\renewcommand{\familydefault}{\sfdefault}

\newcommand\BackgroundPic{
    \put(0,0){
        \parbox[b][\paperheight]{\paperwidth}{
            \vfill
            \centering
            \includegraphics[width=\paperwidth,height=\paperheight,
            keepaspectratio]{Images/Title.png}
            \vfill
        }}}

Wall of code, I know. Sorry for that. I'm not that firm with LaTeX as I'd like to be. If requested I can provide the complete source for error checking.

  • 1
    Welcome to TeX.SX. You're using the \documentclass in a separate file? That's.... weird ;-) – user31729 Apr 2 '16 at 13:49
  • 1
    You should also post the part of your document that your log file refers to as the source of the error. In this case it looks like it is choking on something that is somehow related to \subsection{Preface +} – A Feldman Apr 2 '16 at 13:56
  • @ChristianHupfer Thanks! Weird is my middle name. It's due to a selfmade template, so I can quickly switch between formatting optimized for computerscreens and paper... Warum schreib ich dir das auf englisch? XD – NCRT Apr 2 '16 at 14:04
  • @AFeldman Yes the log says the error comes from the \subsection{Preface +} line, but it occurs on every section, subsection and paragraph in the entire project. – NCRT Apr 2 '16 at 14:07
  • You might benefit from creating a really simple MWE without your bells and whistles, seeing if it still throws your error. Seems like you have a lot of moving parts here. Do simple documents compile without error? – A Feldman Apr 2 '16 at 14:20
6

The reason can be found in the log file:

Class scrbook Info: Deactivating the titlesec workaround, (scrbook) because package is newer than expected on input line 4.

There was an update of package titlesec. If you really want to use the new version together with a KOMA-Script class you have to install the prerelease of version KOMA-Script version 3.20. There the titlesec workaround is activated for titlesec 2016/03/21 v2.10.2 too. See also Fehler bei Verwendung von titlesec (German).

Update KOMA-Sript Version 3.20 was released on 2016/05/10. It is on CTAN, in MiKTeX 2.9 and in TeX Live 2016.

Suggestion without titlesec

But you can ensure that a section starts on a new page without package titlesec: redefine \sectionlinesformat to insert a \clearpage before section headings.

\documentclass[oneside,titlepage,emulatestandardclasses]{scrbook}[2015/10/03]
\usepackage{blindtext}%\dummy text

\renewcommand{\familydefault}{\sfdefault}

\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
  \ifstr{#1}{section}{\clearpage}{}%
  \@hangfrom{\hskip #2#3}{#4}%
}
\makeatother

\begin{document}
\blinddocument
\addsec{Test}
\end{document}

enter image description here

2

I've given the log file a closer look and found the following hint:

Class scrbook Warning: Usage of package `titlesec' together
(scrbook)              with a KOMA-Script class is not recommended.
(scrbook)              I'd suggest to use the package only
(scrbook)              if you really need it, because it breaks several
(scrbook)              KOMA-Script features, i.e., option `headings' and
(scrbook)              the extended optional argument of the section
(scrbook)              commands.
(scrbook)              Nevertheless, using requested
(scrbook)              package `titlesec' on input line 25.

I used "titlsec" to ensure that every section starts on a new page. Until today, that never was an issue. I guess a KOMA-script update did that.

  • Looks like you answered your own question! – A Feldman Apr 2 '16 at 14:41
  • There has been an update of titlesec recently too – user31729 Apr 3 '16 at 16:02
  • The titlesec update did break stuff, also for the standard classes. A fix was updated a few days later. – Johannes_B Jun 7 '16 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.