Menu

#263 Option passing in pgfextra

v1.0 (example)
closed-rejected
nobody
None
5
2019-01-23
2013-09-09
No

In the following code, the color option is not passed inside pgfextra consistently:

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw [red] (0,0) -- (1,1) \pgfextra{\pgfinterruptpath \node at (.5,.5) {o} \endpgfinterruptpath};
\draw [red] (0,.5) -- (1,.5) \pgfextra{\pgfinterruptpath \draw (0,1) -- (1,0); \endpgfinterruptpath};
\end{tikzpicture}
\end{document}

The expected behavior is three red lines and a red o character. However, the line (1, 0) -- (0, 1) is black.

Discussion

  • Till Tantau

    Till Tantau - 2013-09-17

    This is more a feature request than a bug. No guarantee when it will be fixed, if at all.

     
  • Till Tantau

    Till Tantau - 2013-09-17
    • status: open --> open-postponed
     
  • Henri Menke

    Henri Menke - 2019-01-23
    • status: open-postponed --> closed-rejected
     
  • Henri Menke

    Henri Menke - 2019-01-23

    This issue does not seems so relevant to me, especially because there is a simple workaround: Just repeat the outside color inside \pgfextra.

    \documentclass[tikz]{standalone}
    \begin{document}
    \begin{tikzpicture}
    \draw [red] (0,0) -- (1,1) \pgfextra{\pgfinterruptpath \node at (.5,.5) {o}; \endpgfinterruptpath};
    \draw [red] (0,.5) -- (1,.5) \pgfextra{\pgfinterruptpath \draw[red] (0,1) -- (1,0); \endpgfinterruptpath};
    \end{tikzpicture}
    \end{document}
    

    I'm closing this.

     
MongoDB Logo MongoDB