Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
2  
You could just use a document class that provides chapters, like report or book. –  Werner Aug 30 '12 at 14:45
    
You could add the following LaTeX code to your preamble: \renewcommand{\partname}{Chapter}. Or better take Werner's advice. –  lockstep Aug 30 '12 at 15:32
    
Thank you both of you for your help. The problem with Werner's solution is that, when you have numerous child's documents, you have to change the document class for all of them. I have done it though and it keeps showing Part 1, Part 2, etc. ! :( I have also tried lockstep's suggestion, but it doesn't make a difference either. Is there like a "force" command to replace "Part" by "Chapter"...? –  Laure Aug 30 '12 at 17:24
    
Here is my preamble: –  Laure Aug 30 '12 at 17:26
    
\newcommand{\sq}{\footnotesize} \usepackage{amsmath} \renewcommand{\partname}{Chapter} \renewcommand*\thepart{\arabic{part}} % arabic numbers for part \makeatletter \@addtoreset{section}{part} % reset section number when a new part starts \makeatother \renewcommand*\thesection{\thepart.\arabic{section}} % section 1.1 \renewcommand*\thesubsection{\thesection.\arabic{subsection}} % subsection 1.1.1 –  Laure Aug 30 '12 at 17:27
add comment

1 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.