Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

enter image description here

I want to generate shading color in background for a single page. How can I implement this?

share|improve this question
    
Welcome to TeX.sx! Note that you don't have to add "in/with LaTeX" on this site, because everything here is about LaTeX and TeX, with LaTeX as the default. –  Martin Scharrer May 21 '12 at 6:38
add comment

1 Answer

up vote 11 down vote accepted

TikZ can do this in its sleep. This is a slightly modified approach to what is given in the tikz documentation (section 2.14 Shading, p 31):

enter image description here

\documentclass{article}
\usepackage{tikz}% http://ctan.org/pkg/pgf
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
  \shade[left color=white,right color=orange!60]
    (current page.south west) rectangle (current page.north east);
\end{tikzpicture}

\lipsum[1-5]
\end{document}

I've used a full page shading (left-to-right, white to 60% orange), although you can do this with other shapes and sizes as well. For example, a shading similar to the above starting from the middle of the page (horizontally), would be

\begin{tikzpicture}[remember picture,overlay]
  \shade[left color=white,right color=orange!60]
    (current page.south) rectangle (current page.north east);
\end{tikzpicture}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.