2

I want to add a table as headers to all the pages (except title page) in my document. I tried this:

\usepackage{fancyhdr}
%...
\chead{
    \begin{tabular}{l|r}
        Lorem&Ipsum
    \end{tabular}
}

But it did not work. How should I get it done?

1 Answers1

2

Add \pagestyle{fancy}

\documentclass[]{article}


\usepackage{fancyhdr}

\pagestyle{fancy}
%...
\chead{
    \begin{tabular}{l|r}
        Lorem&Ipsum\\
        Lorem&Ipsum
    \end{tabular}
}
\lhead{}
\rhead{}

\renewcommand{\headrulewidth}{0pt}

\usepackage{lipsum}

\title{My title}
\begin{document}

\maketitle

\lipsum

\clearpage

\lipsum

\end{document}