1

I want to create a document template with the footers as shown in the figure. I want the footer to appear exactly as figure in every even page and the reverse order in odd page. The logo should not be included.

For even pages the order will be 1. Page number (background color teal), 2. Document name (background color teal), 3. Institute (background color black).

For odd pages the order will be 1. Institute(background color black), 2. Document name (background color teal), 3. Page number(background color teal).

The text within the box should have different font size. What is the best/efficient way to create this template in LaTeX?

Looking for suggestion from the community. Footer template

Here is my LaTeX file.

\chapter{main1}
\thispagestyle{empty}
\pagestyle{empty}
%\textcolor{black}
A new page starts here.
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south west,minimum width=12cm,minimum height=2.3cm,fill=teal,text=white] (RB) at (current page.south west){ Professional Review Report};
\node[anchor=south west,minimum width=12cm,minimum height=1cm,fill=teal,text=white] (RB) at (current page.south west){ December 2018};
\node[anchor=south east,minimum width=8.9cm,minimum height=2.3cm,fill=black,text=white] (RB) at (current page.south east){LarCos};
\node[anchor=south east,minimum width=8.9cm,minimum height=1cm,fill=black,text=white] (RB) at (current page.south east){Membership No: 12345678};  
\node[anchor=south east,minimum width=1cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south east){1};
\end{tikzpicture}

\newpage

This is a new page.
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south east,minimum width=11cm,minimum height=2cm,fill=teal,text=white] (RB) at (current page.south east){ Professional Review Report};
\node[anchor=south east,minimum width=11cm,minimum height=0.1cm,fill=teal,text=white] (RB) at (current page.south east){ August 2018};
\node[anchor=south west,minimum width=11cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south west){LarCos};
\node[anchor=south west,minimum width=11cm,minimum height=.1cm,fill=black,text=white] (RB) at (current page.south west){Membership No: 12345678};
\node[anchor=south west,minimum width=1cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south west){2};
\end{tikzpicture}

\newpage

This is a new page
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south west,minimum width=11cm,minimum height=2cm,fill=teal,text=white] (RB) at (current page.south west){ Professional Review Report};
\node[anchor=south west,minimum width=11cm,minimum height=0.1cm,fill=teal,text=white] (RB) at (current page.south west){ August 2018};
\node[anchor=south east,minimum width=11cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south east){LarCos};
\node[anchor=south east,minimum width=11cm,minimum height=0.1cm,fill=black,text=white] (RB) at (current page.south east){Membership No: 12345678};  
\node[anchor=south east,minimum width=1cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south east){3};
\end{tikzpicture}
\newpage

\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south east,minimum width=11cm,minimum height=2cm,fill=teal,text=white] (RB) at (current page.south east){ Professional Review Report};
\node[anchor=south east,minimum width=11cm,minimum height=0.1cm,fill=teal,text=white] (RB) at (current page.south east){ August 2018};
\node[anchor=south west,minimum width=11cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south west){LarCos};
\node[anchor=south west,minimum width=11cm,minimum height=.1cm,fill=black,text=white] (RB) at (current page.south west){Membership No: 12345678};
\node[anchor=south west,minimum width=1cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south west){4};
\end{tikzpicture}
  • 4
    Welcome to TeX.SX! What have you tried so far? Please help us help you by providing a minimal working example (MWE). – TeXnician Oct 14 '18 at 7:30
  • 1
    tryy to draw with help of one of packages dedicated to drawing. for example tikz or pstrick. – Zarko Oct 14 '18 at 7:34
  • I would create the image with TikZ, store it in a savebox, then add it to every pagestyle (except \ps@empty). You will also need to increase \footskip (see geometry package). Fancyhdr can help, but isn't really needed. – John Kormylo Oct 14 '18 at 14:55
  • I tried to use Tikz. But I find that I need to use this at every page separately. – LarCos Oct 16 '18 at 3:19
  • @JohnKormylo Can you please explain it based on the LaTex document I have. – LarCos Nov 5 '18 at 22:40
2

your question is very broad, actually has hidden many unclear sub questions ...

i try to answer to the main: how to put in bottom of each page desired image oriented depending on if it is on the even or on the odd page ... mwe below show only principle, fine tuning i left to you.

\documentclass[twoside]{book}
\usepackage[margin=25mm,
            bottom= 0mm,%
            footskip=6\baselineskip,
            includefoot,
            showframe
            ]{geometry}
\usepackage{tikz}
\usetikzlibrary{backgrounds, positioning, scopes}
\tikzset{FOOT/.style = {
every node/.append style = {font=\sffamily\bfseries,
                            text=white,
                            align=center,
                            minimum height=11mm,
                            outer sep=0pt,
                            },
               sx/.style = {xshift=##1mm}
                        }
        }

\usepackage{lastpage}
\usepackage{fancyhdr}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
%%%%
\fancyfoot[E]{% even pages
\begin{tikzpicture}[FOOT,
remember picture, overlay,
node distance=0pt]
\node (E1) [minimum width=25mm,
            above right=of current page.south west]
            {\thepage~of~\pageref{LastPage}};
\node (E2) [minimum width=0.5\textwidth, align=left,
            right=of E1]
            { Professional Review Report\\
                \footnotesize
              M001\qquad Version 1 Revision 12 -- 28 September 2018};
\node (E3) [minimum width=0.5\textwidth,
            align=center,
            right=of E2]
            { Institution of Civil Engineers\\
                \footnotesize
            Registered charity no. 210252\qquad
            Scotland no. SC038629};
\node (E4) [minimum width=25mm, font=\Huge\sffamily\bfseries,
            right=of E3]
            {ice};
\begin{scope}[on background layer]
\fill[teal] (E1.south west) |- ([sx= 3] E3.north east)
                            -- ([sx=-3] E3.south east)
                             -- cycle;
\fill[black] ([sx=-3] E2.south east) -- ([sx= 3] E2.north east) -|
            (E4.south east) -- cycle;
\path[white, line width=1mm, shorten >=-0.5mm, shorten < =-0.5mm]
            ([sx=-3] E2.south east) edge ([sx=3] E2.north east)
            ([sx=-3] E4.south west) edge ([sx=3] E4.north west);
\end{scope}
\end{tikzpicture}
                } %even page
%%%%
\fancyfoot[O]{% odd pages
\begin{tikzpicture}[FOOT,
remember picture, overlay,
node distance=0pt]
\node (O1) [minimum width=25mm,
            above left=of current page.south east]
            {\thepage~of~\pageref{LastPage}};
\node (O2) [minimum width=0.5\textwidth, align=left,
            left=of O1]
            { Professional Review Report\\
                \footnotesize
              M001\qquad Version 1 Revision 12 -- 28 September 2018};
\node (O3) [minimum width=0.5\textwidth,
            align=center,
            left=of O2]
            { Institution of Civil Ongineers\\
                \footnotesize
            Registered charity no. 210252\qquad
            Scotland no. SC038629};
\node (O4) [minimum width=25mm, font=\Huge\sffamily\bfseries,
            left=of O3]
            {ice};
\begin{scope}[on background layer]
\fill[teal] (O1.south east) |- ([sx= 3] O2.north west)
                            -- ([sx=-3] O2.south west)
                             -- cycle;
\fill[black] ([sx=-3] O3.south east) -- ([sx= 3] O3.north east) -|
            (O4.south west) -- cycle;
\path[white, line width=1mm, shorten >=-0.5mm, shorten < =-0.5mm]
            ([sx=-3] O3.south east) edge ([sx=3] O3.north east)
            ([sx=-3] O3.south west) edge ([sx=3] O3.north west);
\end{scope}
\end{tikzpicture}
                } % for odd page



\usepackage{lipsum}

\begin{document}
\pagestyle{fancy}

\chapter{main1}
\thispagestyle{fancy}

\lipsum
\lipsum
\lipsum
\lipsum

\end{document}

enter image description here

enter image description here

  • Thank you so much. I exactly wanted this things. I have done the fine tuning myself. – LarCos Nov 17 '18 at 20:01
  • @LarCos, you are welcome! – Zarko Nov 17 '18 at 20:02
1

This is how to use everypage to put a tikzpicture on every page. I also reset page style plain to be the same as page style empty.

\documentclass{report}
\usepackage{tikz}
\usepackage{everypage}

\AddEverypageHook{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south west,minimum width=12cm,minimum height=2.3cm,fill=teal,text=white] (RB) at (current page.south west){ Professional Review Report};
\node[anchor=south west,minimum width=12cm,minimum height=1cm,fill=teal,text=white] (RB) at (current page.south west){ December 2018};
\node[anchor=south east,minimum width=8.9cm,minimum height=2.3cm,fill=black,text=white] (RB) at (current page.south east){LarCos};
\node[anchor=south east,minimum width=8.9cm,minimum height=1cm,fill=black,text=white] (RB) at (current page.south east){Membership No: 12345678};  
\node[anchor=south east,minimum width=1cm,minimum height=2cm,fill=black,text=white] (RB) at (current page.south east){\thepage};
\end{tikzpicture}}
\pagestyle{empty}

\makeatletter
\let\ps@plain=\ps@empty% page style plain is now the same as page style empty
\makeatother

\begin{document}
\chapter{main1}
%\thispagestyle{empty}% no longer needed

A new page starts here.
\newpage

This is a new page.
\newpage

This is a new page
\newpage

\end{document}
  • Thanks for the response. I want to change the page number. It appears as 1 on all page. How can I do that? – LarCos Nov 5 '18 at 23:16
  • Didn't notice. Easy fix. – John Kormylo Nov 5 '18 at 23:19
  • Thanks!! One more question. Can I place the text within the node as per my requirement? e.g. I want write the "December 2018" and "Professional Review Report" a little up and a larger font size than month below. – LarCos Nov 6 '18 at 0:19
  • There is [xshift=.., yshift=...]. I tend to use [above right=...] instead of [anchor=south west] (fewer characters). You can add pretty much any LaTeX macro inside the text field, like \large or \makebox{...}. There is also a [font=\large] option. – John Kormylo Nov 6 '18 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.