Re: [NTG-context] Troubles with backgrounds in bTABLE

2010-08-04 Thread Willi Egger
Hello Peter,

thanks for your explanation. Hm, that also makes clear why the diagonal works 
without setting the bounding box. 

Willi
On 4 Aug 2010, at 09:45, Peter Rolf wrote:

> Hi Willi,
> 
> Am 04.08.2010 08:57, schrieb Willi Egger:
>> Hi all,
>> 
>> I need to use the background mechanism to draw a thicker line in a 
>> bTABLE...eTABLE setup together with MKII.
>> It looks like that there is a bug somewhere in this. I am unable to draw the 
>> line at the top of the cell. However it is possible to draw a diagonal 
>> through the cel. I think that the problem is related to the background 
>> mechanism in general, because the problem is also present when using the 
>> background mechanism in framed. The behavior is identical in MKII en MKIV.
>> I updated this morning to the latest version of Context, the bug is there as 
>> it was in a version ca 1 month old.
>> 
> No bug, only the bounding box. The relative position of a graphic does
> not count any longer, if the graphic leaves MP.
> For example: drawing a fullcircle/unitcircle results in the same
> graphic, although they have a different center point. Only the final
> boundingbox is counting here (equal in this case).
> In your example the boundingbox has the size (OverlayWidth,2pt) or
> (OverlayWidth+2pt,2p) if you ignore the linewidth. So you need a manual
> boundingbox setup, as in the attached example. The Topline does not
> cross the borders of the OverlayBox (donno if this is wanted, but easy
> to change).
> 
> Best wishes,  Peter
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Troubles with backgrounds in bTABLE

2010-08-04 Thread Peter Rolf
Hi Willi,

Am 04.08.2010 08:57, schrieb Willi Egger:
> Hi all,
> 
> I need to use the background mechanism to draw a thicker line in a 
> bTABLE...eTABLE setup together with MKII.
> It looks like that there is a bug somewhere in this. I am unable to draw the 
> line at the top of the cell. However it is possible to draw a diagonal 
> through the cel. I think that the problem is related to the background 
> mechanism in general, because the problem is also present when using the 
> background mechanism in framed. The behavior is identical in MKII en MKIV.
> I updated this morning to the latest version of Context, the bug is there as 
> it was in a version ca 1 month old.
>
No bug, only the bounding box. The relative position of a graphic does
not count any longer, if the graphic leaves MP.
For example: drawing a fullcircle/unitcircle results in the same
graphic, although they have a different center point. Only the final
boundingbox is counting here (equal in this case).
In your example the boundingbox has the size (OverlayWidth,2pt) or
(OverlayWidth+2pt,2p) if you ignore the linewidth. So you need a manual
boundingbox setup, as in the attached example. The Topline does not
cross the borders of the OverlayBox (donno if this is wanted, but easy
to change).

Best wishes,  Peter
\setupcolors[state=start]


\startuniqueMPgraphic{Topline}
draw (1pt,OverlayHeight-1pt)--(OverlayWidth-1pt,OverlayHeight-1pt)
withpen pencircle scaled 2pt;
setbounds currentpicture to OverlayBox;
\stopuniqueMPgraphic


\startuniqueMPgraphic{Diagonal}
path p,q;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight;
draw llcorner p -- urcorner p withpen pencircle scaled 2pt;
\stopuniqueMPgraphic

\defineoverlay[Topline][\useMPgraphic{Topline}]
\defineoverlay[Diagonal][\useMPgraphic{Diagonal}]

\starttext
\bTABLE
\setupTABLE[r][1][background=Topline]
\bTR
   \bTD Test\ \eTD  
\eTR 
\bTR
   \bTD Test\ \eTD  
\eTR
\eTABLE

\blank
\framed[background=Topline,framecolor=red]{test}
\blank

\bTABLE
\setupTABLE[r][1][background=Diagonal]
\bTR
   \bTD Test\ \eTD  
\eTR 
\bTR
   \bTD Test\ \eTD  
\eTR
\eTABLE

\blank
\framed[background=Diagonal]{test}
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Troubles with backgrounds in bTABLE

2010-08-04 Thread Willi Egger
Hi Peter,

thanks for this rapid reply! Though not nice, it works!

Willi 
On 4 Aug 2010, at 09:32, Peter Münster wrote:

> On Wed, Aug 04 2010, Willi Egger wrote:
> 
>> Please refer to the attached test file.
> 
> Hello Willi,
> 
> Here some workaround:
> 
> \startuniqueMPgraphic{Topline}
>   path p,q;
>   p := unitsquare xscaled \overlaywidth yscaled \overlayheight;
>   draw urcorner p -- ulcorner p withpen pencircle scaled 2pt;
>   draw lrcorner p -- lrcorner p withpen pencircle scaled 0pt;
> \stopuniqueMPgraphic
> 
> Cheers, Peter
> 
> -- 
> Contact information: http://pmrb.free.fr/contact/
> 
> 
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Troubles with backgrounds in bTABLE

2010-08-04 Thread Peter Münster
On Wed, Aug 04 2010, Willi Egger wrote:

> Please refer to the attached test file.

Hello Willi,

Here some workaround:

\startuniqueMPgraphic{Topline}
path p,q;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight;
draw urcorner p -- ulcorner p withpen pencircle scaled 2pt;
draw lrcorner p -- lrcorner p withpen pencircle scaled 0pt;
\stopuniqueMPgraphic

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Troubles with backgrounds in bTABLE

2010-08-03 Thread Willi Egger
Hi all,

I need to use the background mechanism to draw a thicker line in a 
bTABLE...eTABLE setup together with MKII.
It looks like that there is a bug somewhere in this. I am unable to draw the 
line at the top of the cell. However it is possible to draw a diagonal through 
the cel. I think that the problem is related to the background mechanism in 
general, because the problem is also present when using the background 
mechanism in framed. The behavior is identical in MKII en MKIV.
I updated this morning to the latest version of Context, the bug is there as it 
was in a version ca 1 month old.

Please refer to the attached test file.


Using:
This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)
ConTeXt  ver: 2010.08.04 00:37 MKII  fmt: 2010.8.4  int: english/english

Kind regards

Willi


test-background.tex
Description: Binary data
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___