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.

Please consider the following MWE:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}

    \begin{center}

        PGF version: \pgfversion
        \vspace{1em}

        \begin{tikzpicture}[circuit ee IEC]    
            \draw
                node{} (0,1)
                to [contact={at end, fill=white}] (0,1)
                to [contact=at end] node[pos=.5, above]{} (1,1);
            \draw
                node{} (1,2)
                to [contact=at end] (1,2)
                to [contact=at end] (1,1)
                to [contact=at end] (1,0);
            \draw
                node{} (5,2)
                to [contact=at end] (5,2)
                to [contact=at end] (5,1)
                to [contact=at end] (5,0);
            \draw
                node{} (5,1)
                to [contact=at end] (5,1)
                to [contact={at end, fill=white}] (6,1);
            \draw
                node{} (1,2)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,2);
            \draw
                node{} (1,1)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,1);
            \draw
                node{} (1,0)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,0);
        \end{tikzpicture}
    \end{center}

\end{document}

When compiled with MiKTeX 2.9 64-bit using PGF 2.10, the following result is yield:

Compiled MWE with PGF 2.10

After updating my MiKTeX installation and upgrade of the PGF package to version 3.0.0 the output is the following:

Compiled MWE with PGF 3.0.0

As you may notice, several lines are displaced as well as the open contacts are not displayed correctly anymore.

I just want to ask for confirmation whether this is a bug in the PGF 3.0.0 package or if I am doing something wrong. In case it is, I will file a bug report at PGF's bugtracker at sourceforge.net.

share|improve this question
2  
I can confirm that I get the same results than you (straight lines with PGF 2.10 in OSX, TeXlive 2012, incorrect lines with PGF 3.0.0 in Ubuntu, TeXlive 2013) –  JLDiaz May 25 at 10:35

1 Answer 1

up vote 2 down vote accepted

I don't know if the observed behaviour can be considered a bug, because I'm not familiar with the "proper" syntax for circuits.

I would write the code in a different way (which does not imply that yours is wrong, since as I stated I don't know the "right" syntax). This is my version:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}

    \begin{center}

        PGF version: \pgfversion
        \vspace{1em}

        \begin{tikzpicture}[circuit ee IEC]
            \draw  (0,1) node [contact,fill=white] {}
                to (1,1);
            \draw  (1,2) node[contact] {}
                to (1,1) node[contact] {}
                to (1,0) node[contact] {};
            \draw  (5,2) node[contact] {}
                to (5,1) node[contact] {}
                to (5,0) node[contact] {} ;
            \draw  (5,1)
                to (6,1) node[contact, fill=white] {};
            \draw  (1,2)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,2);
            \draw  (1,1)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,1);
            \draw  (1,0)
                to [resistor={style={circuit symbol size=width 10 height 2.5}}] (5,0);
        \end{tikzpicture}
    \end{center}
\end{document}

I find that contact has to be considered a node, to which lines are connected, and not part of a to specification as you wrote in your example. A point in favour of my version is that it produces the same result both in PGF2.10 and PGF3.0 :-)

PGF 2.10

PGF 3.0

share|improve this answer
    
Thank you very much for your answer. I am a beginner with TikZ/PGF, so I think my syntax is simply wrong and it was just a pure coincidence that my code worked with PGF 2.10. Thank you for this hint! –  DigNative May 26 at 7:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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