![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
2007/7/3, John R. Culleton
On Tuesday 03 July 2007 04:20, Patrick Gundlach wrote:
Hello Hans,
I would like to shrink the whitespace at the top and the bottom of a framedtext. Like thus:
not this but this ------------------------------ ------------------------------
| | | abcd | | | | | | abcd | | abcd | | abcd | | | | | | | | | ------------------------------
------------------------------
I have tried a lot of things with [before, after, top, bottom]. Although [depthcorrection=off] shaves somewhat off the whitespace, it is not much nor am I sure if this is on the right track; and it is not parametrized.
Someone knows the trick?
perhaps with an overlay?
-------------------------------------------------- \def\TightFrame {\startoverlay {\framed[width=\overlaywidth,height=\dimexpr(\overlayheight - 5ex)]{}}{}\stopoverlay} \defineoverlay[TightFrame][\TightFrame]
\starttext
\startframedtext [background=TightFrame,frame=off] Hallo Welt \input tufte
\input knuth \stopframedtext \stoptext
First I woud try just a negative \vskip thus: \vskip -10pt
I know we are not supposed to use \vskips in Context except when enclosed by \startstandardmakeup \stopstandardmakeup But I use them and thus far there have been no terrible bad effects.
If you use \vskip and the sky falls in then there are the more complex but safer methods such as the one outlined by Patrick G. -- John Culleton
why should we avoid primtives in ConTeXt, I see no problem to use them as long as you know what you do. \starttext \startframedtext[offset=2cm,top=\vskip-1cm\relax,bottom=\vskip-1cm\relax] \input knuth \stopframedtext \stoptext Wolfgang