• Circuit breaker in circuitikz

    From Michael F. Stemper@michael.stemper@gmail.com to comp.text.tex on Thu Mar 19 16:29:21 2026
    From Newsgroup: comp.text.tex

    I'm trying to draw some one-line diagrams of various substation
    topologies, but can't figure out how to draw a circuit breaker.
    I'm seeking something like: <https://www.researchgate.net/figure/Breaker-and-a-half-substation-arrangement_fig7_273350176>
    or the ring bus and breaker-and-a-half diagrams shown at: <https://electrical-engineering-portal.com/switchgear-control-circuits-ac-dc-circuit-breaker-closing-circuit>

    I've tried to RTFM:
    <https://texdoc.org/serve/circuitikzmanual.pdf/0>
    but, breakers don't show up in the components list, and a search for
    the string "breaker" on that document reveals nothing.

    Duck-Duck-Go's hallucination generator suggests "to[breaker]", but I get
    the following messsage in my *.log file:
    ! Package pgfkeys Error: I do not know the key '/tikz/breaker' and I am going t o ignore it. Perhaps you misspelled it.

    A MWE follows, although, by rights, it should be called a "Minimum
    Non-working Example":

    =======================================================
    \batchmode
    \documentclass[letterpaper,12pt]{article}
    \usepackage[american]{circuitikz}

    \begin{document}

    \begin{circuitikz}
    \draw(0,0) to[breaker] (0,1);
    \end{circuitikz}

    \end{document}
    =======================================================

    Any pointers on how to do something a simple as this?
    --
    Michael F. Stemper
    Outside of a dog, a book is man's best friend.
    Inside of a dog, it's too dark to read.
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.text.tex on Thu Mar 19 22:12:28 2026
    From Newsgroup: comp.text.tex

    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:
    but, breakers don't show up in the components list, and a search for
    the string "breaker" on that document reveals nothing.

    From what I dug up, to[breaker] only turns up in unofficial texts;
    strictly off the books, and my TeXlive 2024 setup does not recognize
    it. It seems the options are either swapping in a substitute, like a
    switch, or cobbling together the symbol yourself.

    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Michael F. Stemper@michael.stemper@gmail.com to comp.text.tex on Sat Mar 21 13:41:27 2026
    From Newsgroup: comp.text.tex

    On 19/03/2026 17.12, Stefan Ram wrote:
    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:
    but, breakers don't show up in the components list, and a search for
    the string "breaker" on that document reveals nothing.

    From what I dug up, to[breaker] only turns up in unofficial texts;
    strictly off the books, and my TeXlive 2024 setup does not recognize
    it. It seems the options are either swapping in a substitute, like a
    switch, or cobbling together the symbol yourself.

    Thanks for the reply.

    With that hint, I found a document titled "An easy way to creat your
    own circuitikz symbols"[1], which sounded just like what I needed.

    It took a while, but I managed to reverse-engineer it[2]. The
    procedure appear to be:
    1. Define something that attaches to a generic (or other) component.
    2. Every time you want your custom thingy, \draw the base domponent.
    3. Apply white-out to it.
    3. Invoke your custom thingy on top of it.

    Looks kind of like this:

    ====================================================== \documentclass[letterpaper,12pt]{article}
    \usepackage[american]{circuitikz}

    \begin{document}

    \newcommand{\breaker}[2]
    {\draw[thick] (#1)
    +(-0.4,-0.4) -- +(-0.4,0.4) -- +(0.4,0.4) -- +(0.4,-0.4) -- cycle;
    }

    \begin{circuitikz}
    \draw (0,0) to[generic,color=white,n=B1] (0,2);
    \breaker{B1}{0}
    \end{circuitikz}

    \end{document}
    ======================================================

    However, it's a bit sloppy. The breaker that I've drawn is really
    larger than I'd like -- 0.8x0.8, when 0.6x0.6 would be better. But,
    even at this too-large size, the leads from the original "generic"
    element don't reach the breaker.

    Now, linemen like an air-gap when they work on a breaker, but on a
    diagram it's less than desirable. Three possible fixes come to mind:
    1. Make the breaker even bigger, which offends me aesthetically.
    2. Make the hidden generic shorter, hoping that the leads will
    come along.
    3. Make the generic short enough that it's square (still with the
    leads coming along) and forget about drawing a box on top of it.

    Well, I guess that 2 and 3 are the same thing.

    Any ideas?

    [1] <https://www.elfsoft2000.com/projects/speaker.pdf>
    [2] Probably more accurate to say "cargo cult".
    --
    Michael F. Stemper
    Galatians 3:28

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Michael F. Stemper@michael.stemper@gmail.com to comp.text.tex on Sat Mar 21 14:01:52 2026
    From Newsgroup: comp.text.tex

    On 21/03/2026 13.41, Michael F. Stemper wrote:
    On 19/03/2026 17.12, Stefan Ram wrote:
    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:


    However, it's a bit sloppy. The breaker that I've drawn is really
    larger than I'd like -- 0.8x0.8, when 0.6x0.6 would be better. But,
    even at this too-large size, the leads from the original "generic"
    element don't reach the breaker.

    Now, linemen like an air-gap when they work on a breaker, but on a
    diagram it's less than desirable. Three possible fixes come to mind:
    1. Make the breaker even bigger, which offends me aesthetically.
    2. Make the hidden generic shorter, hoping that the leads will
    -a-a come along.
    3. Make the generic short enough that it's square (still with the
    -a-a leads coming along) and forget about drawing a box on top of it.

    Well, I guess that 2 and 3 are the same thing.

    I posted too soon. I just found \ctikzset, which does close to what
    I'd like:

    \ctikzset{bipoles/length=0.8cm}

    However, I'd like it even better if I could make this change apply
    only to "generic"; make the breakers smaller while leaving the caps
    and inductors unchanged.

    Base on <https://tex.stackexchange.com/questions/698705/command-to-put-circuitikz-specification-in-preamble-to-use-it-globally>,
    I tried:
    \ctikzset{bipoles/generic/length=0.8cm}
    but that is not the magic incantation. I bet that there is one.
    Any pointers?
    --
    Michael F. Stemper
    Galatians 3:28

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.text.tex on Sat Mar 21 22:49:42 2026
    From Newsgroup: comp.text.tex

    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted: >\ctikzset{bipoles/generic/length=0.8cm}

    I also find code starting with

    |\documentclass[border=10pt]{standalone}
    |\usepackage[T1]{fontenc}
    |\usepackage[siunitx, RPvoltages]{circuitikz}
    |\makeatletter
    |%% Copied from Generic bipole - used as resistor by some |\ctikzset{bipoles/nlgeneric/height/.initial=.20} |\ctikzset{bipoles/nlgeneric/width/.initial=.60}

    on the TeX stackexchange page titled

    |Adding a custom component in circuitikz and using it within different files

    .


    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Michael F. Stemper@michael.stemper@gmail.com to comp.text.tex on Tue Mar 31 08:46:32 2026
    From Newsgroup: comp.text.tex

    On 21/03/2026 17.34, Stefan Ram wrote:
    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:
    \ctikzset{bipoles/generic/length=0.8cm}
    but that is not the magic incantation. I bet that there is one.
    Any pointers?

    I find these examples in the web:

    [snip candidates]

    , so there might be no key starting with "bipoles/generic".

    OTOH, "bipoles/empty" and "bipoles/circle" from the examples are
    not in that index. So, the index might not be complete . . .


    An empty bipole sounded like it might be what I wanted, but I couldn't make
    it work. But, I had another idea, which does what I wanted (a smaller breaker, with the leads running all of the way to it. It involves:
    1. Making the original bipole invisible.
    2. Drawing my own leads.
    3. Applying a filled breaker on top of it.

    The result:

    ================================================
    \batchmode
    \documentclass[letterpaper,12pt]{article}
    \usepackage[american]{circuitikz}

    \begin{document}

    \newcommand{\gcb}[2]
    {
    % \draw (0,0) to (0,2);
    \filldraw[thick,fill=white,rotate=#2] (#1)
    +(-0.3,-0.3) -- +(-0.3,0.3) -- +(0.3,0.3) -- +(0.3,-0.3) -- cycle;
    }

    \begin{circuitikz}
    \draw (0,0) to[generic,color=white,n=B1] (0,2);
    \draw (0,0) to (0,2);
    \gcb{B1}{0}

    \draw (0,0) to[generic,color=white,n=B2] (2,0);
    \draw (0,0) to (2,0);
    \gcb{B2}{0}
    \end{circuitikz}

    \end{document}
    ================================================

    I tried to include drawing my own leads in the "newcommand", but
    even though I put that before drawing the breaker, the filled breaker
    didn't obscure the part that I would have expected to be behind it.

    I guess that it's clean enough.

    Thanks,
    Mike
    --
    Michael F. Stemper
    Article I, Section 8: The Congress shall have Power [...] To declare War, [...] --- Synchronet 3.21f-Linux NewsLink 1.2
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.text.tex on Sat Mar 21 22:34:48 2026
    From Newsgroup: comp.text.tex

    "Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted: >\ctikzset{bipoles/generic/length=0.8cm}
    but that is not the magic incantation. I bet that there is one.
    Any pointers?

    I find these examples in the web:

    |\ctikzset{bipoles/cuteswitch/thickness=0.5}

    |\ctikzset{bipoles/empty/height/.initial=.30} |\ctikzset{bipoles/empty/width/.initial=.80} |\ctikzset{bipoles/empty/voltage/distance from node/.initial=.4} |\ctikzset{bipoles/empty/voltage/bump b/.initial=2}

    |\ctikzset{bipoles/circle/height/.initial=.60} |\ctikzset{bipoles/circle/width/.initial=.60}

    |\ctikzset{bipoles/thickness=1}

    . In the Web there is a special tutorial (PDF) named

    |Creating bipole circuit components for circuitikz

    by John Kormylo.

    CircuiTikZ and its manual are an impressive work, but the
    index does not have entries "ctikzset", "slash", nor "/",
    so it's a bit difficult to learn from the ground up the
    meaning of the syntax "\ctickzset{.../...=...}".

    The idea seems to be

    \ctikzset{key=value}

    meaning "\tikzset{/tikz/circuitikz/key=value}".

    The index gives use these entries starting with "bipoles":

    |bipoles/border margin, 35
    |bipoles/crossing/size, 100
    |bipoles/currtap, 87
    |bipoles/cutechoke/cthick, 159
    |bipoles/cuteswitch/shape, 173
    |bipoles/cuteswitch/thickness, 173
    |bipoles/dcisource/angle, 81
    |bipoles/fix tunable direction, 259
    |bipoles/inductors/core distance, 65
    |bipoles/inductors/dot x distance, 65
    |bipoles/inductors/dot y distance, 65
    |bipoles/is current, 224
    |bipoles/jumpers/shape, 179
    |bipoles/length, 36, 37
    |bipoles/mic/bar thickness, 96
    |bipoles/mstline/height, 154
    |bipoles/mstline/width, 154
    |bipoles/oosourcetrans/upper circle offset, 84
    |bipoles/oosourcetrans/upper circle size default, 84
    |bipoles/oscope/height, 90
    |bipoles/oscope/waveform, 88
    |bipoles/oscope/width, 90
    |bipoles/qmeter/index position, 88
    |bipoles/smeter/index position, 88
    |bipoles/thickness, 38
    |bipoles/tline/width, 155
    |bipoles/vsourceam/inner plus, 82
    |bipoles/vsourceam/margin, 82
    |bipoles/vsourcesam/inner minus, 82
    |bipoles/wfuse/dots, 97
    |bipoles/wfuse/shape, 97

    , so there might be no key starting with "bipoles/generic".

    OTOH, "bipoles/empty" and "bipoles/circle" from the examples are
    not in that index. So, the index might not be complete . . .


    --- Synchronet 3.21f-Linux NewsLink 1.2