3

How can I center the titles of the chapters in the frontmatter and the backmatter of a document written using memoir?

Keep in mind that the mainmatter chapters should not be affected at all.

3

Define your own chapter styles. For example,

% ===== FRONT MATTER CHAPTER STYLE
\makechapterstyle{frontmatter}{% Front matter chapter style
  \chapterstyle{default}% Or whatever you consider to be default
  \renewcommand{\printchaptertitle}[1]{% Update chapter title printing macro
    \centering\chaptitlefont ##1}% Centred chapter title
}
% ===== MAIN MATTER CHAPTER STYLE
\makechapterstyle{mainmatter}{% Main matter chapter style
  \chapterstyle{default}% Or whatever you consider to be default
}
% ===== BACK MATTER CHAPTER STYLE
\makechapterstyle{backmatter}{% Back matter chapter style
  \chapterstyle{frontmatter}% Backmatter chapterstyle is similar to frontmatter
}

and, if need be, add these chapter style changes to the respective formatting macros:

\let\oldfrontmatter\frontmatter
\renewcommand{\frontmatter}{\chapterstyle{frontmatter}\oldfrontmatter}
\let\oldmainmatter\mainmatter
\renewcommand{\mainmatter}{\chapterstyle{mainmatter}\oldmainmatter}
\let\oldbackmatter\backmatter
\renewcommand{\backmatter}{\chapterstyle{backmatter}\oldbackmatter}
  • I was in need of a solution without the "definition" of a new chapter style, since the class I'm using (which makes use of memoir, that's why I addressed it here) defines its own, and I didn't want to "hack it" to make it work... Is there a way to "redefine" just the necessary parts of an already defined style? – araruna Aug 16 '13 at 13:40
  • To make things clearer, I'm using abntex2, which is a class most used to typeset graduate texts, like PhD thesis, using the rules of the Brazilian standard for these kinds of documents. The customization on the standard style is considerable, and the way to make only this change would be to copy the defined style from the .cls file and base the new style on it. This is really not optimal, because if the standard changes, or the way things are done in the class changes, then I would need to reflect them in all my document sources. – araruna Aug 16 '13 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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