Page Layout ⇒ Changing background color of just 1 page
Changing background color of just 1 page
I would like to change the background color of one page of my document. I thought I would do by creating a minipage and defining its background color, but I don't know how to do it.
I've tried by definint a box (mbox, fbox, makebox,...) but all of them define a box "inside" the page but leave the margins de same color as the rest of the document.
Anybody can help me?
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
Changing background color of just 1 page
you can use the \pagecolor command provided by the xcolor package; please refer to the package documentation for further information. A little example:
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}%just to generate some text
\begin{document}
\lipsum[1-4]
\newpage
\pagecolor{purple!30}
\lipsum[1-4]
\newpage
\pagecolor{white}
\lipsum[1-4]
\end{document}