On Sat, Jan 25, 2003 at 10:18:11PM -0800, Peter Harkins wrote:
>       I've got an ERT for defining a shaded box with a line around it. I'm
> trying to make my own environment for it, but I'm just not getting the
> Preamble right.

        Well, after spending a few hours reading 'The Not So Short Guide to
LaTex' and 'A Simplified Introduction to LaTex' and pulling some of Herbert
Voss' pages out of Google's catch (a few transatlantic links have been
spotty, so I can't get there directly) I've got this, which works quite
nicely:

  Preamble
\usepackage(color,calc}
\definecolor{shade}{gray}{0.8}
\newenvironment{myshadedbox}[1][]%
        {
        %\setlength{\fboxsep}{-\fboxrule}
        \footnotesize\normalfont\ttfamily\raggedright
        \setlength{\rightmargin}{\leftmargin}
        \setlength{\itemsep}{-12pt}
        \setlength{\parsep}{20pt}
        \begin{lrbox}{\@tempboxa}%
        \begin{minipage}{\linewidth-2\fboxsep}
        }%
        {
        \end{minipage}%
        \end{lrbox}%
        \fcolorbox{black}{shade}{\usebox{\@tempboxa}}\newline\newline
        }%
  EndPreamble

        Just figured I'd post it in case anyone else was curious how to do it.

Reply via email to