Dear list, I wanted to show off the wonders of Natural Tables in TeX.SX but the table I wanted to make escapes out of the page. Why does the width explode so much? MWE is below. Cheers, Henri --- \starttext \startTABLE[align={lohi,middle}] \NC OSI-Schicht \NC[nx=6] Umsetzung \NC\NR \NC Anwendungsschicht \NC[nx=2,ny=3] SOME/I \NC[nx=2,ny=3] AVB/TSN \NC[nx=2,ny=3] DoIP \NC\NR \NC Darstellungsschicht \NC\NR \NC Sitzungsschicht \NC\NR \NC Transportschicht \NC[nx=3] TCP \NC[nx=3] UDP \NC\NR \NC Vermittlungsschicht \NC[nx=3] IPv4 \NC[nx=3] IPv6 \NC\NR \NC Sicherungsschicht \NC[nx=6] Ethernet \NC\NR \NC Bitübertragungsschicht \NC[nx=2] 100BASE-TX \NC[nx=2] 100BASE-T \NC[nx=2] 1000BASE-T \NC\NR \stopTABLE \stoptext
On 03/08/2017 10:28 AM, Henri Menke wrote:
\starttext
\startTABLE[align={lohi,middle}] \NC OSI-Schicht \NC[nx=6] Umsetzung \NC\NR \NC Anwendungsschicht \NC[nx=2,ny=3] SOME/I \NC[nx=2,ny=3] AVB/TSN \NC[nx=2,ny=3] DoIP \NC\NR \NC Darstellungsschicht \NC\NR \NC Sitzungsschicht \NC\NR \NC Transportschicht \NC[nx=3] TCP \NC[nx=3] UDP \NC\NR \NC Vermittlungsschicht \NC[nx=3] IPv4 \NC[nx=3] IPv6 \NC\NR \NC Sicherungsschicht \NC[nx=6] Ethernet \NC\NR \NC Bitübertragungsschicht \NC[nx=2] 100BASE-TX \NC[nx=2] 100BASE-T \NC[nx=2] 1000BASE-T \NC\NR \stopTABLE
\stoptext
Because that's not a natural table. You're confusing the old TABLE environment (\startTABLE) with natural tables (\bTABLE; \NC[nx=3] should be \bTD[nx=e]). And it's inconsistent. If you want six columns, you have to tell ConTeXt what it should do in rows 3 and 4, where you define only one column. Thomas
On 03/08/2017 10:52 AM, Thomas A. Schmitz wrote:
On 03/08/2017 10:28 AM, Henri Menke wrote:
\starttext
\startTABLE[align={lohi,middle}] \NC OSI-Schicht \NC[nx=6] Umsetzung \NC\NR \NC Anwendungsschicht \NC[nx=2,ny=3] SOME/I \NC[nx=2,ny=3] AVB/TSN \NC[nx=2,ny=3] DoIP \NC\NR \NC Darstellungsschicht \NC\NR \NC Sitzungsschicht \NC\NR \NC Transportschicht \NC[nx=3] TCP \NC[nx=3] UDP \NC\NR \NC Vermittlungsschicht \NC[nx=3] IPv4 \NC[nx=3] IPv6 \NC\NR \NC Sicherungsschicht \NC[nx=6] Ethernet \NC\NR \NC Bitübertragungsschicht \NC[nx=2] 100BASE-TX \NC[nx=2] 100BASE-T \NC[nx=2] 1000BASE-T \NC\NR \stopTABLE
\stoptext
Because that's not a natural table. You're confusing the old TABLE environment (\startTABLE) with natural tables (\bTABLE; \NC[nx=3] should be \bTD[nx=e]). And it's inconsistent. If you want six columns, you have to tell ConTeXt what it should do in rows 3 and 4, where you define only one column.
No, this is Natural Tables. The macros I am using are defined in tabl-nte.mkiv and the header there states %D This module provides an easy way to use natural in a similiar %D way as the older table module (based on the \TABLE\ macros) and %D the newer tabulate module. Nevertheless, as you requested, here the same bug with the traditional Natural Table macros: \starttext \bTABLE[align={lohi,middle}] \bTR\bTD OSI-Schicht \eTD\bTD[nx=6] Umsetzung \eTD\eTR \bTR\bTD Anwendungsschicht \eTD\bTD[nx=2,ny=3] SOME/I \eTD\bTD[nx=2,ny=3] AVB/TSN \eTD\bTD[nx=2,ny=3] DoIP \eTD\eTR \bTR\bTD Darstellungsschicht \eTD\eTR \bTR\bTD Sitzungsschicht \eTD\eTR \bTR\bTD Transportschicht \eTD\bTD[nx=3] TCP \eTD\bTD[nx=3] UDP \eTD\eTR \bTR\bTD Vermittlungsschicht \eTD\bTD[nx=3] IPv4 \eTD\bTD[nx=3] IPv6 \eTD\eTR \bTR\bTD Sicherungsschicht \eTD\bTD[nx=6] Ethernet \eTD\eTR \bTR\bTD Bitübertragungsschicht \eTD\bTD[nx=2] 100BASE-TX \eTD\bTD[nx=2] 100BASE-T \eTD\bTD[nx=2] 1000BASE-T \eTD\eTR \eTABLE \stoptext
Thomas ___________________________________________________________________________________ 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 03/08/2017 03:47 PM, Henri Menke wrote:
No, this is Natural Tables. The macros I am using are defined in tabl-nte.mkiv and the header there states
You're right, I was too fast with my response.
Nevertheless, as you requested, here the same bug with the traditional Natural Table macros:
I didn't request anything, but there seems to be a real bug. Here's my code: \setuppapersize [A4,landscape] \starttext \setupTABLE [row] [each] [align={lohi,middle}] \setupTABLE [column] [1] [width=5cm] \setupTABLE [column] [2] [width=2cm] \setupTABLE [column] [3] [width=2cm] \setupTABLE [column] [4] [width=2cm] \setupTABLE [column] [5] [width=2cm] \setupTABLE [column] [6] [width=2cm] \setupTABLE [column] [7] [width=2cm] \bTABLE \bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \bTD 5 \eTD \bTD 6 \eTD \bTD 7 \eTD \eTR \bTR \bTD OSI-Schicht \eTD \bTD[nc=6] Umsetzung \eTD \eTR \bTR \bTD Anwendungsschicht \eTD \bTD[nc=2,nr=3] SOME/I\eTD \bTD[nc=2,nr=3] AVB/TSN\eTD \bTD[nc=2,nr=3] DoIP \eTD \eTR \bTR \bTD Darstellungsschicht \eTD \eTR \bTR \bTD Sitzungsschicht \eTD \eTR \bTR \bTD Transportschicht \eTD \bTD[nc=3] TCP\eTD \bTD[nc=3] UDP \eTD \eTR \bTR \bTD Vermittlungsschicht \eTD \bTD[nc=3] IPv4\eTD \bTD[nc=3] IPv6 \eTD \eTR \bTR \bTD Sicherungsschicht \eTD \bTD[nc=6] Ethernet \eTD \eTR \bTR \bTD Bitübertragungsschicht \eTD \bTD[nc=2] 100BASE-TX\eTD \bTD[nc=2] 100BASE-T\eTD \bTD[nc=2] 1000BASE-T \eTD \eTR \eTABLE \stoptext If I comment out the first table row, the table is out of whack. Same if I do not define the width of columns explicitly. So something is not quite right here. Thomas
On 3/8/2017 5:46 PM, Thomas A. Schmitz wrote:
On 03/08/2017 03:47 PM, Henri Menke wrote:
No, this is Natural Tables. The macros I am using are defined in tabl-nte.mkiv and the header there states
You're right, I was too fast with my response.
Nevertheless, as you requested, here the same bug with the traditional Natural Table macros:
I didn't request anything, but there seems to be a real bug. Here's my code:
\setuppapersize [A4,landscape]
\starttext
\setupTABLE [row] [each] [align={lohi,middle}] \setupTABLE [column] [1] [width=5cm] \setupTABLE [column] [2] [width=2cm] \setupTABLE [column] [3] [width=2cm] \setupTABLE [column] [4] [width=2cm] \setupTABLE [column] [5] [width=2cm] \setupTABLE [column] [6] [width=2cm] \setupTABLE [column] [7] [width=2cm]
\bTABLE \bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \bTD 5 \eTD \bTD 6 \eTD \bTD 7 \eTD \eTR \bTR \bTD OSI-Schicht \eTD \bTD[nc=6] Umsetzung \eTD \eTR \bTR \bTD Anwendungsschicht \eTD \bTD[nc=2,nr=3] SOME/I\eTD \bTD[nc=2,nr=3] AVB/TSN\eTD \bTD[nc=2,nr=3] DoIP \eTD \eTR \bTR \bTD Darstellungsschicht \eTD \eTR \bTR \bTD Sitzungsschicht \eTD \eTR \bTR \bTD Transportschicht \eTD \bTD[nc=3] TCP\eTD \bTD[nc=3] UDP \eTD \eTR \bTR \bTD Vermittlungsschicht \eTD \bTD[nc=3] IPv4\eTD \bTD[nc=3] IPv6 \eTD \eTR \bTR \bTD Sicherungsschicht \eTD \bTD[nc=6] Ethernet \eTD \eTR \bTR \bTD Bitübertragungsschicht \eTD \bTD[nc=2] 100BASE-TX\eTD \bTD[nc=2] 100BASE-T\eTD \bTD[nc=2] 1000BASE-T \eTD \eTR \eTABLE
\stoptext
If I comment out the first table row, the table is out of whack. Same if I do not define the width of columns explicitly. So something is not quite right here.
Fixing this will break something else (which is why i don't want to touch the code) What works is adding a first row: \bTR[height=0pt,offset=overlay,frame=off] \dorecurse{7}{\bTD\eTD} \eTR makes me wonder if that should be an option but it needs testing. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Henri Menke
-
Thomas A. Schmitz