texlive[56660] Master/texmf-dist: circuitikz (14oct20)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 14 23:44:17 CEST 2020
Revision: 56660
http://tug.org/svn/texlive?view=revision&revision=56660
Author: karl
Date: 2020-10-14 23:44:17 +0200 (Wed, 14 Oct 2020)
Log Message:
-----------
circuitikz (14oct20)
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/pgfcirclabel.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 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2020-10-14 21:44:17 UTC (rev 56660)
@@ -1,6 +1,13 @@
<!--- 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.2.5 (2020-10-14)
+
+ Mainly a bugfix release fir `raised` voltage style.
+
+ - added macro to access labels and annotations anchors and direction
+ - fixed a bug in "raised" voltages' positions with `invert` and/or `mirror`
+
* Version 1.2.4 (2020-10-04)
- several documentation enhancment
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2020-10-14 21:44:17 UTC (rev 56660)
@@ -5,6 +5,19 @@
\begin{itemize}
\item
+ Version 1.2.5 (2020-10-14)
+
+ Mainly a bugfix release fir \texttt{raised} voltage style.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ added macro to access labels and annotations anchors and direction
+ \item
+ fixed a bug in ``raised'' voltages' positions with \texttt{invert}
+ and/or \texttt{mirror}
+ \end{itemize}
+\item
Version 1.2.4 (2020-10-04)
\begin{itemize}
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 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2020-10-14 21:44:17 UTC (rev 56660)
@@ -6412,6 +6412,33 @@
\end{circuitikz}
\end{LTXexample}
+
+If you want to have more access to the label positioning algorithm, since \texttt{1.2.5} you can access the label rotation using with the command \texttt{\textbackslash ctikzgetrotation\{\emph{nodename}\}} (where node name is for example \texttt{L1label} or \texttt{L2annotation}), and the anchor used for positioning the node as \texttt{\textbackslash ctikzgetanchor\{\emph{component label}\}\{\emph{type}\}}, where \emph{component label} is, for example, \texttt{L1} and type is either \texttt{label} or \texttt{annotation} (notice that the syntax is slightly different, for implementation reasons).
+Those values are available only if the dipole declares a \texttt{l} or \texttt{a} keys; if you want them without any label you need to declare a blank one (like for example \texttt{l=\textasciitilde}).
+The following example gives an idea of the values of those macro for the three types of label positioning strategies.
+
+\begin{LTXexample}[varwidth=true, pos=t, basicstyle=\small\ttfamily]
+\newcommand{\marklabann}[3][45]{% [angle] {node label} {type: label or annotation}
+\node[circle, draw, blue, inner sep=1pt,
+pin={[draw, blue, font=\tiny, align=left]#1:{#2 \\ dir: \ctikzgetdirection{#2#3} \\
+ anchor: \ctikzgetanchor{#2}{#3}}}] at (#2#3.\ctikzgetanchor{#2}{#3}) {};}
+\begin{tikzpicture}[scale=0.95, transform shape]
+\foreach \style/\xdelta in {straight/0, smart/5, rotate/10} {
+\begin{scope}[xshift=\xdelta cm]
+ \ctikzset{label/align = \style}
+ \draw (0,0) node[above right, rotate=45]{\style}
+ to[L, o-, l=$L_{ab}$, v, name=L1, a=a] ++(3,3)
+ to[ceV, -*, v, name=V1, l2_=L1 and L2, a^=A] ++(0,-3);
+ \marklabann[135]{L1}{label}
+ \marklabann[-90]{L1}{annotation}
+ \marklabann[90]{V1}{label}
+ \marklabann[-90]{V1}{annotation}
+\end{scope}}
+\end{tikzpicture}
+\end{LTXexample}
+
+
+
\subsection{Advanced voltages, currents and flows}\label{sec:vif-anchors}
Since version \texttt{1.2.1}, it is possible to access the anchors of the ``ornaments'' --- voltage, current and flows, together with some additional information that makes it possible to personalize them.
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2020-10-14 21:44:17 UTC (rev 56660)
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.2.4}
-\def\pgfcircversiondate{2020/10/04}
+\def\pgfcircversion{1.2.5}
+\def\pgfcircversiondate{2020/10/14}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2020-10-14 21:44:17 UTC (rev 56660)
@@ -195,7 +195,8 @@
\pgf at circ@res at temp=1.5\pgf at circ@res at temp
\fi
%Calculate rotation of the label from direction and strip decimals
- \edef\pgfcirclabrot{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+ \pgfmathsetmacro{\pgfcirclabrot}{round(\pgf at circ@direction)}
+ \edef\pgfcirclabrot{\expandafter\pgf at circ@stripdecimals\pgfcirclabrot\pgf at nil}
% rotate the label at second or third quadrant:
\ifnum \pgfcirclabrot > 90 \ifnum \pgfcirclabrot < 270
\pgfmathsubtract{\pgf at circ@direction}{180}
@@ -205,8 +206,10 @@
\pgf at circ@res at temp=1.5\pgf at circ@res at temp
\fi
\fi\fi
- \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf at circ@direction+90:\pgf at circ@direction-90}
- \edef\pgf at circ@labposangle{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+ \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf at circ@direction+90:\pgf at circ@direction-90}%
+ \edef\pgf at circ@labposangle{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}%
+ \expandafter\xdef\csname pgfcirc@\pgfcirc at a@prefix#1-direction\endcsname{\pgfcirclabrot}%
+ \expandafter\xdef\csname pgfcirc@\pgfcirc at a@prefix-#1-anchor\endcsname{mid}%
}
% reset cm is not working correctly here
(pgfcirc at labelcoor)++(\pgf at circ@labposangle:\the\pgf at circ@res at temp) coordinate(pgfcirc at labelcoor)
@@ -250,7 +253,6 @@
\fi
\fi\fi
%Values between -5 and 5 are at pos /neg x-axis
- \pgfextra{\def\uffa{}\newdimen\realshift\realshift=\dimexpr1pt\relax}
\ifnum \pgfcircmathresult <6 \ifnum \pgfcircmathresult > -6
\ifnum \ctikzvalof{bipole/#1/position} < 0
\ifnum \pgf at circ@labanc > 90
@@ -281,6 +283,10 @@
\fi
\fi
\fi\fi
+ \pgfextra{%
+ \expandafter\xdef\csname pgfcirc@\pgfcirc at a@prefix#1-direction\endcsname{0}%
+ \expandafter\xdef\csname pgfcirc@\pgfcirc at a@prefix-#1-anchor\endcsname{\pgf at circ@labanctext}%
+ }
(pgfcirc at labelcoor) node[anchor=\pgf at circ@labanctext,
inner sep=0.5\pgf at circ@res at temp, outer sep=0pt, \circuitikzbasekey/bipole #1 style,
](\ctikzvalof{bipole/name}#1){\strut\pgf at circ@finallabels{#1}%
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2020-10-14 21:44:17 UTC (rev 56660)
@@ -177,7 +177,7 @@
\fi
\ifpgf at circuit@bipole at voltage@raised
\def\pgf at circ@bipole at voltage@label at anchor{center}
- \pgfmathsetlength{\absvshift}{\absvshift+height{"Q"}} % with the current font.
+ \pgfmathsetlength{\absvshift}{\absvshift+sign(\absvshift)*height{"Q"}} % with the current font.
\fi
}
% %\pgf at circ@Rlen/\ctikzvalof{current arrow scale} is equal to the length of the currarrow
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2020-10-14 21:43:48 UTC (rev 56659)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2020-10-14 21:44:17 UTC (rev 56660)
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.2.4}
-\def\pgfcircversiondate{2020/10/04}
+\def\pgfcircversion{1.2.5}
+\def\pgfcircversiondate{2020/10/14}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
More information about the tex-live-commits
mailing list.