2

I want to use calibri in text and cambria math fonts for equations, with lualatex. When there are no equations to my file everything works ok, but when I add an equation I get an error message "Undefined control sequence."

this is my file:

\documentclass[12pt,a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\setotherlanguage{english}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Calibri}
\setmathfont{Cambria Math}
\begin{document}
some text\\
Ορισμένο ολοκλήρωμα: % definite integral
$\int_{\alpha}^{\beta}f(x)dx = \dfrac{3}{\sqrt{5}-2}$

\end{document}

and the log file when the error occures

! Undefined control sequence.
l.13 $\int_{\alpha}^{\beta}f(x)dx = \dfrac
{3}{\sqrt{5}-2}$
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf" [1
{C:/Users/user/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(C:/Users/user/Documents/LaTeX/test_lualatex.aux
luatex-hyphen: loading patterns and exceptions for: greek (\language24)
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf"
luaotfload | load : Lookup/name: "Calibri" -> "calibri.ttf")
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
)
Here is how much of LuaTeX's memory you used:
20047 strings out of 494734
100000,552014 words of node,token memory allocated
310 words of node memory still in use:
nodes
avail lists: 1:52,2:67,3:23,4:41,5:14,6:49,7:3,8:2,9:511,10:981,11:520,12:229
23203 multiletter control sequences out of 65536+200000
47 fonts using 14496391 bytes
61i,4n,63p,829b,249s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Windows/Fonts/cambria.ttc(CambriaMath:1)><C:/Windows/Fonts/cambria.ttc(Cambr
iaMath:1)><C:/Windows/Fonts/calibri.ttf>
Output written on test_lualatex.pdf (1 page, 71199 bytes).
PDF statistics: 27 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 131072)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
  • 3
    \dfrac seems not to be defined… Try loading mathtools (before unicode-math). – Manuel Sep 4 '14 at 13:35
4

\dfrac is defined in the amsmath package. Load this package before unicode-math. (The problem is unrelated to LuaLaTeX or the fonts.)

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.