On Mon, 30 Jan 2012, Kip Warner wrote:
Hey Hans, Aditya, and Wolfgang,
You gentlemen seem to be very knowledgeable with ConTeXt, so I will run a question by you that has been plaguing me for months. I am using the following to typeset a text box containing text.
\definetextbackground[GeneralDocument][ location=paragraph, color=color_text, background=color, backgroundcolor=colour_page, framecolor=colour_text, topoffset=1.0cm, bottomoffset=1.0cm, leftoffset=1.0cm, rightoffset=1.0cm, before={ \blank[2*big] }, after={ \blank[2*big] }, style=small, corner=round, frame=on]
This works fine, but I still have a problem if the text box spans multiple pages because bottomoffset / topoffset seem to be ignored at the points where the page breaks. The text just goes right to the edge of the page top or bottom without any whitespace.
Do you have to use textbackground (assuming, of course, that you are using MkIV)? Regular backgrounds take care of top and bottom offsets: \definebackground [whatever] [topoffset=1cm, bottomoffset=1cm, frame=on] \starttext \input ward \startwhatever \dorecurse{6}{\input knuth \endgraf} \stopwhatever \input ward \stoptext The main advantage of textbackground is that they adapt to pararagraph shapes (if you use things like \startplacefigure[location=left] ... \stopplacefigure), and can be nested. Aditya