Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-25 Thread Hans Hagen

On 6/24/2014 9:53 PM, Rik Kabel wrote:

On 2014-06-24 08:03, Hans Hagen wrote:

On 6/23/2014 10:50 PM, Peter Münster wrote:

On Mon, Jun 23 2014, Peter Münster wrote:


No solution, just a smaller MWE:


Yet smaller, but I don't know, if it's still the same problem:

\starttext
\bTABLE
\bTR \bTD A x \eTD \bTD[nc=2] A \eTD \eTR
\eTABLE
\stoptext


after lots of experiments (adapting the width guesser) i decided to
stick to a simple check and warning; the first column will be ok but
the second one to wide (btw, one solution was to set maxwidth to a
large value)

catching all possible errors in coding a table is undoable (plus
unpredictable)

(xtables work ok btw)

Hans


Hans,

While xtable works fine for Peter's reduced MWE, it does not handle the
problem first presented, which includes an alignment character for
columns of mark-separated numbers. By my understanding of how xtable
works, I suspect that it will not be able to handle this requirement.

In this case I can get by with explicitly setting column widths as
needed to prevent the error. I have been using the following code to get
the width of what appears to be the widest element in a column:

%% This gets the width of simple things; from Hans on the mailing
%%   list http://www.ntg.nl/pipermail/ntg-context/2007/024390.html
%%   example usage: \SetWidthOf{\ColContent}\to\ColContentWidth\relax
%%   or: \SetWidthOf{Column Content}\to\ContentWidth\relax
\def\SetWidthOf#1\to#2%
  {\bgroup
   \setbox\scratchbox\hbox{#1}%
   \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

Is TABLE with explicit column widths the best solution for now on tables
that require number alignment, or do you recommend another table mechanism?


you can avoid the nc triggering width distribution with

\setupTABLE[maxwidth=100cm]

(in the case of unpredictable nc the available width is distributed and 
the  doesn't break)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-24 Thread Hans Hagen

On 6/23/2014 10:50 PM, Peter Münster wrote:

On Mon, Jun 23 2014, Peter Münster wrote:


No solution, just a smaller MWE:


Yet smaller, but I don't know, if it's still the same problem:

\starttext
\bTABLE
\bTR \bTD A x \eTD \bTD[nc=2] A \eTD \eTR
\eTABLE
\stoptext


after lots of experiments (adapting the width guesser) i decided to 
stick to a simple check and warning; the first column will be ok but the 
second one to wide (btw, one solution was to set maxwidth to a large value)


catching all possible errors in coding a table is undoable (plus 
unpredictable)


(xtables work ok btw)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-24 Thread Rik Kabel

On 2014-06-24 08:03, Hans Hagen wrote:

On 6/23/2014 10:50 PM, Peter Münster wrote:

On Mon, Jun 23 2014, Peter Münster wrote:


No solution, just a smaller MWE:


Yet smaller, but I don't know, if it's still the same problem:

\starttext
\bTABLE
\bTR \bTD A x \eTD \bTD[nc=2] A \eTD \eTR
\eTABLE
\stoptext


after lots of experiments (adapting the width guesser) i decided to 
stick to a simple check and warning; the first column will be ok but 
the second one to wide (btw, one solution was to set maxwidth to a 
large value)


catching all possible errors in coding a table is undoable (plus 
unpredictable)


(xtables work ok btw)

Hans


Hans,

While xtable works fine for Peter's reduced MWE, it does not handle the 
problem first presented, which includes an alignment character for 
columns of mark-separated numbers. By my understanding of how xtable 
works, I suspect that it will not be able to handle this requirement.


In this case I can get by with explicitly setting column widths as 
needed to prevent the error. I have been using the following code to get 
the width of what appears to be the widest element in a column:


   %% This gets the width of simple things; from Hans on the mailing
   %%   list http://www.ntg.nl/pipermail/ntg-context/2007/024390.html
   %%   example usage: \SetWidthOf{\ColContent}\to\ColContentWidth\relax
   %%   or: \SetWidthOf{Column Content}\to\ContentWidth\relax
   \def\SetWidthOf#1\to#2%
 {\bgroup
  \setbox\scratchbox\hbox{#1}%
  \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

Is TABLE with explicit column widths the best solution for now on tables 
that require number alignment, or do you recommend another table mechanism?


--
Rik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-23 Thread Rik Kabel
When a wide-ish column precedes a character-aligned column and a column 
span is in place, the table is set improperly.


With the following example, the first two columns overlap.

When the first column is moved to the right side of the table there is 
no issue.


When the setup line is removed, there is no issue.

When the long entry in column is shortened, there is no issue.

When the column span is removed and another cell added to that row, 
there is no issue.


The problem occurs when the span is applied to the first two or the last 
two columns in the example.


TL14 handles this correctly. It fails with the 20140622 beta.

   \starttext
  \bTABLE
   \setupTABLE[c][3][alignmentcharacter={.},aligncharacter=yes]
\bTABLEbody
  \bTR
\bTC AAA\eTC
\bTC[nc=2] Location\eTC
  \eTR
  \bTR
\bTC AAA Longish entry\eTC
\bTC Figure\eTC
\bTC 1.12\eTC
  \eTR
  \bTR
\bTC AAA\eTC
\bTC Table\eTC
\bTC 10.8\eTC
  \eTR
\eTABLEbody
  \eTABLE
   \stoptext

--
Rik Kabel
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-23 Thread Rik Kabel

On 2014-06-23 15:03, Rik Kabel wrote:
When a wide-ish column precedes a character-aligned column and a 
column span is in place, the table is set improperly.


With the following example, the first two columns overlap.

When the first column is moved to the right side of the table there is 
no issue.


When the setup line is removed, there is no issue.

When the long entry in column is shortened, there is no issue.

When the column span is removed and another cell added to that row, 
there is no issue.


The problem occurs when the span is applied to the first two or the 
last two columns in the example.


TL14 handles this correctly. It fails with the 20140622 beta.

\starttext
  \bTABLE
\setupTABLE[c][3][alignmentcharacter={.},aligncharacter=yes]
\bTABLEbody
  \bTR
\bTC AAA\eTC
\bTC[nc=2] Location\eTC
  \eTR
  \bTR
\bTC AAA Longish entry\eTC
\bTC Figure\eTC
\bTC 1.12\eTC
  \eTR
  \bTR
\bTC AAA\eTC
\bTC Table\eTC
\bTC 10.8\eTC
  \eTR
\eTABLEbody
  \eTABLE
\stoptext

--
Rik Kabel

Small correction. The statement

   When the first column is moved to the right side of the table there
   is no issue.

is incorrect. The problem exists with the long entry in a column 
following the alignmentcharacter column as well.


--
Rik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-23 Thread Peter Münster
On Mon, Jun 23 2014, Rik Kabel wrote:

 With the following example, the first two columns overlap.

No solution, just a smaller MWE:

\starttext
\setupTABLE[c][3][aligncharacter=yes]
\setupTABLE[height=2cm]
\bTABLE
\bTR \bTD A   \eTD \bTD[nc=2] A \eTD \eTR 
\bTR \bTD A x \eTD \bTD   A \eTD \bTD 1 \eTD \eTR
\eTABLE
\stoptext

-- 
   Peter
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem in natural tables with nc= and alignmentcharacter

2014-06-23 Thread Peter Münster
On Mon, Jun 23 2014, Peter Münster wrote:

 No solution, just a smaller MWE:

Yet smaller, but I don't know, if it's still the same problem:

\starttext
\bTABLE
\bTR \bTD A x \eTD \bTD[nc=2] A \eTD \eTR 
\eTABLE
\stoptext

-- 
   Peter
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem with Natural Tables

2005-03-07 Thread luigi.scarso
I find problems with this piece of code
( texexec -v: TeXExec 5.2.3 - ConTeXt / PRAGMA ADE 1997-2004)
\starttext
\bTABLE
\bTR \bTD one  \eTD \bTD two \eTD \eTR
\bTR \bTD three fout five six seven eight nine \eTD \bTD ten \eTD \eTR
\eTABLE
\stoptext
The log say
! Undefined control sequence.
argument \@@tblprefix \c!each
   \v!each
\getvalue #1-\csname #1
   \endcsname
\setupTBLcell ...e {\@@tblprefix \c!each \v!each }
 \getvalue 
{\@@tblprefix \c...

\handleTBLcell ...ox \hbox {\setupTBLcell {#1}{#2}
 \localframed [\@@tbl 
\@@tb...
inserted text ...bl \begintblrow \makeTBL {1}{1}
 \nexttblcol \makeTBL 
{1}{2...

\endTBL ...x {\trialtypesettingtrue \the \tbltoks
 }\ifautoTBLspread 
\checktb...
...
l.5 \eTABLE

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problem with Natural Tables

2005-03-07 Thread VnPenguin
On Mon, 07 Mar 2005 12:04:24 +0100, luigi.scarso
[EMAIL PROTECTED] wrote:
 I find problems with this piece of code
 ( texexec -v: TeXExec 5.2.3 - ConTeXt / PRAGMA ADE 1997-2004)
 
 \starttext
 \bTABLE
 \bTR \bTD one  \eTD \bTD two \eTD \eTR
 \bTR \bTD three fout five six seven eight nine \eTD \bTD ten \eTD \eTR
 \eTABLE
 \stoptext
 
 The log say
 
 ! Undefined control sequence.
 argument \@@tblprefix \c!each
 \v!each
 \getvalue #1-\csname #1
 \endcsname
 \setupTBLcell ...e {\@@tblprefix \c!each \v!each }
   \getvalue
 {\@@tblprefix \c...
 
 \handleTBLcell ...ox \hbox {\setupTBLcell {#1}{#2}
   \localframed [\@@tbl
 \@@tb...
 inserted text ...bl \begintblrow \makeTBL {1}{1}
   \nexttblcol \makeTBL
 {1}{2...
 
 \endTBL ...x {\trialtypesettingtrue \the \tbltoks
   }\ifautoTBLspread
 \checktb...
 ...
 l.5 \eTABLE
 

Have a look at http://thread.gmane.org/gmane.comp.tex.context/17944
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problem with Natural Tables

2005-03-07 Thread luigi.scarso
Thanks, next time i will pay more attention to the list.
luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context