Hi, I'm currently trying to typeset tables of digits. I read in This Way #3 that the tabulate environment has digits support with \NN. Would it be possible to had the same feature in the table environment? By the way, I'd like to congratulate Hans for the \digits command: it really saved me so much time! It don't need to retype numbers from my numerical outputs anymore. And I can switch very easily from english to french number format. It's great! Best wishes, Morgan
Hi everyone, Sorry to bother you again with that question, but I didn't get any answers last time, and I think this would make a useful new feature in ConTeXt: is there a particular reason why the \NN command is defined in 'tabulate' and not in 'table'? Would it be hard to add it in 'table'? Best wishes, Morgan On Mon, 17 Mar 2008, Morgan Brassel wrote:
Hi, I'm currently trying to typeset tables of digits. I read in This Way #3 that the tabulate environment has digits support with \NN. Would it be possible to had the same feature in the table environment?
By the way, I'd like to congratulate Hans for the \digits command: it really saved me so much time! It don't need to retype numbers from my numerical outputs anymore. And I can switch very easily from english to french number format. It's great!
Best wishes, Morgan
On Sat, 22 Mar 2008, Morgan Brassel wrote:
Hi everyone,
Sorry to bother you again with that question, but I didn't get any answers last time, and I think this would make a useful new feature in ConTeXt:
What exactly are you trying to achieve? I do not completely know all the features of digits. But table has a numerical columns n and q, see http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf. There are also \HC (hook column) which can do certain things. Can you give an example of a table (placing \digit commands by hand)?
is there a particular reason why the \NN command is defined in 'tabulate' and not in 'table'?
'table' is just a wrapper around TaBlE macros, and due to the syntax sugar of ConTeXt, some of the features of the original TaBlE macros are lost. (Though I do not know if \digits thing is possible with the original TaBlE macros or not)
Would it be hard to add it in 'table'?
I believe so. The TaBlE code is *very* old, written at a time when TeX was limited in terms of features and memory. Tabluate are more recenlt relatively, and written from scratch by Hans. Actually, if you request for features of table that are missing in tabulate, that might be easier to implement. Aditya
What exactly are you trying to achieve? I do not completely know all the features of digits. But table has a numerical columns n and q, see http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf. There are also \HC (hook column) which can do certain things. Can you give an example of a table (placing \digit commands by hand)?
Thank you for your quick answer, Aditya. In fact, I saw this example at the end of Hans's This Way #3: \starttext \starttabulate[|r|] \NN 1.@@ \NR \NN 1.1@ \NR \NN 1.11 \NR \NN 11.11 \NR \stoptabulate \stoptext and I would like to get the same result replacing tabulate by table... What I like about \digits (and \NN) is that you can change the number format (english Vs french for example) without rewriting anything.
is there a particular reason why the \NN command is defined in 'tabulate' and not in 'table'?
'table' is just a wrapper around TaBlE macros, and due to the syntax sugar of ConTeXt, some of the features of the original TaBlE macros are lost. (Though I do not know if \digits thing is possible with the original TaBlE macros or not)
Would it be hard to add it in 'table'?
I believe so. The TaBlE code is *very* old, written at a time when TeX was limited in terms of features and memory. Tabluate are more recenlt relatively, and written from scratch by Hans. Actually, if you request for features of table that are missing in tabulate, that might be easier to implement.
Aditya
I see. So maybe I should switch from table to tabulate for now, as I don't need vertical lines... I'll try that as a first solution. Morgan
On Sat, 22 Mar 2008, Morgan Brassel wrote:
What exactly are you trying to achieve? I do not completely know all the features of digits. But table has a numerical columns n and q, see http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf. There are also \HC (hook column) which can do certain things. Can you give an example of a table (placing \digit commands by hand)?
Thank you for your quick answer, Aditya. In fact, I saw this example at the end of Hans's This Way #3:
\starttext \starttabulate[|r|] \NN 1.@@ \NR \NN 1.1@ \NR \NN 1.11 \NR \NN 11.11 \NR \stoptabulate \stoptext
and I would like to get the same result replacing tabulate by table... What I like about \digits (and \NN) is that you can change the number format (english Vs french for example) without rewriting anything.
Does this do what you want? %\TracingFormats=1 \starttable[|b{\digits}r|] \NC 1.@@ \NC \AR \NC 1.1@ \NC \AR \NC 1.11 \NC \AR \NC 11.11 \NC \AR \stoptable Aditya
Does this do what you want?
%\TracingFormats=1 \starttable[|b{\digits}r|] \NC 1.@@ \NC \AR \NC 1.1@ \NC \AR \NC 1.11 \NC \AR \NC 11.11 \NC \AR \stoptable
Aditya
Hi Aditya, Thank you for this solution. I saw it on the wiki before I sent my first e-mail: it is actually less powerful than a \NN command, as it applies to the whole column, whereas \NN can apply to a single cell. (See the example below) My current solution is to define a new command \define\NN{\NC\digits} It (apparently) does not clash with the \NN command in tabulate, but it seems like a dangerous hack. What is your opinion? Thanks for your time! Morgan \setdigitmode 2 \define\NN{\NC\digits} \starttext \starttabulate[|r|] \NN 1.@@ \AR \NN 1.11 \AR \NC hello \AR \stoptabulate \starttable[|r|] \NN 1.@@ \AR \NN 1.11 \AR \NC hello \AR \stoptable \starttable[|b{\digits}r|] \NC 1.@@ \AR \NC 1.11 \AR \NC hello \AR \stoptable \stoptext
On Sun, 23 Mar 2008, Morgan Brassel wrote:
Does this do what you want?
%\TracingFormats=1 \starttable[|b{\digits}r|] \NC 1.@@ \NC \AR \NC 1.1@ \NC \AR \NC 1.11 \NC \AR \NC 11.11 \NC \AR \stoptable
Aditya
Hi Aditya,
Thank you for this solution. I saw it on the wiki before I sent my first e-mail: it is actually less powerful than a \NN command, as it applies to the whole column, whereas \NN can apply to a single cell. (See the example below)
The table way is the opposite. You can specify what applies to all the columns, and then rule out specific columns using \REF[..].
My current solution is to define a new command \define\NN{\NC\digits}
It (apparently) does not clash with the \NN command in tabulate, but it seems like a dangerous hack. What is your opinion?
This is pretty safe w.r.t tabulate. I do not think that any other context feature uses \NN command, so this will only clash with user commands. Aditya
On Sun, 23 Mar 2008, Aditya Mahajan wrote:
On Sun, 23 Mar 2008, Morgan Brassel wrote:
Does this do what you want?
%\TracingFormats=1 \starttable[|b{\digits}r|] \NC 1.@@ \NC \AR \NC 1.1@ \NC \AR \NC 1.11 \NC \AR \NC 11.11 \NC \AR \stoptable
Aditya
Hi Aditya,
Thank you for this solution. I saw it on the wiki before I sent my first e-mail: it is actually less powerful than a \NN command, as it applies to the whole column, whereas \NN can apply to a single cell. (See the example below)
The table way is the opposite. You can specify what applies to all the columns, and then rule out specific columns using \REF[..].
My current solution is to define a new command \define\NN{\NC\digits}
It (apparently) does not clash with the \NN command in tabulate, but it seems like a dangerous hack. What is your opinion?
This is pretty safe w.r.t tabulate. I do not think that any other context feature uses \NN command, so this will only clash with user commands.
Aditya
Ok, so I think I'll stick with this solution for now. Thank you for all your answers, Aditya! Best wishes, Morgan
participants (2)
-
Aditya Mahajan
-
Morgan Brassel