5

Looking closely at the image produced by circuitikz, I find that the minus sign of an american voltage looks rather odd. The alignment seems off and the sign seems much too wide. Is there a way to align the minus sign to the horizontal line of the plus sign and make it just as wide?

Produced image

This is the code snippet that reproduces the result:

\documentclass{book}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[h]
    \begin{circuitikz}[american voltages]
        \draw
        (4,-1) to[short] (4,-2)
        (5,-1) to[short] (5,-2);
        \draw (4,-2) to[open,v_>=$U_S$] (5,-2);
    \end{circuitikz}
\end{figure}
\end{document}
4
  • pgfcircvoltage.tex, lines 190-210: one sign is set in normal size, the other in \scriptsize. One should patch these. But maybe it is a standard american notation (I have absolutely no idea).
    – campa
    Apr 26 '19 at 7:55
  • I'll look at it when I have time. Can you open an issue at github? github.com/circuitikz/circuitikz/issues (it seems a bug...)
    – Rmano
    Apr 26 '19 at 8:12
  • Thank you, @campa! Modifying the pgfcircvoltage.tex file (removing those \scriptsize commands) indeed resolved the problem. So it's not really a bug, just an unusual design choice. @Rmano, unfortunately I don't have a github account (deleted it after Microsoft stepped in).
    – dzereb
    Apr 26 '19 at 8:22
  • I opened an issue myself: github.com/circuitikz/circuitikz/issues/193 . @campa, if you write an answer I'll be happy to cite it in the bug solution... I am thinking of making the sizes configurable (but coherent).
    – Rmano
    Apr 26 '19 at 10:27
4

This is a bug; thanks for noticing. The new version will have this fixed and, as a bonus, a way to customize the appearance of the symbols.

See https://github.com/circuitikz/circuitikz/pull/196

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.