2

MWE:

\documentclass[lang=en,11pt]{elegantbook}
\usepackage{lipsum}

\title{Book Title} \subtitle{Chapter and section at header alternatively}

\author{No author name given} \institute{ABC} \date{February 10, 2020}

\begin{document}

\maketitle

\frontmatter \tableofcontents

\mainmatter \chapter{First Chapter} \lipsum[1]

\section{First Ection} \lipsum[1-20]

\subsection{First Ection} \lipsum[1] \lipsum[1]

\end{document}

How can I get chapter name and section alternatively in elegantbook?

Sofia
  • 167

1 Answers1

3
  • Maybe this helps, I just used the option twoside in the document class.
  • According to the manual, the template is "[...] based on the Standard LATEX book class, so the options of book class work as well".

enter image description here


\documentclass[lang=en,11pt, twoside]{elegantbook} % <-- Modified
\usepackage{lipsum}

\title{Book Title} \subtitle{Chapter and section at header alternatively}

\author{No author name given} \institute{ABC} \date{February 10, 2020}

\begin{document}

\maketitle

\frontmatter \tableofcontents

\mainmatter \chapter{First Chapter} \lipsum[1]

\section{First Ection} \lipsum[1-20]

\subsection{First Ection} \lipsum[1] \lipsum[1]

\end{document}

enter image description here enter image description here

  • @ Dr.ManuelKuehner Thank you very much for your answer. If I would like to get chapter name with chapter number like "1 First Chapter" not like "Chapter 1 First Chapter", what to do? Section at header is good. – Sofia Apr 10 '21 at 05:01
  • Please ask a new question. But before you do that, do a Google search regarding the book class in Latex. – Dr. Manuel Kuehner Apr 10 '21 at 05:23
  • @user239457 In case you were not pinged with my previous comment. BTW, I go offline now, it's 10:40 PM local time for me :). Just a guess, you are probably interested in https://tex.stackexchange.com/questions/120740. – Dr. Manuel Kuehner Apr 10 '21 at 05:41