texlive[67458] Master/texmf-dist: circuitikz (24jun23)
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 24 21:58:27 CEST 2023
Revision: 67458
http://tug.org/svn/texlive?view=revision&revision=67458
Author: karl
Date: 2023-06-24 21:58:27 +0200 (Sat, 24 Jun 2023)
Log Message:
-----------
circuitikz (24jun23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2023-06-24 19:58:27 UTC (rev 67458)
@@ -1,11 +1,22 @@
<!--- CircuiTikz - Changelog --->
The major changes among the different CircuiTikZ versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
+* Version 1.6.3 (2023-06-23)
+
+ The main change is that the definition of the "plus" and "minus" symbols used in several parts of the library has changed in order to achieve better alignment of voltages and amplifier symbols when using fonts different from Computer Modern.
+ Additionally, internal connection dots in transistors are configurable and have a new default, and documentation has got several fixes and enhancements.
+
+ - Change the definition of the "minus" symbol (see [this issue](https://github.com/circuitikz/circuitikz/issues/721)) for details
+ - Add documentation on how to contact the border of the source symbols (suggested by [user `@Tipounk` on GitHub](https://github.com/circuitikz/circuitikz/issues/722))
+ - in transistors, solder dots and connection dots for body diodes [are now configurable](https://github.com/circuitikz/circuitikz/issues/720)
+ - Add anchors for the symbols on the `oo`-type sources, suggested [by user @lapreindl on GitHub](https://github.com/circuitikz/circuitikz/issues/725); the symbols have been slightly changed and repositioned in the process
+ - several documentation fixes
+
* Version 1.6.2 (2023-05-13)
Several more styling options for elements (body diodes, transformers, crossing), a clock wedge shape for logical circuits, and documentation updates for ConTeXt, mainly noticing the (upstream) elimination of the thin `siunitx` layer compatibility macros.
- - there is no `siunitx` support for ConTeXt, point to the `units` package
+ - There is no `siunitx` support for ConTeXt, point to the `units` package
- `context` compatibility can have glitches: please see [this issue](https://github.com/circuitikz/circuitikz/issues/706)
- Add styling of `transform core` lines (suggested by [user `@myzinsky` on GitHub](https://github.com/circuitikz/circuitikz/issues/702))
- Add `scale` to the bodydiode options (suggested by [user `@sputeanus` on GitHub](https://github.com/circuitikz/circuitikz/issues/703))
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -5,6 +5,40 @@
\begin{itemize}
\item
+ Version 1.6.3 (2023-06-23)
+
+ The main change is that the definition of the ``plus'' and ``minus''
+ symbols used in several parts of the library has changed in order to
+ achieve better alignment of voltages and amplifier symbols when using
+ fonts different from Computer Modern. Additionally, internal
+ connection dots in transistors are configurable and have a new
+ default, and documentation has got several fixes and enhancements.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Change the definition of the ``minus'' symbol (see
+ \href{https://github.com/circuitikz/circuitikz/issues/721}{this
+ issue}) for details
+ \item
+ Add documentation on how to contact the border of the source symbols
+ (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/722}{user
+ \texttt{@Tipounk} on GitHub})
+ \item
+ in transistors, solder dots and connection dots for body diodes
+ \href{https://github.com/circuitikz/circuitikz/issues/720}{are now
+ configurable}
+ \item
+ Add anchors for the symbols on the \texttt{oo}-type sources,
+ suggested
+ \href{https://github.com/circuitikz/circuitikz/issues/725}{by user
+ @lapreindl on GitHub}; the symbols have been slightly changed and
+ repositioned in the process
+ \item
+ several documentation fixes
+ \end{itemize}
+\item
Version 1.6.2 (2023-05-13)
Several more styling options for elements (body diodes, transformers,
@@ -15,7 +49,7 @@
\begin{itemize}
\tightlist
\item
- there is no \texttt{siunitx} support for ConTeXt, point to the
+ There is no \texttt{siunitx} support for ConTeXt, point to the
\texttt{units} package
\item
\texttt{context} compatibility can have glitches: please see
@@ -184,7 +218,7 @@
B. Cameron, user \texttt{@cameroncb1} on GitHub)
\item
Added Shockley diode (suggested by
- {[}@dauph{]}(https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz))
+ \href{https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz}{@dauph})
\end{itemize}
\item
Version 1.5.2 (2022-05-08)
@@ -1362,7 +1396,7 @@
\item
Fixed varcap symbol at small scalings
\item
- New packet-option "straightvoltages, to draw straight(no curved)
+ New packet-option ``straightvoltages, to draw straight(no curved)
voltage arrows
\item
New option ``invert'' to revert the node direction at paths
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -249,6 +249,18 @@
Here, we will provide a list of incompatibilities between different versions of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than include a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
If unsure, you can check the version in your local installation by using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item Since version \texttt{1.6.3} the default symbol for the minus sign changed from the simple \verb|$-$| to \verb|$\vphantom{+}-$|. The reason is that in some (most?) font, the minus sign is enclosed in a smaller bounding box than the plus sign and that leads to poorly aligned minus symbols in \texttt{american} and \texttt{raised} voltages. This was not noticed before because the two symbols share the same bounding box in the default Computer Modern font. You can look at \href{https://github.com/circuitikz/circuitikz/issues/721}{this issue on GitHub} for more details; if you want to go back to the previous definitions you can write
+ \begin{lstlisting}
+ \ctikzset{amplifiers/minus=$-$}
+ \ctikzset{bipoles/cvsourceam/inner minus=$-$}
+ \ctikzset{bipoles/vsourceam/inner minus=$-$}
+ \ctikzset{voltage/american minus=$-$}
+ \end{lstlisting}
+ \item Since version \texttt{1.6.3} the size of the solder dot and the connection dot of the body diodes for transistors has changed (now they are the same and are configurable). The new default scale of~\texttt{0.7} makes the dots \emph{area} more or less one half the one of the external connections. You can go back to the previous values with
+ \begin{lstlisting}
+ \ctikzset{transistor bodydiode/dot scale=0.5,
+ transistor solderdot scale=1.0}
+ \end{lstlisting}
\item Since version \texttt{1.6.2} \texttt{siunitx} will \textbf{not} work anymore with \ConTeXt{} (it was a very poor simulation layer, anyway); it has been disabled in upstream \ConTeXt, in favor of \href{https://www.pragma-ade.nl/general/manuals/units-mkiv.pdf}{its own \texttt{units} module}.
\item Version \texttt{1.6.0} has a big rewrite of the block's code. In principle the changes are backward-compatible, but there were several bugs (wrong anchors, errors with rotations, and so on) that have been fixed in the process.
\item Since \texttt{v1.5.1}\footnote{Do not use \texttt{v1.5.0}, it's buggy.} color management (see section~\ref{sec:colors}) and the details of how the shapes are drawn and protected by the external drawing options has changed. There should be no substantial changes to the circuits, though.
@@ -2712,6 +2724,24 @@
\end{circuitikz}
\end{LTXexample}
+These two ``sources'' have additional anchors that reach the center of the symbol;\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/725}{user @lapreindl on GitHub}.} they are used sometimes to add a (symbolic) connection there, like for example a ground connection.
+
+\begin{LTXexample}[varwidth=true]
+\begin{tikzpicture}[european, scale=2, transform shape,
+ smalldot/.style={draw, circle,red, inner sep=0.2pt}]
+ \draw (0,0) to[oosourcetrans, name=A,
+ prim=delta, sec=wye] ++(1,0)
+ to[ooosource, name=B, prim=wye, sec=zig,
+ tert=delta] ++(1,0)
+ (A.symbolsec) -- ++(-45:0.5) node[ground]{};
+ \node [smalldot] at (A.symbolprim) {};
+ \node [smalldot] at (A.symbolsec) {};
+ \node [smalldot] at (B.symbolprim) {};
+ \node [smalldot] at (B.symbolsec) {};
+ \node [smalldot] at (B.symboltert) {};
+\end{tikzpicture}
+\end{LTXexample}
+
\subsubsection{Nullator and norator}
These are special elements used in some approaches to model ideal amplifiers\footnote{See \href{https://en.m.wikipedia.org/wiki/Nullor}{the Wikipedia article}; suggested by \href{https://github.com/circuitikz/circuitikz/issues/615}{user atticus-sullivan on GitHub}.}.
@@ -2802,7 +2832,7 @@
\paragraph{Polarity symbols.}
The symbols drawn into the \texttt{american voltage source}\footnote{Since version \texttt{1.1.0}, thanks to the suggestions and discussion
-\href{https://tex.stackexchange.com/questions/538723/circuitikz-what-should-i-do-to-put-the-and-on-the-appropriate-places-like-t}{in this TeX.SX question}.} can be changed by using the \verb|\ctikzset| keys \texttt{bipoles/vsourceam/inner plus} and \texttt{.../inner minus} (by default they are \verb|$+$| and \verb|$-$| respectively, in the current font), and move them nearer of farther away by twiddling \texttt{bipoles/vsourceam/margin} (default \texttt{0.7}, less means nearer).
+\href{https://tex.stackexchange.com/questions/538723/circuitikz-what-should-i-do-to-put-the-and-on-the-appropriate-places-like-t}{in this TeX.SX question}.} can be changed by using the \verb|\ctikzset| keys \texttt{bipoles/vsourceam/inner plus} and \texttt{.../inner minus} (by default they are \verb|$+$| and \verb|$\vphantom{+}-$| respectively, in the current font), and move them nearer of farther away by twiddling \texttt{bipoles/vsourceam/margin} (default \texttt{0.7}, less means nearer). The reason of the \verb|\vphantom| can be found in section~\ref{sec:american-voltage-custom}.
You can do the same with the \texttt{american controlled voltage sources}, substituting \texttt{cvsourceam} to \texttt{vsourceam} (notice the initial ``\texttt{c}'').
@@ -2841,8 +2871,38 @@
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Source borders}
+Unfortunately, the border of the sources is only easily accessed if some anchor is provided.
+The border anchors of the shapes are not tight on them (see section~\ref{sec:bipoles-border-anchors}), which is not easily changeable, given that the algorithm that positions the labels depends on it.
+On the other hand, \TikZ{} powerful partway coordinate calculation (around section 13.5.3 of the manual) makes it possible to easily identify points on a circle if the center and one point of the circle are known, as you can see in the following example.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ \path (0,0) to[oosourcetrans, name=T, ]++(2,0);
+ % Use partway modifiers to reach a point on the left circle
+ \draw ($(T.centerprim)!1!45:(T.left)$) -- ++(-135:0.2)
+ -- ++(0,-1) node[ground]{};
+ \begin{scope}[font=\tiny\ttfamily, pin distance=2mm, inner sep=0pt]
+ \foreach \a in {-90,-45,...,90}
+ \node [circ, scale=0.5, pin=\a:\a, color=red] at
+ ($(T.centersec)!1!\a:(T.right)$){};
+ \end{scope}
+\end{tikzpicture}
+\end{LTXexample}
+
+A similar approach can be used for dependent sources. Just remember that the anchors move (rotate) together with the component.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+ \begin{tikzpicture}[american]
+ \draw (0,0) to [cvsource, name=S] ++(0,2);
+ \node [circ,red] at ($(S.e)!0.3333!(S.n)$) {};
+ \node [circ,blue] at ($(S.e)!0.6666!(S.n)$) {};
+ \end{tikzpicture}
+\end{LTXexample}
+
+
\subsection{Instruments}
\begin{groupdesc}
\circuitdescbip*{ammeter}{Ammeter}{}
@@ -3813,7 +3873,7 @@
\circuitdesc{GaN hemt}{Gallium Nitride hemt (a ``styled'' \texttt{hemt}, see~\ref{sec:hemt})}{Q}( G/180/0.2,D/0/0.2,S/0/0.2, nogate/-120/0.2)
\end{groupdesc}
-\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively.
+\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively (You can adjust the size of the solder dot, see section~\ref{sec:solderdot-scale}).
\begin{groupdesc}
\circuitdesc{nfet}{nfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
@@ -3940,6 +4000,33 @@
You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
\texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
+To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command
+\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!. To remove the dot completely (only useful if you have \texttt{arrowmos} enabled, otherwise there will be no difference between P-MOS and N-MOS), you can use the option \texttt{nocircle} or \verb|\ctikzset{tripoles/pmos style/nocircle}|.
+
+\begin{groupdesc}
+ \circuitdesc{pmos,emptycircle}{pmos}{}
+ \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
+\end{groupdesc}
+
+This example show the combined effects of the arrows and gate-circle options:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[
+ info/.style={left=1cm, blue, text width=5em, align=right},]
+ \draw (0,1) node{pmos} (2,1) node{nmos};
+ \draw (0,0) node[info]{default} node[pmos]{} (2,0) node[nmos]{};
+ \ctikzset{tripoles/mos style/arrows}
+ \draw (0,-2) node[info]{arrows} node[pmos]{} (2,-2) node[nmos]{};
+ \ctikzset{tripoles/pmos style/emptycircle}
+ \draw (0,-4) node[info]{emptycircle} node[pmos]{} (2,-4) node[nmos]{};
+ \ctikzset{tripoles/pmos style/nocircle}
+ \draw (0,-6) node[info]{nocircle} node[pmos]{} (2,-6) node[nmos]{};
+ \ctikzset{tripoles/mos style/no arrows}
+ \draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
+ node[pmos]{} (2,-8) node[nmos]{};
+\end{circuitikz}
+\end{LTXexample}
+
You can also change\footnote{Thanks to the idea by \href{https://github.com/circuitikz/circuitikz/issues/655}{Dr. Matthias Jung on GitHub}.} the type of the arrow for the ``light rays'' of the phototransistors with the generic arrows options shown in~\ref{sec:tunablearrows}, using the name \texttt{opto}, like in the following (overdone) example. Also the \texttt{opto arrows} styling options (see section~\ref{sec:opto-arrows}).
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
@@ -4125,14 +4212,6 @@
\end{circuitikz}
\end{LTXexample}
-To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command
-\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!. To remove the dot completely (only useful if you have \texttt{arrowmos} enabled, otherwise there will be no difference between P-MOS and N-MOS), you can use the option \texttt{nocircle} or \verb|\ctikzset{tripoles/pmos style/nocircle}|.
-
-\begin{groupdesc}
- \circuitdesc{pmos,emptycircle}{pmos}{}
- \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
-\end{groupdesc}
-
\paragraph{Bulk terminals.} You can add a bulk terminal\footnote{Thanks to Burak Kelleci <kellecib at hotmail.com>.} to \texttt{nmos} and \texttt{pmos} using the key \texttt{bulk} in the node (and \texttt{nobulk} if you set the bulk terminal by default); additional anchors \texttt{bulk} and \texttt{nobulk} are added (in the next example, \texttt{tripoles/mos style/arrows} is enacted, too):
\begin{groupdesc}
@@ -4146,21 +4225,19 @@
\footnotetext{Since \texttt{v1.4.4}, noticed by \href{https://tex.stackexchange.com/q/619334/38080}{user \texttt{hinata exc} on Stack Exchange}.}
\end{groupdesc}
+
+\paragraph{Solder dots.}\label{sec:solderdot-scale}
+Solder dots are scaled-down\footnote{Since \texttt{v1.6.3}, suggested by \href{https://tex.stackexchange.com/q/687225/38080}{user Hartomes on TeX StackExchange}; previously, the default scale was \texttt{1.0}, which created a clash with body diodes.} version of the normal \texttt{circ} connection dot (\emph{pole}).
+This is to convey the information that the connection is \emph{internal} to the device, and not controllable from the outside. By default, they are scaled as the bodydiode connection dots (see section~\ref{sec:trans-bodydiode-custom}), but you can change them with the command \texttt{\textbackslash ctikzset\{transistor solderdot scale=\emph{x}\}}, where $x$ is the scale with respect to the normal \texttt{circ} node (default: \texttt{0.7}).
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[
- info/.style={left=1cm, blue, text width=5em, align=right},]
- \draw (0,1) node{pmos} (2,1) node{nmos};
- \draw (0,0) node[info]{default} node[pmos]{} (2,0) node[nmos]{};
- \ctikzset{tripoles/mos style/arrows}
- \draw (0,-2) node[info]{arrows} node[pmos]{} (2,-2) node[nmos]{};
- \ctikzset{tripoles/pmos style/emptycircle}
- \draw (0,-4) node[info]{emptycircle} node[pmos]{} (2,-4) node[nmos]{};
- \ctikzset{tripoles/pmos style/nocircle}
- \draw (0,-6) node[info]{nocircle} node[pmos]{} (2,-6) node[nmos]{};
- \ctikzset{tripoles/mos style/no arrows}
- \draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
- node[pmos]{} (2,-8) node[nmos]{};
-\end{circuitikz}
+\begin{tikzpicture}[]
+ \draw (0,0) to[short,*-] ++(.1,0)
+ node[nigfete, solderdot, anchor=G]{};
+ \ctikzset{transistor solderdot scale=1}
+ \draw (2,0) to[short,*-] ++(.1,0)
+ node[nigfete, solderdot, anchor=G]{};
+\end{tikzpicture}
\end{LTXexample}
\paragraph{Simplified symbols for depletion-mode MOSFETs}.
@@ -4342,6 +4419,7 @@
color & default & stroke color: \texttt{default} is the same as the component \\
dash & default & dash pattern: \texttt{default} means not to change the setting for the component; \texttt{none} means unbroken line; every other input is a dash pattern\footnotemark \\
scale & 0.3 & scale of the diode, with respect to the basic (not scaled) diode dimension.\\
+ dot scale & 0.7 & scale of bodydiode connections dots, with respect to the \texttt{circ} pole. Use zero to remove them (useful if you have circles around the transistor).\\
\bottomrule
\end{tabular}
\footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
@@ -4356,9 +4434,10 @@
circuitikz/transistor bodydiode/relative thickness=0.3}]
\draw (0,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_1$};
\draw[densely dashed] (3,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_2$};
- \draw (6,0) node (mosfet1) [nigfete,anchor=D,bodydiode,
+ \draw (6,0) node (mosfet1) [nigfete,anchor=D,bodydiode, tr circle,
circuitikz/transistor bodydiode/color=gray,
- circuitikz/transistor bodydiode/scale=0.2] {$Q_3$};
+ circuitikz/transistor bodydiode/scale=0.2,
+ circuitikz/transistor bodydiode/dot scale=0] {$Q_3$};
\draw (0,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
circuitikz/transistor bodydiode/dash={{2pt}{1pt}}] {$Q_4$};
\draw[densely dashed] (3,-2) node (mosfet1) [nigfete,anchor=D,
@@ -4366,13 +4445,12 @@
\ctikzset{transistor bodydiode/relative thickness=.5,
transistor bodydiode/scale=0.6}% from now on, in scope
\draw[densely dotted] (6,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
- circuitikz/transistor bodydiode/dash=none] {$Q_6$};
+ circuitikz/transistor bodydiode/dash=none,
+ circuitikz/transistor bodydiode/dot scale=1] {$Q_6$};
\path (7,0); %% adjust bounding box (node text is outside it!)
\end{tikzpicture}
\end{LTXexample}
-
-
\subsubsection{Transistors anchors}
For \textsc{nmos}, \textsc{pmos}, \textsc{nfet}, \textsc{nigfete}, \textsc{nigfetd}, \textsc{pfet}, \textsc{pigfete}, and \textsc{pigfetd} transistors one has \texttt{base}, \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{B}, \texttt{G}, \texttt{S} and \texttt{D}):
@@ -8334,7 +8412,7 @@
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[raised voltages]
\draw (0,1.5) to[R, v^=$v_1$, i=$i_1$] ++(2,0);
- \draw (0,0) to[R, v^=$v_1$, i=$i_1$,
+ \draw (0,0) to[R, v^=$v_1$, i_=$i_1$,
voltage shift=-1.0] ++(2,0);
\end{circuitikz}
\end{LTXexample}
@@ -8378,7 +8456,7 @@
If you want or need to maintain the old behavior for \texttt{open} voltage, you can set the key \texttt{open voltage position} to \texttt{legacy} (the default is the new behavior, which corresponds to the value \texttt{center}).
-\subsubsection{American voltages customization}
+\subsubsection{American voltages customization}\label{sec:american-voltage-custom}
Since 0.9.0, you can change the font\footnote{There was a bug before, noticed by the user \texttt{dzereb} on \href{https://tex.stackexchange.com/questions/487683/odd-minus-style-when-drawing-american-voltage}{tex.stackexchange.com} which made the symbols using different fonts in a basically random way. In the same page, user \texttt{campa} found the problem. Thanks!} used by the \texttt{american voltages} style, by setting to something different from nothing the key \texttt{voltage/american font} (default: nothing, using the current font) style:
@@ -8393,8 +8471,10 @@
\end{LTXexample}
Also, if you want to change the symbols (sometimes just the $+$ sign is drawn, for example, or for highlighting something),
-using the keys \texttt{voltage/american plus} and \texttt{voltage/american minus} (default \verb|$+$| and \verb|$-$|).
+using the keys \texttt{voltage/american plus} and \texttt{voltage/american minus} (default \verb|$+$| and \verb|$\vphantom{+}-$|).
+Notice that the definition of the minus sign is not simply \verb|$-$| because in most font (but not Computer Modern!) the size of the bounding box for the mathematical plus or minus are different. The \verb|\vphantom| forces the vertical size of the minus sign to be the same as the plus sign.\footnote{Changed in v1.6.3, you can look at \href{https://github.com/circuitikz/circuitikz/issues/721}{this issue on GitHub} for more details.}
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[american]
\ctikzset{voltage/american font=\scriptsize\boldmath}
@@ -8546,13 +8626,13 @@
\end{circuitikz}
\end{LTXexample}
-Or, for example, to have a different voltage style; normally you would define a macro:
+Or, for example, to have a different voltage style; normally you would define a macro (see~\ref{sec:american-voltage-custom} to understand the \verb|\vphantom|).
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[voltage shift=0.5]
\def\eurVPM#1#2{% node, label
\draw [thin, -{Stealth[width=8pt]}, shorten >=5pt,
- shorten <=5pt] (#1-Vfrom) node[font=\tiny]{$-$}
+ shorten <=5pt] (#1-Vfrom) node[font=\tiny]{$\vphantom{+}-$}
.. controls (#1-Vcont1) and (#1-Vcont2)..
(#1-Vto) node[font=\tiny]{$+$}
node[pos=0.5,anchor=\ctikzgetanchor{#1}{Vlab}]{#2};}
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -16,8 +16,8 @@
\startmodule[circuitikz]
\usemodule[tikz]
-\def\pgfcircversion{1.6.2}
-\def\pgfcircversiondate{2023/05/13}
+\def\pgfcircversion{1.6.3}
+\def\pgfcircversiondate{2023/06/23}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -467,6 +467,18 @@
\fi
}
+% set the text color (via \color) if the color is not default or none
+% needed in some strange case (like bodydiode' dots)
+\def\pgf at circ@maybe at color#1{%
+ \edef\@@none{none}\edef\@@default{default}%
+ \edef\@@tmp{\ctikzvalof{#1}}%
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none\else
+ \color{\@@tmp}%
+ \fi
+ \fi
+}
+
%%>>>
%% font changes compatible with plain/LaTeX/ConTeXt%<<<1
@@ -1125,7 +1137,10 @@
% shaping the +/- sign, see pgfcircvoltage.tex
\ctikzset{voltage/american font/.initial={}}
\ctikzset{voltage/american plus/.initial={$+$}}
-\ctikzset{voltage/american minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{voltage/american minus/.initial={$\vphantom{+}-$}}
% here we start the voltage adjustments for special components.
% default values:
%
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -2113,7 +2113,10 @@
%% To change the internal symbols of the voltage source american style
\ctikzset{bipoles/vsourceam/inner plus/.initial={$+$}}
-\ctikzset{bipoles/vsourceam/inner minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{bipoles/vsourceam/inner minus/.initial={$\vphantom{+}-$}}
%% Independent voltage source - American style
\pgfcircdeclarebipolescaled{sources}
{}
@@ -2398,15 +2401,18 @@
% triangle
\def\pgf at circ@delta#1{
\pgfscope
- \pgftransformscale{-.01*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf at circ@res at left*#1}
+ \pgftransformscale{-.015*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf at circ@res at left*#1}
\def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
\pgftransformrotate{-\pgfcircmathresult}
\pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgf at circ@set at relative@thickness{symbol/thickness}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{0}{.866\pgf at circ@res at up}}
+ % \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ % \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ % \pgfpathlineto{\pgfpoint{0}{.866\pgf at circ@res at up}}
+ \pgfpathmoveto{\pgfpointpolar{90}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpointpolar{-30}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpointpolar{-150}{\pgf at circ@res at up}}
\pgfpathclose
\pgfusepath{stroke}
\endpgfscope
@@ -2467,6 +2473,16 @@
\pgf at y=0pt\relax
\pgf at x=\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf at x
}
+ \anchor{symbolprim}{
+ \northeast
+ \pgf at y=0pt\relax
+ \pgf at x=-\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf at x
+ }
+ \anchor{symbolsec}{
+ \northeast
+ \pgf at y=0pt\relax
+ \pgf at x=\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf at x
+ }
}
{\ctikzvalof{bipoles/oosourcetrans/height}}
{oosourcetrans}
@@ -2580,7 +2596,6 @@
\anchor{centertert}{
\centertert
}
-
% add some anchors in case the are needed :)
\anchor{prim1}{
\pgf at circ@scaled at Rlen=\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen
@@ -2630,6 +2645,24 @@
\pgf at circ@res at other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at other
\pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf at circ@res at other}}
}
+ % symbol "center" anchors
+ \anchor{symbolprim}{
+ \northeast
+ \pgf at y=0pt
+ \pgf at x=-0.6\pgf at x
+ }
+ \anchor{symbolsec}{
+ \northeast
+ \pgf at ya=\pgf at y
+ \pgf at xa=\pgf at x
+ \pgfpointpolar{60}{0.6\pgf at ya}
+ }
+ \anchor{symboltert}{
+ \northeast
+ \pgf at ya=\pgf at y
+ \pgf at xa=\pgf at x
+ \pgfpointpolar{-60}{0.6\pgf at ya}
+ }
}
{\ctikzvalof{bipoles/ooosource/height}}
{ooosource}
@@ -2674,7 +2707,7 @@
% % primary winding
\ifpgf at circ@prim at delta
\pgfscope
- \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at left}
+ \pgftransformxshift{.6\pgf at circ@res at left}
\pgf at circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
@@ -2695,19 +2728,19 @@
\ifpgf at circ@sec at delta
\pgfscope
\pgfpointorigin
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf at circ@res at right}}
\pgf at circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf at circ@sec at wye
\pgfscope
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf at circ@res at right}}
\pgf at circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf at circ@sec at zig
\pgfscope
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf at circ@res at right}}
\pgf at circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
@@ -2715,19 +2748,19 @@
% % tertiary winding
\ifpgf at circ@tert at delta
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf at circ@res at right}}
\pgf at circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf at circ@tert at wye
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf at circ@res at right}}
\pgf at circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf at circ@tert at zig
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf at circ@res at right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf at circ@res at right}}
\pgf at circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
@@ -2824,7 +2857,10 @@
%% To change the internal symbols of the controlled voltage source american style
\ctikzset{bipoles/cvsourceam/inner plus/.initial={$+$}}
-\ctikzset{bipoles/cvsourceam/inner minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{bipoles/cvsourceam/inner minus/.initial={$\vphantom{+}-$}}
%% Controlled voltage source - American
\pgfcircdeclarebipolescaled{csources}
{}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -3380,6 +3380,8 @@
\ctikzset{transistor bodydiode/relative thickness/.initial=1}
\ctikzset{transistor bodydiode/color/.initial=default}
\ctikzset{transistor bodydiode/dash/.initial=default}
+\ctikzset{transistor bodydiode/dot scale/.initial=0.7}
+\ctikzset{transistor solderdot scale/.initial=0.7}
% this is unfortunate, but needed for backward compatibility
\ctikzset{transistor bodydiode/scale/.code={%
\ctikzset{tripoles/nmos/bodydiode scale=#1}%
@@ -3945,33 +3947,46 @@
\pgf at circ@setcolor
%
\ifnum \ctikzvalof{tripoles/#1/curr direction} > 0
- \pgf at circuit@trans at ntypetrue
+ \pgf at circuit@trans at ntypetrue
\else
- \pgf at circuit@trans at ntypefalse
- \fi
- \northeast
- \pgf at circ@res at up = \pgf at y
- \pgf at circ@res at down = -\pgf at y
- \pgf at circ@res at right = \pgf at x
- \left
- \pgf at circ@res at left = \pgf at x
- \pgf at circ@scaled at Rlen=\scaledRlen
- %
- #3%
- % BODY DIODE
- \ifpgf at circuit@fet at bodydiode
- \pgfscope
- \pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
- \pgf at circ@subset at color@dash{transistor bodydiode}
+ \pgf at circuit@trans at ntypefalse
+ \fi
+ \northeast
+ \pgf at circ@res at up = \pgf at y
+ \pgf at circ@res at down = -\pgf at y
+ \pgf at circ@res at right = \pgf at x
+ \left
+ \pgf at circ@res at left = \pgf at x
+ \pgf at circ@scaled at Rlen=\scaledRlen
+ %
+ #3%
+ % BODY DIODE
+ \ifpgf at circuit@fet at bodydiode
\drawbodydiode{#1}
- \endpgfscope
- \fi
- %
+ \fi
+ %
+ }
}
}
+
+\def\drawdobydiodedot#1#2{
+ % retrieve dot scale
+ \edef\@@tmp{\ctikzvalof{transistor bodydiode/dot scale}}
+ \ifdim\@@tmp pt>0pt
+ \pgfscope
+ \pgftransformshift{\pgfpoint{\pgf at circ@res at right}
+ {\ctikzvalof{tripoles/#1/bodydiode conn}#2}}
+ \pgftransformscale{\@@tmp}
+ % I'm not sure why this is needed, but...
+ \pgf at circ@maybe at color{transistor bodydiode/color}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+ \endpgfscope
+ \fi
}
\long\def\drawbodydiode#1{
+ \pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
+ \pgf at circ@subset at color@dash{transistor bodydiode}
\pgfscope
\pgftransformshift{\pgfpoint{-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\pgf at circ@res at up+\pgf at circ@res at down}}
\pgftransformrotate{90}
@@ -3999,12 +4014,7 @@
{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{east}}
\pgfusepath{draw}
- \pgfscope
- \pgftransformshift{\pgfpoint{\pgf at circ@res at right}
- {\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at circ@res at up}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope{}
+ \drawdobydiodedot{#1}{\pgf at circ@res at up}
%Draw lower connection to body diode
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}
{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
@@ -4011,11 +4021,7 @@
\pgfpathlineto{\pgfpoint{-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf at circ@res at left}{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
\pgfpathlineto{\pgfpointanchor{pgf at bodydiode}{west}}
\pgfusepath{draw}
- \pgfscope
- \pgftransformshift{\pgfpoint{\pgf at circ@res at right} {\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at circ@res at down}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope
+ \drawdobydiodedot{#1}{\pgf at circ@res at down}
}
\long\def\declarebpt#1{
@@ -5601,6 +5607,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf at circ@res at down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5615,6 +5622,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/nigfetebulk/gate height}\pgf at circ@res at down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5635,6 +5643,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf at circ@res at down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5657,6 +5666,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/pigfete/gate height}\pgf at circ@res at up}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope
\fi
@@ -5684,6 +5694,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf at circ@res at up}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5891,6 +5902,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf at circ@res at right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf at circ@res at down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -6085,7 +6097,10 @@
\ctikzset{tripoles/op amp/font=#1}%
}}
\ctikzset{amplifiers/plus/.initial={$+$}}
-\ctikzset{amplifiers/minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{amplifiers/minus/.initial={$\vphantom{+}-$}}
\tikzset{amp symbol font/.code={%
\ctikzset{amplifiers/symbol font={#1}}%
}
@@ -6993,8 +7008,7 @@
% main component, normally in thicker lines
\pgfscope
\newdimen\pgf at circ@res at right@double
- \pgf at circ@res at right@double=2\pgf at circ@res at right
-
+ \pgf at circ@res at right@double=2\pgf at circ@res at right
\pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
\pgftransformxshift{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}
\pgf at circ@res at step=\pgf at circ@res at right
@@ -7044,8 +7058,8 @@
\pgf at circ@text at strokecolor
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf at circ@res at up}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf at circuit@oa at iplusup\pgf at circ@ampli at plus\else\pgf at circ@ampli at minus\fi}
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf at circuit@oa at iplusup\pgf at circ@ampli at minus\else\pgf at circ@ampli at plus\fi}
- \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup$-\;$\else$+\;$\fi}
- \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup$+\;$\else$-\;$\fi}
+ \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup\pgf at circ@ampli at minus\space\else\pgf at circ@ampli at plus\space\fi}
+ \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf at circ@res at right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf at circ@res at up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf at circuit@oa at oplusup\pgf at circ@ampli at plus\space\else\pgf at circ@ampli at minus\space\fi}
}
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2023-06-24 19:58:27 UTC (rev 67458)
@@ -114,7 +114,10 @@
% the default font command is {} --- nothing
\def\pgf at circ@avfont{\ctikzvalof{voltage/american font}}
%
-% plus and minus symbols (default is $+$ and $-$, see pgfcirc.defines.tex)
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+% plus and minus symbols (default is $+$ and $\vphantom{+}-$, see pgfcirc.defines.tex)
%
\def\pgf at circ@avplus{\ctikzvalof{voltage/american plus}}
\def\pgf at circ@avminus{\ctikzvalof{voltage/american minus}}
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2023-06-24 18:02:58 UTC (rev 67457)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2023-06-24 19:58:27 UTC (rev 67458)
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.6.2}
-\def\pgfcircversiondate{2023/05/13}
+\def\pgfcircversion{1.6.3}
+\def\pgfcircversiondate{2023/06/23}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
More information about the tex-live-commits
mailing list.