Re: [NTG-context] \textcomma (was Re: Comma separating multiple footnotes)

2012-04-20 Thread Hans Hagen

On 20-4-2012 00:11, Aditya Mahajan wrote:


The case with , (comma) is more tricky. Normally, in plain TeX comma is
defined as punctuation. But since comma is used as a separator in
Europe, ConTeXt deos something smart based on the setting of
autopunction. I don't completely understand how that works.


lua magic

(Later this year I want to follow up on domain specific rendering, so 
that one can switch to (say) 'logic' and get spacing suitable for that. 
Not too hard to do as long as we have char-def up-to-date.)


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] \textcomma (was Re: Comma separating multiple footnotes)

2012-04-19 Thread Hans Hagen

On 19-4-2012 21:06, Aditya Mahajan wrote:

On Thu, 19 Apr 2012, Wolfgang Schuster wrote:



Don’t use \textcomma in MkIV, it’s a math symbol and doesn’t scale
when you change the relative font size.

\starttext

a, b\textcomma\ c

{\tfxx a, b\textcomma\ c}

{\tfb a, b\textcomma\ c}

\stoptext

@Hans/Aditya: Is it a good idea to put “textcomma” in the mathspec
entry (char-def.lua):


indeed, it's probably some leftover (there might be some more)


What is textcomma supposed to do? I see that it is defined and used in
core-mis.mkiv and then redefined in char-def.

My guess is that \textcomma and \textperiod were defined to be
complementary to \mathcomma and \mathperiod, but this is not consistent
with rest of the naming convention. (\text... begin text mode commands
for symbols, and not math mode commands).

Does anyone use \textcomma and \textperiod in math mode? I would suggest
that we rename them to \puncuationcomma and \punctuationperiod, and add
\textcomma and \textperiod as text mode commands (and remove the
definition of \textcomma from core-mis)


the \text* should be just . and , (no math)

I have no clue about the math usage. Just tell me what to patch.

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] \textcomma (was Re: Comma separating multiple footnotes)

2012-04-19 Thread Wolfgang Schuster

Am 19.04.2012 um 22:31 schrieb Hans Hagen:

 On 19-4-2012 21:06, Aditya Mahajan wrote:
 On Thu, 19 Apr 2012, Wolfgang Schuster wrote:
 
 
 Don’t use \textcomma in MkIV, it’s a math symbol and doesn’t scale
 when you change the relative font size.
 
 \starttext
 
 a, b\textcomma\ c
 
 {\tfxx a, b\textcomma\ c}
 
 {\tfb a, b\textcomma\ c}
 
 \stoptext
 
 @Hans/Aditya: Is it a good idea to put “textcomma” in the mathspec
 entry (char-def.lua):
 
 indeed, it's probably some leftover (there might be some more)
 
 What is textcomma supposed to do? I see that it is defined and used in
 core-mis.mkiv and then redefined in char-def.
 
 My guess is that \textcomma and \textperiod were defined to be
 complementary to \mathcomma and \mathperiod, but this is not consistent
 with rest of the naming convention. (\text... begin text mode commands
 for symbols, and not math mode commands).
 
 Does anyone use \textcomma and \textperiod in math mode? I would suggest
 that we rename them to \puncuationcomma and \punctuationperiod, and add
 \textcomma and \textperiod as text mode commands (and remove the
 definition of \textcomma from core-mis)
 
 the \text* should be just . and , (no math)
 
 I have no clue about the math usage. Just tell me what to patch.

Is there a reason the make them into math commands, I think it’s better the 
define them
as “contextname=…” to let them behave as in MkII where \textcomma is defined as

enco-def.mkii:\definecharacter textcomma ,
enco-def.mkii:\definecharacter textperiod.

Wolfgang
___
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] \textcomma (was Re: Comma separating multiple footnotes)

2012-04-19 Thread Hans Hagen

On 19-4-2012 22:59, Wolfgang Schuster wrote:


Is there a reason the make them into math commands, I think it’s better the 
define them
as “contextname=…” to let them behave as in MkII where \textcomma is defined as

enco-def.mkii:\definecharacter textcomma ,
enco-def.mkii:\definecharacter textperiod.


indeed, so what about math


-
  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] \textcomma (was Re: Comma separating multiple footnotes)

2012-04-19 Thread Aditya Mahajan

On Thu, 19 Apr 2012, Hans Hagen wrote:


On 19-4-2012 22:59, Wolfgang Schuster wrote:

Is there a reason the make them into math commands, I think it’s better the 
define them
as “contextname=…” to let them behave as in MkII where \textcomma is 
defined as


enco-def.mkii:\definecharacter textcomma ,
enco-def.mkii:\definecharacter textperiod.


indeed, so what about math


I don't think that these are needed in math. We can simply delete lines 
443-445 from char-def:


   {
class=punctuation,
name=textperiod,
   },

and add

   contextname=textperiod,


The case with , (comma) is more tricky. Normally, in plain TeX comma is 
defined as punctuation. But since comma is used as a separator in Europe, 
ConTeXt deos something smart based on the setting of autopunction. I don't 
completely understand how that works.


If autopunction is ignored, then we simply need to map , to punctuation. I 
think that the definition of mathcomma can also be deleted. Thus, we can 
simply delete lines 408 onwards:


  mathspec={
   {
class=punctuation,
name=textcomma,
   },
   {
class=ord,
name=mathcomma,
   },
  },


Full patch:

@@ -404,17 +404,8 @@
   description=COMMA,
   direction=cs,
   linebreak=is,
+  contextname=textcomma,
   mathclass=punctuation,
-  mathspec={
-   {
-class=punctuation,
-name=textcomma,
-   },
-   {
-class=ord,
-name=mathcomma,
-   },
-  },
   unicodeslot=0x002C,
  },
  {
@@ -434,6 +425,7 @@
   description=FULL STOP,
   direction=cs,
   linebreak=is,
+  contextname=textperiod,
   mathclass=ord,
   mathspec={
{
@@ -442,10 +434,6 @@
},
{
 class=punctuation,
-name=textperiod,
-   },
-   {
-class=punctuation,
 name=ldotp,
},
   },


Aditya___
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
___