0

Apologies if this is a duplicate; I've found some similar questions but nothing that exactly addresses my problem.

I'd like to rename alternate chapter headings in my book-class LaTeX document. I'm aware of using \renewcommand to achieve this for every chapter heading, but can this be modified to only rename alternate chapters?

i.e.

for i in [Chapter 1, Chapter 3, Chapter 5, ...]:
    \renewcommand{\chaptername}{Lecture}
1
  • You could use the \titleformat command from the package titlesec and use a conditional for odd chapter numbers. Commented Dec 19, 2017 at 22:31

1 Answer 1

3

You can add a test to \chaptername itself:

\documentclass{book}
\usepackage[english]{babel}
\addto\captionsenglish{\renewcommand\chaptername{\ifodd\value{chapter}Lecture\else Something else\fi}}
\begin{document}
\chapter{A} \chapter{B} \chapter{C}
\end{document}

This naturally assume that you are not using the command in some other place where the test it not suited.

0

You must log in to answer this question.

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