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 ?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- 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: 10324
- 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: 10324
- 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}
