5

I am using the OTF variant of the Latin Modern Fonts on my system (Linux Ubuntu) with XeLaTex. http://www.gust.org.pl/projects/e-foundry/latin-modern

I cannot set an Em Space : https://www.compart.com/de/unicode/U+2003 since there is a warning

[WARNING] Missing character: There is no   (U+2003) (U+2003) in font Latin Modern Roman 12 Regular

Why is this? I thought the font was Unicode capable?

MWE:

\documentclass[
  12pt,
  paper=a4,
  twoside,
  titlepage=true,
  openright,
  abstract=on,
  toc=listofnumbered,
  numbers=noenddot,
  chapterprefix=true,
  headings=optiontohead,
  svgnames,
  dvipsnames]{scrreprt}
\usepackage{amsmath,amssymb}

  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[]{Latin Modern Roman}
  \setsansfont[]{Latin Modern Sans}
  \setmonofont[]{Latin Modern Mono}
  \setmathfont[]{Latin Modern Math}


\begin{document}
EN space     
\end{document}
1
  • 2
    no font has every unicode character (there are more Unicode character slots than the font format supports, and most font designers only design fonts for specific scripts so a subset of Unicode) so you will always potentially get missing character errors. Also spaces are usually don in TeX with \hspace{1em} no by adding a character. Apr 23 at 22:44

2 Answers 2

8

Just because a font is “Unicode capable” doesn't mean it has to support every single glyph. The easiest LaTeX way in my opinion would be to simply use \quad.

That said, if you regularly have these kind of spaces in your document and want to deal with them automatically, check out the uspace (as in “Unicode Space”) package. https://ctan.org/pkg/uspace

It also supports zero width space (U+200B), three-per-em space (U+2004), four-per-em space, thin space (U+2009), hair space (U+200A) and others and works with all fonts.

8

TeX doesn't consider spaces as characters. You can obtain the same result by doing

\catcode"2003=\active
\protected\def^^^^2003{\quad}

Full example.

\documentclass{article}
\usepackage{fontspec}

\catcode"2003=\active
\protected\def^^^^2003{\quad}

\begin{document}

EN space

EN\quad space% for check

\end{document}

enter image description here

In my opinion, typing in \quad is much clearer.

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.