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.

How can I modify ClassicThesis to format chapter headings with the word "Chapter" followed by the roman numeral chapter number, a verticle space, and the chapter title? As many know, the default looks like:

Default beginning of a chapter

While the desired (nay, required) would look like:

Desired beginning of a chapter

I have written the whole thing using lyx, and have been able to change many things to match required formatting.

share|improve this question
    
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Christian Hupfer Jun 24 at 7:54
    
Christian, Is there a proper way to post a MWE when using LyX instead of LaTeX proper? –  franklin mazzarratti Jun 24 at 22:56

1 Answer 1

up vote 3 down vote accepted

You can add the following code to your preamble, just before \begin{document}:

\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}
\def\ifNumPutRoman#1{%
  \if!\ifnum9<1#1!\else_\fi
    \RNum{#1}\else#1\fi}

\titleformat{name=\chapter}[display]%             
        {\relax}
        {\centering{CHAPTER \ifNumPutRoman{\thechapter}} \\ }%
        {10pt}%
        {\centering\spacedallcaps}[\normalsize\vspace*{2\baselineskip}]%

Which gives you this: enter image description here

\RNum converts thechapter to roman numerics, however, it first needs to be checked if it is a number or not. This could happen when \chapter{} is called in appendix part. The next command, \ifNumPutRoman takes care of this. Credit for this check goes to this answer.

share|improve this answer
    
Pouya, thanks for your answer. This code works as advertised when added to the preamble in a LyX classicthesis document. –  franklin mazzarratti Jun 24 at 23:00

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.