3

I want to draw a Darlington assembly with two transistors. For the layout: no problem!

On the other hand, the label of the 2nd transistor is outside the frame by taking as the standalone document class (which I prefer to keep to facilitate the export of the image later).

I know that an inelegant solution is to artificially increase the margins but I am thinking that maybe there is a "cleaner" solution?

Thanks for your response

\documentclass[border=1mm]{standalone}
\usepackage[european, straightvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[pnp](T1){T1};
\draw (T1.emitter) node[pnp, anchor=base](T2){T2};
\draw (T2.collector) |- (T1.collector);
\end{circuitikz}

\end{document}
2
  • 1
    In circuitikz node text down not contribute to the alignment nor bounding box. This is the same as tex.stackexchange.com/questions/586283/… - notice my comment here: tex.stackexchange.com/questions/586283/…. You can use @Zarko method or just all an invisible path to T2 \path (T2.east) ++(2em,0) or something similar. In bigger circuit is not a problem normally. – Rmano Mar 28 at 8:23
  • Sorry for the &ß@ing autocorrect of the message above: *down: do not, *all: add, *circuit: circuits (well, last one is me, but...) – Rmano Mar 28 at 12:02
3

Why this happens will be probably explained by (one of) the package authors. Meanwhile you can use the following workaround:

\documentclass[border=1mm]{standalone}
\usepackage[european, straightvoltages]{circuitikz}

\begin{document}

\begin{circuitikz}
\draw   (0,0) node[pnp, label=right: T1] (T1) {} 
        (T1.emitter) node[pnp, anchor=base, label=right: T2] (T2) {}    % <---
        (T2.collector) |- (T1.collector);
\end{circuitikz}

\end{document}

enter image description here

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.