table making ugly column sizes, how to fix?
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
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
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 ___________________________________________________________________________________
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
participants (2)
-
Aditya Mahajan
-
David Walther