I get something weird from the \xrightarrow command: the line is dashed. enter image description here

Here is my main.texfile:








    vardef middir(expr p,ang) =
     dir(angle direction length(p)/2 of p + ang)
    style_def arrow_right expr p =
      cfill(arrow p
       shifted (8thick*middir(p,-90)));
    \fmfleft{i} \fmfright{o}
    \fmf{quark,label=$p$}{i,v1} \fmf{quark,label=$p$}{v2,o}
\qquad \xrightarrow[\: \varepsilon \to 0 \:]{}
\quad i \, \slashed{p} \, C_F\, \frac{g_C^2}{4\pi} \, \frac{1}{\varepsilon} + \dots


To compile, I run:

latexmk -quiet -e '$pdflatex=q/xelatex %O %S/' -f -pdf -synctex=1 -jobname=Document -outdir=$PWD/Result $PWD/main.tex
cd Result/
mpost self.mp
cd ..
latexmk -quiet -e '$pdflatex=q/xelatex %O %S/' -f -pdf -synctex=1 -jobname=Document -outdir=$PWD/Result $PWD/main.tex

Would you know how I could fix that ?

Thanks a lot for your help !


Here's a MWE:




 \xrightarrow[\: \varepsilon \to 0 \:]{}

  • 3
    this appears to be a bug in unicode-math. (there are some problems with the \xrightarrow being tested in the new beta version of the stix fonts, so this isn't surprising. i will ping will robertson.) – barbara beeton Aug 22 '15 at 14:12
  • @barbarabeeton — actually I don't really see why unicode-math needs to reimplement amsmath whenever something doesn't work; it would preferable to fix amsmath instead :) Presumably the problem would go away if U+23AF (horizontal line extender) were being used directly without the need to "back up" as in @egreg's answer below. – Will Robertson Feb 11 '16 at 23:15

It seems that the backing up done by \arrowfill@ is insufficient when Latin Modern Math is used. Here's a fix:





enter image description here

Here's the output if the four \patchcmd lines are commented out.

enter image description here

One can observe that the first and the last parts have gaps, while the middle parts are not overlapping each other. The default backing up is -7mu for the terminal parts and -2mu for the middle parts.


It's got something to do with how \: is interpreted. The following code doesn't have the same problem.




 \xrightarrow[\; \varepsilon \to 0 \;]{}

  • I get exactly the same, a dashed arrow. – Johannes_B Aug 22 '15 at 14:58
  • Same here. This doesn't answer the question; the problem remains. It is a bug in unicode-math. I'd suggest you either to modify the answer or to delete it. – Gonzalo Medina Aug 22 '15 at 18:37
  • With \; I get a regular arrow. Yes, it is a bug in unicode-math. – JPi Aug 22 '15 at 19:47
  • Perhaps the whole question should be turned into a bug report to the unicode-math packag authors. – JPi Aug 22 '15 at 19:54
  • @JPi Will did just that: github.com/wspr/unicode-math/issues/314 – David Carlisle Aug 24 '15 at 7:10

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.