Square root sign has dotted line (PGF/TikZ + XeLaTeX). Is this a bug? Is there a workaround? [duplicate]

I am encountering a number of problems using XeLaTeX and PGF/TikZ. One concerns the spy library and seems well-documented. Today I have encountered another. Here is a minimal working example.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[auto]
\draw[thin, dotted] (0,0) -- node {$\sqrt{r_1 r_2}$} (3,0);
\end{tikzpicture}
\end{document}


Compiling with XeLaTeX one sees that the line which extends the surd in the square root is also dotted (!):

This does not happen with PDFLaTeX, for example:

Is there a workaround?

-

marked as duplicate by Qrrbrbirlbel, Torbjørn T., Peter Jansson, Werner, Sean AllredNov 3 '13 at 19:08

This is a bug in PGF that has been fixed in the CVS version. (Xe)TeX’s rules somehow inherit the dashing style of PGF. –  Qrrbrbirlbel Nov 3 '13 at 18:25

You could add solid as an option to the node.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[auto]
\draw[thin, dotted] (0,0) -- node[solid] {$\sqrt{r_1 r_2}$} (3,0);
\end{tikzpicture}
\end{document}


-
Indeed! That works! (But this is surely not the intended behaviour, right?) –  José Figueroa-O'Farrill Nov 3 '13 at 18:21
@JoséFigueroa-O'Farrill No, I wouldn't think so. Perhaps a bug in PGF's XeTeX driver, but I really have no clue about that stuff. –  Torbjørn T. Nov 3 '13 at 18:25