Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
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

1 Answer 1

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

share|improve this answer
    
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.