# Floating a sidebar into the margin with ConTeXt

I would like to use \framedtext to create a grey sidebar that floats to the right of the text.

While I've discovered framedtext, I haven't figured out how to place it such that it floats with text wrapping and without a caption. I suspect that some theme on placeframedtext will be necessary.

Here's what I have so far:

\setupframedtexts[bodyfont=small, location=right hanging, width=3 cm]

\framedtext{
In this section, the steps towards creating a \SDFN\ will be described in the main text, while specific examples from my experience will be revealed in sidebars like this one. These will be reflective on the lessons I learned while creating the \SDFN\ in contract with the prescriptive tone of the main text. }


I suspect my arguments to location are lacking.

Edit: There's a suggestion that flowing places is possible from "starthangingaround" but it's an undocumented feature...

-
Have you seen Chapter 5 of the Details manual? It gives explicit examples of floating figures in the margin. The same idea will work for a \framedtext instead of a \externalfigure. –  Aditya May 14 '11 at 0:47
The problem is spanning the margin and body, not just placing a framedtext in there. –  Brian Ballsun-Stanton May 14 '11 at 0:52
The details manual gives examples for spanning the figure in the margin and body. See page 34 and 38. –  Aditya May 14 '11 at 0:56
Thanks. If you throw that up as an answer, I'll accept it. It's exactly what I was looking for. Sorry for not being thinky. –  Brian Ballsun-Stanton May 14 '11 at 2:04

## 3 Answers

See page 34 and 38 of the Details manual.

-

have you played with the inmargin command? http://wiki.contextgarden.net/Reference/en/inmargin

sounds like what you want...

-

Based on advice from @Aditya, I looked at: Pages 34-38 of the Details manual.

On MkIV (using the context command), the following code creates a margin-spanning grayed sidebar on the outer edge of the page:

\starttext

\definefloat
[marginfigure]

\setupfloats
[sidespacebefore=none,
sidespaceafter=depth]

\setupfloat
[marginfigure]
[criterium=.5\textwidth,
maxwidth=\rightmarginwidth,
default={outermargin,none}]

\setupframedtexts[background=screen,
corner=round,
width=7cm,
style={\setupbodyfont[10pt]}]

\placemarginfigure{} {\framedtext{In this section, the steps towards creating a SDFN will be described in the main text, while specific examples from my experience will be revealed in sidebars like this one. These will be reflective on the lessons I learned while creating the SDFN in contract with the prescriptive tone of the main text. }}

This section will describe the process of creating a SDFN in full. It is intended as a descriptive manual to provide readers with a way to run the methodology for themselves. In brief, the SDFN begins through the explanation of terms, a summary of the ideas expressed above. If participants do not understand the nature of entities, an entity dictionary should be created. When participants understand entity and flow, a topic is chosen and the diagram is created.

\stoptext

-