Hi,
I want to put text into a colored box that spans over many pages. I tried the framed-Package and its shaded environment. But with this environment, I can not set the width of the box.
Does anybody know, how I can use a colored box over many pages, where I can set the width of the box as well as the padding of the text in the box?
Thanks
Konrad
Text Formatting ⇒ Colored boxes spanning over pages of defined width ...
Colored boxes spanning over pages of defined width ...
Hi,
you can define your own environments using the features provided by the framed package. Take a look at the following simple example:
you can define your own environments using the features provided by the framed package. Take a look at the following simple example:
Code: Select all
\documentclass{report}
\usepackage{lipsum}% just to generate some text
\usepackage{framed}
\usepackage{xcolor}
\renewenvironment{shaded}{%
\def\FrameCommand{\fboxsep=\FrameSep \colorbox{blue!60}}%
\MakeFramed {\FrameRestore}}%
{\endMakeFramed}
\newenvironment{shadedi}{%
\def\FrameCommand{\fboxsep=\FrameSep \colorbox{blue!60}}%
\MakeFramed {\advance\hsize+2\width\FrameRestore}}%
{\endMakeFramed}
\newenvironment{shadedii}{%
\def\FrameCommand{\fboxsep=\FrameSep \colorbox{blue!60}}%
\MakeFramed {\advance\hsize-7\width\everypar{\parshape 1 1.8cm 4cm}\FrameRestore}}%
{\endMakeFramed}
\begin{document}
\begin{shaded}
\lipsum[1-10]
\end{shaded}
\lipsum[1]
\begin{shadedi}
\lipsum[1-10]
\end{shadedi}
\lipsum[1]
\begin{shadedii}
\lipsum[1-10]
\end{shadedii}
\lipsum[1]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Colored boxes spanning over pages of defined width ...
Thank you very much ... that's it!