ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* table cell minimum heights -- help needed
@ 2018-12-13  9:40 Taco Hoekwater
  2018-12-14 14:18 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2018-12-13  9:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

I am attempting to process html tables that are styled using css,
and I have problem with the ‘height’ property. CSS (or rather, the 
html browser) interprets ‘height’ as if it was a “minheight”, and
if the content does not fit, it will just enlarge the height until
it does fit.

Needless to say: I want that same functionality from the ConTeXt
table I am using to generate the PDF and not end up with text 
crossing row boundaries. And I cannot figure out how
to do it, as neither bTABLE’s \bTD nor xtable’s \startxcell
interpret a “minheight" parameter. And whatever I put in “height”
becomes the absolute value of the cell height. 

Did I miss something? I cannot imagine that this problem has not
come up before…

Best wishes,
Taco

Example code:

\starttext
\bTABLE[frame=on]
\bTR \bTD[height=20pt] \input tufte \eTD \eTR
\eTABLE
\blank[10*line]
\startxtable[frame=on]
\startxrow \startxcell[height=20pt] \input tufte \stopxcell \stopxrow
\stopxtable
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: table cell minimum heights -- help needed
  2018-12-13  9:40 table cell minimum heights -- help needed Taco Hoekwater
@ 2018-12-14 14:18 ` Aditya Mahajan
  2018-12-14 14:23   ` Taco Hoekwater
  2018-12-16 16:51   ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Aditya Mahajan @ 2018-12-14 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Thu, 13 Dec 2018, Taco Hoekwater wrote:

> I am attempting to process html tables that are styled using css,
> and I have problem with the ‘height’ property. CSS (or rather, the 
> html browser) interprets ‘height’ as if it was a “minheight”, and
> if the content does not fit, it will just enlarge the height until
> it does fit.
>
> Needless to say: I want that same functionality from the ConTeXt
> table I am using to generate the PDF and not end up with text 
> crossing row boundaries. And I cannot figure out how
> to do it, as neither bTABLE’s \bTD nor xtable’s \startxcell
> interpret a “minheight" parameter. And whatever I put in “height”
> becomes the absolute value of the cell height. 
>
> Did I miss something? I cannot imagine that this problem has not
> come up before…

AFAIK, there is no option to do this. The closest option is 
`autowidth=force` for `\framed` etc. which forces `width` to behaves as 
`maxwidth`. It will be nice to explicitly add both minwidth/minheight and 
maxwidth/maxheight options to framed, etc.

Aditya

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: table cell minimum heights -- help needed
  2018-12-14 14:18 ` Aditya Mahajan
@ 2018-12-14 14:23   ` Taco Hoekwater
  2018-12-16 16:51   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Taco Hoekwater @ 2018-12-14 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

Offlist, Wolfgang sent me a patch for \framed (which \eTD inherits from) 
that adds a minheight key, and Hans promised to add that to the next beta :)

Best wishes,
Taco

> On 14 Dec 2018, at 15:18, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Thu, 13 Dec 2018, Taco Hoekwater wrote:
> 
>> I am attempting to process html tables that are styled using css,
>> and I have problem with the ‘height’ property. CSS (or rather, the html browser) interprets ‘height’ as if it was a “minheight”, and
>> if the content does not fit, it will just enlarge the height until
>> it does fit.
>> 
>> Needless to say: I want that same functionality from the ConTeXt
>> table I am using to generate the PDF and not end up with text crossing row boundaries. And I cannot figure out how
>> to do it, as neither bTABLE’s \bTD nor xtable’s \startxcell
>> interpret a “minheight" parameter. And whatever I put in “height”
>> becomes the absolute value of the cell height. 
>> Did I miss something? I cannot imagine that this problem has not
>> come up before…
> 
> AFAIK, there is no option to do this. The closest option is `autowidth=force` for `\framed` etc. which forces `width` to behaves as `maxwidth`. It will be nice to explicitly add both minwidth/minheight and maxwidth/maxheight options to framed, etc.
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: table cell minimum heights -- help needed
  2018-12-14 14:18 ` Aditya Mahajan
  2018-12-14 14:23   ` Taco Hoekwater
@ 2018-12-16 16:51   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2018-12-16 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan

Aditya Mahajan schrieb am 14.12.18 um 15:18:
> On Thu, 13 Dec 2018, Taco Hoekwater wrote:
>
>> I am attempting to process html tables that are styled using css,
>> and I have problem with the ‘height’ property. CSS (or rather, the 
>> html browser) interprets ‘height’ as if it was a “minheight”, and
>> if the content does not fit, it will just enlarge the height until
>> it does fit.
>>
>> Needless to say: I want that same functionality from the ConTeXt
>> table I am using to generate the PDF and not end up with text 
>> crossing row boundaries. And I cannot figure out how
>> to do it, as neither bTABLE’s \bTD nor xtable’s \startxcell
>> interpret a “minheight" parameter. And whatever I put in “height”
>> becomes the absolute value of the cell height.
>> Did I miss something? I cannot imagine that this problem has not
>> come up before…
>
> AFAIK, there is no option to do this. The closest option is 
> `autowidth=force` for `\framed` etc. which forces `width` to behaves 
> as `maxwidth`. It will be nice to explicitly add both 
> minwidth/minheight and maxwidth/maxheight options to framed, etc.

Adding minwidth is possible without problems but maximum values
can be problematic because you have to do a lot of size checks
and since framed is used by many other commands you would
increase compilation time.

The better solution to have maxwidth/maxheight support is to create
a new command which uses multiple passes to get the necessary
values for both directions (which already happens for natural and
extreme tables).

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-12-16 16:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13  9:40 table cell minimum heights -- help needed Taco Hoekwater
2018-12-14 14:18 ` Aditya Mahajan
2018-12-14 14:23   ` Taco Hoekwater
2018-12-16 16:51   ` Wolfgang Schuster

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