2

I would like to have a different custom footer for each chapter. For e.g each chapter has a version, i would like to print that version for that chapter in the footer.

  • 1
    The way to do this would be to define the page footer so that it uses a mark or a macro --- set the mark or redefine the macro at the beginning of each chapter, depending on the desired content. – WillAdams Jul 11 '13 at 12:27
1

Using the fancyhdr package, you can easily place the version at the footer. The following example illustrates this (details may vary depending on how you actually define the version). I used a \ChapVersion command to be used at the beginning of chapters, to hold the chapter version; internally, this version is placed at the footer:

\documentclass{book}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\pagestyle{fancy}
\makeatletter
\newcommand\ChapVersion[1]{\def\@ChapVersion{#1}}

\fancyhf{}
\fancyfoot[C]{\small\@ChapVersion}% footer center: version
\fancyhead[LE,RO]{\small\thepage}% header (left on even, right on odd): page number
\makeatother

\begin{document}

\chapter{Test Chapter One}
\ChapVersion{Version 2.3--April 25, 2009}
\lipsum[1-2]
\chapter{Test Chapter Two}
\ChapVersion{Version 1.1--September 13, 2012}
\lipsum[1-2]

\end{document}

enter image description here

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.