[XeTeX] fonts for units in math mode
Faisal Moledina
faisal.moledina at gmail.com
Sun Jan 29 21:01:25 CET 2006
On 29-Jan-06, at 1:51 PM, Bruno Voisin wrote:
> You could try \; to create the desired space (Knuth uses \, in the
> TeXbook). Or \text{...} from the amsmath package, but this will use
> the text font which is precisely what you're wanting to avoid.
>
> Sorry, I'd forgotten to check that it should be included inside
> \AtBeginDocument, given fontspec.sty includes the corresponding
> code inside \AtBeginDocument. Thus you should try, I think:
>
> \AtBeginDocument{
> \SetSymbolFont{operators}{normal}{OT1}{cmr}{m}{n}
> \SetSymbolFont{operators}{bold} {OT1}{cmr}{bx}{n}
> \SetMathAlphabet{\mathrm}{normal}{OT1}{cmr}{m}{n}
> \SetMathAlphabet{\mathbf}{normal}{OT1}{cmr}{bx}{n}
> \SetMathAlphabet{\mathit}{normal}{OT1}{cmr}{m}{it}
> \SetMathAlphabet{\mathsf}{normal}{OT1}{cmss}{m}{n}
> \SetMathAlphabet{\mathtt}{normal}{OT1}{cmtt}{m}{n}
> \SetMathAlphabet{\mathrm}{bold} {OT1}{cmr}{bx}{n}
> \SetMathAlphabet{\mathbf}{bold} {OT1}{cmr}{bx}{n}
> \SetMathAlphabet{\mathit}{bold} {OT1}{cmr}{bx}{it}
> \SetMathAlphabet{\mathsf}{bold} {OT1}{cmss}{bx}{n}
> \SetMathAlphabet{\mathtt}{bold} {OT1}{cmtt}{bx}{n}}
I put the AtBeginDocument tag and it didn't work at first. I thought
I would try something else. I commented out the above section and
went back to my \usepackage[thinspace,thinqspace,textstyle]{SIunits}
declaration. I remember putting in the "textstyle" option because,
from what I understood, it would automatically follow the text that
surrounded the unit. Obviously this was not working as expected so I
removed the textstyle option. It still didn't work. And then I
uncommented the above section (\AtBeginDocument{..) and the fonts are
great. Now, all three methods for displaying F are displayed perfectly.
So, to recap, in fontspec.sty, are there defined fonts for math? I'm
asking out of the blue, but why should it be necessary to change the
math fonts back to Computer Modern for text in math to be displayed
properly? Also, does anyone know what the "textstyle" option for
SIunits is actually for? Lastly, are there better math fonts out there?
Merci for all the timely help Bruno.
Faisal
More information about the XeTeX
mailing list