Edit Links |
FAQ /
ShadedBoxPlease categorize this page. << ChangeFontUsingLatex | Page list | BeforeAfter? >>> I've got an ERT for defining a shaded box with a line around it. I'm 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. From: Peter Harkins <ph@malaprop.org> << ChangeFontUsingLatex | FAQ.PageList | BeforeAfter? >> |