I have a custom layout file that is attached to my document and used by Lyx. The file is in ~/.lyx/layouts
.
This question tells how to add a line to the preamble via the menu:
\renewcommand\partname{Act}
I'd like to keep all of my formatting in the layout file if possible and avoid setting things in the Lyx menus.
So I added that line to the Preamble
section of my layout file, and also tried
\renewcommand{\partname}{Experiment}
but it does not work. After re-configuring, restarting and re-rendering the PDF, the parts are still called "part".
Is there a way to make this change ("part" to "act") work from the layout file?
And is there a way to make the editor reflect this change from within the layout file, without changing the default definition of the book
class (which my layout file extends).
My Lyx version is 2.2.3 on Linux.
Update: Maybe \renewcommand{\partname}{Act}
is the wrong command, as it doesn't work if you put it in the LATEX preamble section in Lyx document settings either.
Update two: here's a striped down layout file:
# \DeclareLaTeXClass[book]{book (My Book Style)}
# Input general definitions
Input stdclass.inc
MaxCounter Counter_Section
SecNumDepth 3
Preamble
% Tell the TOC not to include any levels below "chapter"
\setcounter{tocdepth}{0}
% Change "Part" to "Act"
\AtBeginDocument{\renewcommand{\partname}{Act}}
EndPreamble
\AtBeginDocument{\renewcommand{\partname}{Experiment}}
?