5

Recently, I wanted to use unicode-math to introduce better distinguishable greek letters (e.g. boldface) at some point. However, I cannot seem to make things work. Here is my MWE:

\documentclass{standalone}
\usepackage{unicode-math} % Must be loaded after amsmath.

%\setmathfont{Asana Math} % No matter what I select here
\setmathfont{XITS Math}
\begin{document}
$$
\alpha, \beta, \lambda
$$
\end{document}

No matter, which math font I choose, the greek letters are not shown and the log contains lines like:

Missing character: There is no 𝛼 (U+1D6FC) in font "file:lmroman10-regular:sc
ript=latn;+trep;+tlig;"!

(ironically, my terminal does show the alpha). Why is the lookup being done in lmroman10-regular:sc (and how do I fix this)?

edit: lualatex --version:

This is LuaTeX, Version beta-0.80.0 (TeX Live 2016/dev) (rev 5238)

Filelist:

standalone.cls    2015/07/15 v1.2 Class to compile TeX sub-files standalone
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
standalone.cfg    2015/07/15 v1.2 Default configuration file for 'standalone' cl
ass
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
unicode-math.sty    2015/09/09 v0.8b Unicode maths in XeLaTeX and LuaLaTeX
   expl3.sty    2015/09/11 v6002 L3 programming layer (loader) 
expl3-code.tex    2015/09/11 v6002 L3 programming layer 
l3unicode-data.def    2015/07/20 v5676 L3 Unicode data
l3pdfmode.def    2015/09/10 v5983 L3 Experimental driver: PDF mode
ucharcat.sty    2015/08/23 v0.02 ucharcat for luaLaTeX (DPC)
  xparse.sty    2015/09/11 v6001 L3 Experimental document command parser
l3keys2e.sty    2015/09/11 v6001 LaTeX2e option processing using LaTeX3 keys
fontspec.sty    2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX
luaotfload.sty    2014/08/10 v2.5-4 OpenType layout system
luatexbase.sty    2013/05/11 v0.6 Resource management for the LuaTeX macro progr
ammer
  luatex.sty    2010/03/09 v0.4 LuaTeX basic definition package (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
    etex.sty    2015/09/02 v2.4 eTeX basic definition package (PEB,DPC)
luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)
luatexbase-compat.sty    2011/05/24 v0.4 Compatibility tools for LuaTeX
luatexbase-modutils.sty    2013/05/11 v0.6 Module utilities for LuaTeX
luatexbase-loader.sty    2013/05/11 v0.6 Lua module loader for LuaTeX
luatexbase-regs.sty    2011/05/24 v0.4 Registers allocation for LuaTeX
luatexbase-attr.sty    2013/05/11 v0.6 Attributes allocation for LuaTeX
luatexbase-cctb.sty    2013/05/11 v0.6 Catcodetable allocation for LuaTeX
luatexbase-mcb.sty    2013/05/11 v0.6 Callback management for LuaTeX
fontspec-patches.sty    2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX

fontspec-luatex.sty    2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
  eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
  eu2lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many othe
r characters in Unicode lower plane
 eu2lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
fontspec.cfg
catchfile.sty    2011/03/01 v1.6 Catch the contents of a file (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
  fix-cm.sty    2015/01/14 v1.1t fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
filehook.sty    2011/10/12 v0.5d Hooks for input files
unicode-math-luatex.sty    
lualatex-math.sty    2014/08/18 v1.4 Patches for mathematics typesetting with Lu
aLaTeX
etoolbox.sty    2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
unicode-math-table.tex
   t3cmr.fd    2001/12/31 TIPA font definitions
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
8

Without the varwidth option, standalone typesets the document in a horizontal box and there $$ just means an empty math formula. Thus \alpha, \beta and \gamma are being typeset in text mode. By a precise choice of the LuaTeX team, a math symbol in text mode doesn't raise an error and tries to typeset the (character corresponding to the) symbol in the current font.

In other words, you have discovered another good reason for never using $$ in LaTeX. With \[...\] you get a different error message:

! LaTeX Error: Bad math environment delimiter.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.9 \]

Not really very helpful, but perhaps it could lead you to a real solution.

However, using \[...\] with the varwidth option will not give the wanted result.

Here's the right way:

\documentclass{standalone}
\usepackage{unicode-math} % Must be loaded after amsmath.

%\setmathfont{Asana Math}
\setmathfont{XITS Math}
\begin{document}
$\displaystyle
\alpha, \beta, \lambda
$
\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.