[lltx] unicode-math: [range=…] in-document
Arno Trautmann
Arno.Trautmann at gmx.de
Wed Sep 21 14:46:25 CEST 2011
Ulrike Fischer wrote:
> Am Wed, 21 Sep 2011 12:17:50 +0200 schrieb Arno Trautmann:
>
>> Hi all,
>>
>> the following document throws an error:
>>
>> \documentclass{minimal}
>> \usepackage{unicode-math}
>> \setmathfont{Latin Modern Math}
>> \begin{document}
>> \setmathfont[range=\oiint]{XITS math}
>> \[ ∫ \oiint\]
>> \end{document}
>>
>> ./test.tex:7: Missing number, treated as zero.
>> <to be read again>
>> \oiint
>> l.7 \setmathfont[range=\oiint]{XITS math}
>>
>> ?
>>
>> It works fine if the second \setmathfont is in the preamble. (I want to
>> change the math font for some glyphs only in the document, so I cannot
>> put it in the preamble.)
>> Is it not possible in prinicple to load a range of a math font
>> in-document or is it a bug? Maybe something with parsing
>> numbers/arguments in the preablem vs. in-document?
>
> At \begin{document} unicode-math setups the various math
> definitions, such definitions can be quite complicated and so you no
> longer can't use the commands as numbers. That's not very surprising
> (actually I find it quite impressing that you can use them this way
> in the preamble).
Indeed, I love this feature. But still haven't looked into the
implementation, I have to admit …
> But you can use in the document numbers:
>
> \documentclass{article}
> \usepackage{unicode-math}
> \setmathfont{Latin Modern Math}
> \begin{document}
> \[\plus \oiint \]
> \setmathfont[range={"0002B, "0222F}]{XITS math}
> \[\plus \oiint \]
> \end{document}
>
> (you can find the numbers in unicode-math-table.tex).
Ok, that will help me, thank you!
cheers
Arno
More information about the lualatex-dev
mailing list