Page Layout ⇒ Colored boxes in footer
Colored boxes in footer
I had some stupid ideas but cant think of how to fix it:
+ using tikz (its not possible to put a tikz pic in a footer) (using fncyhdr)
+ using a table (impossible to make it the exact with and height i want (or am i missing something ?)
Anyone has an idea ?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Colored boxes in footer
have a look at Fancy chapter headings with TikZ, there are examples using TikZ together with fancyhdr and scrpage2 to get colored boxes in the header. That could be done similar with the footer.
Stefan
Re: Colored boxes in footer

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Colored boxes in footer
Stefan
Colored boxes in footer

Code: Select all
\documentclass[a4paper, 10pt, oneside]{report}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{tikz}
\definecolor{paars}{cmyk}{0.04,0.95,0,0}
\definecolor{rood}{cmyk}{0,0.93,1,0}
\newcommand*\tikzhead{%
\begin{tikzpicture}[remember picture,overlay]
\fill[color=paars!100] (0,0) rectangle (6.1,-0.75);
\fill[color=rood!100] (6.6,0) rectangle (12.6,-0.75);
\fill[color=rood!100] (13.1,0) rectangle (19,-0.75);
\end{tikzpicture}}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfootoffset{-2.0in}
\foot{\tikzhead}
\pagestyle{fancy}
\newcommand*\headcolor{Aqua}
\newcommand*\setheadcolor[1]{\renewcommand*\headcolor{#1}}
\begin{document}
\setheadcolor{Gold}
\tableofcontents
\clearpaged
\setheadcolor{Olive}
\blinddocument
\end{document}
Code: Select all
\newcommand*\tikzhead{%
\begin{tikzpicture}[remember picture,overlay]
\fill[color=paars!100] (0,0) rectangle (6.1,-0.75);
\fill[color=rood!100] (6.6,0) rectangle (12.6,-0.75);
\fill[color=rood!100] (13.1,0) rectangle (19,-0.75);
\end{tikzpicture}}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfootoffset{-2.0in}
\cfoot{\tikzhead}

ps: the pic is wider then textwidth, thats why im trying to make the footer wider but i suck at it

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Colored boxes in footer
That's why the example on the other page used the current page node for positiong:znarch wrote: the image is alligned really odd.
Code: Select all
\node[yshift=-2cm] at (current page.north west)
{\begin{tikzpicture} ...
Stefan
Colored boxes in footer
Mypic started at coordinate 0,0, and thats the anchor,now i did like this:
Code: Select all
\begin{tikzpicture}[remember picture,overlay]
\fill[color=paars!100] (-9.5,0) rectangle (-3.4,-0.75);
\fill[color=rood!100] (-2.9,0) rectangle (3.1,-0.75);
\fill[color=rood!100] (3.6,0) rectangle (9.6,-0.75);
\end{tikzpicture}}

Colored boxes in footer

I want the chapter number/title and so on aligned left, and in color.
I tried using something like this, but i really cant seem to do it:
Code: Select all
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter\hfill \chaptertitle{\Huge}
