[XeTeX] unicode-math package and \UnicodeMathSymbol command

Ed Morehouse emorehouse at wesleyan.edu
Mon Jun 22 00:43:05 CEST 2009


Nicolas Vaughan <nivaca at ...> writes:

> 
> 
> Can you send a minimal example/Nicolas

here you go:

\documentclass{article}

\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase}
\setromanfont{Latin Modern Roman}

\usepackage[math-style=TeX]{unicode-math}
\setmathfont{Cambria Math}

\UnicodeMathSymbol{"0003A}{\colon}{\mathrel}{colon}% default:\mathpunct
\UnicodeMathSymbol{"0007C}{\vert}{\mathrel}{vertical bar}% default: \mathord

\begin{document}

	the colon and vertical bar below should have relation spacing,
	which is fairly wide and symmetrical.
	\\
	for comparison, vertical ellipsis ("022EE) is also a very narrow glyph
	but is declared a relation by default,
	so should have the same spacing:
	$$
		f : X → Y \quad ⟹ \quad f ^{-1} : 2 ^Y → 2 ^X = B ⟼ \{x ∈ X | f (x) ∈ B\}
	$$
	$$
		f ⋮ X → Y \quad ⟹ \quad f ^{-1} ⋮ 2 ^Y → 2 ^X = B ⟼ \{x ∈ X ⋮ f (x) ∈ B\}
	$$
\end{document}





More information about the XeTeX mailing list