[OS X TeX] Framed Shaded Box
Michael Sharpe
msharpe at ucsd.edu
Fri Jun 25 16:55:22 EDT 2010
On Jun 25, 2010, at 1:25 PM, David Arnold wrote:
> Hi,
>
> Consider:
>
> \documentclass{article}
> \usepackage{geometry}
> \usepackage{xcolor}
> \usepackage{framed}
>
> \definecolor{shadecolor}{gray}{0.8}
>
> \begin{document}
>
> {\noindent \itshape Starting in the Fall of 2009, all students enrolled in Math 376 (Prealgebra) at College of the Redwoods will receive a free copy of this textbook on a CD on the first day of class. A printed version of this textbook may be purchased from the college bookstore (707-476-4130).}
>
> \begin{shaded}
> \noindent All parts of this prealgebra textbook are copyrighted © 2009 in the name Department of Mathematics, College of the Redwoods. They are not in the public domain. However, they are being made available free for use in educational institutions. This offer does not extend to any application that is made for profit. Users who have such applications in mind should contact David Arnold or Bruce Wagner at David-Arnold at redwoods.edu or Bruce-Wagner at redwoods.edu.
> \end{shaded}
>
> \end{document}
>
> I am trying to figure a way to put a frame around the shaded text, but no success thus far. I'm trying to duplicate the framed shaded region on:
>
> http://msenux.redwoods.edu/PreAlgText/
>
> Any suggestions?
>
You can use \fcolorbox, as in
\documentclass{article}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{framed}
\newdimen\tw \tw=\textwidth\advance\tw-10pt
\definecolor{shadecolor}{gray}{0.8}
\begin{document}
{\noindent \itshape Starting in the Fall of 2009, all students enrolled in Math 376 (Prealgebra) at College of the Redwoods will receive a free copy of this textbook on a CD on the first day of class. A printed version of this textbook may be purchased from the college bookstore (707-476-4130).}
\vspace{10pt}
\noindent\fcolorbox{black}{gray!20}{
\parbox{\tw}{All parts of this prealgebra textbook are copyrighted © 2009 in the name Department of Mathematics, College of the Redwoods. They are not in the public domain. However, they are being made available free for use in educational institutions. This offer does not extend to any application that is made for profit. Users who have such applications in mind should contact David Arnold or Bruce Wagner at David-Arnold at redwoods.edu or Bruce-Wagner at redwoods.edu.
}}
\end{document}
Michael
More information about the MacOSX-TeX
mailing list