Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subnode does not work well with xelatex #14

Open
jiaopjie opened this issue Apr 29, 2022 · 1 comment
Open

subnode does not work well with xelatex #14

jiaopjie opened this issue Apr 29, 2022 · 1 comment

Comments

@jiaopjie
Copy link

When use the command \subnode to label some texts, some problem appears.
The following is the codes.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tikzpicture}[remember picture,>=stealth]
\node{Assume \subnode{f}{$f'(x)$} exists};
\draw[->] (0,1) to (f);
\end{tikzpicture}
\end{document}

The target of f defined by \subnode will be wrong if compile with xelatex.
The result looks like the picture.
20220429201249

But, when compile using pdflatex or lualatex, the problem disappears.
20220429201500

I don't know whether the problem is due to tikzmark or xelatex itself.

@loopspace
Copy link
Owner

My understanding of this is that it is actually an issue with the xetex driver for pgf. There is an open issue on the pgf repository for this at pgf-tikz/pgf#353 and it was raised on TeX-SX some time ago at https://tex.stackexchange.com/q/229500/86.

Looking at the commits on the pgf repository, a fix was implemented but then reverted, so I imagine that the proposed fix had some issues elsewhere. Nevertheless, the suggestion there (which, I think, came from the TeX-SX thread) may work in specific cases so you could try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants