5

I would like to draw a transformer in CircuiTikZ without the small parts of conductor going to the sides.

Left: Current situation. Right: What I want.

Transformer. Left: Current situation. Right: What I want.

Code:

\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,cuteinductors]{circuitikz}
\begin{document}
\begin{figure}[bth]
    \begin{center}
    \begin{circuitikz}
    \draw
        (0,0) node[rground] {}
        to [vsourcesin, l^=$F_A$] (0,2)
        to [generic, l_=$Z_A$] (0,4)
        to [short, i^>=$V_S$] (1,4)
        to [short] (1,3)
        (2,3) node[transformer]{}
        (1,1) node {}
        to [short] (1,0)
        to [short] (0,0);
    \end{circuitikz}
    \end{center}
    \caption{Position1.}\label{fig:position1}
\end{figure}
\end{document}
5

Do not use the node syntax with transformer, but rather cute inductor.

\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,cuteinductors]{circuitikz}
\begin{document}
\begin{figure}[bth]
    \begin{center}
    \begin{circuitikz}
    \draw
        (0,0) node[rground] {}
        to [vsourcesin, l^=$F_A$] (0,2)
        to [generic, l_=$Z_A$] (0,4)
        to [short, i^>=$V_S$] (1,4)
        to [short] (1,3)
        to[cute inductor] (1,1)
        to [short] (1,0)
        to [short] (0,0);

    \draw (2.5,0)
        to [short] (2.5,1)
        to[cute inductor] (2.5,3)
        to [short] (2.5,4);
    \end{circuitikz}
    \end{center}
    \caption{Position1.}\label{fig:position1}
\end{figure}
\end{document}

The result:

enter image description here

1
  • "Left: Current situation. Right: What I want." I think you have switched left and right. :) Aug 1 '13 at 11:11

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.