# Add chapter number in roman numbers using fancyhdr

I am trying to add the chapter number to the footer using fancyhdr. What I would like to do is have the chapter number in roman numbers and the page number in arabic together like so:

VI - 8


This is the code I have right now:

\documentclass[a4paper]{book}
\usepackage{fancyhdr}

\begin{document}
\pagenumbering{Roman}
\clearpage
\pagestyle{fancy}
\cfoot{\thepage}
%\tableofcontents

\clearpage
\pagenumbering{arabic}
\input{Chapter_1.tex}
\input{Chapter_2.tex}
\input{Chapter_3.tex}
\input{Chapter_4.tex}
\input{Chapter_5.tex}
\input{Chapter_6.tex}

\end{document}


• possible duplicate of Add chapter numbering to page header – Crissov Mar 3 '14 at 22:25
• \cfoot{\Roman{\thechapter} -- \thepage}? – cfr Mar 3 '14 at 22:32
• @Crissov I disagree; this shouldn't be closed as a duplicate of the linked question. The other answer doesn't show how to change the counter representation, and most importantly, doesn't address the necesary redefinition of plain which was not needed there, but it has to be done here. – Gonzalo Medina Mar 3 '14 at 23:55
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – jub0bs Aug 5 '14 at 22:05

\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}


to your current settings. Since, for consistency's sake this should also apply to the first page of each chapter (in ehich the plain style is used), a redefinition of plain will also be needed:

\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}
}


A complete example:

\documentclass[a4paper]{book}
\usepackage{fancyhdr}
\usepackage{lipsum}

\pagestyle{fancy}

\fancyhf{}
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}

\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}
}

\begin{document}

\chapter{Test chapter one}
\lipsum[1-40]
\chapter{Test chapter two}
\lipsum[1-40]
\chapter{Test chapter three}
\lipsum[1-40]

\end{document}


Some images of some of the footers in different chapters:

Of course, activate these settings from the point in which chaters will be numbered on. Since this applies particularly for the redefinition of plain, you could conditionally make the redefinition of the footer depending on wheter you are on the \mainmatter or not:

\makeatletter
\fancypagestyle{plain}{%
\fancyhf{}
\if@mainmatter
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}
\else
\fancyfoot[C]{\thepage}
\fi
}
\makeatother


The code:

\documentclass[a4paper]{book}
\usepackage{fancyhdr}
\usepackage{lipsum}

\pagestyle{fancy}

\fancyhf{}
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}

\makeatletter
\fancypagestyle{plain}{%
\fancyhf{}
\if@mainmatter
\fancyfoot[C]{\Roman{chapter}\,--\,\thepage}
\else
\fancyfoot[C]{\thepage}
\fi
}
\makeatother

\begin{document}

\frontmatter
\tableofcontents

\mainmatter
\chapter{Test chapter one}
\lipsum[1-40]
\chapter{Test chapter two}
\lipsum[1-40]
\chapter{Test chapter three}
\lipsum[1-40]

\end{document}