[XeTeX] Diameter symbol

Will Robertson wspr81 at gmail.com
Mon Mar 15 23:50:12 CET 2010


On 2010-03-16 00:31:10 +1030, David Cottenden 
<d.cottenden at ucl.ac.uk> said:

>> Or are you looking for EMPTY SET, ∅, at U+2205? DIAMETER SIGN, ⌀, is
>> at U+2300.
> The latter is the one that I am after, but I know that my main body font
> doesn't include it. Is there a decent font which does? I'm looking to
> match with Chaparral Pro, if that's possible.


If you're using XeTeX (and why wouldn't you be asking on this list -- ! 
-- sorry I didn't twig this answer straight away), you can just use a 
text glyph directly:

\documentclass{article}
\usepackage{fontspec,siunitx}
\begin{document}
\newfontface\symbolsfont{TeX Gyre Pagella}
\newcommand\diametersymbol{\mbox{\symbolsfont \char"2300}}
% (Or just type the symbol in there instead of the \char nonsense.)
\newcommand\diam{\diametersymbol\,}
The cylinder has dimensions \diam\SI{2x3}{m}.\par
(Not sure how that spacing should look, exactly; hand-tune it for the font.)
\end{document}

Hope this helps,
Will




More information about the XeTeX mailing list