Interfering frames in natural tables
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
On 2012-05-22 Marco
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.
Op Tue, 22 May 2012 13:25:05 +0200
Marco
On 2012-05-22 Marco
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 ___________________________________________________________________________________
On Tue, May 22, 2012 at 1:17 PM, 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
\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
… 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
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
On 2012-05-22 Wolfgang Schuster
\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
participants (4)
-
luigi scarso
-
Marco
-
Sander Maijers
-
Wolfgang Schuster