[Tex/LaTex] In Lyx, how to change the “Part” section to “Chapter”

formattinglyxsectioning

I am using the default Lyx document "article".

My sections range from "Part" to "Subsubsection". When I compile my pdf, I would like to replace "Part 1 Title1", "Part 2 Title2", etc by "Chapter 1 Title1", "Chapter 2 Title2", etc. Any idea how to do that? Many thanks in advance!

Best Answer

As you are using LyX this mean that by default you are using babel package too (for things like that always is a must a MWE). So you need some like this in the preample:

\addto\captionsenglish{%
  \renewcommand{\partname}%
    {Fake Chapter}%
}

However, Lyx will put the babel package after the \makeatletter --\makeatother chunk in your code (see the complete source in the View menu), and therefore cannot work.

Hence, you need put also \usepackage{babel} before in the preamble, to obtain a file that work as this MWE:

\documentclass[english]{article}
\usepackage{babel}
\addto\captionsenglish{%
  \renewcommand{\partname}%
    {Fake Chapter}%
}
\begin{document}
\part{Some part or chapter}
The \textbackslash{}thepart{} is \thepart{} and the  \textbackslash{}partname{} is \partname{}

That is all. 
\end{document}

Or deactivate babel through Lyx menus and put only \renewcommand{\partname}{Fake Chapter} in the preamble.

Related Question