Friday, April 8, 2011

A way to make frame titles, for an abstract book for instance

\usepackage{framed}

%% found on http://www.latex-community.org/forum/viewtopic.php?f=44&t=12341
\newcommand{\widebox}[2]{\colorbox{#1}{\makebox[\linewidth]{#2}}}

\newenvironment{shadedtitle}{%
\def\FrameCommand{\fboxsep=0.5ex \colorbox{latextbl}}%
                  \MakeFramed {\FrameRestore}}%
                 {\endMakeFramed}

\newcommand{\mytitle} [1]{\begin{shadedtitle}\vspace{-1ex}{\color{white}\bf\large{#1}}\end{shadedtitle}\vspace{-10pt}}

No comments: