ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Comma separating multiple footnotes
@ 2012-04-10  1:14 Kip Warner
  2012-04-10  9:21 ` Wolfgang Schuster
  0 siblings, 1 reply; 17+ messages in thread
From: Kip Warner @ 2012-04-10  1:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 261 bytes --]

Hey list,

Is there any means of setting up footnotes such that whenever they are
tangential, they are automatically separated by a comma delimiter?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-10  1:14 Comma separating multiple footnotes Kip Warner
@ 2012-04-10  9:21 ` Wolfgang Schuster
  2012-04-12 21:34   ` Kip Warner
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2012-04-10  9:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 10.04.2012 um 03:14 schrieb Kip Warner:

> Hey list,
> 
> Is there any means of setting up footnotes such that whenever they are
> tangential, they are automatically separated by a comma delimiter?

No there isn’t but it’s not hard hard to add a separator because it’s already possible to change the distance between the numbers.

BTW: It’s always helpful to provide a minimal example.

\starttext
Text\footnote{One}\footnote{Two}\footnote{Three}
\stoptext

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-10  9:21 ` Wolfgang Schuster
@ 2012-04-12 21:34   ` Kip Warner
  2012-04-13 13:58     ` Wolfgang Schuster
  0 siblings, 1 reply; 17+ messages in thread
From: Kip Warner @ 2012-04-12 21:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 633 bytes --]

On Tue, 2012-04-10 at 11:21 +0200, Wolfgang Schuster wrote:
> Am 10.04.2012 um 03:14 schrieb Kip Warner:
> 
> > Hey list,
> > 
> > Is there any means of setting up footnotes such that whenever they are
> > tangential, they are automatically separated by a comma delimiter?
> 
> No there isnt but its not hard hard to add a separator because its already possible to change the distance between the numbers.

Would that be done with \setupnotation or maybe \setupfootnotes? Either
way, I'm not sure how to do this.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-12 21:34   ` Kip Warner
@ 2012-04-13 13:58     ` Wolfgang Schuster
  2012-04-14  0:38       ` Kip Warner
  2012-04-17 20:13       ` Hans Hagen
  0 siblings, 2 replies; 17+ messages in thread
From: Wolfgang Schuster @ 2012-04-13 13:58 UTC (permalink / raw)
  To: Kip Warner, Hans Hagen; +Cc: mailing list for ConTeXt users


Am 12.04.2012 um 23:34 schrieb Kip Warner:

> On Tue, 2012-04-10 at 11:21 +0200, Wolfgang Schuster wrote:
>> Am 10.04.2012 um 03:14 schrieb Kip Warner:
>> 
>>> Hey list,
>>> 
>>> Is there any means of setting up footnotes such that whenever they are
>>> tangential, they are automatically separated by a comma delimiter?
>> 
>> No there isnt but its not hard hard to add a separator because its already possible to change the distance between the numbers.
> 
> Would that be done with \setupnotation or maybe \setupfootnotes? Either way, I'm not sure how to do this.


I wrote a patch for the footnote code where you can set a symbol between the numbers with \setupnote[footnote][textseparator=…] but it’s decision to include it.

\unprotect

\unexpanded\def\strc_notes_inject_symbol
  {\removeunwantedspaces
   \doifitalicelse\/\donothing % Charles IV \footnote{the fourth}
   \ifdim\lastkern=\notesignal
%    \kern\noteparameter\c!distance % yes or no note font? or main text
     \strc_notes_inject_separator
   \fi
   \nobreak
   \begingroup
   \currentconstructionsynchronize % this flushes the data to the list
   \strc_notes_register_note_page % this registers the symbol page number (late)
   \strc_notes_interaction_check_inline
   \strc_notes_set_style_color_inline\c!textstyle\c!textcolor
   \hbox \strc_notes_get_reference_attribute_symbol \bgroup
   \dostarttagged\t!descriptionsymbol\currentnote
   \dotagsetnotesymbol
   \noteparameter\c!textcommand{\ctxcommand{noteprefixednumber("\currentnote",\currentnotenumber)}}%
   % the next one can cycle so we need to make sure it has no advance width
   \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer
   \dostoptagged
   \egroup
   \endgroup
   \dostoptagged % check
   \globallet\lastnotesymbol\relax}

\unexpanded\def\strc_notes_inject_dummy % temp hack
  {\removeunwantedspaces
   \doifitalicelse\/\donothing % Charles IV \footnote{the fourth}
   \ifdim\lastkern=\notesignal
%    \kern\noteparameter\c!distance % yes or no note font? or main text
     \strc_notes_inject_separator
   \fi
   \nobreak
   \hbox to .5em{}%
   \globallet\lastnotesymbol\relax}

\def\strc_notes_inject_separator
  {\edef\p_textseparator{\noteparameter\c!textseparator}%
   \ifx \p_textseparator \empty
     \kern\noteparameter\c!distance
   \else
     \nobreak\hbox\bgroup
       \strc_notes_interaction_check_inline
       \strc_notes_set_style_color_inline\c!textstyle\c!textcolor
       \noteparameter\c!textcommand{\p_textseparator}%
       \kern\noteparameter\c!distance
     \egroup\nobreak
   \fi}

\protect

\setupnote
  [footnote]
  [
     textseparator={,},
         textstyle=italic,
         textcolor=red,
          distance=.5em,
  ]

\starttext
Text\footnote{One}\footnote{Two}\footnote{Three}
\stoptext

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-13 13:58     ` Wolfgang Schuster
@ 2012-04-14  0:38       ` Kip Warner
  2012-04-17 20:13       ` Hans Hagen
  1 sibling, 0 replies; 17+ messages in thread
From: Kip Warner @ 2012-04-14  0:38 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen


[-- Attachment #1.1: Type: text/plain, Size: 720 bytes --]

On Fri, 2012-04-13 at 15:58 +0200, Wolfgang Schuster wrote:
> I wrote a patch for the footnote code where you can set a symbol between the numbers with \setupnote[footnote][textseparator=…] 

Hey Wolfgang. It looks great. I'm assuming I'd stick the following in my
environment file:

    \setupnote[footnote][textseparator={,}]

Also, should it have been \setupnote or \setupnotation?

> but it’s decision to include it.

I suppose I could use it for now with the expectation that it will
neither do nor break anything, but that when it is included in the
official distribution, it will work?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-13 13:58     ` Wolfgang Schuster
  2012-04-14  0:38       ` Kip Warner
@ 2012-04-17 20:13       ` Hans Hagen
  2012-04-18  0:30         ` Kip Warner
  1 sibling, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2012-04-17 20:13 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: Kip Warner, mailing list for ConTeXt users

On 13-4-2012 15:58, Wolfgang Schuster wrote:

> I wrote a patch for the footnote code where you can set a symbol between the numbers with \setupnote[footnote][textseparator=…] but it’s decision to include it.

ok, will be added


-----------------------------------------------------------------
                                           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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-17 20:13       ` Hans Hagen
@ 2012-04-18  0:30         ` Kip Warner
  2012-04-18  7:10           ` Wolfgang Schuster
  0 siblings, 1 reply; 17+ messages in thread
From: Kip Warner @ 2012-04-18  0:30 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 341 bytes --]

On Tue, 2012-04-17 at 22:13 +0200, Hans Hagen wrote:
> ok, will be added

Hey Hans. Should it be 

\setupnote[footnote][textseparator=…], or

\setupnotation[footnote][textseparator=…] ?

Thanks for accepting the patch.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-18  0:30         ` Kip Warner
@ 2012-04-18  7:10           ` Wolfgang Schuster
  2012-04-18 22:56             ` Kip Warner
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2012-04-18  7:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kip Warner


Am 18.04.2012 um 02:30 schrieb Kip Warner:

> On Tue, 2012-04-17 at 22:13 +0200, Hans Hagen wrote:
>> ok, will be added
> 
> Hey Hans. Should it be 
> 
> \setupnote[footnote][textseparator=…], or
> 
> \setupnotation[footnote][textseparator=…] ?

You need \setupnote because the other setting for the number in the text re also set with \setupnote.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-18  7:10           ` Wolfgang Schuster
@ 2012-04-18 22:56             ` Kip Warner
  2012-04-19 10:01               ` Wolfgang Schuster
  0 siblings, 1 reply; 17+ messages in thread
From: Kip Warner @ 2012-04-18 22:56 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 446 bytes --]

On Wed, 2012-04-18 at 09:10 +0200, Wolfgang Schuster wrote:
> You need \setupnote because the other setting for the number in the text re also set with \setupnote.

So this should suffice then in the environment?

    % Implemented by Hans in bleeding edge ConTeXt...
    \setupnote[footnote]
        [textseparator={\textcomma}]

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-18 22:56             ` Kip Warner
@ 2012-04-19 10:01               ` Wolfgang Schuster
  2012-04-19 18:49                 ` Kip Warner
  2012-04-19 19:06                 ` \textcomma (was Re: Comma separating multiple footnotes) Aditya Mahajan
  0 siblings, 2 replies; 17+ messages in thread
From: Wolfgang Schuster @ 2012-04-19 10:01 UTC (permalink / raw)
  To: Kip Warner, Hans Hagen, Aditya Mahajan; +Cc: mailing list for ConTeXt users


Am 19.04.2012 um 00:56 schrieb Kip Warner:

> On Wed, 2012-04-18 at 09:10 +0200, Wolfgang Schuster wrote:
>> You need \setupnote because the other setting for the number in the text re also set with \setupnote.
> 
> So this should suffice then in the environment?
> 
>    % Implemented by Hans in bleeding edge ConTeXt...
>    \setupnote[footnote]
>        [textseparator={\textcomma}]

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):

 {
  adobename="comma",
  category="po",
  cjkwd="na",
  description="COMMA",
  direction="cs",
  linebreak="is",
  mathclass="punctuation",
  mathspec={
   {
    class="punctuation",
    name="textcomma",
   },
   {
    class="ord",
    name="mathcomma",
   },
  },
  unicodeslot=0x002C,
 },

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Comma separating multiple footnotes
  2012-04-19 10:01               ` Wolfgang Schuster
@ 2012-04-19 18:49                 ` Kip Warner
  2012-04-19 19:06                 ` \textcomma (was Re: Comma separating multiple footnotes) Aditya Mahajan
  1 sibling, 0 replies; 17+ messages in thread
From: Kip Warner @ 2012-04-19 18:49 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 379 bytes --]

On Thu, 2012-04-19 at 12:01 +0200, 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.

Would this be better then?

    \setupnote[footnote]
        [textseparator={,}]

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 10:01               ` Wolfgang Schuster
  2012-04-19 18:49                 ` Kip Warner
@ 2012-04-19 19:06                 ` Aditya Mahajan
  2012-04-19 20:31                   ` Hans Hagen
  1 sibling, 1 reply; 17+ messages in thread
From: Aditya Mahajan @ 2012-04-19 19:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1033 bytes --]

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):

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)

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 19:06                 ` \textcomma (was Re: Comma separating multiple footnotes) Aditya Mahajan
@ 2012-04-19 20:31                   ` Hans Hagen
  2012-04-19 20:59                     ` Wolfgang Schuster
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2012-04-19 20:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 20:31                   ` Hans Hagen
@ 2012-04-19 20:59                     ` Wolfgang Schuster
  2012-04-19 21:12                       ` Hans Hagen
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2012-04-19 20:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 20:59                     ` Wolfgang Schuster
@ 2012-04-19 21:12                       ` Hans Hagen
  2012-04-19 22:11                         ` Aditya Mahajan
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2012-04-19 21:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 21:12                       ` Hans Hagen
@ 2012-04-19 22:11                         ` Aditya Mahajan
  2012-04-20  7:01                           ` Hans Hagen
  0 siblings, 1 reply; 17+ messages in thread
From: Aditya Mahajan @ 2012-04-19 22:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1951 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: \textcomma (was Re: Comma separating multiple footnotes)
  2012-04-19 22:11                         ` Aditya Mahajan
@ 2012-04-20  7:01                           ` Hans Hagen
  0 siblings, 0 replies; 17+ messages in thread
From: Hans Hagen @ 2012-04-20  7:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-04-20  7:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10  1:14 Comma separating multiple footnotes Kip Warner
2012-04-10  9:21 ` Wolfgang Schuster
2012-04-12 21:34   ` Kip Warner
2012-04-13 13:58     ` Wolfgang Schuster
2012-04-14  0:38       ` Kip Warner
2012-04-17 20:13       ` Hans Hagen
2012-04-18  0:30         ` Kip Warner
2012-04-18  7:10           ` Wolfgang Schuster
2012-04-18 22:56             ` Kip Warner
2012-04-19 10:01               ` Wolfgang Schuster
2012-04-19 18:49                 ` Kip Warner
2012-04-19 19:06                 ` \textcomma (was Re: Comma separating multiple footnotes) Aditya Mahajan
2012-04-19 20:31                   ` Hans Hagen
2012-04-19 20:59                     ` Wolfgang Schuster
2012-04-19 21:12                       ` Hans Hagen
2012-04-19 22:11                         ` Aditya Mahajan
2012-04-20  7:01                           ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).