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