1

This question already has an answer here:

I am using LyX 2.1 with the document class "Report". I am writing my thesis, which consists of three essays. How do I change word "Part" for each section to "Essay"?

I have not been able to find an answer to this question for LyX 2.1. I have already tried using:

\renewcommand{\partname}{Essay}

in the preamble as documented in previous StackExchange answers but they do not seem to work in the basic report class template in a fresh newfile of LyX 2.1 (I can provide an MWE if necessary).

Edit 1: one solution presented in the comment below is to use something like:

\usepackage[english]{babel}
\addto\captionsenglish{
  \renewcommand{\partname}{Essay}
}

in the preamble. This works for the basic LyX 2.1 document in the Report class. However, I have discovered that the solution breaks if using non-TeX fonts via XeTeX/LuaTeX. In the case of my essays, if one selects the "Use non-TeX fonts (via XeTeX/LuaTeX)" option and the Roman option set to "Baskerville Old Face" the solution breaks down.

Edit 2: With only a slight modification, the code above works for any choice of fonts. Use the following:

\AtBeginDocument{\addto
\captionsenglish{ \renewcommand{\partname}{Essay}}}

marked as duplicate by Torbjørn T., Svend Tveskæg, user31729, Jesse, T. Verron Sep 4 '14 at 12:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    LyX generally adds babel by default, so there is a small difference in the process (tex.stackexchange.com/questions/82993), see tex.stackexchange.com/questions/112391/… – Torbjørn T. Sep 1 '14 at 17:19
  • 1
    Works fine here, with \AtBeginDocument{\addto\captionsenglish{ \renewcommand{\partname}{Essay}}} in the preamble. – Torbjørn T. Sep 1 '14 at 18:30
  • The key line appears to be the \AtBeginDocument{}, at any rate this worked and the question is closed. – mlachans Sep 1 '14 at 18:47
  • Yes, as I say in the last question I linked to in my first comment. It was perhaps misleading to add the link in parentheses as well, sorry about that. – Torbjørn T. Sep 1 '14 at 18:49
  • Yes, I was (and still am) not clear why \AtBeginDocument{} becomes necessary when using non-TeX fonts so I was hesitant to try that particular variation of \renewcommand until a few moments ago. It was my error. – mlachans Sep 1 '14 at 18:52

Browse other questions tagged or ask your own question.