# Which package is this document using for frames and boxes?

The following document (pdf) uses ConTeXt. The source file is too complicated for me to understand and I don't really know ConTeXt. Does anyone know what equivalent LaTeX packages generate similar frameboxes?

-
You can use the package `tikz` to create your own environment. –  Marco Daniel Dec 19 '11 at 9:23
There are two possible questions here: 1) How to get the boxes using ConTeXt and 2) how to get the same effect in LaTeX. The text of the question suggests (2), but the tags given suggest (1). Am I correct in thinking that (2) is what is required? (I'm not sure I really like such a box-heavy design, but that's another matter.) –  Joseph Wright Dec 19 '11 at 9:34
@JosephWright Sorry for the ambiguity. It is (2) I intended. I also agree that an entire document with boxes is overkill, but I felt it would be good when used sparingly in for highlights. –  yayu Dec 19 '11 at 10:57
@Joseph: I'm quite sure that I don't like this layout. And I also find this round boxes quite horrible. They draw the eye to the frame instead to the content - which contradicts the aim of "highlighting". –  Ulrike Fischer Dec 20 '11 at 10:54

For completeness, I'll answer how to draw such boxes in ConTeXt. The oval boxes are obtained using the metafun macro `superellipsed`. The rest is just boilerplate code to pass information from TeX to Metapost and back.

``````\startuseMPgraphic{ovalbox}
begingroup ;
save p; path p;
p := OverlayBox superellipsed 0.9 ;

fill p withcolor OverlayColor;
draw p
withpen pencircle scaled OverlayLineWidth
withcolor OverlayLineColor;
endgroup;
\stopuseMPgraphic

\defineoverlay[ovalbox][\useMPgraphic{ovalbox}]

\defineframedtext
[ovalbox]
[
frame=off,
background=ovalbox, % overlay defined using \defineoverlay
framecolor=red, % OverlayLineColor
backgroundcolor=lightgray, % OverlayColor
rulethickness=2pt, % OverlayLineWidth
]

\defineenumeration
[definition]
[
text=Definition ,
location=serried,
width=fit,
distance=0.5em,
before=\startovalbox, % Add frame around definitions
after=\stopovalbox,   % ....
]
``````

after this

``````\startdefinition
....
\stopdefinition
``````

will have an oval frame around it.

-