Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
You can use the package tikz to create your own environment. –  Marco Daniel Dec 19 '11 at 9:23
1  
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
add comment

2 Answers

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,
      width=broad,
      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.

enter image description here

share|improve this answer
add comment

The tcolorbox package (see here) gives you a LaTeX solution, but, in case you speak no old German, the available documentation is in German. NB: I haven't found the ellipse in the documentation, but you can contact the package author.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.