* Natural Tables Cell Borders
@ 2009-12-31 22:04 Curiouslearn
2010-01-04 16:55 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Curiouslearn @ 2009-12-31 22:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
Help needed! The fifth \setupTABLE command below reduces the
rulethickness of the bottomframe in cells (2,5) and (3,5). Is there a
way to avoid that? I just want the rightframe to be thin in these
cells, but the bottomframe to be thick.
Thanks a ton!
\starttext
\start
\setupTABLE[frame=off]
\setupTABLE[column][align={middle,lohi}]
\setupTABLE[2,3,4,][1,5][bottomframe=on,rulethickness=1pt]
\setupTABLE[1,4][2,3,4,5,][rightframe=on,rulethickness=1pt]
\setupTABLE[2,3][2,3,4,5][rightframe=on,rulethickness=0.2pt]
\bTABLE
\bTR
\bTD \eTD\bTD \eTD\bTD[nc=2] {\bf 2} \eTD
\eTR
\bTR
\bTD \eTD\bTD \eTD
\bTD
a2
\eTD
\bTD
b2
\eTD
\eTR
\bTR
\bTD[nr=3] 1 \eTD \bTD a1 \eTD
\bTD 2,2 \eTD
\bTD 4,5 \eTD
\eTR
\bTR
\bTD b1 \eTD
\bTD 5,4 \eTD
\bTD 3,3 \eTD
\eTR
\bTR
\bTD c1 \eTD
\bTD 6,6 \eTD
\bTD 4,4 \eTD
\eTR
\eTABLE
\stop
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Natural Tables Cell Borders
2009-12-31 22:04 Natural Tables Cell Borders Curiouslearn
@ 2010-01-04 16:55 ` Wolfgang Schuster
2010-01-05 3:02 ` Curiouslearn
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2010-01-04 16:55 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 31.12.2009 um 23:04 schrieb Curiouslearn:
> Help needed! The fifth \setupTABLE command below reduces the
> rulethickness of the bottomframe in cells (2,5) and (3,5). Is there a
> way to avoid that? I just want the rightframe to be thin in these
> cells, but the bottomframe to be thick.
You can use MetaPost to draw the rules, you can use the example i posted
today [1] as starting point.
[1] http://www.ntg.nl/pipermail/ntg-context/2010/046077.html
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Natural Tables Cell Borders
2010-01-04 16:55 ` Wolfgang Schuster
@ 2010-01-05 3:02 ` Curiouslearn
2010-01-05 8:48 ` Hans Hagen
2010-01-06 11:54 ` Wolfgang Schuster
0 siblings, 2 replies; 6+ messages in thread
From: Curiouslearn @ 2010-01-05 3:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks Wolfgang. I am not yet proficient enough in Metapost or Context
to understand your code. But will look at it more carefully later.
Meanwhile, is there any further work going on on Natural Tables? Are
there plans to introduce the ability to have borders of different
thickness for the same cell through simple options.
Thanks.
On Mon, Jan 4, 2010 at 11:55 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 31.12.2009 um 23:04 schrieb Curiouslearn:
>
>> Help needed! The fifth \setupTABLE command below reduces the
>> rulethickness of the bottomframe in cells (2,5) and (3,5). Is there a
>> way to avoid that? I just want the rightframe to be thin in these
>> cells, but the bottomframe to be thick.
>
> You can use MetaPost to draw the rules, you can use the example i posted
> today [1] as starting point.
>
> [1] http://www.ntg.nl/pipermail/ntg-context/2010/046077.html
>
> 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 : 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Natural Tables Cell Borders
2010-01-05 3:02 ` Curiouslearn
@ 2010-01-05 8:48 ` Hans Hagen
2010-01-06 11:54 ` Wolfgang Schuster
1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2010-01-05 8:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 5-1-2010 4:02, Curiouslearn wrote:
> Thanks Wolfgang. I am not yet proficient enough in Metapost or Context
> to understand your code. But will look at it more carefully later.
>
> Meanwhile, is there any further work going on on Natural Tables? Are
> there plans to introduce the ability to have borders of different
> thickness for the same cell through simple options.
normally that is demand driven i.e. if i need it in a project or so
Hans
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Natural Tables Cell Borders
2010-01-05 3:02 ` Curiouslearn
2010-01-05 8:48 ` Hans Hagen
@ 2010-01-06 11:54 ` Wolfgang Schuster
2010-01-06 17:07 ` Curiouslearn
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2010-01-06 11:54 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 05.01.2010 um 04:02 schrieb Curiouslearn:
> Thanks Wolfgang. I am not yet proficient enough in Metapost or Context
> to understand your code. But will look at it more carefully later.
>
> Meanwhile, is there any further work going on on Natural Tables? Are
> there plans to introduce the ability to have borders of different
> thickness for the same cell through simple options.
A TeX based solution won't be possible without Hans but you can set
the values in TeX (\framed, \setupTABLE) and use them in MetaPost.
The following example show you what can be done.
\unprotect
\startuseMPgraphic{tableborder}
%linecap := butt ;
numeric FrameOffset, LeftRuleThickness, RightRuleThickness, TopRuleThickness, BottomRuleThickness ;
FrameOffset := \frameddimension{frameoffset} ;
LeftRuleThickness := \frameddimension{leftrulethickness} ;
RightRuleThickness := \frameddimension{rightrulethickness} ;
TopRuleThickness := \frameddimension{toprulethickness} ;
BottomRuleThickness := \frameddimension{bottomrulethickness} ;
pair lt, rt, lb, rb ;
lt = (FrameOffset/2,OverlayHeight-FrameOffset/2) ;
rt = (OverlayWidth-FrameOffset/2,OverlayHeight-FrameOffset/2) ;
lb = (FrameOffset/2,FrameOffset/2) ;
rb = (OverlayWidth-FrameOffset/2,FrameOffset/2) ;
draw lt--rt withpen pencircle scaled TopRuleThickness ;
draw lb--rb withpen pencircle scaled BottomRuleThickness ;
draw lb--lt withpen pencircle scaled LeftRuleThickness ;
draw rb--rt withpen pencircle scaled RightRuleThickness ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay
[tableborder]
[%\edef\topframeparameter {\framedparameter\c!topframe }%
%\edef\bottomframeparameter{\framedparameter\c!bottomframe}%
%\edef\leftframeparameter {\framedparameter\c!leftframe }%
%\edef\rightframeparameter {\framedparameter\c!rightframe }%
\useMPgraphic{tableborder}]
\setupTABLE
[ toprulethickness=\framedparameter{rulethickness},
bottomrulethickness=\framedparameter{rulethickness},
leftrulethickness=\framedparameter{rulethickness},
rightrulethickness=\framedparameter{rulethickness},
% topframe=on,
% bottomframe=on,
% leftframe=on,
% rightframe=on,
background=tableborder,
frame=off]
\protect
\starttext
\start
\setupTABLE[y][1][bottomrulethickness=2pt]
\setupTABLE[3][3][bottomrulethickness=2pt,rightrulethickness=2pt]
\setupTABLE[1][3][bottomframe=off]
\bTABLE
\bTR
\bTD 1 \eTD
\bTD 2 \eTD
\bTD 3 \eTD
\eTR
\bTR
\bTD 4 \eTD
\bTD 5 \eTD
\bTD 6 \eTD
\eTR
\bTR
\bTD 7 \eTD
\bTD 8 \eTD
\bTD 9 \eTD
\eTR
\eTABLE
\stop
\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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Natural Tables Cell Borders
2010-01-06 11:54 ` Wolfgang Schuster
@ 2010-01-06 17:07 ` Curiouslearn
0 siblings, 0 replies; 6+ messages in thread
From: Curiouslearn @ 2010-01-06 17:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks very much Wolfgang. Will try to play with this during this week.
On Wed, Jan 6, 2010 at 6:54 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 05.01.2010 um 04:02 schrieb Curiouslearn:
>
>> Thanks Wolfgang. I am not yet proficient enough in Metapost or Context
>> to understand your code. But will look at it more carefully later.
>>
>> Meanwhile, is there any further work going on on Natural Tables? Are
>> there plans to introduce the ability to have borders of different
>> thickness for the same cell through simple options.
>
>
> A TeX based solution won't be possible without Hans but you can set
> the values in TeX (\framed, \setupTABLE) and use them in MetaPost.
>
> The following example show you what can be done.
>
> \unprotect
>
> \startuseMPgraphic{tableborder}
>
> %linecap := butt ;
>
> numeric FrameOffset, LeftRuleThickness, RightRuleThickness, TopRuleThickness, BottomRuleThickness ;
>
> FrameOffset := \frameddimension{frameoffset} ;
> LeftRuleThickness := \frameddimension{leftrulethickness} ;
> RightRuleThickness := \frameddimension{rightrulethickness} ;
> TopRuleThickness := \frameddimension{toprulethickness} ;
> BottomRuleThickness := \frameddimension{bottomrulethickness} ;
>
> pair lt, rt, lb, rb ;
>
> lt = (FrameOffset/2,OverlayHeight-FrameOffset/2) ;
> rt = (OverlayWidth-FrameOffset/2,OverlayHeight-FrameOffset/2) ;
> lb = (FrameOffset/2,FrameOffset/2) ;
> rb = (OverlayWidth-FrameOffset/2,FrameOffset/2) ;
>
> draw lt--rt withpen pencircle scaled TopRuleThickness ;
> draw lb--rb withpen pencircle scaled BottomRuleThickness ;
> draw lb--lt withpen pencircle scaled LeftRuleThickness ;
> draw rb--rt withpen pencircle scaled RightRuleThickness ;
>
> setbounds currentpicture to OverlayBox ;
>
> \stopuseMPgraphic
>
> \defineoverlay
> [tableborder]
> [%\edef\topframeparameter {\framedparameter\c!topframe }%
> %\edef\bottomframeparameter{\framedparameter\c!bottomframe}%
> %\edef\leftframeparameter {\framedparameter\c!leftframe }%
> %\edef\rightframeparameter {\framedparameter\c!rightframe }%
> \useMPgraphic{tableborder}]
>
> \setupTABLE
> [ toprulethickness=\framedparameter{rulethickness},
> bottomrulethickness=\framedparameter{rulethickness},
> leftrulethickness=\framedparameter{rulethickness},
> rightrulethickness=\framedparameter{rulethickness},
> % topframe=on,
> % bottomframe=on,
> % leftframe=on,
> % rightframe=on,
> background=tableborder,
> frame=off]
>
> \protect
>
> \starttext
>
> \start
>
> \setupTABLE[y][1][bottomrulethickness=2pt]
> \setupTABLE[3][3][bottomrulethickness=2pt,rightrulethickness=2pt]
> \setupTABLE[1][3][bottomframe=off]
>
> \bTABLE
> \bTR
> \bTD 1 \eTD
> \bTD 2 \eTD
> \bTD 3 \eTD
> \eTR
> \bTR
> \bTD 4 \eTD
> \bTD 5 \eTD
> \bTD 6 \eTD
> \eTR
> \bTR
> \bTD 7 \eTD
> \bTD 8 \eTD
> \bTD 9 \eTD
> \eTR
> \eTABLE
>
> \stop
>
> \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 : 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-06 17:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-31 22:04 Natural Tables Cell Borders Curiouslearn
2010-01-04 16:55 ` Wolfgang Schuster
2010-01-05 3:02 ` Curiouslearn
2010-01-05 8:48 ` Hans Hagen
2010-01-06 11:54 ` Wolfgang Schuster
2010-01-06 17:07 ` Curiouslearn
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).