I'm using the article class. When creating a new part, I would like to change "Part 1" to "Experiment 1", "Part 2" to "Experiment 2" and so on, followed by my part title. How can I do that?
I've found this question, but the answers didn't work for me
In Lyx, how to change the "Part" section to "Chapter"?
Thank you! 🙂
Edit:
This is my preamble:
\usepackage[version=3]{mhchem}
\date{}
\usepackage{fancyhdr}
\usepackage{titlesec}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead[]{}
\rhead[]{}
\lhead[]{}
\rhead[]{}
\lfoot[\thepage]{}
\rfoot[]{\thepage}
\renewcommand{\partname}{Experiment}%added later
EDIT:
The \renewcommand{\partname}{Experiment}
line works fine with the language set to English, but i need to make this work in other languages, because now if I add the toc it's called "Contents", while I need an italian "Indice".
Edit:
self-answer (for all who may find this helpful): use \renewcommand\contentsname{Indice}
to change "Content" to "Indice" or whatever.
Best Answer
LyX just provides an interface (or front end) to LaTeX. So, while you may see
as your title inside the editor view, the LaTeX code associated with it
will output
if you add
to your preamble (Document > Settings... > LaTeX Preamble). If you wish to change this in the editor as well (so the visual matches the PDF output), you need to edit the
stdsections.inc
layout file; specifically the part style:You would have to update
LabelString
to read"Experiment \thepart"
instead.