ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Interfering frames in natural tables
@ 2012-05-22 11:17 Marco
  2012-05-22 11:25 ` Marco
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Marco @ 2012-05-22 11:17 UTC (permalink / raw)
  To: ntg-context

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

Hi,

the frames are interfering in the following example. How to avoid
the 2pt-2-column bottom rule also be drawn at the top?

\startsetups table
  \setupTABLE [frame=off]
  \setupTABLE [row] [first] [topframe=on]
  \setupTABLE [1]   [first] [bottomframe=on, rulethickness=2pt]
\stopsetups

\starttext
  \bTABLE [setups=table]
    \bTR\bTD[nc=2] Lorem                               \eTD\eTR
    \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
    \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
    \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
  \eTABLE
\stoptext


Side question: Is it safe not to use setups and shorten the example?

\starttext
  \bTABLE
    \setupTABLE [frame=off]
    \setupTABLE [row] [first] [topframe=on]
    \setupTABLE [1]   [first] [bottomframe=on, rulethickness=2pt]

    \bTR\bTD[nc=2] Lorem                               \eTD\eTR
    \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
    \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
    \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
  \eTABLE
\stoptext


Marco

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 6892 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Interfering frames in natural tables
  2012-05-22 11:17 Interfering frames in natural tables Marco
@ 2012-05-22 11:25 ` Marco
  2012-05-22 11:37   ` Sander Maijers
  2012-05-22 11:58 ` luigi scarso
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Marco @ 2012-05-22 11:25 UTC (permalink / raw)
  To: ntg-context

On 2012-05-22 Marco <netuse@lavabit.com> wrote:

> the frames are interfering in the following example. How to avoid
> the 2pt-2-column bottom rule also be drawn at the top?

Wiki ⇒ TABLES ⇒ Rules with different thickness

However, IMO it seems total overkill to use MetaPost and overlays to
draw a simple line in a table.


___________________________________________________________________________________
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] 7+ messages in thread

* Re: Interfering frames in natural tables
  2012-05-22 11:25 ` Marco
@ 2012-05-22 11:37   ` Sander Maijers
  0 siblings, 0 replies; 7+ messages in thread
From: Sander Maijers @ 2012-05-22 11:37 UTC (permalink / raw)
  To: ntg-context

Op Tue, 22 May 2012 13:25:05 +0200
Marco <netuse@lavabit.com> schreef:

> On 2012-05-22 Marco <netuse@lavabit.com> wrote:
> 
> > the frames are interfering in the following example. How to avoid
> > the 2pt-2-column bottom rule also be drawn at the top?
> 
> Wiki ⇒ TABLES ⇒ Rules with different thickness
> 
> However, IMO it seems total overkill to use MetaPost and overlays to
> draw a simple line in a table.

I agree! It is inconvenient.
 
> ___________________________________________________________________________________
> 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] 7+ messages in thread

* Re: Interfering frames in natural tables
  2012-05-22 11:17 Interfering frames in natural tables Marco
  2012-05-22 11:25 ` Marco
@ 2012-05-22 11:58 ` luigi scarso
  2012-05-22 11:59 ` Marco
  2012-05-22 12:00 ` Wolfgang Schuster
  3 siblings, 0 replies; 7+ messages in thread
From: luigi scarso @ 2012-05-22 11:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, May 22, 2012 at 1:17 PM, Marco <netuse@lavabit.com> wrote:
> Hi,
>
> the frames are interfering in the following example. How to avoid
> the 2pt-2-column bottom rule also be drawn at the top?
>
> \startsetups table
>  \setupTABLE [frame=off]
>  \setupTABLE [row] [first] [topframe=on]
>  \setupTABLE [1]   [first] [bottomframe=on, rulethickness=2pt]
> \stopsetups
>
> \starttext
>  \bTABLE [setups=table]
>    \bTR\bTD[nc=2] Lorem                               \eTD\eTR
>    \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
>    \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
>    \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
>  \eTABLE
> \stoptext
>
>

Do you mean something like this ?

\startsetups table
 \setupTABLE [frame=off]
 \setupTABLE [r][1] [bottomframe=on]
 \setupTABLE [1]   [1] [bottomframe=on, rulethickness=2pt]
 \setupTABLE [1]   [2] [bottomframe=on, rulethickness=2pt]
 \setupTABLE [c][3] [bottomframe=off]
\stopsetups

\starttext
 \bTABLE [setups=table]
  \bTR\bTD\eTD\bTD\eTD\eTR
   \bTR\bTD[nc=2] Lorem                             \eTD\eTR
   \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
   \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
   \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
 \eTABLE
\stoptext

-- 
luigi
___________________________________________________________________________________
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] 7+ messages in thread

* Re: Interfering frames in natural tables
  2012-05-22 11:17 Interfering frames in natural tables Marco
  2012-05-22 11:25 ` Marco
  2012-05-22 11:58 ` luigi scarso
@ 2012-05-22 11:59 ` Marco
  2012-05-22 12:00 ` Wolfgang Schuster
  3 siblings, 0 replies; 7+ messages in thread
From: Marco @ 2012-05-22 11:59 UTC (permalink / raw)
  To: ntg-context

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


… and I still don't get it working. I used the example from the
wiki. The problem: The frame is drawn on *every* cell. It basically
looks like a global frame=on.

Minimal example to draw two rules in a table (44 lines, seriously?!)

\startuseMPgraphic{tableborders}
  draw leftboundary   OverlayBox withpen pensquare scaled \frameddimension  {leftrulethickness} ;
  draw rightboundary  OverlayBox withpen pensquare scaled \frameddimension {rightrulethickness} ;
  draw topboundary    OverlayBox withpen pensquare scaled \frameddimension   {toprulethickness} ;
  draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness} ;

  clip currentpicture to OverlayBox
    leftenlarged   (\frameddimension  {leftrulethickness}/2)
    rightenlarged  (\frameddimension {rightrulethickness}/2)
    topenlarged    (\frameddimension   {toprulethickness}/2)
    bottomenlarged (\frameddimension{bottomrulethickness}/2) ;

  setbounds currentpicture to OverlayBox ;

\stopuseMPgraphic

\defineoverlay [tableborders] [\useMPgraphic{tableborders}]

\startsetups tableborders

\setupTABLE
  [         background=tableborders,
                 frame=off,
      backgroundoffset=0pt,
     leftrulethickness=\framedparameter{rulethickness},
    rightrulethickness=\framedparameter{rulethickness},
      toprulethickness=\framedparameter{rulethickness},
   bottomrulethickness=\framedparameter{rulethickness}]

\setupTABLE  [row] [first] [toprulethickness=1pt]
\setupTABLE  [1]   [first] [bottomrulethickness=2pt]

\stopsetups

\starttext

  \bTABLE [setups=tableborders]
    \bTR\bTD[nc=2] Lorem                               \eTD\eTR
    \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
    \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
    \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
  \eTABLE

\stoptext


Marco

[-- Attachment #2: tabletestmp.pdf --]
[-- Type: application/pdf, Size: 8125 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Interfering frames in natural tables
  2012-05-22 11:17 Interfering frames in natural tables Marco
                   ` (2 preceding siblings ...)
  2012-05-22 11:59 ` Marco
@ 2012-05-22 12:00 ` Wolfgang Schuster
  2012-05-22 12:15   ` Marco
  3 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2012-05-22 12:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 22.05.2012 um 13:17 schrieb Marco:

> Hi,
> 
> the frames are interfering in the following example. How to avoid
> the 2pt-2-column bottom rule also be drawn at the top?
> 
> \startsetups table
>  \setupTABLE [frame=off]
>  \setupTABLE [row] [first] [topframe=on]
>  \setupTABLE [1]   [first] [bottomframe=on, rulethickness=2pt]
> \stopsetups

\setupTABLE [row] [first] [topframe=on]
\setupTABLE [1,2] [2]     [topframe=on,rulethickness=2pt]

> \starttext
>  \bTABLE [setups=table]
>    \bTR\bTD[nc=2] Lorem                               \eTD\eTR
>    \bTR\bTD Ipsum  \eTD\bTD Dolor    \eTD\bTD Sit     \eTD\eTR
>    \bTR\bTD aaaaaa \eTD\bTD bbbbbbbb \eTD\bTD ccccccc \eTD\eTR
>    \bTR\bTD dddd   \eTD\bTD eeeeeeee \eTD\bTD fffff   \eTD\eTR
>  \eTABLE
> \stoptext
> 
> 
> Side question: Is it safe not to use setups and shorten the example?

Yes, the setups key was added only to separate the table settings from the content.

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] 7+ messages in thread

* Re: Interfering frames in natural tables
  2012-05-22 12:00 ` Wolfgang Schuster
@ 2012-05-22 12:15   ` Marco
  0 siblings, 0 replies; 7+ messages in thread
From: Marco @ 2012-05-22 12:15 UTC (permalink / raw)
  To: ntg-context

On 2012-05-22 Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

> >  \setupTABLE [row] [first] [topframe=on]
> >  \setupTABLE [1]   [first] [bottomframe=on, rulethickness=2pt]
> 
> \setupTABLE [row] [first] [topframe=on]
> \setupTABLE [1,2] [2]     [topframe=on,rulethickness=2pt]

That's a simple and neat solution. Thanks a lot. I have the feeling
that sometimes I think much too complicated.

And I really appreciate the response time and the quick help of all
of you on this list.


Marco


___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2012-05-22 12:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 11:17 Interfering frames in natural tables Marco
2012-05-22 11:25 ` Marco
2012-05-22 11:37   ` Sander Maijers
2012-05-22 11:58 ` luigi scarso
2012-05-22 11:59 ` Marco
2012-05-22 12:00 ` Wolfgang Schuster
2012-05-22 12:15   ` Marco

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).