1

I get this error:

Missing character: There is no ⇒ (U+21D2) in font [lmmono12-regular]:!

I use xelatex and the package unicode-math as suggested at

Entering Unicode characters in LaTeX

Should I install another font? I use Ubuntu 22.04 and texlive.

Gergely
  • 1,065
  • 1
  • 8
  • 17
  • 1
    Sounds as if you try to use math characters in a non-math font (lmmono). Can you provide a small example of what you do? – mickep Jun 05 '23 at 10:05
  • Not really, I use the LaTeX sources here: https://studentnet.cs.manchester.ac.uk/pgr/symposium/posters.php and a verbatim part where I would use unicode math input. – Gergely Jun 05 '23 at 10:12
  • You presumbly have something like \texttt{⇒} so unicode-math is not involved (verbatim is same issue) – David Carlisle Jun 05 '23 at 10:13
  • I have Isabelle theory input which contains the Unicode symbol – Gergely Jun 05 '23 at 10:19

1 Answers1

4

If you have a monospace font with the character you do not need math at all.

\documentclass{article}

\usepackage{fontspec} \setmonofont{Noto Sans Mono} \begin{document}

\begin{verbatim}

a ⇒ b → α

\end{verbatim} \end{document}

(but Noto Sans Mono doesn't have the arrow either)

so you can insert math:

enter image description here

\documentclass{article}

\usepackage{unicode-math} \usepackage{newunicodechar} \newunicodechar{⇒}{\makebox[1em]{$⇒$}} \newunicodechar{α}{\makebox[1em]{$α$}} \begin{document}

\begin{verbatim}

a ⇒ b → α

\end{verbatim} \end{document}

David Carlisle
  • 757,742