ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* support for "SUBSCRIPT THREE" etc. ?
@ 2009-07-21  9:54 Peter Münster
  2009-07-21 10:27 ` Khaled Hosny
  2009-07-21 11:27 ` Peter Münster
  0 siblings, 2 replies; 13+ messages in thread
From: Peter Münster @ 2009-07-21  9:54 UTC (permalink / raw)
  To: ConTeXt list

Hello,

Is support for unicode range 0x2080-0x2089 planned?

Superscript works well, but not the subscript:

\starttext
x³ x₃
\stoptext


I need it for something like this:

\usemodule[vim]
\definevimtyping[C][syntax=c]
\starttext
\startC
for(expr₁; expr₂; expr₃)
	instruction
\stopC
\stoptext


Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21  9:54 support for "SUBSCRIPT THREE" etc. ? Peter Münster
@ 2009-07-21 10:27 ` Khaled Hosny
  2009-07-21 10:38   ` Matthijs Kooijman
                     ` (2 more replies)
  2009-07-21 11:27 ` Peter Münster
  1 sibling, 3 replies; 13+ messages in thread
From: Khaled Hosny @ 2009-07-21 10:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Tue, Jul 21, 2009 at 11:54:02AM +0200, Peter Münster wrote:
> Hello,
> 
> Is support for unicode range 0x2080-0x2089 planned?
> 
> Superscript works well, but not the subscript:
> 
> \starttext
> x³ x₃
> \stoptext

Unicode sub/superscripts aren't real sub/superscripts, and there use is
discouraged. Most fonts will align those subscript glyphs to the base
line not bellow it, and apparently LM fonts don't have them.

I think there is a way to use ConTeXt commands inside verbatim
environments, but I don't recall it.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 10:27 ` Khaled Hosny
@ 2009-07-21 10:38   ` Matthijs Kooijman
  2009-07-21 21:09     ` Hans Hagen
  2009-07-21 10:50   ` Mojca Miklavec
  2009-07-21 11:19   ` Peter Münster
  2 siblings, 1 reply; 13+ messages in thread
From: Matthijs Kooijman @ 2009-07-21 10:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Peter & Khaled,

> I think there is a way to use ConTeXt commands inside verbatim
> environments, but I don't recall it.
I think this is the "option=commands" option for setuptyping & friends. AFAIK
this means you need to use /TEX /ETEX around your commands or something, but
I'm not completely sure. It seems this only works in MkII, it wasn't
implemented in MkIV a month ago at least.

Gr.

Matthijs

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 10:27 ` Khaled Hosny
  2009-07-21 10:38   ` Matthijs Kooijman
@ 2009-07-21 10:50   ` Mojca Miklavec
  2009-07-21 21:10     ` Hans Hagen
  2009-07-21 11:19   ` Peter Münster
  2 siblings, 1 reply; 13+ messages in thread
From: Mojca Miklavec @ 2009-07-21 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jul 21, 2009 at 12:27, Khaled Hosny<khaledhosny@eglug.org> wrote:
> On Tue, Jul 21, 2009 at 11:54:02AM +0200, Peter Münster wrote:
>> Hello,
>>
>> Is support for unicode range 0x2080-0x2089 planned?
>>
>> Superscript works well, but not the subscript:
>>
>> \starttext
>> x³ x₃
>> \stoptext
>
> Unicode sub/superscripts aren't real sub/superscripts, and there use is
> discouraged. Most fonts will align those subscript glyphs to the base
> line not bellow it, and apparently LM fonts don't have them.

In MKIV one could theoretically fix the (virtual) font with subscript
three containing "\sub{3}" *** or "lowered superscript 3" :)

*** The problem is that you would probably loose "monospace" by doing
that, but maybe you are not using monospace at all.

Mojca
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 10:27 ` Khaled Hosny
  2009-07-21 10:38   ` Matthijs Kooijman
  2009-07-21 10:50   ` Mojca Miklavec
@ 2009-07-21 11:19   ` Peter Münster
  2009-07-21 14:55     ` Aditya Mahajan
  2 siblings, 1 reply; 13+ messages in thread
From: Peter Münster @ 2009-07-21 11:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 21 Jul 2009, Khaled Hosny wrote:

> Unicode sub/superscripts aren't real sub/superscripts, and there use is
> discouraged. Most fonts will align those subscript glyphs to the base
> line not bellow it, and apparently LM fonts don't have them.

Hello,

In char-def.lua there is:

 [0x2074]={
  category="no",
  cjkwd="a",
  description="SUPERSCRIPT FOUR",
  direction="en",
  linebreak="ai",
  specials={ "super", 0x0034 },
  unicodeslot=0x2074,
 },
[...]
 [0x2084]={
  category="no",
  cjkwd="a",
  description="SUBSCRIPT FOUR",
  direction="en",
  linebreak="ai",
  specials={ "sub", 0x0034 },
  unicodeslot=0x2084,
 },

So I supposed, that the "specials" are for faking or simulating the unicode
character, for example ² -> \superscript{2} or similar.
Perhaps, my assumption is just wrong...


> I think there is a way to use ConTeXt commands inside verbatim
> environments, but I don't recall it.

Yes, BTEX...ETEX, but not with the t-vim module.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21  9:54 support for "SUBSCRIPT THREE" etc. ? Peter Münster
  2009-07-21 10:27 ` Khaled Hosny
@ 2009-07-21 11:27 ` Peter Münster
  1 sibling, 0 replies; 13+ messages in thread
From: Peter Münster @ 2009-07-21 11:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 21 Jul 2009, Peter Münster wrote:

> I need it for something like this:
> 
> \usemodule[vim]
> \definevimtyping[C][syntax=c]
> \starttext
> \startC
> for(expr₁; expr₂; expr₃)
> 	instruction
> \stopC
> \stoptext

Finally I've found a simple solution:

\usemodule[vim]
\definevimtyping[C][syntax=c]
\defineactivecharacter ₁ {\low{\tx1}}
\defineactivecharacter ₂ {\low{\tx2}}
\defineactivecharacter ₃ {\low{\tx3}}
\starttext
\startC
for(expr₁; expr₂; expr₃)
    instruction
\stopC
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 11:19   ` Peter Münster
@ 2009-07-21 14:55     ` Aditya Mahajan
  0 siblings, 0 replies; 13+ messages in thread
From: Aditya Mahajan @ 2009-07-21 14:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Tue, 21 Jul 2009, Peter Münster wrote:

> On Tue, 21 Jul 2009, Khaled Hosny wrote:
>
>> Unicode sub/superscripts aren't real sub/superscripts, and there use is
>> discouraged. Most fonts will align those subscript glyphs to the base
>> line not bellow it, and apparently LM fonts don't have them.
>
> Hello,
>
> In char-def.lua there is:
>
> [0x2074]={
>  category="no",
>  cjkwd="a",
>  description="SUPERSCRIPT FOUR",
>  direction="en",
>  linebreak="ai",
>  specials={ "super", 0x0034 },
>  unicodeslot=0x2074,
> },
> [...]
> [0x2084]={
>  category="no",
>  cjkwd="a",
>  description="SUBSCRIPT FOUR",
>  direction="en",
>  linebreak="ai",
>  specials={ "sub", 0x0034 },
>  unicodeslot=0x2084,
> },
>
> So I supposed, that the "specials" are for faking or simulating the unicode
> character, for example ² -> \superscript{2} or similar.
> Perhaps, my assumption is just wrong...

I am not sure whethere specials work at all. I am assuming that 
SUPERSCIRPT ONE, TWO, and THREE work because the LM font contain them at 
the right spot. These are less than hex FF. The others, for example, 
SUPERSCIRPT ZERO and SUPERSCRIPT FOUR do not work because they are not 
(AFAIU) mapped to any place in LM fonts. I don't even know if LM fonts 
have these or not. The same is true for SUBSCRIPT.

If you use a opentype font like cambria, superscripts and subscripts work. 
I guess that is because they have these symbols. If you swich to \tt with 
cambria, only sup 1,2,3 work.

So, the easiest solution will be to use a (maybe) virtual font that has 
these glyphs. Otherwise, using the active character trick is the easiest 
option.

Aditya

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 10:38   ` Matthijs Kooijman
@ 2009-07-21 21:09     ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2009-07-21 21:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matthijs Kooijman wrote:
> Hi Peter & Khaled,
> 
>> I think there is a way to use ConTeXt commands inside verbatim
>> environments, but I don't recall it.
> I think this is the "option=commands" option for setuptyping & friends. AFAIK
> this means you need to use /TEX /ETEX around your commands or something, but
> I'm not completely sure. It seems this only works in MkII, it wasn't
> implemented in MkIV a month ago at least.

indeed, if it is introduced again it will be done differently ...

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 10:50   ` Mojca Miklavec
@ 2009-07-21 21:10     ` Hans Hagen
  2009-07-22  4:42       ` Michail Vidiassov
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2009-07-21 21:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mojca Miklavec wrote:
> On Tue, Jul 21, 2009 at 12:27, Khaled Hosny<khaledhosny@eglug.org> wrote:
>> On Tue, Jul 21, 2009 at 11:54:02AM +0200, Peter Münster wrote:
>>> Hello,
>>>
>>> Is support for unicode range 0x2080-0x2089 planned?
>>>
>>> Superscript works well, but not the subscript:
>>>
>>> \starttext
>>> x³ x₃
>>> \stoptext
>> Unicode sub/superscripts aren't real sub/superscripts, and there use is
>> discouraged. Most fonts will align those subscript glyphs to the base
>> line not bellow it, and apparently LM fonts don't have them.
> 
> In MKIV one could theoretically fix the (virtual) font with subscript
> three containing "\sub{3}" *** or "lowered superscript 3" :)
> 
> *** The problem is that you would probably loose "monospace" by doing
> that, but maybe you are not using monospace at all.

it's also font dependent and we would en dup with fallback mess etc etc

if the font has the glyph, you can use the unicode char, bu tit is 
unlikely that there will be a mapping mechanism


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-21 21:10     ` Hans Hagen
@ 2009-07-22  4:42       ` Michail Vidiassov
  2009-07-22  5:47         ` Aditya Mahajan
  2009-07-22  7:48         ` Hans Hagen
  0 siblings, 2 replies; 13+ messages in thread
From: Michail Vidiassov @ 2009-07-22  4:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Dear Hans and All,

On Tue, 21 Jul 2009, Hans Hagen wrote:

>>>> Superscript works well, but not the subscript:
>>>>
>>>> \starttext
>>>> x³ x₃
>>>> \stoptext
>>> Unicode sub/superscripts aren't real sub/superscripts, and there use is
>>> discouraged. Most fonts will align those subscript glyphs to the base
>>> line not bellow it, and apparently LM fonts don't have them.
>> 
>> In MKIV one could theoretically fix the (virtual) font with subscript
>> three containing "\sub{3}" *** or "lowered superscript 3" :)
>> 
> it's also font dependent and we would en dup with fallback mess etc etc
>
> if the font has the glyph, you can use the unicode char, bu tit is 
> unlikely that there will be a mapping mechanism

What about an analog of "ucs" LaTeX package,
when Unicode math subscripts (and other symbols) in TeX file are replaced
by "\sub{3}" etc., regardless of the font used for typesetting?

It will give WYSIWYG-like appearance of the input file on the screen
in the editor using Unicode font and will not bring the mess deep into 
ConTeXt?

Is such thing doable?
(Not making a set of mappings for presonal use, but proper package
for public consumption?)

                    Sincerely, Michail

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-22  4:42       ` Michail Vidiassov
@ 2009-07-22  5:47         ` Aditya Mahajan
  2009-07-22 11:07           ` Hans Hagen
  2009-07-22  7:48         ` Hans Hagen
  1 sibling, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2009-07-22  5:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Wed, 22 Jul 2009, Michail Vidiassov wrote:

> Dear Hans and All,
>
> On Tue, 21 Jul 2009, Hans Hagen wrote:
>
>>>>> Superscript works well, but not the subscript:
>>>>> 
>>>>> \starttext
>>>>> x³ x₃
>>>>> \stoptext
>>>> Unicode sub/superscripts aren't real sub/superscripts, and there use is
>>>> discouraged. Most fonts will align those subscript glyphs to the base
>>>> line not bellow it, and apparently LM fonts don't have them.
>>> 
>>> In MKIV one could theoretically fix the (virtual) font with subscript
>>> three containing "\sub{3}" *** or "lowered superscript 3" :)
>>> 
>> it's also font dependent and we would en dup with fallback mess etc etc
>> 
>> if the font has the glyph, you can use the unicode char, bu tit is unlikely 
>> that there will be a mapping mechanism
>
> What about an analog of "ucs" LaTeX package,
> when Unicode math subscripts (and other symbols) in TeX file are replaced
> by "\sub{3}" etc., regardless of the font used for typesetting?

Most of the support is already there (except superscripts and subscripts). 
MKII implemented this support using active characters (similar to what ucs 
does). MKIV does this using virtual fonts.

> It will give WYSIWYG-like appearance of the input file on the screen
> in the editor using Unicode font and will not bring the mess deep into 
> ConTeXt?
>
> Is such thing doable?
> (Not making a set of mappings for presonal use, but proper package
> for public consumption?)

For most glyphs the support is already there. Making sure that multiple glyphs
are combined correctly is tricier. We can have an input like $ŵ¹$ and it is not
always easy to determine if it should be translated to ${\hat w}^1$ or $\hat
{w^1}$.

Microsoft implmented something like this in newer versions of Word. See the
developer's blog for more detials.
http://blogs.msdn.com/murrays/archive/2009/05/07/entering-math-via-the-linear-format.aspx

Aditya


[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-22  4:42       ` Michail Vidiassov
  2009-07-22  5:47         ` Aditya Mahajan
@ 2009-07-22  7:48         ` Hans Hagen
  1 sibling, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2009-07-22  7:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Michail Vidiassov wrote:

> What about an analog of "ucs" LaTeX package,
> when Unicode math subscripts (and other symbols) in TeX file are replaced
> by "\sub{3}" etc., regardless of the font used for typesetting?

the reverse mapping is doable and on the agenda (normally i do such 
things when i run into it in a project)

> It will give WYSIWYG-like appearance of the input file on the screen
> in the editor using Unicode font and will not bring the mess deep into 
> ConTeXt?

well, editors is another case as not all fonts used in editors have such 
characters so your file becomes quite unportable unless the editor 
implements some fallback mechanism

there's also a subscript font feature but often such features are 
implemented incomplete in fonts (like frac) and quite unuseable unless 
more logic in the engine is added (again, something that i will look 
into when i have a reason)

> Is such thing doable?
> (Not making a set of mappings for presonal use, but proper package
> for public consumption?)

it would be core functionality as it involved manupulating the internal 
math node lists

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: support for "SUBSCRIPT THREE" etc. ?
  2009-07-22  5:47         ` Aditya Mahajan
@ 2009-07-22 11:07           ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2009-07-22 11:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:

> Microsoft implmented something like this in newer versions of Word. See the
> developer's blog for more detials.
> http://blogs.msdn.com/murrays/archive/2009/05/07/entering-math-via-the-linear-format.aspx 

Well, we can consider supporting linear math ..

\unexpanded\def\startmathzone
   {\ifvmode
      \Ustartdisplaymath
      \let\stopmathzone\Ustopdisplaymath
    \else
      \Ustartmath
      \let\stopmathzone\Ustopmath
    \fi}

\defineactivecharacter "23A8 \startmathzone
\defineactivecharacter "23AC \stopmathzone

\catcode"3016=\begingroupcatcode
\catcode"3017=\endgroupcatcode


\utfchar{"23A8}x^\utfchar{"3016}1+2\utfchar{"3017}\utfchar{"23AC}


The question is if we do it this way using a special math catcode 
regime, but that does not work when we pass it as argument unless we 
mess around with some math codes - like prime does) or use a parser 
(which is not that hard to do and is needed for things like sin/cos anyway)

i'll have a look at it (given that it's a frozen 'standard')

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-07-22 11:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21  9:54 support for "SUBSCRIPT THREE" etc. ? Peter Münster
2009-07-21 10:27 ` Khaled Hosny
2009-07-21 10:38   ` Matthijs Kooijman
2009-07-21 21:09     ` Hans Hagen
2009-07-21 10:50   ` Mojca Miklavec
2009-07-21 21:10     ` Hans Hagen
2009-07-22  4:42       ` Michail Vidiassov
2009-07-22  5:47         ` Aditya Mahajan
2009-07-22 11:07           ` Hans Hagen
2009-07-22  7:48         ` Hans Hagen
2009-07-21 11:19   ` Peter Münster
2009-07-21 14:55     ` Aditya Mahajan
2009-07-21 11:27 ` Peter Münster

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