When elegantbook class (3.11) uses polyglossia package it does not show chapter number at header?


%Bengali Font in Document
% For a bilingual document

\defaultfontfeatures{Ligatures=TeX, Scale=MatchUppercase}
% Times New Roman used for English
%\setmainfont{Times New Roman}
%\setmainfont{Times New Roman}[NFSSFamily=ntxtlf]

% Bengali
  AutoFakeBold = 0.2,
  AutoFakeSlant = 0.15  ]

\title{An Elegant \LaTeX{} Template for Books}
\subtitle{Classic Elegant\LaTeX{} Template}

\author{Ethan Deng \& Liam Huang}
\institute{Elegant\LaTeX{} Program}
\date{April 12, 2020}

\extrainfo{Victory won\rq t come to us unless we go to it. }






\chapter{স্যাম্পল  চ্যাপ্টার}
\section{স্যাম্পল সেকশন}

enter image description here

enter image description here

I need following output:

enter image description here enter image description here

Actually I am new in Latex, that's why I have not much knowledge about it. How can I fix this problem?

  • 2
    It would be helpful if you would provide for a file that we can run. You use inserted images we do not have, and I would not like to download letter types I do not use. You could try whether the same problem appears when you use a Latin letter type instead of the Bengali letter. Might be your problem is the "fancy" in your documentclass, because afterwords you do not define how to present the chapter heads nor the headers. – C. Peters Apr 15 at 6:43

The class defines the chapter title and the header in the wrong way. It misuses \chaptername to include the number. But as \chaptername is redefined by the language support packages the number is lost again

But you should be aware that the class is not a generic class for all languages. It explicitly supports only english, chinese and italian.

You can add the following before \begin{document}:

\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter \, #1\,}{}}

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.