4

The word "french" comes just before the chapter heading. Is that a bug, and is there a fix?

\documentclass{report}
\usepackage[french]{babel}
\usepackage[T1]{fontenc} % due to warning from babel
\usepackage{lipsum}
\usepackage{titleps}

%http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/titlesec/titleps.pdf#section.1
\newpagestyle{main}{\sethead[\thepage][\chaptertitle][(\thesection]  % even
  {\thesection)}{\sectiontitle}{\thepage}} % odd
\pagestyle{main}

\begin{document}
\tableofcontents

\chapter{Intro}

\lipsum[1]

\end{document}

Shot1

  • I have no problem with this code. B.t.w. the language option of babel should be loaded with the document class. Check your code – there might be a forgotten ‘french’ somewhere. – Bernard Oct 10 '19 at 23:07
  • "I have no problem with this code.": are you being passive-aggressive with me?! – Erwann Oct 11 '19 at 1:27
  • @Erwann As the code works for Bernard you should show your log file so that one can check for differences. – Ulrike Fischer Oct 11 '19 at 6:18
  • Here it is. – Erwann Oct 11 '19 at 7:10
  • @Bernard I can reproduce the issue using an uptodate TeXLive 2019 or an uptodate MiKTeX. But it works for me, if I switch to TeXLive 2018. – esdd Oct 11 '19 at 7:45
4

\markboth is a robust command now, and the code of titleps seems not to handle this correctly. A possible work-around for now seems to be this:

\documentclass{report}

\usepackage[french]{babel}
\usepackage{titleps}
\makeatletter
\def\ttl@mb@mark{\csname markboth \endcsname} % patch
\makeatother
\newpagestyle{main}{}
\pagestyle{main}

\begin{document}

\chapter{Intro}


\end{document}
|improve this answer|||||
  • 1
    Thank you, Ulrike. I didn't expect it to be a change in the LaTeX kernel (maybe that's why I didn't find where the problem was). I'll fix it and in a few days I'll upload a new version. – Javier Bezos Oct 11 '19 at 15:08

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.