ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* table making ugly column sizes, how to fix?
@ 2018-09-30  0:25 David Walther
  2018-09-30 23:44 ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: David Walther @ 2018-09-30  0:25 UTC (permalink / raw)
  To: ntg-context

Full example at the bottom.

I'm making a table.  So far so good.

Every so often I want to make something like a section header.

Regular table rows are like this:

\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

For the section headers, I do this, and they look the way I want:

\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

But then the regular lines have ugly line breaks and suddenly the column size of column 3 is squeezed.  This shouldn't be, we have the whole page to work with.

So, when I do my section headers this way, the columns come out sized nicely, but the section header isn't styled the way I want it:

\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR

Below is my minimal example you can cut and paste.  How do I do the section
headers without messing up the column sizing?


\setuppagenumbering[alternative=doublesided,location=none,page=no]
\setupfootertexts[\sans{Source: http://mywebsite}]
\setupheadertexts[test column text wrapping]
\setupheadertexts
  [] [Page \userpagenumber\ of \lastuserpagenumber]
  [Page \userpagenumber\ of \lastuserpagenumber] []
\setuppapersize[letter, portrait]
\setuplayout[topspace=0.5in, backspace=1in, height=10in, width=7in,
             header=0.5in, footer=0.5in, headerdistance=0in, footerdistance=0in]
\switchtobodyfont[12pt]
\starttext
\setupTABLE[split=repeat]
\setupTABLE[r][each][toffset=3pt, boffset=3pt, loffset=3pt, roffset=3pt]
\setupTABLE[c][each][leftframe=off,rightframe=off,align=right]
\setupTABLE[c][first][frame=off,align=left]
\setupTABLE[c][2][style=\tfx\it,align=left]
\bTABLE
\bTABLEhead
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEhead
\bTABLEnext
\bTR\bTH Col1 \eTH\bTH Col2 \eTH\bTH Col3 \eTH\eTR
\eTABLEnext
\bTABLEbody
\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR

% This displays the way I want, but breaks the regular rows.
\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

% This works with the regular rows, but doesn't look how I want.
%\bTR\bTC 30. \eTC \bTC\eTC \bTC[align=center] \bf{Foo Bar} \eTC\eTR
\eTABLEbody
\eTABLE
\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] 5+ messages in thread

* Re: table making ugly column sizes, how to fix?
  2018-09-30  0:25 table making ugly column sizes, how to fix? David Walther
@ 2018-09-30 23:44 ` Aditya Mahajan
  2018-10-02  2:52   ` David Walther
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2018-09-30 23:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Sat, 29 Sep 2018, David Walther wrote:

> Full example at the bottom.
>
> I'm making a table.  So far so good.
>
> Every so often I want to make something like a section header.
>
> Regular table rows are like this:
>
> \bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR
>
> For the section headers, I do this, and they look the way I want:
>
> \bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR

You can also use

\bTC[nc=2, align=middle, style=bold]

> But then the regular lines have ugly line breaks and suddenly the column 
> size of column 3 is squeezed.  This shouldn't be, we have the whole page to 
> work with.

I don't really see the difference in column sizes between the two cases. 
See attached (I simplified and cleaned the example a little)

Aditya

[-- Attachment #2: Type: application/x-tex, Size: 1739 bytes --]

[-- Attachment #3: Type: application/pdf, Size: 12143 bytes --]

[-- Attachment #4: 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] 5+ messages in thread

* Re: table making ugly column sizes, how to fix?
  2018-09-30 23:44 ` Aditya Mahajan
@ 2018-10-02  2:52   ` David Walther
  2018-10-02  4:28     ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: David Walther @ 2018-10-02  2:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

I looked at your example.  I ran your example, and on my installation, it has
the same problem as I described.  I have included a PDF file of my original
sample file, and also the PDF generated from your example.   What version of
ConTeXt are you using?

On my installation of context, columns are still coming out "ugly" as you will
see in the PDF t1.pdf.  In t2.pdf you'll see the problem shows up in the table
labelled "Good".  The "Good" refers to the row in bold, not to the row above
it.

David

On Sun, Sep 30, 2018 at 07:44:12PM -0400, Aditya Mahajan wrote:
>On Sat, 29 Sep 2018, David Walther wrote:
>
>>Full example at the bottom.
>>
>>I'm making a table.  So far so good.
>>
>>Every so often I want to make something like a section header.
>>
>>Regular table rows are like this:
>>
>>\bTR\bTC \eTC\bTC NightShift \eTC\bTC Tension Lines 146 - 150 \eTC\eTR
>>
>>For the section headers, I do this, and they look the way I want:
>>
>>\bTR\bTC 30. \eTC \bTC[nc=2,align=center,style=] \bf{Foo Bar} \eTC\eTR
>
>You can also use
>
>\bTC[nc=2, align=middle, style=bold]
>
>>But then the regular lines have ugly line breaks and suddenly the 
>>column size of column 3 is squeezed.  This shouldn't be, we have the 
>>whole page to work with.
>
>I don't really see the difference in column sizes between the two 
>cases. See attached (I simplified and cleaned the example a little)
>
>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
>___________________________________________________________________________________


[-- Attachment #2: t1.tex --]
[-- Type: application/x-tex, Size: 1625 bytes --]

[-- Attachment #3: t2.pdf --]
[-- Type: application/pdf, Size: 11910 bytes --]

[-- Attachment #4: t1.pdf --]
[-- Type: application/pdf, Size: 15873 bytes --]

[-- Attachment #5: 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] 5+ messages in thread

* Re: table making ugly column sizes, how to fix?
  2018-10-02  2:52   ` David Walther
@ 2018-10-02  4:28     ` Aditya Mahajan
  2018-10-02  7:44       ` David Walther
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2018-10-02  4:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Mon, 1 Oct 2018, David Walther wrote:

> I looked at your example.  I ran your example, and on my installation, it 
> has
> the same problem as I described.  I have included a PDF file of my original
> sample file, and also the PDF generated from your example.   What version 
> of
> ConTeXt are you using?

ConTeXt MkIV 2018.09.30

What version are you using?

> On my installation of context, columns are still coming out "ugly" as 
> you will see in the PDF t1.pdf.

Everything seems okay with the latest version of ConTeXt (see attached 
pdf, obtained from your t1.tex).

Aditya

[-- Attachment #2: Type: application/pdf, Size: 16331 bytes --]

[-- Attachment #3: 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] 5+ messages in thread

* Re: table making ugly column sizes, how to fix?
  2018-10-02  4:28     ` Aditya Mahajan
@ 2018-10-02  7:44       ` David Walther
  0 siblings, 0 replies; 5+ messages in thread
From: David Walther @ 2018-10-02  7:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 02, 2018 at 12:28:44AM -0400, Aditya Mahajan wrote:
>ConTeXt MkIV 2018.09.30
>
>What version are you using?

My version is from 2017.  Thank you for the confirmation; now I will file a bug
report with Debian.

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

end of thread, other threads:[~2018-10-02  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  0:25 table making ugly column sizes, how to fix? David Walther
2018-09-30 23:44 ` Aditya Mahajan
2018-10-02  2:52   ` David Walther
2018-10-02  4:28     ` Aditya Mahajan
2018-10-02  7:44       ` David Walther

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