7

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 (!):

dotted line extending surd

This does not happen with PDFLaTeX, for example:

enter image description here

Is there a workaround?

José Figueroa-O'Farrill
  • 4,125
  • 2
  • 27
  • 35

1 Answers1

6

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}

enter image description here

Torbjørn T.
  • 206,688