0

Similar questions have been asked, but for this can I not find an answer to.

I am using XeLaTeX and the \polyglossia package, and I am using the book class, and I don't think it matters, but I am using the \subfiles package also.

I have added:

\addto\captionsenglish{\renewcommand*\chaptername{}}       
\addto\captionsenglish{\renewcommand*\thechapter{}}

However, that results in printing:

". CHAPTER NAME" in the corners of pages. How do I get rid of the ".?"

\chapter*{} is out of the question, because then every page prints "Table of Contents."


If I have to completely redefine the chapter macro, strangely, I am okay with that, right now...

Thank you in advance!

Bernard
  • 271,350

2 Answers2

4

The right thing is to use \chapter*. To reset the header you can then use \markboth.

\documentclass{book}
\pagestyle{headings}
\begin{document}
\chapter*{Some text}
\markboth{Some text}{Some text}
\newpage
abc
\end{document}

The koma classes have an \addchap command

\documentclass{scrbook}
\pagestyle{headings}
\begin{document}
\addchap{Some text}
\newpage
abc
\end{document}
Ulrike Fischer
  • 327,261
  • 1
    Note that there is a difference between \chapter*{...}\markboth{...}{...} and \addchap{...}. \addchap also adds the current chapter to the ToC. – Skillmon Dec 16 '19 at 12:21
0

You want to avoid writing \numberline in the toc entry and to redefine \chaptermark to only save the chapter title.

\documentclass{book}

\usepackage{polyglossia}
\usepackage{lipsum} % for fill-in text

\setmainlanguage{english}

\addto\captionsenglish{\renewcommand*\chaptername{}}       
\addto\captionsenglish{\renewcommand*\thechapter{}}

\makeatletter
% no number in the toc
\patchcmd{\@chapter}{\numberline}{\@gobble}{}{}
% only the title in the header
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}
\makeatother

\begin{document}

\tableofcontents

\chapter{Title}

\lipsum[1-20]

\end{document}

enter image description here

enter image description here

egreg
  • 1,121,712