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

Reply via email to