1

I have drawn a custom diameter symbol in TikZ and now I need the correct unicode glyph (U+2300 ) in my document (pdftex) to provide the right copy-paste text in the pdf. I've found that the \diameter symbol from the stix package produces the right glyph (testable at fileformat.info, it should say "DIAMETER SIGN" as the only result), but in my document stix produces many errors (Too many symbol fonts declared. ...ont{arrows2} {LS1}{stixsf} {m}{it}) for which I wasn't able to find a fix.

So, how can I get the needed unicode glyph in my document with pdftex without using stix? No other symbol package I've tested produces the right glyph.

edit: I've looked into stix.sty and tried to use the definition from there, but this creates the wrong symbol ...

\documentclass{standalone}
\DeclareMathSymbol{\diam}{\mathord}{symbols}{"60}
\begin{document}
\(\diam\) % should always produce U+2300 
\end{document}

enter image description here

This answer might apply here, but I couldn't get it to work for me.

  • Maybe you can provide a minimal but complete code example. – Dr. Manuel Kuehner Apr 3 '17 at 22:11
  • @Dr. Manuel Kuehner: Done – lblb Apr 3 '17 at 22:12
1

You don't need to set up a math font for just one symbol.

\documentclass{standalone}
\usepackage{amsmath}

\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\DeclareRobustCommand{\diameter}{%
  \text{\usefont{LS1}{stixscr}{m}{n}\symbol{"60}}%
}

\begin{document}
\(\diameter\) % something producing the U+2300 glyph
\end{document}

enter image description here

If I copy from the PDF and paste it in http://r12a.github.io/apps/conversion/ I get

enter image description here

  • Thank you. Time for me to educate myself more on the topic instead of bothering others. – lblb Apr 3 '17 at 22:50
  • 1
    @lblb Oh, don't worry! It's fun to do these chores! ;-) – egreg Apr 3 '17 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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