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]
(7,2.5) node[op amp] (opamp){}
    (opamp.down) ++ (0,-.5) node[below] {$-Va$}
    -- (opamp.down)

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


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.



            append after command={
                (\tikzlastnode.north) edge ([shift={(-5pt,0pt)}]\tikzlastnode.north) edge ([shift={(+5pt,0pt)}]\tikzlastnode.north)
            append after command={
                (\tikzlastnode.south) edge ([shift={(-5pt,0pt)}]\tikzlastnode.south) edge ([shift={(+5pt,0pt)}]\tikzlastnode.south)
    \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);

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.