[Tex/LaTex] Different footer for each chapter

header-footer

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.

Best Answer

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

Related Question