ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* whitespace in framedtext
@ 2007-07-02 15:43 Hans van der Meer
  2007-07-03  6:32 ` Wolfgang Schuster
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hans van der Meer @ 2007-07-02 15:43 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 873 bytes --]

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



[-- Attachment #1.2: Type: text/html, Size: 1851 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: whitespace in framedtext
  2007-07-02 15:43 whitespace in framedtext Hans van der Meer
@ 2007-07-03  6:32 ` Wolfgang Schuster
  2007-07-03  8:20 ` Patrick Gundlach
  2007-07-03 17:00 ` Hans van der Meer
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2007-07-03  6:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

2007/7/2, Hans van der Meer <hansm@science.uva.nl>:
> 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

[-- Attachment #2: frame.zip --]
[-- Type: application/zip, Size: 6971 bytes --]

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: whitespace in framedtext
  2007-07-02 15:43 whitespace in framedtext Hans van der Meer
  2007-07-03  6:32 ` Wolfgang Schuster
@ 2007-07-03  8:20 ` Patrick Gundlach
  2007-07-03 14:55   ` John R. Culleton
  2007-07-03 17:00 ` Hans van der Meer
  2 siblings, 1 reply; 6+ messages in thread
From: Patrick Gundlach @ 2007-07-03  8:20 UTC (permalink / raw)
  To: ntg-context

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
--------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: whitespace in framedtext
  2007-07-03  8:20 ` Patrick Gundlach
@ 2007-07-03 14:55   ` John R. Culleton
  2007-07-04  7:36     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: John R. Culleton @ 2007-07-03 14:55 UTC (permalink / raw)
  To: ntg-context; +Cc: Patrick Gundlach

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: whitespace in framedtext
  2007-07-02 15:43 whitespace in framedtext Hans van der Meer
  2007-07-03  6:32 ` Wolfgang Schuster
  2007-07-03  8:20 ` Patrick Gundlach
@ 2007-07-03 17:00 ` Hans van der Meer
  2 siblings, 0 replies; 6+ messages in thread
From: Hans van der Meer @ 2007-07-03 17:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1363 bytes --]

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?
>



[-- Attachment #1.2: Type: text/html, Size: 3017 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: whitespace in framedtext
  2007-07-03 14:55   ` John R. Culleton
@ 2007-07-04  7:36     ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2007-07-04  7:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/7/3, John R. Culleton <john@wexfordpress.com>:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-04  7:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-02 15:43 whitespace in framedtext Hans van der Meer
2007-07-03  6:32 ` Wolfgang Schuster
2007-07-03  8:20 ` Patrick Gundlach
2007-07-03 14:55   ` John R. Culleton
2007-07-04  7:36     ` Wolfgang Schuster
2007-07-03 17:00 ` Hans van der Meer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).