texlive[43430] Master/texmf-dist: circuitikz (8mar17)

commits+karl at tug.org commits+karl at tug.org
Wed Mar 8 23:59:29 CET 2017


Revision: 43430
          http://tug.org/svn/texlive?view=revision&revision=43430
Author:   karl
Date:     2017-03-08 23:59:29 +0100 (Wed, 08 Mar 2017)
Log Message:
-----------
circuitikz (8mar17)

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/generic/circuitikz/README.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/pgfcircpath.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.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	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2017-03-08 22:59:29 UTC (rev 43430)
@@ -1,6 +1,16 @@
 <!--- 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 0.8 (2017-03-08)
+	- Allow use of voltage label at a [short]
+	- Correct line joins between path components (to[...])
+	- New Pole-shape .-. to fill perpendicular joins
+	- Fixed direction of controlled american current source
+	- Fixed incorrect scaling of magnetron
+	- Fixed: Number of american inductor coils not adjustable
+	- Fixed Battery Symbols and added new battery2 symbol
+	- Added non-inverting Schmitttrigger
+
 * Version 0.7 (2016-09-08)
 	- Added second annotation label, showing, e.g., the value of an component
 	- Added new symbol: magnetron
@@ -69,7 +79,7 @@
 	- rename of context.tex and context.pdf (thanks to Karl Berry)
 	- updated the email address
     - in documentation, fixed wrong (non-standard) labelling of the axis in an example (thanks to prof. Claudio Beccaria)
-    - fixed scaling inconsistencies in quadrupoles    
+    - fixed scaling inconsistencies in quadrupoles
     - fixed division by zero error on certain vertical paths
     - introduced options straighlabels, rotatelabels, smartlabels
 

Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -4,12 +4,34 @@
 full list of changes.
 
 \begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
 \item
+  Version 0.8 (2017-03-08)
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Allow use of voltage label at a {[}short{]}
+  \item
+    Correct line joins between path components (to{[}\ldots{}{]})
+  \item
+    New Pole-shape .-. to fill perpendicular joins
+  \item
+    Fixed direction of controlled american current source
+  \item
+    Fixed incorrect scaling of magnetron
+  \item
+    Fixed: Number of american inductor coils not adjustable
+  \item
+    Fixed Battery Symbols and added new battery2 symbol
+  \item
+    Added non-inverting Schmitttrigger
+  \end{itemize}
+\item
   Version 0.7 (2016-09-08)
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     Added second annotation label, showing, e.g., the value of an
     component
@@ -36,7 +58,7 @@
   Version 0.6 (2016-06-06)
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     Added Mechanical Symbols (damper,mass,spring)
   \item
@@ -64,7 +86,7 @@
   Version 0.5 (2016-04-24)
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     new option boxed and dashed for hf-symbols
   \item
@@ -82,7 +104,7 @@
   Version 0.4
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     minor improvements to documentation
   \item
@@ -100,7 +122,7 @@
   Version 0.3.1
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     different management of color\ldots{}
   \item
@@ -121,7 +143,7 @@
   Version 0.3.0
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     fixed gate node for a few transistors
   \item
@@ -156,7 +178,7 @@
   Version 0.2.4
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     added square voltage source (contributed by Alistair Kwan)
   \item
@@ -177,7 +199,7 @@
     in documentation, fixed wrong (non-standard) labelling of the axis
     in an example (thanks to prof. Claudio Beccaria)
   \item
-    fixed scaling inconsistencies in quadrupoles\\
+    fixed scaling inconsistencies in quadrupoles
   \item
     fixed division by zero error on certain vertical paths
   \item
@@ -187,7 +209,7 @@
   Version 0.2.3
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     fixed compatibility problem with label option from tikz
   \item
@@ -237,7 +259,7 @@
   Version 0.2.2 - 20090520
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     Added the shape for lamps.
   \item
@@ -252,7 +274,7 @@
   Version 0.2.1 - 20090503
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     Op-amps added
   \item
@@ -263,7 +285,7 @@
   Version 0.2 - 20090417 First public release on CTAN
 
   \begin{itemize}
-  \itemsep1pt\parskip0pt\parsep0pt
+  \tightlist
   \item
     \emph{Backward incompatibility}: labels ending with
     \texttt{:}\textit{angle} are not parsed for positioning anymore.

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	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -1,6 +1,6 @@
 % % Konfiguration für Texstudio (Version > 2.9)
-% !TeX program = xelatex
-% !TeX TXS-program:compile = txs:///xelatex/[-8bit]
+% % !TeX program = xelatex
+%% !TeX TXS-program:compile = txs:///xelatex/[-8bit]
 % !BIB program = biber
 % !TeX spellcheck = en_US
 % !TeX encoding = utf8
@@ -114,7 +114,7 @@
 	\bottomrule
 \end{tabular}
 \end{table}
-\footnotetext{\ConTeXt\ suppurt was added mostly thanks to Mojca Miklavec and Aditya Mahajan.}
+\footnotetext{\ConTeXt\ support was added mostly thanks to Mojca Miklavec and Aditya Mahajan.}
 
 \noindent \TikZ\ will be automatically loaded.
 
@@ -137,7 +137,7 @@
 So, if loaded with said option, one must write \verb!(0,0) to[*R] (2,0)! and, for transistors on a path, \verb!(0,0) to[*Tnmos] (2,0)!, and so on (but \verb!(0,0) node[nmos] {}!). See example at page~\pageref{ex:compatibility}.
 
 \subsection{License}
-Copyright \copyright\ 2007--2016 Massimo Redaelli. This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘as is’, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
+Copyright \copyright\ 2007--2017 Massimo Redaelli. This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘as is’, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
 
 \subsection{Feedback}
 The easiest way to contact the authors is via the official Github repository: \url{https://github.com/circuitikz/circuitikz/issues}
@@ -145,11 +145,13 @@
 
 \section{Incompabilities between version}
 Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers.
+You can check the used version at your local installation using the macro \verb!\pgfcircversion{}!.
 \begin{itemize}
 \item Since v0.7?: The label behaviour at mirrored bipoles has changes, this fixes the voltage drawing, but perhaps you have to adjust your label positions.
 \item Since v0.5.1: The parts pfet,pigfete,pigfetebulk and pigfetd are now mirrored by default. Please adjust your yscale-option to correct this.
 \item Since v0.5: New voltage counting direction, here exists an option to use the old behaviour
 \end{itemize}
+For older projects, you can use an older version locally using the git-version and picking the correct commit from the repository (branch gh-pages).
 
 \section{Package options}
 
@@ -450,6 +452,7 @@
 \begin{itemize}
 	\circuititembip{battery}{Battery}{}
 	\circuititembip{battery1}{Single battery cell}{}
+	\circuititembip{battery2}{Single battery cell}{}
 	\circuititembip{european voltage source}{Voltage source (european style)}{}
 	\circuititembip{american voltage source}{Voltage source (american style)}{}
 	\circuititembip{european current source}{Current source (european style)}{}
@@ -734,7 +737,7 @@
 
 
 \subsection{Logic gates}
-
+\subsubsection{American Logic gates}
 \begin{itemize}
 	\circuititem{american and port}{American \textsc{and} port}{}
 	\circuititem{american or port}{American \textsc{or} port}{}
@@ -744,7 +747,7 @@
 	\circuititem{american xor port}{American \textsc{xor} port}{}
 	\circuititem{american xnor port}{American \textsc{xnor} port}{}
 \end{itemize}
-
+\subsubsection{European Logic gates}
 \begin{itemize}
 	\circuititem{european and port}{European \textsc{and} port}{}
 	\circuititem{european or port}{European \textsc{or} port}{}
@@ -761,6 +764,10 @@
 If otherwise \texttt{europeanports} option is active (or the style \texttt{[european ports]} is used), the shorthands \texttt{and port}, \texttt{or port}, \texttt{not port}, \texttt{nand port}, \texttt{not port}, \texttt{xor port}, and \texttt{xnor port} are equivalent to the european version of the respective logic port.
 \end{framed}
 
+\begin{itemize}
+	\circuititem{schmitt}{Non-Inverting \textsc{Schmitttrigger}}{}
+	\circuititem{invschmitt}{Inverting \textsc{Schmitttrigger}}{}
+\end{itemize}
 \subsection{Amplifiers}
 
 \begin{itemize}
@@ -1409,10 +1416,26 @@
 \end{circuitikz}
 \end{LTXexample}
 
+\subsection{Line joins between Path Components}
+Line joins should be calculated correctly, if the were on the same path and if the path is not closed. For example, the following path is not closed correctly(\textit{--cycle} does not work here!):
+\begin{LTXexample}[varwidth=true]
+	\begin{tikzpicture}[line width=3pt,european]
+	\draw (0,0) to[R]++(2,0)to[R]++(0,2)
+		--++(-2,0)to[R]++(0,-2);
+	\draw[red,line width=1pt] circle(2mm);
+	\end{tikzpicture}
+\end{LTXexample}
+To correct the line ending, there are support shapes to fill the missing rectangle. They can be used like the support shapes(*,o,d) using a dot (.) on one or both ends of a component(have a look at the last resistor in this example:
+\begin{LTXexample}[varwidth=true]
+	\begin{tikzpicture}[line width=3pt,european]
+	\draw (0,0) to[R]++(2,0)to[R]++(0,2)
+		--++(-2,0)to[R,-.]++(0,-2);
+	\draw[red,line width=1pt] circle(2mm);
+	\end{tikzpicture}
+\end{LTXexample}
 
 
 \section{Not only bipoles}
-
 Since only bipoles (but see section~\ref{sec:transasbip}) can be placed "along a line", components with more than two terminals are placed as nodes:
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}
@@ -1477,7 +1500,7 @@
   (pigfete.G) node[anchor=east] {G}
   (pigfete.D) node[anchor=north] {D}
   (pigfete.S) node[anchor=south] {S}
-  (pigfete.bulk) node[anchor=east] {Bulk}
+  (pigfete.bulk) node[anchor=west] {Bulk}
 ;\end{circuitikz}
 \end{LTXexample}
 
@@ -1537,7 +1560,7 @@
 ;\end{circuitikz}
 \end{LTXexample}
 
-\begin{LTXexample}
+\begin{LTXexample}[varwidth=true]
    \begin{circuitikz}
         \draw (0,2) 
             node[rground, yscale=-1] {} 

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.7}
-\def\pgfcircversiondate{2016/09/08}
+\def\pgfcircversion{0.8}
+\def\pgfcircversiondate{2017/03/08}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -186,6 +186,8 @@
 \ctikzset{bipoles/battery/width/.initial=.3}
 \ctikzset{bipoles/battery1/height/.initial=.6}
 \ctikzset{bipoles/battery1/width/.initial=.3}
+\ctikzset{bipoles/battery2/height/.initial=.6}
+\ctikzset{bipoles/battery2/width/.initial=.3}
 \ctikzset{bipoles/diode/height/.initial=.50}
 \ctikzset{bipoles/diode/width/.initial=.40}
 \ctikzset{bipoles/varcap/height/.initial=.50}
@@ -222,8 +224,14 @@
 \ctikzset{bipoles/tfullgeneric/width/.initial=.80}
 \ctikzset{bipoles/fullgeneric/height/.initial=.30}
 \ctikzset{bipoles/fullgeneric/width/.initial=.80}
-\ctikzset{bipoles/open/height/.initial=.25}
-\ctikzset{bipoles/open/width/.initial=.8}
+\ctikzset{bipoles/open/height/.initial=.3} %necessary for curly voltages
+\ctikzset{bipoles/open/width/.initial=.3} %necessary for curly voltages
+\ctikzset{bipoles/open/voltage/straight label distance/.initial=0}
+\ctikzset{bipoles/open/voltage/distance from node/.initial=.2}
+\ctikzset{bipoles/short/height/.initial=0} %dummy height for voltage positioning
+\ctikzset{bipoles/short/width/.initial=0} %dummy width for voltage positioning
+%\ctikzset{bipoles/short/voltage/straight label distance/.initial=.2}
+%\ctikzset{bipoles/short/voltage/distance from node/.initial=.5}
 \ctikzset{bipoles/ammeter/height/.initial=.60}
 \ctikzset{bipoles/ammeter/width/.initial=.60}
 \ctikzset{bipoles/ohmmeter/height/.initial=.60}
@@ -791,11 +799,13 @@
 \ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
 \ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
 \ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
+\ctikzset{bipole/nodes/left/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/left}{rectjoinfill}}}
 \ctikzset{bipole/nodes/right/.is choice}
 \ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
 \ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
 \ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
 \ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
+\ctikzset{bipole/nodes/right/rectjoinfill/.code={\ctikzsetvalof{bipole/nodes/right}{rectjoinfill}}}
 
 
 

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -329,7 +329,7 @@
 }
 
 
-%% Battery 1
+%% Battery 1 % poles with equl thickness
 
 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery1/height}}{battery1}{\ctikzvalof{bipoles/battery1/height}}{\ctikzvalof{bipoles/battery1/width}}{
 		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
@@ -344,15 +344,29 @@
 
 		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at up}}
 		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at down}}
-		
+		\pgfusepath{draw}
+}
 
+%% Battery 2 % negative pole thicker
 
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery2/height}}{battery2}{\ctikzvalof{bipoles/battery2/height}}{\ctikzvalof{bipoles/battery2/width}}{
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0}}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{0}}
+		\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0}}
+		\pgfusepath{draw}
 
+		\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at down}}
 		\pgfusepath{draw}
+		\pgfsetlinewidth{3\pgflinewidth}
+		\pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{.5\pgf at circ@res at down}}
+		\pgfusepath{draw}
 }
 
 
-
 %% cute inductor
 
 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
@@ -422,10 +436,10 @@
 	\pgf at circ@res at other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf at circ@Rlen
 
 	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\foreach \x in {1,...,\ctikzvalof{bipoles/americaninductor/coils}}
+	{
 	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	}
 	\pgfsetbuttcap
 	\pgfsetbeveljoin
 	\pgfusepath{stroke}
@@ -443,10 +457,10 @@
 	\pgf at circ@res at other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf at circ@Rlen
 
 	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+	\foreach \x in {1,...,\ctikzvalof{bipoles/vamericaninductor/coils}}
+	{
 	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
-	\pgfpatharc{180}{0}{\pgf at circ@res at step and  \pgf at circ@res at other}
+	}
 	\pgfsetbuttcap
 	\pgfsetbeveljoin
 	\pgfusepath{stroke}
@@ -875,8 +889,16 @@
 	\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{\pgf at circ@res at zero}}
 	\pgfusepath{draw}
 	\pgfscope
-		\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
-		\pgfnode{currarrow}{center}{}{}{\pgfusepath{draw}}
+		\ifpgf at circ@oldvoltagedirection
+			\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\else
+			\ifpgf at circuit@bipole at current@backward
+				\pgftransformshift{\pgfpoint{-.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+				\pgftransformrotate{180}
+			\else
+				\pgftransformshift{\pgfpoint{.5\pgf at circ@res at right}{\pgf at circ@res at zero}}
+		\fi\fi
+		\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
 	\endpgfscope
 }
 
@@ -1719,6 +1741,16 @@
 \ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
 \ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
 
+\ctikzset{.-/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{.-*/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{.-o/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{.-d/.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{-./.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
+\ctikzset{o-./.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
+\ctikzset{*-./.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
+\ctikzset{d-./.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
+\ctikzset{.-./.style = {\circuitikzbasekey/bipole/nodes/left=rectjoinfill, \circuitikzbasekey/bipole/nodes/right=rectjoinfill}}
+
 \tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
 
 
@@ -1727,29 +1759,41 @@
 \def\drawpoles{
 	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{diamond}  }
 	\ifx\pgf at temp\pgf at circ@temp 
-		{ (\tikztostart) node[diamondpole] {} }
+		 (\tikztostart) node[diamondpole] {} 
 	\else 
-		\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty}  }
+		\pgfextra{ \def\pgf at temp{empty}  }
 		\ifx\pgf at temp\pgf at circ@temp 
-			{ (\tikztostart) node[ocirc] {} }
+			 (\tikztostart) node[ocirc] {} 
 		\else 
-			\pgfextra{ \def\pgf at temp{full}  }
-			\ifx\pgf at temp\pgf at circ@temp
-				{ (\tikztostart) node[circ] {} }
+			\pgfextra{  \def\pgf at temp{full}  }
+			\ifx\pgf at temp\pgf at circ@temp 
+				(\tikztostart) node[circ] {} 
+			\else 
+				\pgfextra{ \def\pgf at temp{rectjoinfill} }
+				\ifx\pgf at temp\pgf at circ@temp 
+				 (\tikztostart) node[rectjoinfill] {} 
+				\else 
+				\fi
 			\fi
 		\fi
 	\fi
 	\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{diamond}  }
 	\ifx\pgf at temp\pgf at circ@temp 
-		{ (\tikztotarget) node[diamondpole] {} }
+		 (\tikztotarget) node[diamondpole] {} 
 	\else 
-		\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty}  }
+		\pgfextra{ \def\pgf at temp{empty}  }
 		\ifx\pgf at temp\pgf at circ@temp 
-			{ (\tikztotarget) node[ocirc] {} }
+			 (\tikztotarget) node[ocirc] {} 
 		\else 
-			\pgfextra{ \def\pgf at temp{full}  }
-			\ifx\pgf at temp\pgf at circ@temp
-				{ (\tikztotarget) node[circ] {} }
+			\pgfextra{  \def\pgf at temp{full}  }
+			\ifx\pgf at temp\pgf at circ@temp 
+				(\tikztotarget) node[circ] {} 
+			\else 
+				\pgfextra{ \def\pgf at temp{rectjoinfill} }
+				\ifx\pgf at temp\pgf at circ@temp 
+				 (\tikztotarget) node[rectjoinfill] {} 
+				\else 
+				\fi
 			\fi
 		\fi
 	\fi
@@ -1757,23 +1801,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 %% Lamp
 
 \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/lamp/height}}{lamp}{\ctikzvalof{bipoles/lamp/height}}{\ctikzvalof{bipoles/lamp/width}}{

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -47,29 +47,33 @@
 
 %% Generic bipole path
 \def\pgf at circ@bipole at path#1#2{
-	\pgfextra{
+
+\pgfextra{
 		\ctikzset{bipole/kind = #1}
 		
-		\edef\pgf at temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/name}}
+		\edef\pgf at temp{\ctikzvalof{bipole/name}}
 		\def\pgf at circ@temp{}
 		\ifx\pgf at temp\pgf at circ@temp % if it has not a name
 			\pgfmathrandominteger{\pgf at circ@rand}{1000}{9999}
 			\ctikzset{bipole/name = #2\pgf at circ@rand} % create it
 		\fi
-
-		\def\pgf at temp{open}
-		\def\pgf at circ@temp{#1}
+		\pgfsyssoftpath at getcurrentpath{\myp at th}%% save current path to extend after calculation of correct start/end coordinates
 	}
 
-		(\tikztostart) coordinate (\ctikzvalof{bipole/name}start)
+		(\tikztostart) coordinate (\ctikzvalof{bipole/name}start)%necessary to get correct coordinates in the case of relativ start/end or constructions like ((node1)-|(node2))
 		(\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
 		\pgfextra{
 			\pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
 							{\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
-			\edef\pgf at circ@direction{\pgfmathresult}		
+			\edef\pgf at circ@direction{\pgfmathresult}%Calculate direction(angle) of path
+			\pgfsyssoftpath at setcurrentpath{\myp at th}		
 		}
-	
-		($(\tikztostart) ! .5 ! (\tikztotarget)$) 
+	\pgfextra{\def\pgf at temp{open}\def\pgf at circ@temp{#1}}
+	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
+	\else
+		--($(\ctikzvalof{bipole/name}start) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}end)$) %ugly workaround to get correct linejoins(node breaks path?)
+	\fi
+		($(\tikztostart) ! .5 ! (\tikztotarget)$)%%positio of middle node 
 		node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}] 
 			(\ctikzvalof{bipole/name}) {}
 			\ifpgf at circuit@bipole at inverted
@@ -89,33 +93,40 @@
 					coordinate	(anchorendnode) at (\ctikzvalof{bipole/name}.right)
 				\fi
 			\fi
+	\pgfextra{\def\pgf at temp{open}\def\pgf at circ@temp{#1}}
 	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
 	\else
 		\ifpgf at circuit@bipole at strokedsymbol%draw line thrue symbol(e.g. diodes)
 			\ifcsname pgf at anchor@#1shape at strokepathstart\endcsname%if special path-anchors are defined, use them!
-				(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
+				(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}.strokepathstart)
 				(\ctikzvalof{bipole/name}.strokepathend)  -- (\ctikzvalof{bipole/name}end.center)
 			\else
-				(\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
+				(\ctikzvalof{bipole/name}start.center) -- (\ctikzvalof{bipole/name}end.center)
 			\fi
 		\else		
-			(\ctikzvalof{bipole/name}start.center) --(anchorstartnode)
+			(\ctikzvalof{bipole/name}start.center) -- (anchorstartnode)
 			(anchorendnode)  -- (\ctikzvalof{bipole/name}end.center)
-		
 		\fi
 	\fi
 	
-
+	\drawpoles
 	\pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabels{label}\fi
 	\pgf at circ@ifkeyempty{bipole/annotation/name}\else\pgf at circ@drawlabels{annotation}\fi
-	\drawpoles
 	\pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
 	\pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
+	\pgfextra{\def\pgf at temp{open}\def\pgf at circ@temp{#1}}
+	\ifx\pgf at temp\pgf at circ@temp  % if it is an open
+		(\ctikzvalof{bipole/name}end)%Move to end of path
+	\else
+		($(\ctikzvalof{bipole/name}end) ! .5\pgflinewidth ! (\ctikzvalof{bipole/name}start)$) -- (\ctikzvalof{bipole/name}end)%ugly workaround to get correct linejoins(node breaks path?)
+		%tikztostart and tikztotarget could not be used, because it would break if target coordinate is something like (node1-|node2)
+		
+	\fi
 	% reset
 	\pgfextra{
 		\pgfcircresetpath
 	}  
-	(\tikztotarget) 	\tikztonodes  % e si continua
+	\tikztonodes%draw pending nodes an path
 }
 
 
@@ -133,7 +144,8 @@
 \def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
 \def\pgf at circ@piezoelectric at path#1{\pgf at circ@bipole at path{piezoelectric}{#1}}
 \def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
-\def\pgf at circ@battery1 at path#1{\pgf at circ@bipole at path{battery1}{#1}}
+\def\pgf at circ@batteryone at path#1{\pgf at circ@bipole at path{battery1}{#1}}
+\def\pgf at circ@batterytwo at path#1{\pgf at circ@bipole at path{battery2}{#1}}
 \def\pgf at circ@europeaninductor at path#1{\pgf at circ@bipole at path{fullgeneric}{#1}}
 \def\pgf at circ@americaninductor at path#1{\pgf at circ@bipole at path{americaninductor}{#1}}
 \def\pgf at circ@cuteinductor at path#1{\pgf at circ@bipole at path{cuteinductor}{#1}}
@@ -285,7 +297,8 @@
 \compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
 \compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piezoelectric at path, l=#1}}
 \compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
-\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery1 at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@batteryone at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{battery2/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@batterytwo at path, \circuitikzbasekey/bipole/is voltage=true,  \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
 \compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@inductor at path, l=#1}}
 \compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@gfsurgearrester at path, l=#1}}
 \compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@americangfsurgearrester at path, l=#1}}
@@ -662,4 +675,4 @@
 \pgf at circ@definetranspath{pigbt}
 \pgf at circ@definetranspath{nigbt}
 \pgf at circ@definetranspath{Lpigbt}
-\pgf at circ@definetranspath{Lnigbt}
\ No newline at end of file
+\pgf at circ@definetranspath{Lnigbt}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -115,6 +115,28 @@
 		}
 }
 
+%% Fill for correct rectangular joins
+
+\pgfdeclareshape{rectjoinfill}{
+	\anchor{center}{
+		\pgfpointorigin
+	}
+	\anchorborder{
+		\pgf at circ@res at left=\pgf at x
+		\pgf at circ@res at up=\pgf at y
+	}
+	\behindforegroundpath{		
+		\pgfscope
+			\pgfpathrectanglecorners
+			{\pgfpoint{0}{.5\pgflinewidth}}
+			{\pgfpoint{0}{-.5\pgflinewidth}}
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+			\pgfusepath{draw,fill}		
+		\endpgfscope
+		}
+}
+
+
 %% Current arrow
 
 \pgfdeclareshape{currarrow}{
@@ -121,6 +143,12 @@
 	\anchor{center}{
 		\pgfpointorigin
 	}
+		\anchor{tip}{
+		\pgfpointorigin
+			\pgf at circ@res at step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+				\divide \pgf at circ@res at step by 16
+		\pgf at x	=\pgf at circ@res at step
+		}
 	\behindforegroundpath{		
 		
 		\pgfscope

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -738,13 +738,14 @@
 		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
 		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
 		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-		\pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathclose
 		\pgfusepath{draw}
 		\pgfpathellipse
 			{\pgfpoint{\pgf at circ@res at step-.5\pgf at circ@res at other}{0pt}}
 			{\pgfpoint{.5\pgf at circ@res at other}{0pt}}
 			{\pgfpoint{0pt}{.5\pgf at circ@res at other}}
-		\pgfusepath{draw}
+				\pgfsetfillcolor{white}
+		\pgfusepath{draw,fill}
 	\endpgfscope
 		
 		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
@@ -769,10 +770,114 @@
 	  }
 	}
 
+\pgfdeclareshape{schmitt}
+	{
+	  \anchor{center}{\pgfpointorigin}
+	  \savedanchor\northwest{%
+		\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf at y
+		\pgf at y=.5\pgf at y
+		\pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+		\pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf at x
+		\pgf at x=.5\pgf at x
+	  }
+	  \savedanchor\left{%
+	  	\pgf at y=0pt
+	  }
+	  \anchor{in}{
+		\northwest
+		\pgf at y=0pt
+	  }
+	  \anchor{out}{
+		\northwest
+		\pgf at y=0pt
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{center}{
+	  	\pgfpointorigin
+	  }
+	  \anchor{east}{
+	  	\left
+	  	\pgf at x=-.8\pgf at x  
+	  }
+	  \anchor{west}{
+	  	\left
+	  }
+	  \anchor{south}{
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north}{
+		\northwest
+		\pgf at x=0pt
+	  }
+	  	  \anchor{south west}{
+		\northwest
+		\pgf at y=-\pgf at y
+	  }
+	  \anchor{north east}{
+		\northwest
+		\pgf at x=-\pgf at x
+	  }
+	  \anchor{north west}{
+		\northwest
+	  }
+	  \anchor{south east}{
+		\northwest
+		\pgf at x=-\pgf at x
+		\pgf at y=-\pgf at y
+	  }	  
+	  \backgroundpath{			
+			\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}	
+			
+			
+			\northwest
+			\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
+			\pgf at circ@res at left = \pgf at x
+			
+		\pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf at circ@res at right
+						
+	\pgfscope
+		\pgfsetlinewidth{2\pgflinewidth}
+		\pgftransformxshift{.7\pgf at circ@res at left}
+		\pgf at circ@res at step=\pgf at circ@res at right
+		\advance\pgf at circ@res at step by -\pgf at circ@res at left
+		\pgf at circ@res at step=.7\pgf at circ@res at step
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+		\pgfpathclose
+		\pgfusepath{draw}
+	\endpgfscope
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+		
+		\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+		\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right-\pgf at circ@res at other}{0pt}}
+				\pgfusepath{draw}
+		%draw inner shape
+		
+		\pgfsetlinewidth{2\pgflinewidth}
+		
+		\pgfpathmoveto{\pgfpoint{.6\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+		\pgfpathlineto{\pgfpoint{.05\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+		\pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.25\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+		\pgfpathlineto{\pgfpoint{.25\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+		\pgfusepath{draw}
+	  
+	  }
+	}
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 % #1 - name
@@ -3235,22 +3340,29 @@
 		\pgfpointorigin
 	}
 	\anchor{anode}{
-	\northwest
-	\pgf at circ@res at step=	\pgf at y
-		\pgfpointorigin
-		\pgfpathmoveto{ \pgfpointpolar{-90}{\pgf at circ@res at step}}
+		\northwest
+		\pgf at x=0pt
+		\pgf at y=-\pgf at y
 	}
 	\anchor{cathode1}{
 		\northwest
-		\pgf at circ@res at step=	\pgf at y
-		\pgfpointorigin
-		\pgfpathmoveto{ \pgfpointpolar{105}{\pgf at circ@res at step}}
+		\pgf at circ@res at step=\pgf at y
+		\pgfmathparse{cos(105)}
+		\pgf at x=\pgfmathresult\pgf at circ@res at step
+		\pgfmathparse{sin(105)}
+		\pgf at y=\pgfmathresult\pgf at circ@res at step
+		%\pgfpointorigin
+		%\pgfpathmoveto{\pgfpointpolar{105}{\pgf at circ@res at step}}%not working in a scaled tikzpicture
 	}
 	\anchor{cathode2}{
 		\northwest
-		\pgf at circ@res at step=	\pgf at y
-		\pgfpointorigin
-		\pgfpathmoveto{ \pgfpointpolar{75}{\pgf at circ@res at step}}
+		\pgf at circ@res at step=\pgf at y
+		\pgfmathparse{cos(75)}
+		\pgf at x=\pgfmathresult\pgf at circ@res at step
+		\pgfmathparse{sin(75)}
+		\pgf at y=\pgfmathresult\pgf at circ@res at step
+		%\pgfpointorigin
+		%\pgfpathmoveto{\pgfpointpolar{75}{\pgf at circ@res at step}}%not working in a scaled tikzpicture
 	}
 	  \anchor{text}{
 		\pgfpointorigin

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex	2017-03-08 22:59:29 UTC (rev 43430)
@@ -90,16 +90,26 @@
 
 \def\pgf at circ@drawvoltagegeneric{
 	\pgfextra{
+	
+	
+	\edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}
+			\pgfkeysifdefined{\pgf at temp}
+				{ \edef\partwidth{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}} 
+					\def\tmpdistfromline{\partwidth\pgf at circ@Rlen}}
+				{ 
+		\edef\partwidth{0.5*\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/height}}
+			\def\tmpdistfromline{(\partwidth\pgf at circ@Rlen+0.2\pgf at circ@Rlen)}
+	}
 		\ifnum \ctikzvalof{mirror value}=-1
 			\ifpgf at circuit@bipole at inverted
 				\ifpgf at circuit@bipole at voltage@straight
-					\def\distfromline{\eudist}
+					\def\distfromline{\tmpdistfromline}
 				\else
 					\def\distfromline{\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
 				\fi
 			\else
 				\ifpgf at circuit@bipole at voltage@straight
-					\def\distfromline{-\eudist}
+					\def\distfromline{-\tmpdistfromline}
 				\else
 					\def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
 				\fi
@@ -107,13 +117,13 @@
 		\else
 			\ifpgf at circuit@bipole at inverted
 				\ifpgf at circuit@bipole at voltage@straight
-					\def\distfromline{-\eudist}
+					\def\distfromline{-\tmpdistfromline}
 				\else
 					\def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
 				\fi
 			\else
 				\ifpgf at circuit@bipole at voltage@straight
-					\def\distfromline{\eudist}
+					\def\distfromline{\tmpdistfromline}
 				\else
 					\def\distfromline{\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
 				\fi
@@ -136,12 +146,18 @@
 			{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
 	}
 	
+	% %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 is equal to the length of the currarrow
+	coordinate (pgfcirc at midtmp) at ($(\tikztostart) ! \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 ! (anchorstartnode)$) %absolute move, minimum space is length of arrowhead
+	coordinate (pgfcirc at midtmp) at ($(pgfcirc at midtmp) ! \distacefromnode ! (anchorstartnode)$)
 
-	coordinate (pgfcirc at midtmp) at ($(\tikztostart) ! \distacefromnode ! (anchorstartnode)$)
+	
 	coordinate (pgfcirc at Vfrom) at ($(pgfcirc at midtmp) ! -\distfromline ! \pgf at circ@voltage at angle:(anchorstartnode)$) 
-	coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (anchorendnode)$)
-	coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \distfromline ! \pgf at circ@voltage at angle : (anchorendnode)$)
+	coordinate (pgfcirc at midtmp) at ($(\tikztotarget) ! \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 ! (anchorendnode)$)%absolute move, minimum space is length of arrowhead
+	coordinate (pgfcirc at midtmp) at ($(pgfcirc at midtmp) ! \distacefromnode ! (anchorendnode)$)
 
+	coordinate (pgfcirc at Vto) at ($(pgfcirc at midtmp) ! \distfromline ! \pgf at circ@voltage at angle : (anchorendnode)$)
+
+
 	\ifpgf at circuit@bipole at voltage@below
 		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
 		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
@@ -153,9 +169,9 @@
 	\ifpgf at circuit@europeanvoltage
 		\ifpgf at circuit@bipole at voltage@straight
 			\ifpgf at circuit@bipole at voltage@backward
-				(pgfcirc at Vto) --(pgfcirc at Vfrom) node[currarrow, sloped,  allow upside down, pos=1] {} 
+				(pgfcirc at Vto) --(pgfcirc at Vfrom) node[currarrow, sloped,  allow upside down, pos=1,anchor=tip] {} 
 			\else
-				(pgfcirc at Vfrom) --(pgfcirc at Vto) node[currarrow, sloped,  allow upside down, pos=1] {}
+				(pgfcirc at Vfrom) --(pgfcirc at Vto) node[currarrow, sloped,  allow upside down, pos=1,anchor=tip] {} 
 				 	
 			\fi	
 		\else
@@ -194,18 +210,18 @@
 
 \def\pgf at circ@drawvoltagegenerator{
 	\ifpgf at circuit@bipole at voltage@below
-		coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
-		coordinate (pgfcirc at Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
+		coordinate (pgfcirc at Vfrom) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
+		coordinate (pgfcirc at Vto) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-60)$)
 	\else
-		coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
-		coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
+		coordinate (pgfcirc at Vfrom) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
+		coordinate (pgfcirc at Vto) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
 	\fi
 
 	\ifpgf at circuit@europeanvoltage
 		\ifpgf at circuit@bipole at voltage@backward
-			(pgfcirc at Vcont2)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont1)
+			(pgfcirc at Vto)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vfrom)
 		\else
-			(pgfcirc at Vcont1)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vcont2)
+			(pgfcirc at Vfrom)  -- node[currarrow, sloped,  allow upside down, pos=1] {} (pgfcirc at Vto)
 		\fi
 	
 	\else % american voltage
@@ -213,9 +229,9 @@
 	\ifpgf at circuit@bipole at voltageoutsideofsymbol
 		% if it is a battery, must put + and -
 			\ifpgf at circuit@bipole at voltage@backward
-				(pgfcirc at Vcont1)  node {$-$}  (pgfcirc at Vcont2) node {$+$}
+				(pgfcirc at Vfrom)  node {$-$}  (pgfcirc at Vto) node {$+$}
 			\else
-				(pgfcirc at Vcont1)  node {$+$}  (pgfcirc at Vcont2) node {$-$}
+				(pgfcirc at Vfrom)  node {$+$}  (pgfcirc at Vto) node {$-$}
 			\fi
 		\fi
 		
@@ -321,14 +337,23 @@
 			\pgf at circ@drawvoltagegeneric 
 		\fi
 		
-
-		
-		(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)
+	%	(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where) %Zeile sinnlos!?
+		\ifpgf at circuit@bipole at voltage@straight
+			coordinate (Vlab) at ($(pgfcirc at Vto)!0.5!(pgfcirc at Vfrom) $)
+			node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt] 
+					  at (Vlab) { \pgf at circ@finallabels{voltage/label} }
+		\else
 		coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
-			\ifpgf at circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
+			\ifpgf at circuit@europeanvoltage
+				\eudist
+			\else
+				\ctikzvalof{voltage/american label distance}
+			\fi !
 			(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)$)
-		node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=0] 
-			  at (Vlab) { \pgf at circ@finallabels{voltage/label} }
-}
+		node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt] 
+					  at (Vlab) { \pgf at circ@finallabels{voltage/label} }
+		
+		\fi
+		}%end drawvoltages
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2017-03-08 01:05:45 UTC (rev 43429)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2017-03-08 22:59:29 UTC (rev 43430)
@@ -17,8 +17,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{0.7}
-\def\pgfcircversiondate{2016/09/08}
+\def\pgfcircversion{0.8}
+\def\pgfcircversiondate{2017/03/08}
 
 \ProvidesPackage{circuitikz}%
         [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



More information about the tex-live-commits mailing list