Dear fellow gangsters, MkIV: \starttext \starttables[|c|c|c|c|c|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext In row 2, the space between columns 2-3, and 3-4 are not even. Is this a bug? If not, how do I balance them? Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
pdf attached
Best wishes
On Wed, 14 Jul 2010 12:42:29 -0600, Idris Samawi Hamid ادريس سماوي حامد
Dear fellow gangsters,
MkIV:
\starttext \starttables[|c|c|c|c|c|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
In row 2, the space between columns 2-3, and 3-4 are not even. Is this a bug? If not, how do I balance them?
Best wishes Idris
-- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Am 14.07.2010 20:42, schrieb Idris Samawi Hamid ادريس سماوي حامد:
Dear fellow gangsters,
MkIV:
\starttext \starttables[|c|c|c|c|c|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
In row 2, the space between columns 2-3, and 3-4 are not even. Is this a bug? If not, how do I balance them?
probably just automatic width balancing.
Best wishes Idris
maybe like this... \starttext \setbox\scratchbox\hbox{Al-Yaʿqūbī (d.~283{\sc ah})} \newdimen\colA \colA\wd\scratchbox \advance\colA-2em % sub column offsets \setbox\scratchbox\hbox{Al-Munādī (d.~334{\sc ah})} \newdimen\colB \colB\wd\scratchbox \advance\colB-2em \starttables[|c|cp(.5\colA)|cp(.5\colA)|cp(.5\colB)|cp(.5\colB)|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext Best wishes, Peter
Hi Peter,
On Wed, 14 Jul 2010 14:26:10 -0600, Peter Rolf
Am 14.07.2010 20:42, schrieb Idris Samawi Hamid ادريس سماوي حامد:
Dear fellow gangsters,
MkIV:
\starttext \starttables[|c|c|c|c|c|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
In row 2, the space between columns 2-3, and 3-4 are not even. Is this a bug? If not, how do I balance them?
probably just automatic width balancing.
I'm sure you are right :-) The question is, what is the logic here? If this is correct behavior, I'd like to understand why. Can someone explain it?
maybe like this...
That's a great workaround, and I appreciate it. But what about new users? There has got to be a more elegant solution to this seemingly simple table. Row two just does not look right...
\starttext
\setbox\scratchbox\hbox{Al-Yaʿqūbī (d.~283{\sc ah})} \newdimen\colA \colA\wd\scratchbox \advance\colA-2em % sub column offsets \setbox\scratchbox\hbox{Al-Munādī (d.~334{\sc ah})} \newdimen\colB \colB\wd\scratchbox \advance\colB-2em
\starttables[|c|cp(.5\colA)|cp(.5\colA)|cp(.5\colB)|cp(.5\colB)|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
Thanks again, Peter, and Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Am 15.07.2010 02:35, schrieb Idris Samawi Hamid ادريس سماوي حامد:
Hi Peter,
On Wed, 14 Jul 2010 14:26:10 -0600, Peter Rolf
wrote: Am 14.07.2010 20:42, schrieb Idris Samawi Hamid ادريس سماوي حامد:
Dear fellow gangsters,
MkIV:
\starttext \starttables[|c|c|c|c|c|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
In row 2, the space between columns 2-3, and 3-4 are not even. Is this a bug? If not, how do I balance them?
probably just automatic width balancing.
I'm sure you are right :-) The question is, what is the logic here? If this is correct behavior, I'd like to understand why. Can someone explain it?
has to do with the way the column width is calculated. the combined entries (2+3,4+5) in row one can only influence (increase) the total width of the involved columns, but they can not give an answer to the question how wide the single columns should be. in the end you need a linear system of equations (and metapost) to solve this. and there is also no guarantee that it is solvable in all (more complex) cases. col2=col3; col4=col5; col2+col3= ....; col4+col5= ....; also: i can't imagine how a user interface for this should look like. :)
maybe like this...
That's a great workaround, and I appreciate it. But what about new users? There has got to be a more elegant solution to this seemingly simple table. Row two just does not look right...
true, but this is font related. you can see this by using \ruledhbox{ʿAlī}. you have to add some manual kerning (\kern-0.??em ...) then.
\starttext
\setbox\scratchbox\hbox{Al-Yaʿqūbī (d.~283{\sc ah})} \newdimen\colA \colA\wd\scratchbox \advance\colA-2em % sub column offsets \setbox\scratchbox\hbox{Al-Munādī (d.~334{\sc ah})} \newdimen\colB \colB\wd\scratchbox \advance\colB-2em
\starttables[|c|cp(.5\colA)|cp(.5\colA)|cp(.5\colB)|cp(.5\colB)|] \HL \VL Sevens \VL \Use{2}[c]{Al-Yaʿqūbī} (d.~283{\sc ah})\VL \Use{2}[c]{Al-Munādī} (d.~334{\sc ah}) \VL\AR \HL \VL \VL ʿAlī \VL Zayd \VL ʿAlī \VL Zayd \VL\AR \HL \stoptables \stoptext
Thanks again, Peter, and
Best wishes Idris
On Thu, 15 Jul 2010 02:33:03 -0600, Peter Rolf
has to do with the way the column width is calculated. the combined entries (2+3,4+5) in row one can only influence (increase) the total width of the involved columns, but they can not give an answer to the question how wide the single columns should be. in the end you need a linear system of equations (and metapost) to solve this. and there is also no guarantee that it is solvable in all (more complex) cases. col2=col3; col4=col5; col2+col3= ....; col4+col5= ....;
Ok... But it seems inescapable that this is a bug in some sense. If we simplify things, compare ====================================== \starttext \starttables[|c|c|] \HL \VL \Use{2}[c]{B} \VL\AR \HL \VL B \VL B \VL\AR \HL \stoptables \blank \starttables[|c|c|] \HL \VL \Use{2}[c]{BBBBBBB} \VL\AR \HL \VL B \VL B \VL\AR \HL \stoptables \stoptext ==================================== Your mathematical explanation makes sense, but to a new user I doubt one could convince him/her that the second table is a feature and not a bug. But I understand that the challenge may be complicated. Till then, we need a simple workaround if that's possible.
also: i can't imagine how a user interface for this should look like.
\setuptables[spanalign=balance] or something....
maybe like this...
That's a great workaround, and I appreciate it. But what about new users? There has got to be a more elegant solution to this seemingly simple table. Row two just does not look right...
true, but this is font related. you can see this by using \ruledhbox{ʿAlī}. you have to add some manual kerning (\kern-0.??em ...) then.
I don't see the font-relatedness, even with \ruledhbox... Hence the above simple test case. As we work to bring ConTeXt to a wider audience -- I'm currently involved with such efforts, we should keep track of outwardly "simple" cases like the above ... Thanks again and Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Am 15.07.2010 16:53, schrieb Idris Samawi Hamid ادريس سماوي حامد:
On Thu, 15 Jul 2010 02:33:03 -0600, Peter Rolf
wrote: has to do with the way the column width is calculated. the combined entries (2+3,4+5) in row one can only influence (increase) the total width of the involved columns, but they can not give an answer to the question how wide the single columns should be. in the end you need a linear system of equations (and metapost) to solve this. and there is also no guarantee that it is solvable in all (more complex) cases. col2=col3; col4=col5; col2+col3= ....; col4+col5= ....;
Ok... But it seems inescapable that this is a bug in some sense. If we simplify things, compare
====================================== \starttext \starttables[|c|c|] \HL \VL \Use{2}[c]{B} \VL\AR \HL \VL B \VL B \VL\AR \HL \stoptables \blank \starttables[|c|c|] \HL \VL \Use{2}[c]{BBBBBBB} \VL\AR \HL \VL B \VL B \VL\AR \HL \stoptables \stoptext ====================================
Your mathematical explanation makes sense, but to a new user I doubt one could convince him/her that the second table is a feature and not a bug.
it's more a limitation of this table implementation. you have some additional space from the multicolumn entry that must be added to the involved columns somehow. the current implementation is probably something like this: use the natural width (maxima) for all but the last involved column and add the complete additional space to the last one.
But I understand that the challenge may be complicated.
Till then, we need a simple workaround if that's possible.
also: i can't imagine how a user interface for this should look like.
\setuptables[spanalign=balance]
right. you can implement all kind of different spanning algorithms. i would expect that 'balance' would share the additional space equally on all involved columns. but table macros in tex are really ugly. you need tons of bookkeeping data for maxima, styles, multi-column|row, whatever. and tex has no data types for bookkeeping (like a programming language), so you have to store all the data in macros, dimens... it's a complete mess. have a look at the macro definitions and you will agree :) anyhow, i expect much better functionality (e.g. clever spanning alternatives) with a lua based table implementation. we have to wait for that.
or something....
maybe like this...
That's a great workaround, and I appreciate it. But what about new users? There has got to be a more elegant solution to this seemingly simple table. Row two just does not look right...
true, but this is font related. you can see this by using \ruledhbox{ʿAlī}. you have to add some manual kerning (\kern-0.??em ...) then.
I don't see the font-relatedness, even with \ruledhbox... Hence the above simple test case.
see attached pdf (the box looks centered). the \ruledhbox breaks the width calculation of the second column somehow, but you can see that there is some additional space in front of the first character. use a negative kern in front of it for compensation.
As we work to bring ConTeXt to a wider audience -- I'm currently involved with such efforts, we should keep track of outwardly "simple" cases like the above ...
not an easy task, as it's more a 'special' than a 'simple' case ;) but i know what you mean. my best wishes for that. Peter
On Thu, 15 Jul 2010 11:12:16 -0600, Peter Rolf
see attached pdf (the box looks centered).
Thanks... Could you post the code ;-) (unless this is the same code u posted the first time...) Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Am 15.07.2010 19:16, schrieb Idris Samawi Hamid ادريس سماوي حامد:
On Thu, 15 Jul 2010 11:12:16 -0600, Peter Rolf
wrote: see attached pdf (the box looks centered).
Thanks... Could you post the code ;-)
sure, but don't expect too much :)
(unless this is the same code u posted the first time...)
Best wishes Idris
Am 15.07.2010 19:28, schrieb Peter Rolf:
Am 15.07.2010 19:16, schrieb Idris Samawi Hamid ادريس سماوي حامد:
On Thu, 15 Jul 2010 11:12:16 -0600, Peter Rolf
wrote: see attached pdf (the box looks centered).
Thanks... Could you post the code ;-)
sure, but don't expect too much :)
mh, seems my advice with the negative kern has some unwanted side effect to the cell height. tables are complex constructs :) using \hskip has no sideeffect (the value is not optimized). so here only the changed line... \VL \VL \hskip-.2emʿAlī \VL Zayd \VL \hskip-.2emʿAlī \VL Zayd \VL\AR i'll drink a beer now, so no more advices from my side! (i know why) ;) cheers, peter
(unless this is the same code u posted the first time...)
Best wishes Idris
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 15.07.2010 19:12, schrieb Peter Rolf:
see attached pdf (the box looks centered). the \ruledhbox breaks the width calculation of the second column somehow, but you can see that there is some additional space in front of the first character. use a negative kern in front of it for compensation.
sorry, wrong pdf
On Thu, 15 Jul 2010, Peter Rolf wrote:
also: i can't imagine how a user interface for this should look like.
\setuptables[spanalign=balance]
right. you can implement all kind of different spanning algorithms. i would expect that 'balance' would share the additional space equally on all involved columns.
but table macros in tex are really ugly. you need tons of bookkeeping data for maxima, styles, multi-column|row, whatever. and tex has no data types for bookkeeping (like a programming language), so you have to store all the data in macros, dimens... it's a complete mess. have a look at the macro definitions and you will agree :)
anyhow, i expect much better functionality (e.g. clever spanning alternatives) with a lua based table implementation. we have to wait for that.
Also remember that the starttable macros are just a wrapper around TaBlE macros written by Michael Wichura. I don't know if those have enough hooks to support a high level interface. Have you tried using natural tables. Now you can use them with almost the same amount of typing as the old table macros. \startTABLE \NC text 1 \NC text 2 \NC\NR \NC text 3 \NC text 4 \NC\NR \stopTABLE and you have a high level interface of \setupTABLE (although I do not know if natural tables support equal column widths) Aditya
Hi Aditya,
On Thu, 15 Jul 2010 11:37:32 -0600, Aditya Mahajan
Have you tried using natural tables. Now you can use them with almost the same amount of typing as the old table macros. \startTABLE \NC text 1 \NC text 2 \NC\NR \NC text 3 \NC text 4 \NC\NR \stopTABLE
Question for all: for MkIV, should we recommend ONLY natural tables to newcomers, e.g., in a ConTeXt Book? I have not used Natural Tables too much, but I can switch to those for future work and consider Tables deprecated for most purposes. Mainly a pedagogical/practical question: better to have one good way to do things than burdening folks with too much info...
and you have a high level interface of \setupTABLE (although I do not know if natural tables support equal column widths)
I guess we'll find out soon enough... ;-) Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
2010/7/15 Idris Samawi Hamid ادريس سماوي حامد> Hi Aditya, > > On Thu, 15 Jul 2010 11:37:32 -0600, Aditya Mahajan > wrote: > > Have you tried using natural tables. Now you can use them with almost the >> same amount of typing as the old table macros. >> \startTABLE >> \NC text 1 \NC text 2 \NC\NR >> \NC text 3 \NC text 4 \NC\NR >> \stopTABLE >> > > Question for all: for MkIV, should we recommend ONLY natural tables to > newcomers, e.g., in a ConTeXt Book? > > I have not used Natural Tables too much, but I can switch to those for > future work and consider Tables deprecated for most purposes. > > I use only 1) b\TABLE\eTABLE 2) \starttabulate\stoptabulate -- luigi
On 15-7-2010 7:45, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi Aditya,
On Thu, 15 Jul 2010 11:37:32 -0600, Aditya Mahajan
wrote: Have you tried using natural tables. Now you can use them with almost the same amount of typing as the old table macros. \startTABLE \NC text 1 \NC text 2 \NC\NR \NC text 3 \NC text 4 \NC\NR \stopTABLE
Question for all: for MkIV, should we recommend ONLY natural tables to newcomers, e.g., in a ConTeXt Book?
I have not used Natural Tables too much, but I can switch to those for future work and consider Tables deprecated for most purposes.
Mainly a pedagogical/practical question: better to have one good way to do things than burdening folks with too much info...
and you have a high level interface of \setupTABLE (although I do not know if natural tables support equal column widths)
I guess we'll find out soon enough... ;-)
\bTABLE .. \eTABLE \starttabulate .. \stoptabulate tabulate is quite different and has unique properties (there are also linetables but those are only for source code readers) 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 -----------------------------------------------------------------
On Thu, Jul 15 2010, Idris Samawi Hamid ادريس سماوي حامد wrote:
Question for all: for MkIV, should we recommend ONLY natural tables to newcomers, e.g., in a ConTeXt Book?
Hello Idris, For me, it's yes! But newcomers need to pay attention in some cases: - alignment (see issue http://tracker.luatex.org/view.php?id=427 ) - TABLEhead is repeated, TABLEfoot is not (see issue http://tracker.luatex.org/view.php?id=116 ) Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Hi Peter,
On Fri, 16 Jul 2010 07:05:19 -0600, Peter Münster
On Thu, Jul 15 2010, Idris Samawi Hamid ادريس سماوي حامد wrote:
Question for all: for MkIV, should we recommend ONLY natural tables to newcomers, e.g., in a ConTeXt Book?
Hello Idris,
For me, it's yes! But newcomers need to pay attention in some cases: - alignment (see issue http://tracker.luatex.org/view.php?id=427 ) - TABLEhead is repeated, TABLEfoot is not (see issue http://tracker.luatex.org/view.php?id=116 )
Sure, hopefully by the time we get to that point the bugs will be fixed. I also see that Wolfgang has wrapped some of the old Tables syntax into a module (as Aditya hinted)... I missed all of these developments :-) The Tables syntax is certainly less verbose, and may be useful for beginners. But for pedagogical purposes it makes sense to consider Table/Tables deprecated, if not obsolete... So the pedagogical challenge is to make TABLE as easy as possible, perhaps teaching \start/stopTABLE as intro and \b/eTABLE as advanced. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
2010/7/16 Idris Samawi Hamid ادريس سماوي حامد> Hi Peter, > > > On Fri, 16 Jul 2010 07:05:19 -0600, Peter Münster wrote: > > On Thu, Jul 15 2010, Idris Samawi Hamid ادريس سماوي حامد wrote: >> >> Question for all: for MkIV, should we recommend ONLY natural tables to >>> newcomers, e.g., in a ConTeXt Book? >>> >> >> Hello Idris, >> >> For me, it's yes! But newcomers need to pay attention in some cases: >> - alignment (see issue http://tracker.luatex.org/view.php?id=427 ) >> - TABLEhead is repeated, TABLEfoot is not >> (see issue http://tracker.luatex.org/view.php?id=116 ) >> > > Sure, hopefully by the time we get to that point the bugs will be fixed. > > I also see that Wolfgang has wrapped some of the old Tables syntax into a > module (as Aditya hinted)... I missed all of these developments :-) > > The Tables syntax is certainly less verbose, and may be useful for > beginners. But for pedagogical purposes it makes sense to consider > Table/Tables deprecated, if not obsolete... So the pedagogical challenge is > to make TABLE as easy as possible, perhaps teaching \start/stopTABLE as > intro and \b/eTABLE as advanced. > > > A top-down approach 1) \bTABLE 2) \starttabulate 3) chapter 22 of TeXbook 1) is much easy than 2) which is much easy than 3 1) is slower than 2) which is slower than 3) -- luigi
On 15-7-2010 7:37, Aditya Mahajan wrote:
Also remember that the starttable macros are just a wrapper around TaBlE macros written by Michael Wichura. I don't know if those have enough hooks to support a high level interface.
indeed .. I actually should merge all the patches on TaBLe and then have a look at it again ... I must admit that I haven't used starttable for ages 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 -----------------------------------------------------------------
On Thu, 15 Jul 2010 12:43:44 -0600, Hans Hagen
I must admit that I haven't used starttable for ages
Well then, that settles it; the current project is my last start/stoptable :-) Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي حامد
-
luigi scarso
-
Peter Münster
-
Peter Rolf