4.7.1 Framed Boxes
Recall the \framebox command described in §2.8.2. Optional Arguments:
This treats <text> as a box of width <width> and puts a frame around it. The second optional argument may be one of: c (centred contents), l (left-aligned contents), r (right-aligned contents).
Example:
There is a shorter related command with no optional arguments:
The fancybox package provides some additional framing commands:
Puts a shadow-style frame around its contents:
Puts a double-lined frame around its contents:
Puts a thin-lined oval frame around its contents:
Puts a thick-lined oval frame around its contents:
If you want a different frame effect, you will need to use a graphical package, such as pgf/tikz.
Example:
This example uses commands beyond the scope of this book, but gives you an idea of what's possible.
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
Some
\begin{tikzpicture}[baseline=(n.base),decoration=bumps]
\node[draw,ellipse,decorate] (n) {framed};
\end{tikzpicture}
text.
\end{document}
For further details, see the pgf documentation.
Related UK FAQ topics:
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).
