whitespace in framedtext
![](https://secure.gravatar.com/avatar/58128ef2fa853eca7f2503a152c340ae.jpg?s=120&d=mm&r=g)
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? Hans van der Meer
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
2007/7/2, Hans van der Meer
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?
Hans van der Meer
Hi Hans, ConTeXt did not support different offset values for \framed and \startframedtext but you can use my module to use enable them. Look in the two example files how to use it. Wolfgang
![](https://secure.gravatar.com/avatar/62c54476729274ddfefd6b1f53e311dc.jpg?s=120&d=mm&r=g)
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 --------------------------------------------------
![](https://secure.gravatar.com/avatar/8b3c344f0adba6016612e05447039f44.jpg?s=120&d=mm&r=g)
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 ATTN Publishers/authors: If you don't read you don't succeed. Free short list of publishing/marketing books. http://wexfordpress.com/tex/shortlist.pdf
![](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
![](https://secure.gravatar.com/avatar/58128ef2fa853eca7f2503a152c340ae.jpg?s=120&d=mm&r=g)
Thanks to all people who were so kind to react to this message. It turned out to be a problem to be characterized by "Oh, silly me", since I seem to have completely forgotten about the default offset for framedtexts not being zero. Therefore: the most simple solution (and I really think I should have thought of it much earlier) was to use \startframedtext[offset=0pt]. with humbly regards Hans van der Meer On Jul 2, 2007, at 17:43, Hans van der Meer wrote:
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?
participants (4)
-
Hans van der Meer
-
John R. Culleton
-
Patrick Gundlach
-
Wolfgang Schuster