12

I would like to have a simple TikZ coloured header and footer for a bulletin/newsletter template. I have in mind something such as this:

enter image description here

Note the green bands spanning the width of the first page at the top and the bottom.

Could you suggest a way of approaching this?

1
  • Check the PGF manual for the options remember picture and overlay as well as the special current page node. Jun 27, 2013 at 21:33

1 Answer 1

19

A possibility, using the remember picture, overlay options for tikzpicture (make the necessary adjustments according to your needs); the package atbegshi was used to place the header and footer on every page:

\documentclass{article}
\usepackage[hmargin=2cm,bmargin=3cm,tmargin=4.5cm,centering]{geometry}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{lmodern}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage{atbegshi}

\definecolor{mygreen}{RGB}{25,170,75}
\newcommand\Header{%
\begin{tikzpicture}[remember picture,overlay]
\fill[mygreen]
  (current page.north west) -- (current page.north east) --
  ([yshift=50pt]current page.north east|-current page text area.north east) --
  ([yshift=50pt,xshift=-3cm]current page.north|-current page text area.north) --
  ([yshift=10pt,xshift=-5cm]current page.north|-current page text area.north) --
  ([yshift=10pt]current page.north west|-current page text area.north west) -- cycle;
\node[font=\sffamily\bfseries\color{white},anchor=east,
  xshift=-1.5cm,yshift=-1.3cm] at (current page.north east)
  {\fontsize{50}{60}\selectfont d3pd Bulletin};
\end{tikzpicture}%
}
\newcommand\Footer{%
\begin{tikzpicture}[remember picture,overlay]
\fill[mygreen]
  (current page.south west) -- (current page.south east) --
  ([yshift=-40pt]current page.south east|-current page text area.south east) --
  ([yshift=-40pt,xshift=-3cm]current page.south|-current page text area.south) --
  ([xshift=-5cm,yshift=-10pt]current page.south|-current page text area.south) --
  ([yshift=-10pt]current page.south west|-current page text area.south west) -- cycle;
\node[yshift=0.75cm,font=\ttfamily\bfseries\color{white}] at (current page.south) {\fontsize{20}{24}\selectfont www.stackexchange.com};
\end{tikzpicture}%
}

\pagestyle{empty}
\AtBeginShipout{\Header\Footer}
\AtBeginShipoutFirst{\Header\Footer}

\begin{document}
\begin{multicols}{3}
\lipsum[1-15]
\end{multicols}
\end{document}

enter image description here

1
  • This is really excellent. Thank you so much for your help!
    – d3pd
    Jun 29, 2014 at 11:47

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.