Re: [NTG-context] TABLE: header with a thick bottom line

2012-10-23 Thread Rogers, Michael K
One issue is that the overlay overlaps the text space (reduces whitespace or 
potentially overlaps letters).  One could use a blank row with a black 
background, but a row seems to have a minimum height of about 2mm.  I 
discovered the "boffset" key, which can be used with the overlay, but it's 
kludgy.

Perhaps there is a better way...

Michael


\startuseMPgraphic{MP:thickBtm}
 draw bottomboundary OverlayBox withpen pensquare scaled 
\frameddimension{bottomrulethickness};
 clip currentpicture to OverlayBox;
 setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay[OL:thickBtm][\useMPgraphic{MP:thickBtm}]

\starttext
 \bTABLE % Overlay method
   \setupTABLE[align=middle]
   % By eye, by trial: boffset = bottomrulethickness/2 - 0.2mm
   
\setupTABLE[header][background={OL:thickBtm},bottomrulethickness=3mm,boffset=1.3mm]
   \setupTABLE[row][4][background={OL:thickBtm},bottomrulethickness=1.5mm, 
boffset=.55mm]
   %
   \bTABLEhead\bTR\dorecurse{3}{\bTH#1\eTH}\eTR\eTABLEhead
   \bTABLEbody\dorecurse{6}{\bTR\dorecurse{3}{\bTD#1-##1\eTD}\eTR}\eTABLEbody
 \eTABLE
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] TABLE: header with a thick bottom line

2012-10-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Mon, 22 Oct 2012 17:45:21 +0200, Marco Patzer  wrote:


http://wiki.contextgarden.net/TABLE#Rules_with_different_thickness


... I knew this snippet; unfortunately, there were some bindings or 
relationships that I didn't understand fully.


Marco


Anyway, after some experiments, based on Wolfgang's code on wiki, I reached the 
following minimal working example:


\startuseMPgraphic{MP:thickBtm}
  draw bottomboundary OverlayBox withpen pensquare scaled 
\frameddimension{bottomrulethickness};
  clip currentpicture to OverlayBox;
  setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay[OL:thickBtm][\useMPgraphic{MP:thickBtm}]

\starttext
  \bTABLE
\setupTABLE[align=middle]
\setupTABLE[header][background={OL:thickBtm},bottomrulethickness=3mm]
\setupTABLE[row][4][background={OL:thickBtm},bottomrulethickness=1.5mm]
%
\bTABLEhead\bTR\dorecurse{3}{\bTH#1\eTH}\eTR\eTABLEhead
\bTABLEbody\dorecurse{6}{\bTR\dorecurse{3}{\bTD#1-##1\eTD}\eTR}\eTABLEbody
  \eTABLE
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Tab-ThkBtm.mkiv
Description: Binary data


t-Tab-ThkBtm.pdf
Description: Adobe PDF document
___
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] TABLE: header with a thick bottom line

2012-10-22 Thread Marco Patzer
2012-10-22 Procházka Lukáš Ing. - Pontex s. r. o.:

> On Mon, 22 Oct 2012 16:41:46 +0200, Aditya Mahajan  wrote:
> 
> > If you want only the bottom border (and no other border),
> 
> ... No, I want all borders with default thickness but head bottom border 
> thicker;
> this is most common look of my tables:

http://wiki.contextgarden.net/TABLE#Rules_with_different_thickness


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
___

Re: [NTG-context] TABLE: header with a thick bottom line

2012-10-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Mon, 22 Oct 2012 16:41:46 +0200, Aditya Mahajan  wrote:


If you want only the bottom border (and no other border),


... No, I want all borders with default thickness but head bottom border 
thicker;
this is most common look of my tables:

+---+---+
| a | b |  -> header
+===+===+
| 1 | 2 |  \
+---+---+   > body
| 3 | 4 |  /
+---+---+


use

[frame=off, bottomframe=on, ...]


How to achieve it?


If you want to have all borders, but only draw the bottom border with a
different thickness, you will have to use a custom metapost background.


... OK.

I believed there would be something like

  \setupTABLE[header][bottomframe=on,bottomrulethickness=2pt]

Lukas



Aditya



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] TABLE: header with a thick bottom line

2012-10-22 Thread Aditya Mahajan

On Mon, 22 Oct 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote:


Hello,

how to achieve the table header to have a thick bottom line?

Here are my two attempts:


\starttext
\bTABLE
  \setupTABLE[width=broad]
  \setupTABLE[header][align=middle]
  \bTABLEhead
\bTR[bottomframe=on,rulethickness=2mm]\bTH a\eTH\bTH b\eTH\eTR
  \eTABLEhead
  \bTABLEbody
\bTR\bTD 1\eTD\bTD 2\eTD\eTR
\bTR\bTD 3\eTD\bTD 4\eTD\eTR
  \eTABLEbody
\eTABLE

Or even better:

\bTABLE
  \setupTABLE[width=broad]
  \setupTABLE[header][bottomframe=on,rulethickness=2mm,align=middle]
  \bTABLEhead
\bTR\bTH a\eTH\bTH b\eTH\eTR
  \eTABLEhead
  \bTABLEbody
\bTR\bTD 1\eTD\bTD 2\eTD\eTR
\bTR\bTD 3\eTD\bTD 4\eTD\eTR
  \eTABLEbody
\eTABLE
\stoptext


As you can see, in both cases all header cells are surrounded by a thick 
border; but only the bottom border should be.


If you want only the bottom border (and no other border), use

[frame=off, bottomframe=on, ...]


How to achieve it?


If you want to have all borders, but only draw the bottom border with a 
different thickness, you will have to use a custom metapost background.


Aditya___
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] TABLE: header with a thick bottom line

2012-10-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

how to achieve the table header to have a thick bottom line?

Here are my two attempts:


\starttext
  \bTABLE
\setupTABLE[width=broad]
\setupTABLE[header][align=middle]
\bTABLEhead
  \bTR[bottomframe=on,rulethickness=2mm]\bTH a\eTH\bTH b\eTH\eTR
\eTABLEhead
\bTABLEbody
  \bTR\bTD 1\eTD\bTD 2\eTD\eTR
  \bTR\bTD 3\eTD\bTD 4\eTD\eTR
\eTABLEbody
  \eTABLE

  Or even better:

  \bTABLE
\setupTABLE[width=broad]
\setupTABLE[header][bottomframe=on,rulethickness=2mm,align=middle]
\bTABLEhead
  \bTR\bTH a\eTH\bTH b\eTH\eTR
\eTABLEhead
\bTABLEbody
  \bTR\bTD 1\eTD\bTD 2\eTD\eTR
  \bTR\bTD 3\eTD\bTD 4\eTD\eTR
\eTABLEbody
  \eTABLE
\stoptext


As you can see, in both cases all header cells are surrounded by a thick 
border; but only the bottom border should be.

How to achieve it?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-TabHdr.mkiv
Description: Binary data


t-TabHdr.pdf
Description: Adobe PDF document
___
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
___