0

I'd like to use the fancyhdr package to have odd number pages with the chapter number spelled out, for instance, "CHAPTER ONE" OR "CHAPTER TWO" etc., and the even number pages with the actually title of the chapter, for instance, "ESCAPE FROM DARTHAN"

So far, I've learned that the package contains these macro commands.
\thechapter generates the chapter number, for instance 1, 2, 3, 4, etc. \chaptername generates the word "Chapter" \chaptermark generates the title

Since this is a literary work, I'd like it to appear less technical, and use words instead of numbers. It's common in popularly published novels to do that, so I hope LaTeX has that capability.

FYI, Koma Script Book Class scrbook doesn't use the fancyhdr package for headers, but has it's own macros book headers that might be able to solve it. I believe the Memoir Class does use fancyhdr package for book headers though.

Is there a way I can get \thechapter to print ONE, TWO, THREE etc? Or, is there another LaTeX way I can do that, perhaps using the scrbook or memoir class?

  • 1
    If the linked post doesn't solve your problem, please provide the community with a minimal example using dummy text from lipsum. – Werner Feb 12 '15 at 5:40
  • What class are you using? It can't be both memoir or scrbook (and neither uses fancyhdr). – egreg Feb 14 '15 at 11:57
  • I'm testing my book out with these classes: book, memoir and scrbook. I'm using LyX (you can easily just swap the class out under the Document/Settings/Class menu) I haven't had any luck with the code supplied in similar thread.. cut and paste into the preamble didn't work, the code too unfamiliar and complex for me to tweak or customize. I need a simply solution that doesn't require a lot of nested macros or packages to understand. I do know a little Python, with that package I hope to build a For Loop to iterate a List [One, Two, etc].. just need to keep the List alive each time called. – user12711 Feb 14 '15 at 19:14
  • and.. the Page Layout is set under LyX Document/Settings to Heading Style: "Fancy"..just assumed it was using the fancyhdr package, which the BOOK class uses. I'm trying to learn the fancyhdr package to add LaTeX code manually within LyX, but it doesn't have the option for chapter ONE, TWO etc. BTW, my novel is setup with Child Files: Chapters. Parent document contains Front Matter, TOC, calls child Chapters. The book has NOTHING complex, all centered or \microtype justified text, a TOC, Chapters, Scene Break lines. Odd Header: CHAPTER ONEetc. Even Header: CH TITLE, centered Footer=page – user12711 Feb 14 '15 at 19:38
2

I still think, this question is a duplicate to @egreg's answer.

We use scrlayer-scrpage with some of the newest features, so an up to date TeX-distribution is needed.

We first clear all the predefined fields (1), remove the chapter number from the our left pages (2), put the leftmark, which is our chaptertitle, in the center of even pages (3). Put the name of the chapter and the spelled out number (using package fmtcount) in the center of odd pages (4), add a page number in the footers center. We set the header to use small caps on the right place (5).

Later we define a command, that just prints some dummy text for testing.

\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\usepackage{fmtcount}
\usepackage{blindtext}
\clearpairofpagestyles%1
\renewcommand{\chaptermarkformat}{}%2
\cohead{\leftmark}%3
\cehead{\chapapp\ \numberstring{chapter}}(4)
\cfoot*{\pagemark}
%page number on all pages
\addtokomafont{pagehead}{\scshape}%5
%small caps headers, make it more *novelly*
\newcommand{\dasEnte}[1]{\chapter{#1}\blindtext[10]}
% i don't want ducks to die
\begin{document}
\dasEnte{Donald}
\dasEnte{Daisy}
\dasEnte{Gustav}
\dasEnte{Tic}
\appendix
\dasEnte{Mickey}
\end{document}
  • That's what I needed, particularly the fmtcount package and it's \numberstring macro. It turns out LyX is using the fancyhdr package with my Komo-Script, instead of the more extensive scrlayer-scrpage. I'll be able to tweak just right now. – user12711 Feb 16 '15 at 18:56
  • You can put things in the preamble of your document. Just copy the code and don't use the clicky interface. LaTeX is the base, doing nearly everything. LyX is the level for advanced users, downside: Less flexibility. – Johannes_B Feb 16 '15 at 19:31
  • alright, I had gotten it in there just fine. I had taken the code, pasted into a text editor as example.tex, then opened a blank .lyx file, did a File>Import>[Plain Text] of example.tex. LyX processed it: took the Preamble code and put it in its settings place,and the other code visible within the document processor interface. I've added a title page, TOC and page footer: \cfoot{\pagemark} and changed the capitalization to smallcaps to suit me for the headers: \cohead{\textsc{\leftmark}} \cehead{\textsc{\chapapp\ \Numberstring{chapter}}} It's looking great, like a literary novel should now. – user12711 Feb 17 '15 at 0:58
  • can you explain to me the options in \newcommand. I understand it's defining and populating the chapter with dummy text, but I don't understand what "[1]" and "{#1}" do. Also the \renewcommand, I can't grasp why I need to use renewcommand. – user12711 Feb 17 '15 at 1:53
  • 1
    Learning LaTeX isn't a pain ;-) btw: Even if you stick with LyX, you will need to use some LaTeX Code once in a while. – Johannes_B Feb 18 '15 at 15:04

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.