4

I don't like the default positioning of the labels Q1 and Q2 below; is there a way to move or shift them relative to the circuit symbols? I know I could do \node[nigbt,label={something}] but it seems wrong.

\documentclass{standalone} \usepackage{circuitikz} \usepackage{tikz} \begin{document} \begin{tikzpicture}[american, font=\sffamily] \node[nigbt](q1) at (0,0) {Q1}; \node[nigbt](q2) at (0,2) {Q2}; \draw (1,-0.8) node[]{dummy} % not sure why this is necessary (q2.E) to (q1.C) (q1.E) |- (-2,-1) to [C](-2,3) -| (q2.C); \end{tikzpicture} \end{document} 

enter image description here

For some reason, I need that line with the dummy node, otherwise Q1 and Q2's labels don't show up at all. (???)


I can create extra nodes, and get exactly what I want, but it seems unnecessary:

\documentclass{standalone} \usepackage{circuitikz} \usepackage{tikz} \begin{document} \begin{tikzpicture}[american, font=\sffamily] \node[nigbt](q1) at (0,0) {}; \node[nigbt](q2) at (0,2) {}; \node[above] at (q1.B){Q1}; \node[above] at (q2.B){Q2}; \draw (1,-0.8) node[]{dummy} (q2.E) to (q1.C) (q1.E) |- (-2,-1) to [C](-2,3) -| (q2.C); \end{tikzpicture} \end{document} 

enter image description here

4
  • 3
    Without the dummy node your labels are still drawn, but are outside the area shown by standalone. Try \documentclass[border=6mm]{standalone}. Commented Apr 28, 2016 at 22:03
  • xshift and yshift can be used to nudge nodes hither and thither. Commented Apr 29, 2016 at 2:31
  • Though I can't see why label would be 'wrong' here. It seems the appropriate solution, really. Commented Apr 29, 2016 at 2:32
  • @JasonS Done, but I omitted the [american, font=\sffamily] after tikzpicture. For some reason that was giving me a circle between Q1 and Q2. Commented Sep 8, 2016 at 21:59

1 Answer 1

2

Without the dummy node your labels are still drawn, but are outside the area shown by standalone. They can be revealed by adding a border.

\documentclass[border=6mm]{standalone} \usepackage{circuitikz} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[nigbt](q1) at (0,0) {Q1}; \node[nigbt](q2) at (0,2) {Q2}; \draw (q2.E) to (q1.C) (q1.E) |- (-2,-1) to [C](-2,3) -| (q2.C); \end{tikzpicture} \end{document} 

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.