Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using unicode-math with XeTeX and XITS fonts.

Instead of writing \mathcal, I want to use the unicode characters ๐“, ๐“‘, โ€ฆ, ๐“ฉ and have them render like \mathcal A, \mathcal B, โ€ฆ, \mathcal Z. These have codes U+1D4D0โ€“U+1D4E9 and are named "MATHEMATICAL BOLD SCRIPT CAPITAL Aโ€“Z". Despite their names, they display just like the regular calligraphic characters rendered through \mathcal, at least in the Free Serif font I am using.

I have been successful at having XeTeX render them as bold calligraphic characters rendered through \mathbfcal:

\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont[range={"1D4D0-"1D4E9},StylisticSet=1]{XITS Math}
\setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math}
\begin{document}
$ ๐“, \mathcal A, \mathbfcal A, \quad
  ๐““, \mathcal D, \mathbfcal D, \quad
  ๐“›, \mathcal L, \mathbfcal L, \quad
  ๐“Ÿ, \mathcal P, \mathbfcal P $
\end{document}

rendering of unicode characters against \mathcal and \mathbfcal

What can I do to remove their bold attribute, i.e., have XeTeX render them as regular, non-bold calligraphic letters, as if I were using \mathcal rather than \mathbfcal?

EDIT: I do not want to use ๐’œ instead of ๐“. I want to be able to access the math script alphabet through the unicode characters ๐’œ, โ„ฌ, โ€ฆ, ๐’ต, rendered as \mathscr A, \mathscr B, โ€ฆ, \mathscr Z while accessing the math calligraphic alphabet with StylisticSet=1 through ๐“, ๐“‘, โ€ฆ, ๐“ฉ, without the bold attribute.

share|improve this question
1  
You should be using ๐’œ not ๐“ U+1D49C not U+1D4D0 –  David Carlisle Oct 10 '13 at 15:58

1 Answer 1

up vote 6 down vote accepted

The Unicode math script alphabet starts at ๐’œ not ๐“ (U+1D49C not U+1D4D0) see for example the tables in the XML entities spec

Beware of the "holes" highlighted in those tables, where the script character is taken from the Basic plane, not 1Dxxx.

enter image description here

\documentclass{article}

\usepackage{unicode-math}
\setmathfont{xits-math.otf}

\begin{document}

\[ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\]

\[๐’œโ„ฌ๐’ž๐’Ÿโ„ฐโ„ฑ๐’ขโ„‹โ„๐’ฅ๐’ฆโ„’โ„ณ๐’ฉ๐’ช๐’ซ๐’ฌโ„›๐’ฎ๐’ฏ๐’ฐ๐’ฑ๐’ฒ๐’ณ๐’ด๐’ต \]

\end{document}
share|improve this answer
    
Thank you, but I do not have any trouble using the math script alphabet. It is the math calligraphic alphabet, accessible with StylisticSet=1, that I am trying to map ๐“, ๐“‘, โ€ฆ, ๐“ฉ to. EDIT: I still want to be able to use the math script alphabet with ๐’œ,โ€ฆ,๐’ต. –  Munger Oct 10 '13 at 17:58
    
@Munger ah sorry I misread the question then, although arguably you are not supposed to do that (Unicode opting not to distinguish between calligraphic and script) so by design if you choose the script stylistic variant you are supposed to use the non-bold slots. It would be easy to do the remapping just by setting the (extended) mathcodes of the bold script alphabet to \mathcal, I may do that later if no one else has answered –  David Carlisle Oct 10 '13 at 18:03
    
Oh, I didn't realize what I was trying to do might be a bad idea. In any case, I'd like to work it out. If you do not wish to spend too much time on this, I'd appreciate if you could point me to an example of how to do such mappings. I should then be able to work it out and post the solution here. –  Munger Oct 10 '13 at 18:14
    
@Munger well internally of course uniocde-math is doing something like that but its coding is a bit opaque last time I looked:-) I'd just do the classic tex thing, to make x be a sans-serif y you can do \mathcode`\x="8000 then {\catcode`\x\active\gdef x{\mathsf{y} and then just do that in a loop for teh whole alphabet –  David Carlisle Oct 10 '13 at 18:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.