1

I am working on a book using KOMA-script in LYX 2.3. The first two chapters (Preface and Introduction_ are unnumbered. I can add them to the Table of Contents using e.g., \addcontentsline{toc}{chapter}{Preface}. However, the page header does not show the chapter name.

I have tried adding \usepackage{scrlayer-scrpage} to the LaTeX preamble and \pagehead {Preface} to the text. This results in error message:

"Undefined control sequence" when trying to output pdf.

Any advice?

1

With document class scrbook you can use \frontmatter and \mainmatter and \chapter for unnumbered chapters in front matter.

Example:

\documentclass{scrbook}
\usepackage{lipsum}% only for dummy text
\begin{document}
\frontmatter
\tableofcontents
\chapter{Preface}
\lipsum
\chapter{Introduction}
\lipsum
\mainmatter
\chapter{Foo}
\lipsum
\end{document}

Or you can use \addchap for unnumbered chapters.

Example:

\documentclass{scrbook}
\usepackage{lipsum}% only for dummy text
\begin{document}
\tableofcontents
\addchap{Preface}
\lipsum
\addchap{Introduction}
\lipsum
\chapter{Foo}
\lipsum
\end{document}

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.