1

Very similar to Voltage labels too close to circuit element with circuitikz 2.4 and Spacing circuit element labels from their elements with CircuiTikz but with horizontally-oriented components:

\documentclass{standalone}
\usepackage[siunitx]{circuitikz}

\begin{document}

\begin{circuitikz}[american]
    \draw (0,0) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=$v_g$] (2,0)
        node [right] {\tiny\verb|default|};
    \draw (0,1) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=$v_g$,label/align=rotate] (2,1)
        node [right] {\tiny\verb|label/align=rotate|};
    \draw (0,2) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=$\quad v_g$] (2,2) 
        node [right] {\tiny\verb|\quad|};
\end{circuitikz}
\end{document}

enter image description here

I want to move the voltage label a little bit further from the component, and don't know how to do it. Things like \hspace and \quad are horizontal adjustment and don't help vertically.

1

ah -- I found it: \raisebox does the trick:

\documentclass{standalone}
\usepackage[siunitx]{circuitikz}

\begin{document}

\begin{circuitikz}[american]
    \draw (0,0) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=$v_g$] (2,0)
        node [right] {\tiny\verb|default|};
    \draw (0,1) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=$v_g$,label/align=rotate] (2,1)
        node [right] {\tiny\verb|label/align=rotate|};
    \draw (0,2) to[/tikz/circuitikz/bipoles/length=0.6cm, D*, v^=\raisebox{1.0ex}{$v_g$}] (2,2) 
        node [right] {\tiny\verb|\raisebox|};
\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.