2

My problem is, that all my footers and headers are gone now :( and the pagenumber.

Here the code:

\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{microtype}
\begin{document}
\begingroup
    \noindent
    \bfseries
    \begin{tabular}{|p{\dimexpr0.5\textwidth-2\tabcolsep}p{\dimexpr0.5\textwidth-2\tabcolsep}|}
        \hline
        Received:            & Approved:  \cr
                             & Date:      \cr
                             & Signature: \cr
        (for the instructor) &            \cr
        \hline
    \end{tabular}
\endgroup
\bigskip
\begingroup
    \centering
    \obeylines
    \scshape
    \lsstyle
    \large Modern Box
    \LARGE Aflering 3
    \Large John Boxer
    \large Institute for Boxes
    \large Box University
    \large 26/04/2014
\endgroup
\end{document}

I have also usepackages for headers and fooders in my preamble. The fooder and header worked before, but now they are gone.

It's good they are gone on the first page. And that the pagenumbering is gone on the front page and on the tableofcontents page is really nice. But now I would prefer pagenumbering (so the pagenumbering starts on maybe page 3 width "page 3 of number"). And please just in the "page ... of ... style".

Are my ideas possible? Are their anyone who can help me?

2
  • Remove \pagestyle{empty} and eventually add at the begin of the document \thispagestyle{empty}
    – Guido
    Apr 26, 2014 at 21:19
  • for the "page X of Y" search for this comination of terms in the site.
    – Guido
    Apr 26, 2014 at 21:24

1 Answer 1

4

Just set the pagestyle to empty and restore it later on to the pagestyle with your headers, here fancy. For the "page X of Y" you will need to use the lastpage package.

\documentclass{article}
\usepackage{microtype,blindtext,fancyhdr,lastpage}
\fancyhf{}
\lhead{\leftmark}
\rhead{\rightmark}
\cfoot{\thepage\ of \pageref{LastPage}}
\begin{document}
\pagestyle{empty}
\begingroup
    \noindent
    \bfseries
    \begin{tabular}{|p{\dimexpr0.5\textwidth-2\tabcolsep}p{\dimexpr0.5\textwidth-2\tabcolsep}|}
        \hline
        Received:            & Approved:  \cr
                             & Date:      \cr
                             & Signature: \cr
        (for the instructor) &            \cr
        \hline
    \end{tabular}
\endgroup
\bigskip
\begingroup
    \centering
    \obeylines
    \scshape
    \lsstyle
    \large Modern Box
    \LARGE Aflering 3
    \Large John Boxer
    \large Institute for Boxes
    \large Box University
    \large 26/04/2014
\endgroup
\clearpage
\tableofcontents
\clearpage
\pagestyle{fancy}
\blinddocument
\end{document}

enter image description here enter image description here enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .