9

I'm using TexLive2013 and the Circuitikz package.

I'm trying to draw the ground symbol but it appears as just a line and not the proper symbol.

The code I'm using is:

\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{center}
  \begin{circuitikz} 
    \draw (0,0) to [ground] (0,-1); 
  \end{circuitikz} 
\end{center}
\end{document}

But what I get is this:

enter image description here Anyone know why?

12

This is absolutely normal: the symbol ground is a node shape, hence it mandatory to adopt the TikZ \node syntax.

Specifically, one should change

\draw (0,0) to [ground] (0,-1); 

into

\draw (0,0) to (0,-1) node[ground]{}; 

or the equivalent

\draw (0,0) -- (0,-1) node[ground]{}; 

A complete example:

\documentclass[tikz,border=10pt]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} 
\draw (0,0) -- (0,-1) node[ground]{}; 
\end{circuitikz}
\end{document}

The result:

enter image description here

|improve this answer|||||
  • Note: the previous edit suggesting \draw (0,0) node[ground]{} to (0,-1) ; option has been removed since it is very unlikely to place a ground in the middle of a wire within a circuit. – Claudio Fiandrino Apr 24 '14 at 14:40
0

Using \usetikzlibrary{circuits.ee.IEC} conflicts with the ground and causes this behaviour.

|improve this answer|||||
  • 2
    Welcome to TeX.SX! That cannot be the cause here though, as the OP doesn't load that library. – Torbjørn T. Oct 10 '16 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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