# Missing Glyph with fontspec, XeTeX and LyX

I'm getting the error for missing glyphs in LyX using XeTeX with fontspec on Windows. The error is Missing character: There is no ^^C in font [lmroman10-regular]:mapping=tex-text;!

The wierf thing is that the font LM Roman 10 actually supports the Lambda Character (https://fonts2u.com/lmroman10-regular.font).

The WME in TeX is:

% Preview source code

%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{fontspec}

\makeatother

\usepackage{babel}
\begin{document}
$\mathrm{\Lambda}$
\end{document}


The WME in LyX is just adding \usepackage{fontspec} to the preamble, and writing $\mathrm{\Lambda}$ in the body of the document.

EDIT: Also happens without fontenc:

% Preview source code

%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\begin{document}
$\mathrm{\Lambda}$
\end{document}


EDIT 2: Verified that it happend also on Ubuntu.

Thanks!

• You can't use arbitrary symbols inside \mathrm. Why don't you use simply \Lambda? – Ulrike Fischer Dec 26 '18 at 10:16
• First of all, with pdflatex it works, but unfortunately I have to use XeTeX. I don't want to just use \Lambda, because it's generated from the .bib file. – EZLearner Dec 26 '18 at 10:18
• well \mathrm{\Lambda} is wrong code. That it works with pdflatex is more or less by chance. So you better correct whatever is generating this. – Ulrike Fischer Dec 26 '18 at 10:22
• never use \usepackage[T1]{fontenc} with xetex, you disable all its Unicode support and force incorrect hyphenation for anything except unaccented English. – David Carlisle Dec 26 '18 at 11:52
• Is there a way to tell the compiler to just use \Lambda whenever he looks for \mathrm{\Lambda}? – EZLearner Dec 26 '18 at 12:40

This works:

\documentclass[english]{article}

\usepackage{babel}
\usepackage[no-math]{fontspec}

\begin{document}

$\mathrm{\Lambda}$

\end{document}


And also

\documentclass{article}

\usepackage[no-math]{fontspec}
\usepackage{polyglossia}

\setmainlanguage{english}

\begin{document}

$\mathrm{\Lambda}$

\end{document}


Instead of loading fontspec with the no-math option, you could instead load unicode-math to set up your math alphabets with Unicode. You could also use mathastext to set up your Greek letters or, in XeLaTeX, mathspec, or for a legacy NFSS font, isomath.

You can also copy-and-paste a Λ into your UTF-8 source.

The reason you’re getting the message about missing character 003, or ^C, is that that’s the character slot for Λ in the legacy OML encoding, but in a Unicode font, 0x03 is a control character, control-C.

• It's a terrific answer. Thank you. I need to see what I choose to do. – EZLearner Dec 26 '18 at 21:25