I try to get a linear gradient from top to bottom (i.e. black to white) which affects all lines across one or more paragraphs.
The MWE I composed:
\documentclass{article}
\usepackage{lipsum}
\documentclass{article}
\begin{document}
\begin{shadow}
\lipsum[2]
\end{shadow}
\end{document}
And this is the result I would like to achieve:
How can I achieve this with an environment or a one-line command?
Best Answer
Adapted from this answer to fit the requested black-to-white gradient.
EDIT
By using the basic function style in LaTeX and reasoning outside of the box, you can do the following:
The basic function to give some text to
\myfunstuff{Hello world!}
will color the text in blue and will restore any following text to black.Which helps you wrap up the previous answer into:
Now onto the small trick you cannot introduce line breaks if you use the
parbox
command. The solution is to add\vspace*{.5cm} \\
to simulate the effect of paragraphs:If I use lipsum commands LaTeX will complain that there are no lines to break. So I took the following text from wikipedia and voila!