This recipe will showcase how to bring some color into document headings.
We will use TikZ for coloring and positioning. Follow these steps:
Set up a basic document with blindtext support:
\documentclass{scrartcl} \usepackage[automark]{scrpage2} \usepackage[english]{babel} \usepackage{blindtext}
Load the
tikz
package beforehand, and pass a naming option to the implicitly loaded packagexcolor
to use names for predefined colors:\PassOptionsToPackage{svgnames}{xcolor} \usepackage{tikz}
Define a macro that prints the heading, given as an argument:
\newcommand{\tikzhead}[1]{% \begin{tikzpicture}[remember picture,overlay] \node[yshift=-2cm] at (current page.north west) {\begin{tikzpicture}[remember picture, overlay] \path[draw=none, fill=LightSkyBlue] (0,0) rectangle (\paperwidth,2cm); \node[anchor=east,xshift=.9\paperwidth, rectangle, rounded corners=15pt, inner sep=11pt, fill=MidnightBlue...