1

How can I put the label of the resistors horizontally instead of being in the same direction of the component?

I tried to use [R, l=$R_c$:-90] as an example I saw but it didn't work.

\documentclass[11pt]{article}

\usepackage{circuitikz}
\usepackage{tikz}                           % for flowcharts
\begin{document}

    \begin{center}
            \begin{circuitikz}[american voltages]
            \draw (0,0) 
            to[R, l=$R_c$, o-o] (4,0)
            to[R, l=$R_a$, o-o] (2,-3)
            to[R, l=$R_b$, o-o] (0,0)
            {[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
            \end{circuitikz}
            $\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
            \begin{circuitikz}[american voltages]
            \draw (0,0) 
            to[R, l=$R_1$, o-*] (2,-1)
            to[R, l=$R_2$, *-o] (4,0) (2,-1)
            to[R, l=$R_3$, *-o] (2,-3)
            {[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
            \end{circuitikz}
            \end{center}
\end{document}

This is how it is

enter image description here

This is what I would like

enter image description here

PS: I would like also to put the arrow between the two images more centralized. Is that possible?

Best regards!

1
  • \ctikzset {label/align = straight} or \usepackage[straightlabels]{circuitikz}
    – user11232
    Apr 8, 2015 at 5:56

1 Answer 1

1

Straight labeling can be achieved with the \ctikzset macro:

\documentclass[a4paper]{article}
\usepackage{circuitikz}
\begin{document}
\begin{center}
  \begin{circuitikz}[american voltages]
    \ctikzset { label/align = straight }
    \draw (0,0)
    to[R, l=$R_c$, o-o] (4,0) % The voltage source
    to[R, l=$R_a$, o-o] (2,-3)
    to[R, l=$R_b$, o-o] (0,0)
    {[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
  \end{circuitikz}
  $\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
\end{center}
\end{document}

This, and other information on circuitikz labeling can be found on p. 25 of the circuitikz official documentation.

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.