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?

percusse
  • 157,807
d3pd
  • 1,718

1 Answers1

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

Gonzalo Medina
  • 505,128