I have a clash with the fancyhdr package and the longtabu package.
I am writing an abbreviations page that spans over multiple pages. I have used the longtabu environment for this and it works well.
I am also using fancyhdr for the footers and headers which work fine on every other page apart from the first page of the multiple tables.
I was advised that for rfoot in fancyhdr you must use \\ rather than \newline otherwise it ends up centering the text on the first line.
Unfortunately longtabu tries to interpret the \\ from rfoot on this page only. I assume it thinks it is part of the table.
On the rfoot for that page, there is no newline and everything appears on one line.
I have included a MWE below, apologies it has to be large to span two pages.
Code: Select all
\documentclass[12pt,oneside]{article}
\usepackage{fancyhdr}
\usepackage{tabu}
\usepackage{longtable}
\fancypagestyle{style2}{
\renewcommand{\footrulewidth}{0.4pt}
\lhead{toptext}
\chead{}
\rhead{}
\lfoot{docref \newline Document uncontrolled when printed}
\cfoot{}
\rfoot{Version\ 1.0\\Page\ \thepage}
}
\begin{document}
\pagestyle{style2}
\begin{longtabu}{|l|l|}
\hline
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
TestA & TestB\\
\hline
\caption[Abbreviations]{List of Abbreviations used within this document}
\end{longtabu}
\end{document}