I run into a problem with tikzmark and the professional help on the xetex mail list and on stackexchange (Ulrike Fischer) identified it as a pgf problem. Please find some description and minimal examples here:
http://tex.stackexchange.com/questions/229500/tikzmark-and-xelatex
For convenience, I attach the code here:
The following code does not work when compiled with XeLaTeX but produces the expected result when compiled with PDFLaTeX:
Last edit: Stefan Pinnow 2018-12-23
Hi Stefan
tikzmark
library is not actually an official library of TikZ but it is written by Andrew Stacey and he commented under your TeX.SX question under the nickname Loop Space what the problem is and how you can resolve.Maybe you can contact him for further elaborations?
Hi,
I checked the Tex.SX post but did not find anything. I can contact him directly. Thanks for the hint!
Best
Stefan
The example given does not demonstrate the problem. Here's an example which uses
tikzmark
correctly (i.e. avoids nestingtikzpicture
s) by using\subnode
within a node. With pdfTeX or LuaTeX, for example, this compiles correctly. With XeTeX, it does not.The problem appears to lie in the backend driver provided by PGF. The following code corrects the problem (from Jipí's answer at http://tex.stackexchange.com/a/339975/).
Examining the definition of this macro before it is redefined, it seems that the problem lies with its definition in
pgfsys-dvipdfmx.def
:I don't understand this code at all, but according to comments on TeX SE, I gather that this is preventing positions within a node from being saved -- the position is always saved as
0,0
. However, I may have misunderstood the discussion there. Even so, overwriting this definition with the one frompgfsys-common-pdf-via-dvi.def
certainly makes the code work with XeTeX as it does with other engines.Last edit: Stefan Pinnow 2018-12-23