ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco <netuse@lavabit.com>
To: ntg-context@ntg.nl
Subject: Re: Interfering frames in natural tables
Date: Tue, 22 May 2012 13:59:45 +0200	[thread overview]
Message-ID: <20120522135945.35e31181@Zewz> (raw)
In-Reply-To: <20120522131757.1556b56d@Zewz>

[-- 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
___________________________________________________________________________________

  parent reply	other threads:[~2012-05-22 11:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 11:17 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 [this message]
2012-05-22 12:00 ` Wolfgang Schuster
2012-05-22 12:15   ` Marco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120522135945.35e31181@Zewz \
    --to=netuse@lavabit.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).