# Fancy Quotation Boxes in Latex

Latex

I wanted to have some fancy boxes for displaying particular definitions - in my case, formal definitions - that would be readable, span pages, and easy to use. I wanted a left-hand margin border and background shading for the entire box.

After much searching and modification, I found that the framed package worked well, after some modifications. I can then use the following Latex code:

\begin{formal}
Some text goes here.
\end{formal}

Which will produce an output similar to that at the right.

The definition for the formal environment is as follows:

% for adjustwidth environment
\usepackage[strict]{changepage}

% for formal definitions
\usepackage{framed}

% environment derived from framed.sty: see leftbar environment definition

\newenvironment{formal}{%
\def\FrameCommand{%
\hspace{1pt}%
{\color{darkblue}\vrule width 2pt}%
}%
\noindent\hspace{-4.55pt}% disable indenting first paragraph
\vspace{2pt}\vspace{2pt}%
}
{%
}

Categories: Latex | Article