Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns
Hello, it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module: ---- \usemodule[ntb-to-xtb] \restoreTABLEfromxtable \starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE \bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup \bTR \bTD A \eTD \eTR \eTABLE \egroup \stoptext ---- Gives: " ... setup > error in line 1, namespace 'xtable', key 'c' setup > error in line 1, namespace 'xtable', key 'c' setup > error in line 1, namespace 'xtable', key 'c' ... " It might be useful to extend the module to understand "c" setup option as well. Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439 Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396
Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:
Hello,
it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module:
---- \usemodule[ntb-to-xtb] \restoreTABLEfromxtable
\starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE
\bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup
xtables don’t support row/column settings like natural table and the mapping doesn’t change this. Wolfgang
Hello,
On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster
Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:
Hello,
it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module:
---- \usemodule[ntb-to-xtb] \restoreTABLEfromxtable
\starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE
\bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup
xtables don’t support row/column settings like natural table and the mapping doesn’t change this.
Wolfgang
as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables? From what I read in the manual, setting width of a column for xtable is provided by \startxcell[width=...] at the place of the first cell-in-that-column usage. Moreover, when xtable is built in two passes, in the first pass it might take a column (width) specification(s), if provided, and keep on reading xcell specification(s), considering xcell width, if provided. I guess to be handy to implement both \setupTABLE[c][...] and \setupxtable[c][...] in a similar way, especially when there is a simple mechanism which allows TABLE/xtable switching (ntb-to-xtb module). Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439 Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396
On 2/20/2019 9:06 AM, Procházka Lukáš Ing. wrote:
Hello,
On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster
wrote: Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:
Hello,
it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module:
---- \usemodule[ntb-to-xtb] \restoreTABLEfromxtable
\starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE
\bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup
xtables don’t support row/column settings like natural table and the mapping doesn’t change this.
Wolfgang
as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables?
all is popssible but it won't happen ... different approach ... you can use named setups here
From what I read in the manual, setting width of a column for xtable is provided by \startxcell[width=...] at the place of the first cell-in-that-column usage.
Moreover, when xtable is built in two passes, in the first pass it might take a column (width) specification(s), if provided, and keep on reading xcell specification(s), considering xcell width, if provided.
it already does ... even more than two passes
I guess to be handy to implement both \setupTABLE[c][...] and \setupxtable[c][...] in a similar way, especially when there is a simple mechanism which allows TABLE/xtable switching (ntb-to-xtb module).
it would also be pretty inefficient 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 -----------------------------------------------------------------
Hello Hans,
On Wed, 20 Feb 2019 09:15:40 +0100, Hans Hagen
as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables?
all is possible but it won't happen ... different approach ... you can use named setups here
should you provide a MWE? - I cannot find an example of usage setups for setting column width; something like: \startsetups MyXTable % How to specify the width of the first column here? \stopsetups \startxtable[setup=MyXTable] ... \stopxtable Best regards, Lukas
Hans
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439 Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396
On 2/20/2019 10:51 AM, Procházka Lukáš Ing. wrote:
Hello Hans,
On Wed, 20 Feb 2019 09:15:40 +0100, Hans Hagen
wrote: as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables?
all is possible but it won't happen ... different approach ... you can use named setups here
should you provide a MWE? - I cannot find an example of usage setups for setting column width; something like:
\startsetups MyXTable % How to specify the width of the first column here? \stopsetups
\startxtable[setup=MyXTable] ... \stopxtable \setup*
did you look at the manual? ----------------------------------------------------------------- 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
-
Procházka Lukáš Ing.
-
Wolfgang Schuster