3

How can I do those small bars at the end of a wire?

Specifically at the end of (opamp.up) and (opamp.down)

\begin{circuitikz}[american inductors]
\draw
(7,2.5) node[op amp] (opamp){}
    (opamp.down) ++ (0,-.5) node[below] {$-Va$}
    -- (opamp.down)
;
\end{circuitikz}

I tried to use the perpendicular sign -| but obviously it's not meant for that.

So, is there a command for that (perpendicular) bar ?

enter image description here

3

Based on this excellent answer from Peter Gill, here are two new styles (named opampdownlbl and opampuplbl) which handle the placement and draw the horizontal lines at the top and bottom of the node.

\documentclass{article}

\usepackage{circuitikz}

\tikzset{opampdownlbl/.style={
            below,
            draw=none,
            append after command={
                (\tikzlastnode.north) edge ([shift={(-5pt,0pt)}]\tikzlastnode.north) edge ([shift={(+5pt,0pt)}]\tikzlastnode.north)
            }},
        opampuplbl/.style={
            above,
            draw=none,
            append after command={
                (\tikzlastnode.south) edge ([shift={(-5pt,0pt)}]\tikzlastnode.south) edge ([shift={(+5pt,0pt)}]\tikzlastnode.south)
            }}}
\begin{document}
    \begin{circuitikz}[american inductors]
    \draw (7,2.5) node[op amp] (opamp){}
        (opamp.down) ++ (0,-.5) node[opampdownlbl] {$-Va$} -- (opamp.down)
        (opamp.up) ++ (0,.5) node[opampuplbl] {$+Va$} -- (opamp.up);
    \end{circuitikz}
\end{document}

Op amp with bars

|improve this answer|||||

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.