2

I'd like to see all the characters from Latin Modern Math. Running xelatex on the following gives error "Running mktexmf Latin...I can't find file 'Latin'".

\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{fonttable}

\begin{document}
\fonttable{Latin Modern Math}
\end{document}

Using lm-math instead of Latin Modern Math gives the same kind of error.

How can it be done?

3

Compile with XeLaTeX:

\documentclass{article}
\usepackage[
  a4paper,
  left=1.5cm,
  right=1.5cm,
  top=2cm,
  bottom=2cm,
  heightrounded,
]{geometry}
\usepackage{fontspec}
\usepackage{multicol}

\ExplSyntaxOn

\NewDocumentCommand{\Ufonttable}{mO{}}
 {
  \begin{multicols}{8}[\section*{#1}]
  \setlength{\parindent}{0pt}
  \newfontface\test{#1}[#2]
  \test
  \int_step_inline:nnn { \xetex_firstfontchar:D \font } { \xetex_lastfontchar:D \font }
  {
   \iffontchar\font##1\scan_stop:
    \makebox[32pt][l]{ \scriptsize \ttfamily U+\ufonttable_number:n { ##1 } }
    \symbol{##1}\par
   \fi
  }
  \end{multicols}
 }

\cs_new:Nn \ufonttable_number:n
 {
  \prg_replicate:nn { \int_max:nn { 0 } { 4 - \tl_count:e { \int_to_Hex:n { #1 } } } } { 0 }
  \int_to_Hex:n { #1 }
 }
\cs_generate_variant:Nn \tl_count:n { e }

\ExplSyntaxOff

\begin{document}

\Ufonttable{Latin Modern Roman}

\end{document}

enter image description here

  • For my particular query, I would want \Ufonttable{Latin Modern Math}, of course. – murray Aug 29 '19 at 19:47
2

Enclose the font name in double-quotes:

\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{fonttable}

\begin{document}
\fonttable{"Latin Modern Math"}
\end{document}

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.