I'm trying to use \dot{P} in a math environment.


        \dot{P}(t) + 1234567890

Without the command \dot everything works as aspected.
With it I get the error: Internal error: bad native font flag and no output is produced.

Without the option no-math or the entire fontspec package (whose functionality I don't even need at the moment) there is an output compiled that includes a correct "dotted" P.
But the paranthesis, the plus sign and the numbers are not set in the Libertine font but rather in CM. Also the spacing information from the newtxmath package seems to get lost (could be related to CM).

I already tried to change the package order. That resulted in an option clash error for fontspec and the same output as without the fontspec package at all.

Any suggestions?
I tried using the libertine package for pdflatex (without fontspec of course) which produced the same output as XeLaTeX without the fontspec package.

Versions/File List:

MikTeX                2.9 64bit, Win7
libertineotf.sty      2012/04/07 5.13-8
fontspec.sty          2012/05/06 v2.2b
newtxmath.sty         2012/06/25 v0.99

3 Answers 3


This a bug in XeTeX resulting from mixing the OpenType (AKA "native") font Libertine with accent from the TFM font newtxmath. It didn't show up in earlier versions because of a bug that prevented the proper utilisation of OpenType math accent positioning that has been recently fixed.

I tried to fix the new bug, but it seems to be a bit tricky. Anyway, I hope it will be fixed by the time of the next release.

  • 5
    Two years later, is this bug going to be fixed?
    – marczellm
    Commented Feb 22, 2014 at 11:36
  • Mixing OpenType and TFM math fonts is not something I personally support, so it is a low priority issue, but feel free to open an issue in XeTeX bug tracker so it does not get forgotten again. Commented Feb 24, 2014 at 8:16
  • I posted sourceforge.net/p/xetex/bugs/89. (This is my first ever bug report on SF, so I hope I didn't get something wrong.)
    – marczellm
    Commented Feb 24, 2014 at 8:34

I (finally) found a solution with the help of Hendrik's answer to Dot Derivative Discrepancy.

By simply adding


to his code snippet.

This does not help for other accents, of course.
For the \hat{} command I found the following solution:


where \acc@hat is defined as:

  • Miktex 2.9 does not know \placeaccent Commented Aug 25, 2015 at 5:42
  • To respond a previous comment: the code is incomplete. \placeaccent is not defined in any package, but one can find its definition from Hendrik's answer.
    – fantasie
    Commented Apr 14 at 16:39

I had a similar problem, here is MWE

  \setmainfont{Liberation Serif}
   \[ \dot{P}(t) + 1234567890 \]

Here the line \[ \dot{P}(t) + 1234567890 \] is rendered fine

Instead in this example the command \not\leadsto will crash; it does not crash if unicode-math is not used, but no symbol appears; the command \not\conduce does work (but it looks bit ugly).

Note that here Libertine font is used, but this is not relevant; I tried adding \setmathfont{STIX Two Math} and/or \setmainfont{Times New Roman} and it behaves the same.

So, to answer the OP: use setmainfont

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .