0

I am laying out a book and need to have a different custom footer for each chapter. For instance, the page below has a footer that says "Flashbacks Chapter 3 1982" and for the next chapter I need to change the style to "Flashbacks Chapter 4 1983".
A similar question was asked here but I can't quite figureout how to modify mine.

Here is a MWE where both chapters have 'Chapter 3' in the footer:

\documentclass[12pt]{scrbook}
\usepackage{adjustbox} 
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE,LO]{\footnotesize{Author}
\fancyfoot[LO,RE]{Title \hspace{2mm}|\hspace{2mm}  CHAPTER 3  \hspace{2mm}|\hspace{2mm}  1982}}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE, RO]{\texttt{{\footnotesize{{\scriptsize\thepage}}}}}

%----------------------DOCUMENT----------------------------------------------%
\begin{document}
\chapter*{{\small {\textsf{\bfseries{Chapter 3}}}}}
\thispagestyle{fancy}
Example Text
\chapter*{{\small {\textsf{\bfseries{Chapter 4}}}}}
\thispagestyle{fancy}
Example Text
\end{document}

enter image description here

6
  • I don't get why you use the starred version \chapter while numbering them?
    – Bernard
    Jul 27, 2016 at 23:33
  • In order to remove the numbering the actually text. i.e. 'Downloaded' not 'Chapter 3: Downloaded"
    – Richard
    Jul 27, 2016 at 23:37
  • I'm not sure I follow you. You want the chapter title does not contain the label chapter xx, only the title (Downloaded in the present case) but the footer must contain both the label and the title? Or do I misunderstand?
    – Bernard
    Jul 27, 2016 at 23:48
  • That's correct. The chapter # in the title itself is replaced by the big number in the background.
    – Richard
    Jul 28, 2016 at 16:06
  • So really, you want a numbered chapter, w but with this special layout, i.e; a big chapter number in the back ground and the title, and an ordinary flashbacks |chapter xx | some yearin the footer?
    – Bernard
    Jul 28, 2016 at 16:19

1 Answer 1

1

This seem to boil down to setting footers in a dynamic fashion (regardless of the document content). As such, below I've defined the three components of the footer as \TITLE, \CHAPTER and \YEAR, which can be set whenever needed using \settitle, \setchapter and \setyear respectively:

enter image description here

\documentclass[twoside]{report}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE,LO]{\footnotesize{Author}
\fancyfoot[LO,RE]{\TITLE \hspace{2mm} $\vert$ \hspace{2mm} \CHAPTER \hspace{2mm} $\vert$ \hspace{2mm} \YEAR}}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE, RO]{\texttt{\scriptsize\thepage}}

\newcommand{\settitle}[1]{\def\TITLE{#1}}
\newcommand{\setchapter}[1]{\def\CHAPTER{#1}}
\newcommand{\setyear}[1]{\def\YEAR{#1}}
\newcommand{\chapterfont}{\small\sffamily\bfseries}

%----------------------DOCUMENT----------------------------------------------%
\begin{document}

\chapter*{\chapterfont Chapter 3}
\settitle{Title A}\setchapter{CHaPTeR 3}\setyear{1982}
\thispagestyle{fancy}
Example Text

\chapter*{\chapterfont Chapter 4}
\settitle{Title B}\setchapter{CHaPTeR 4}\setyear{1983}
\thispagestyle{fancy}
Example Text

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .