* Proposal for math mappings
@ 2010-12-10 4:49 Aditya Mahajan
2010-12-10 12:41 ` Vladimir Lomov
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Aditya Mahajan @ 2010-12-10 4:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2770 bytes --]
This is a proposal for a new way of selecting math mappings in MkIV. I want
to get input from other math users whether this syntax would take care of all
scenarios or not.
There are five different ranges in mathematics:
- digits (0..9)
- lower case Latin (abc..z)
- upper case Latin (ABC..Z)
- lower case Greek (αβγ..ζ)
- upper case Greek (ΑΒΓ..Z)
A user may want to control what each range is mapped to. So, I suggest a setup
command
\setupmathmappings
[
digits={style,alternative},
lclatin={style,alternative},
uclatin={style,alternative},
lcgreek={style,alternative},
ucgreek={style,alternative},
]
where the options for style are
normal, bold
while the options for alternative are
normal, italic, sans, sansitalic, blackboard, script
This command will the mappings for each range. **NOTE**: All combinations are not valid.
A companion command
\definemathmappings
[whatever]
[....]
can be used to define multiple mappings. These mappings can be used by
\setupmathmappings[whatever]
(An alternative is that these mappings are activated using \whatever ...)
For example, we can define a command to typeset vectors using
\definemathmappings
[vectors]
[ digits={bold,normal},
lclatin={bold,normal},
uclatin={bold,normal},
lcgreek={bold,normal},
ucgreek={bold,normal}]
\def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
If later, we want to represent vectors as sans serif, we can use
\definemathmappings
[vectors]
[ digits={normal,sans},
lclatin={normal,sans},
uclatin={normal,sans},
lcgreek={normal,sans},
ucgreek={normal,sans}]
This interface makes it easy to switch math fonts for disiplines that want
different style for different alphabet ranges.
It is relatively easy to implement the above interface. All we need is
some bookkeeping to set the right attributes. The default math mapping
commands can be reimplmeneted using \definemappings. Before implementing
this, I want to ask the opinion of other math users.
Would the above interface take care of different use cases, or is it missing
something?
Finally, I am not too happy with the syntax. There are only a few ConTeXt
commands in which the keys take a pair of values. Another option is to allow all
12 valid options
normal, italic, sans, sansitalic, blackboard, script,
bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms.
Which way of specifying the keys do you prefer?
Aditya
[-- Attachment #2: Type: text/plain, Size: 486 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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 4:49 Proposal for math mappings Aditya Mahajan
@ 2010-12-10 12:41 ` Vladimir Lomov
2010-12-10 15:29 ` Aditya Mahajan
2010-12-10 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-11 16:28 ` Aditya Mahajan
2 siblings, 1 reply; 9+ messages in thread
From: Vladimir Lomov @ 2010-12-10 12:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi.
** Aditya Mahajan [2010-12-09 23:49:26 -0500]:
> This is a proposal for a new way of selecting math mappings in MkIV. I want
> to get input from other math users whether this syntax would take care of all
> scenarios or not.
>
> There are five different ranges in mathematics:
> - digits (0..9)
> - lower case Latin (abc..z)
> - upper case Latin (ABC..Z)
> - lower case Greek (αβγ..ζ)
> - upper case Greek (ΑΒΓ..Z)
Should be: αβγ..ω
and ΑΒΓ..Ω
> A user may want to control what each range is mapped to. So, I suggest a setup
> command
>
> \setupmathmappings
> [
> digits={style,alternative},
> lclatin={style,alternative},
> uclatin={style,alternative},
> lcgreek={style,alternative},
> ucgreek={style,alternative},
> ]
>
> where the options for style are
>
> normal, bold
>
> while the options for alternative are
>
> normal, italic, sans, sansitalic, blackboard, script
>
> This command will the mappings for each range. **NOTE**: All combinations are not valid.
>
> A companion command
>
> \definemathmappings
> [whatever]
> [....]
>
> can be used to define multiple mappings. These mappings can be used by
>
> \setupmathmappings[whatever]
>
> (An alternative is that these mappings are activated using \whatever ...)
>
> For example, we can define a command to typeset vectors using
>
> \definemathmappings
> [vectors]
> [ digits={bold,normal},
> lclatin={bold,normal},
> uclatin={bold,normal},
> lcgreek={bold,normal},
> ucgreek={bold,normal}]
>
> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
Is it should be
\def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}}
?
>
> If later, we want to represent vectors as sans serif, we can use
>
>
> \definemathmappings
> [vectors]
> [ digits={normal,sans},
> lclatin={normal,sans},
> uclatin={normal,sans},
> lcgreek={normal,sans},
> ucgreek={normal,sans}]
>
> This interface makes it easy to switch math fonts for disiplines that want
> different style for different alphabet ranges.
>
> It is relatively easy to implement the above interface. All we need
> is some bookkeeping to set the right attributes. The default math
> mapping commands can be reimplmeneted using \definemappings. Before
> implementing this, I want to ask the opinion of other math users.
>
> Would the above interface take care of different use cases, or is it missing
> something?
IMHO, style is already used so it is normal.
> Finally, I am not too happy with the syntax. There are only a few ConTeXt
> commands in which the keys take a pair of values. Another option is to allow all
> 12 valid options
>
> normal, italic, sans, sansitalic, blackboard, script,
> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
This very depends on used fonts.
> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms.
>
> Which way of specifying the keys do you prefer?
>
> Aditya
Actually I don't get what you try to do. I thought that 'font
switching' command should take care of font switching either in math or
text modes (if typescript is set properly). Right now the only good
example of usage of proposed mechanism is \VEC command (for vectors and etc).
---
WBR, Vladimir Lomov.
--
I share the belief of many of my contemporaries that the spiritual crisis
pervading all spheres of Western industrial society can be remedied only
by a change in our world view. We shall have to shift from the materialistic,
dualistic belief that people and their environment are separate, toward a
new conciousness of an all-encompassing reality, which embraces the
experiencing ego, a reality in which people feel their oneness with animate
nature and all of creation.
- Dr. Albert Hoffman
___________________________________________________________________________________
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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 4:49 Proposal for math mappings Aditya Mahajan
2010-12-10 12:41 ` Vladimir Lomov
@ 2010-12-10 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-10 15:22 ` Aditya Mahajan
2010-12-11 16:28 ` Aditya Mahajan
2 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2010-12-10 13:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Fri, 10 Dec 2010 05:49:26 +0100, Aditya Mahajan <adityam@umich.edu> wrote:
> This is a proposal for a new way of selecting math mappings in MkIV. I want
> to get input from other math users whether this syntax would take care of all
> scenarios or not.
>
> There are five different ranges in mathematics:
> - digits (0..9)
> - lower case Latin (abc..z)
> - upper case Latin (ABC..Z)
> - lower case Greek (αβγ..ζ)
> - upper case Greek (ΑΒΓ..Z)
Just to confirm -
- 0-9 are 48-57 in ASCII
- a-z = 97-122
- A-Z = 65-90
- LC Greek = ?-? (given by \alpha to \omega range)
- UC Greek = ?-? (given by \Alpha to \Omega range)
- Is that right?
> A user may want to control what each range is mapped to. So, I suggest a setup
> command
>
> \setupmathmappings
> [
> digits={style,alternative},
> lclatin={style,alternative},
> uclatin={style,alternative},
> lcgreek={style,alternative},
> ucgreek={style,alternative},
> ]
>
OK, it might be useful when one wants e.g. ALL Greek letters to be printed somehow, e.g. bold.
I don't think that the basic criterion for style in math is the (alphabet) range, it's rather the meaning of maths (variable/parameter/vector/tensor/operator (e.g. Nabla operator)). But OK -
> where the options for style are
>
> normal, bold
>
> while the options for alternative are
>
> normal, italic, sans, sansitalic, blackboard, script
>
> This command will the mappings for each range. **NOTE**: All combinations are not valid.
>
> A companion command
>
> \definemathmappings
> [whatever]
> [....]
>
> can be used to define multiple mappings. These mappings can be used by
>
> \setupmathmappings[whatever]
>
> (An alternative is that these mappings are activated using \whatever ...)
>
> For example, we can define a command to typeset vectors using
>
> \definemathmappings
> [vectors]
> [ digits={bold,normal},
> lclatin={bold,normal},
> uclatin={bold,normal},
> lcgreek={bold,normal},
> ucgreek={bold,normal}]
>
> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
Or rather the following (?): \def\VEC#1{\groupedcommand{\setupmathmappings[vector]}{#1}}
> If later, we want to represent vectors as sans serif, we can use
>
> \definemathmappings
> [vectors]
> [ digits={normal,sans},
> lclatin={normal,sans},
> uclatin={normal,sans},
> lcgreek={normal,sans},
> ucgreek={normal,sans}]
>
This kind of switching would be great.
> This interface makes it easy to switch math fonts for disciplines that want
> different style for different alphabet ranges.
>
> It is relatively easy to implement the above interface. All we need is
> some bookkeeping to set the right attributes. The default math mapping
> commands can be reimplmeneted using \definemappings. Before implementing
> this, I want to ask the opinion of other math users.
>
> Would the above interface take care of different use cases, or is it missing
> something?
It looks good. Some examples would be needed, starting at simple ones and ending with "wildly" switching math formulas.
> Finally, I am not too happy with the syntax. There are only a few ConTeXt
> commands in which the keys take a pair of values. Another option is to allow all
> 12 valid options
>
> normal, italic, sans, sansitalic, blackboard, script,
> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
>
> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms.
>
> Which way of specifying the keys do you prefer?
Personally, no matter. Programming "clarity" should be kept at most - so it's up to you. When some samples are provided, someone will follow them.
Thank for your effort.
Lukas
>
> Aditya
--
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2010-12-10 15:22 ` Aditya Mahajan
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2010-12-10 15:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4565 bytes --]
On Fri, 10 Dec 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> On Fri, 10 Dec 2010 05:49:26 +0100, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> This is a proposal for a new way of selecting math mappings in MkIV. I want
>> to get input from other math users whether this syntax would take care of
>> all
>> scenarios or not.
>>
>> There are five different ranges in mathematics:
>> - digits (0..9)
>> - lower case Latin (abc..z)
>> - upper case Latin (ABC..Z)
>> - lower case Greek (αβγ..ζ)
>> - upper case Greek (ΑΒΓ..Z)
>
> Just to confirm -
>
> - 0-9 are 48-57 in ASCII
> - a-z = 97-122
> - A-Z = 65-90
> - LC Greek = ?-? (given by \alpha to \omega range)
> - UC Greek = ?-? (given by \Alpha to \Omega range)
>
> - Is that right?
Yes. In addition, Greek will work even if you key in 0x0391-0x03C9.
>> A user may want to control what each range is mapped to. So, I suggest a
>> setup
>> command
>>
>> \setupmathmappings
>> [
>> digits={style,alternative},
>> lclatin={style,alternative},
>> uclatin={style,alternative},
>> lcgreek={style,alternative},
>> ucgreek={style,alternative},
>> ]
>>
>
> OK, it might be useful when one wants e.g. ALL Greek letters to be printed
> somehow, e.g. bold.
>
> I don't think that the basic criterion for style in math is the (alphabet)
> range, it's rather the meaning of maths
> (variable/parameter/vector/tensor/operator (e.g. Nabla operator)). But OK -
>
>> where the options for style are
>>
>> normal, bold
>>
>> while the options for alternative are
>>
>> normal, italic, sans, sansitalic, blackboard, script
>>
>> This command will the mappings for each range. **NOTE**: All combinations
>> are not valid.
>>
>> A companion command
>>
>> \definemathmappings
>> [whatever]
>> [....]
>>
>> can be used to define multiple mappings. These mappings can be used by
>>
>> \setupmathmappings[whatever]
>>
>> (An alternative is that these mappings are activated using \whatever ...)
>>
>> For example, we can define a command to typeset vectors using
>>
>> \definemathmappings
>> [vectors]
>> [ digits={bold,normal},
>> lclatin={bold,normal},
>> uclatin={bold,normal},
>> lcgreek={bold,normal},
>> ucgreek={bold,normal}]
>>
>> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
>
> Or rather the following (?):
> \def\VEC#1{\groupedcommand{\setupmathmappings[vector]}{#1}}
I haven't tested this, but I think that my definition should work (after
changing vector -> vectors). The point of grouped command is that you can
use
\VEC{ABC}
as well as
{\VEC ABC}
If you only need the first variant, you can simply define
\def\VEC#1{{\setupmathmappings[vectors]#1}}
>> If later, we want to represent vectors as sans serif, we can use
>>
>> \definemathmappings
>> [vectors]
>> [ digits={normal,sans},
>> lclatin={normal,sans},
>> uclatin={normal,sans},
>> lcgreek={normal,sans},
>> ucgreek={normal,sans}]
>>
>
> This kind of switching would be great.
>
>> This interface makes it easy to switch math fonts for disciplines that want
>> different style for different alphabet ranges.
>>
>> It is relatively easy to implement the above interface. All we need is
>> some bookkeeping to set the right attributes. The default math mapping
>> commands can be reimplmeneted using \definemappings. Before implementing
>> this, I want to ask the opinion of other math users.
>>
>> Would the above interface take care of different use cases, or is it
>> missing
>> something?
>
> It looks good. Some examples would be needed, starting at simple ones and
> ending with "wildly" switching math formulas.
>
>> Finally, I am not too happy with the syntax. There are only a few ConTeXt
>> commands in which the keys take a pair of values. Another option is to
>> allow all
>> 12 valid options
>>
>> normal, italic, sans, sansitalic, blackboard, script,
>> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
>>
>> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as
>> synonmyms.
>>
>> Which way of specifying the keys do you prefer?
>
> Personally, no matter. Programming "clarity" should be kept at most - so it's
> up to you. When some samples are provided, someone will follow them.
I will provide a more detailed example.
Aditya
[-- Attachment #2: Type: text/plain, Size: 486 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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 12:41 ` Vladimir Lomov
@ 2010-12-10 15:29 ` Aditya Mahajan
2010-12-11 15:24 ` Otared Kavian
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2010-12-10 15:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3859 bytes --]
On Fri, 10 Dec 2010, Vladimir Lomov wrote:
>
> ** Aditya Mahajan [2010-12-09 23:49:26 -0500]:
>
>> This is a proposal for a new way of selecting math mappings in MkIV. I want
>> to get input from other math users whether this syntax would take care of all
>> scenarios or not.
>>
>> There are five different ranges in mathematics:
>> - digits (0..9)
>> - lower case Latin (abc..z)
>> - upper case Latin (ABC..Z)
>> - lower case Greek (αβγ..ζ)
>> - upper case Greek (ΑΒΓ..Z)
> Should be: αβγ..ω
> and ΑΒΓ..Ω
Thanks. I need to learn my Greek :)
>> A user may want to control what each range is mapped to. So, I suggest a setup
>> command
>>
>> \setupmathmappings
>> [
>> digits={style,alternative},
>> lclatin={style,alternative},
>> uclatin={style,alternative},
>> lcgreek={style,alternative},
>> ucgreek={style,alternative},
>> ]
>>
>> where the options for style are
>>
>> normal, bold
>>
>> while the options for alternative are
>>
>> normal, italic, sans, sansitalic, blackboard, script
>>
>> This command will the mappings for each range. **NOTE**: All combinations are not valid.
>>
>> A companion command
>>
>> \definemathmappings
>> [whatever]
>> [....]
>>
>> can be used to define multiple mappings. These mappings can be used by
>>
>> \setupmathmappings[whatever]
>>
>> (An alternative is that these mappings are activated using \whatever ...)
>>
>> For example, we can define a command to typeset vectors using
>>
>> \definemathmappings
>> [vectors]
>> [ digits={bold,normal},
>> lclatin={bold,normal},
>> uclatin={bold,normal},
>> lcgreek={bold,normal},
>> ucgreek={bold,normal}]
>>
>> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
> Is it should be
> \def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}}
> ?
Indeed. Thanks.
>> If later, we want to represent vectors as sans serif, we can use
>>
>>
>> \definemathmappings
>> [vectors]
>> [ digits={normal,sans},
>> lclatin={normal,sans},
>> uclatin={normal,sans},
>> lcgreek={normal,sans},
>> ucgreek={normal,sans}]
>>
>> This interface makes it easy to switch math fonts for disiplines that want
>> different style for different alphabet ranges.
>>
>> It is relatively easy to implement the above interface. All we need
>> is some bookkeeping to set the right attributes. The default math
>> mapping commands can be reimplmeneted using \definemappings. Before
>> implementing this, I want to ask the opinion of other math users.
>>
>> Would the above interface take care of different use cases, or is it missing
>> something?
> IMHO, style is already used so it is normal.
>> Finally, I am not too happy with the syntax. There are only a few ConTeXt
>> commands in which the keys take a pair of values. Another option is to allow all
>> 12 valid options
>>
>> normal, italic, sans, sansitalic, blackboard, script,
>> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
> This very depends on used fonts.
I am assuming a complete opentype math font.
>> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms.
>>
>> Which way of specifying the keys do you prefer?
>>
> Actually I don't get what you try to do.
I'll try to explain better in a later post.
> I thought that 'font
> switching' command should take care of font switching either in math or
> text modes (if typescript is set properly).
I am proposing to separate out math font switching from text mode font
switching.
> Right now the only good
> example of usage of proposed mechanism is \VEC command (for vectors and etc).
More on this later.
Aditya
[-- Attachment #2: Type: text/plain, Size: 486 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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 15:29 ` Aditya Mahajan
@ 2010-12-11 15:24 ` Otared Kavian
0 siblings, 0 replies; 9+ messages in thread
From: Otared Kavian @ 2010-12-11 15:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear Aditya,
I do think that your proposal would be of great help in writing mathematics.
Indeed the use of different alphabets, or range of characters with different styles, depend on the fields of mathematics, so having a \setup command like the one you suggest would be wonderful.
However, IMHO, the new setup command should follow the general rules of ConTeXt commands for setting up different environments. So maybe the option of having all the 12 forms, as you suggest,
normal, italic, sans, sansitalic, blackboard, script,
bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
would be more homogeneous with the usual style choice.
Best regards: OK
On 10 déc. 2010, at 16:29, Aditya Mahajan wrote:
> On Fri, 10 Dec 2010, Vladimir Lomov wrote:
>>
>> ** Aditya Mahajan [2010-12-09 23:49:26 -0500]:
>>
>>> This is a proposal for a new way of selecting math mappings in MkIV. I want
>>> to get input from other math users whether this syntax would take care of all
>>> scenarios or not.
>>>
>>> There are five different ranges in mathematics:
>>> - digits (0..9)
>>> - lower case Latin (abc..z)
>>> - upper case Latin (ABC..Z)
>>> - lower case Greek (αβγ..ζ)
>>> - upper case Greek (ΑΒΓ..Z)
>> Should be: αβγ..ω
>> and ΑΒΓ..Ω
>
> Thanks. I need to learn my Greek :)
>
>>> A user may want to control what each range is mapped to. So, I suggest a setup
>>> command
>>>
>>> \setupmathmappings
>>> [
>>> digits={style,alternative},
>>> lclatin={style,alternative},
>>> uclatin={style,alternative},
>>> lcgreek={style,alternative},
>>> ucgreek={style,alternative},
>>> ]
>>>
>>> where the options for style are
>>>
>>> normal, bold
>>>
>>> while the options for alternative are
>>>
>>> normal, italic, sans, sansitalic, blackboard, script
>>>
>>> This command will the mappings for each range. **NOTE**: All combinations are not valid.
>>>
>>> A companion command
>>>
>>> \definemathmappings
>>> [whatever]
>>> [....]
>>>
>>> can be used to define multiple mappings. These mappings can be used by
>>>
>>> \setupmathmappings[whatever]
>>>
>>> (An alternative is that these mappings are activated using \whatever ...)
>>>
>>> For example, we can define a command to typeset vectors using
>>>
>>> \definemathmappings
>>> [vectors]
>>> [ digits={bold,normal},
>>> lclatin={bold,normal},
>>> uclatin={bold,normal},
>>> lcgreek={bold,normal},
>>> ucgreek={bold,normal}]
>>>
>>> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
>> Is it should be
>> \def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}}
>> ?
>
> Indeed. Thanks.
>
>>> If later, we want to represent vectors as sans serif, we can use
>>>
>>>
>>> \definemathmappings
>>> [vectors]
>>> [ digits={normal,sans},
>>> lclatin={normal,sans},
>>> uclatin={normal,sans},
>>> lcgreek={normal,sans},
>>> ucgreek={normal,sans}]
>>>
>>> This interface makes it easy to switch math fonts for disiplines that want
>>> different style for different alphabet ranges.
>>>
>>> It is relatively easy to implement the above interface. All we need
>>> is some bookkeeping to set the right attributes. The default math
>>> mapping commands can be reimplmeneted using \definemappings. Before
>>> implementing this, I want to ask the opinion of other math users.
>>>
>>> Would the above interface take care of different use cases, or is it missing
>>> something?
>> IMHO, style is already used so it is normal.
>>> Finally, I am not too happy with the syntax. There are only a few ConTeXt
>>> commands in which the keys take a pair of values. Another option is to allow all
>>> 12 valid options
>>>
>>> normal, italic, sans, sansitalic, blackboard, script,
>>> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
>
>> This very depends on used fonts.
>
> I am assuming a complete opentype math font.
>
>>> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms.
>>>
>>> Which way of specifying the keys do you prefer?
>>>
>> Actually I don't get what you try to do.
>
> I'll try to explain better in a later post.
>
>> I thought that 'font
>> switching' command should take care of font switching either in math or
>> text modes (if typescript is set properly).
>
> I am proposing to separate out math font switching from text mode font
> switching.
>
>> Right now the only good
>> example of usage of proposed mechanism is \VEC command (for vectors and etc).
>
> More on this later.
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-10 4:49 Proposal for math mappings Aditya Mahajan
2010-12-10 12:41 ` Vladimir Lomov
2010-12-10 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2010-12-11 16:28 ` Aditya Mahajan
2010-12-12 16:15 ` Procházka Lukáš
2 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2010-12-11 16:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4881 bytes --]
I'll try once more to explain the setup.
If I understand the unicode philosopy correctly, then we do not any font
switching macros in math. If we want math italic A, we can simply type
0x1D434; if we want math bold A, we can type 0x1D400; and so on.
One difficulty with this approach is that it is not easy to type (and see)
these characters in an editor. One way to circumvent this, as is done by
the latex unicode-math package, is to define a macro for each symbol:
\mathitA, \mathbfA, etc.
Even if we define such macros, writing such macros is inconvinient. A more
nature way is to write $A {\bf A}$ rather than $\mathitA \mathbfA$ etc.
Traditionally, commands like \bf, \it, etc are font switches. However, in
unicode math, rather than font switches, these macros are simply input
mapping commands. Thus, by default, 0x0041 (latin A) maps to 0x1D434 (math
italic A), and so on. If \bf is active, 0x0041 (latin A) maps to 0x1D400
(math bold A), and so on.
Roughly speaking, this is how \bf. \it, \bi, \cal, \Bbd, etc work in the
background. However, at present these mappings are unsatisfactory. For
example, by default, 0x03B1 (Greek alpha) maps 0x1D6FC (Math italic small
alpha), while 0xO391 (Greek capital Alpha) maps to itself. What should
these mappings be when \bf is active? Or when \bi is active?
The trouble with the current implementation of \bf, \bi, \cal, etc is that
these mappings are not explicitly specified. My proposal is to allow users
to customize these mappings.
I agree that digits, upper and lower case latin and greek does not capture
all mathematic characters for which such mappings are needed. Similar
mappings might also be needed for some symbols like nabla (are there other
such symbols?). These can also be added as a key like
nabla={normal,italic}
or
nabla={bold,normal}
Hopefully, the above explanation makes more sense.
Aditya
On Thu, 9 Dec 2010, Aditya Mahajan wrote:
> This is a proposal for a new way of selecting math mappings in MkIV. I want
> to get input from other math users whether this syntax would take care of all
> scenarios or not.
>
> There are five different ranges in mathematics:
> - digits (0..9)
> - lower case Latin (abc..z)
> - upper case Latin (ABC..Z)
> - lower case Greek (αβγ..ζ)
> - upper case Greek (ΑΒΓ..Z)
>
> A user may want to control what each range is mapped to. So, I suggest a
> setup
> command
>
> \setupmathmappings
> [
> digits={style,alternative},
> lclatin={style,alternative},
> uclatin={style,alternative},
> lcgreek={style,alternative},
> ucgreek={style,alternative},
> ]
>
> where the options for style are
>
> normal, bold
>
> while the options for alternative are
>
> normal, italic, sans, sansitalic, blackboard, script
>
> This command will the mappings for each range. **NOTE**: All combinations are
> not valid.
>
> A companion command
>
> \definemathmappings
> [whatever]
> [....]
>
> can be used to define multiple mappings. These mappings can be used by
>
> \setupmathmappings[whatever]
>
> (An alternative is that these mappings are activated using \whatever ...)
>
> For example, we can define a command to typeset vectors using
>
> \definemathmappings
> [vectors]
> [ digits={bold,normal},
> lclatin={bold,normal},
> uclatin={bold,normal},
> lcgreek={bold,normal},
> ucgreek={bold,normal}]
>
> \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}}
>
> If later, we want to represent vectors as sans serif, we can use
>
>
> \definemathmappings
> [vectors]
> [ digits={normal,sans},
> lclatin={normal,sans},
> uclatin={normal,sans},
> lcgreek={normal,sans},
> ucgreek={normal,sans}]
>
> This interface makes it easy to switch math fonts for disiplines that want
> different style for different alphabet ranges.
>
> It is relatively easy to implement the above interface. All we need is some
> bookkeeping to set the right attributes. The default math mapping commands
> can be reimplmeneted using \definemappings. Before implementing this, I want
> to ask the opinion of other math users.
>
> Would the above interface take care of different use cases, or is it missing
> something?
>
> Finally, I am not too happy with the syntax. There are only a few ConTeXt
> commands in which the keys take a pair of values. Another option is to allow
> all
> 12 valid options
>
> normal, italic, sans, sansitalic, blackboard, script,
> bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript
>
> with the variants sansitalic-italicsans, boldsans-sansbold, etc. as
> synonmyms.
>
> Which way of specifying the keys do you prefer?
>
> Aditya
[-- Attachment #2: Type: text/plain, Size: 486 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] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-11 16:28 ` Aditya Mahajan
@ 2010-12-12 16:15 ` Procházka Lukáš
2010-12-13 14:15 ` Aditya Mahajan
0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš @ 2010-12-12 16:15 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello, thanks for the deeper explanation -
On Sat, 11 Dec 2010 17:28:55 +0100, Aditya Mahajan <adityam@umich.edu> wrote:
> I agree that digits, upper and lower case latin and greek does not capture
> all mathematic characters for which such mappings are needed. Similar
> mappings might also be needed for some symbols like nabla (are there other
> such symbols?). These can also be added as a key like
>
> nabla={normal,italic}
>
> or
>
> nabla={bold,normal}
I came to work with some similar operators in differential geometry, so as I remember or I can find:
grad (also horizontally flipped greek Delta)
div (looking like normal greek Delta)
curl, rot - the same as div (but in R3 space, whilst div is for R1)
Laplace operator
Lukas
>
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Proposal for math mappings
2010-12-12 16:15 ` Procházka Lukáš
@ 2010-12-13 14:15 ` Aditya Mahajan
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2010-12-13 14:15 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1541 bytes --]
On Sun, 12 Dec 2010, Procházka Lukáš wrote:
> Hello, thanks for the deeper explanation -
>
> On Sat, 11 Dec 2010 17:28:55 +0100, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> I agree that digits, upper and lower case latin and greek does not capture
>> all mathematic characters for which such mappings are needed. Similar
>> mappings might also be needed for some symbols like nabla (are there other
>> such symbols?). These can also be added as a key like
>>
>> nabla={normal,italic}
>>
>> or
>>
>> nabla={bold,normal}
>
> I came to work with some similar operators in differential geometry, so as I
> remember or I can find:
>
> grad (also horizontally flipped greek Delta)
> div (looking like normal greek Delta)
> curl, rot - the same as div (but in R3 space, whilst div is for R1)
> Laplace operator
Unlike Nabla, these characters do not have any bold or sans-serif
variants, so it does not make sense to define math-mappings for them.
The only other character that I could find with multiple alternatives is
the partial symbol. So, I suggest the following macro:
\definemathmappings % and \setupmathmappings
[....]
[digits=...,
uclatin=....,
lclatin=....,
ucgreek=...,
lcgreek=...,
nabla=...,
partial=...]
Other symbols (blackboard sum, differential operator, etc) are better
handled by a dedicated macro rather than input mappings.
If there are no other concerns, Hans, Mojca, and I can take this offline.
Aditya
[-- Attachment #2: Type: text/plain, Size: 486 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] 9+ messages in thread
end of thread, other threads:[~2010-12-13 14:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 4:49 Proposal for math mappings Aditya Mahajan
2010-12-10 12:41 ` Vladimir Lomov
2010-12-10 15:29 ` Aditya Mahajan
2010-12-11 15:24 ` Otared Kavian
2010-12-10 13:49 ` Procházka Lukáš Ing. - Pontex s. r. o.
2010-12-10 15:22 ` Aditya Mahajan
2010-12-11 16:28 ` Aditya Mahajan
2010-12-12 16:15 ` Procházka Lukáš
2010-12-13 14:15 ` Aditya Mahajan
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).