profile
viewpoint
Massimo Redaelli mredaelli Lari Digital Zurich

circuitikz/circuitikz 217

CircuiTikZ TeX/LaTeX package for drawing circuits

mredaelli/circuitikz 2

CircuiTikZ TeX/LaTeX package for drawing circuits

mredaelli/AnalyzeSkeleton 0

ImageJ/Fiji plugin to analyze 2D and 3D skeleton images

mredaelli/aws.ec2 0

AWS EC2 Client Package

mredaelli/enolib 0

The cross-language eno standard library

mredaelli/fs2-mongodb 0

Simple streaming interface for FS2 queries

push eventcircuitikz/circuitikz

Travis CI

commit sha 6a68b34880d103442ceb7262e7c49f9b3205fdea

Deploy to GitHub Pages: 6af138a87d8f5dbf16cd21bbfa1274912f11a1f8

view details

push time in 5 days

push eventcircuitikz/circuitikz

Romano Giannetti (at home)

commit sha 11f9e23da67ceed41294d48288a99f4c1c867aa6

Add the closed shape of normally open buttons and viceversa. Also, add a "tip" anchor to this. Suggested by @septatrix in https://github.com/circuitikz/circuitikz/issues/128#issuecomment-731771299

view details

Romano Giannetti

commit sha 6af138a87d8f5dbf16cd21bbfa1274912f11a1f8

Merge pull request #461 from Rmano/more-pushbuttons Add the closed shape of normally open buttons and viceversa.

view details

push time in 5 days

PR merged circuitikz/circuitikz

Add the closed shape of normally open buttons and viceversa. enhancement

Also, add a "tip" anchor to this. Suggested by @septatrix in https://github.com/circuitikz/circuitikz/issues/128#issuecomment-731771299

image

+74 -4

0 comment

3 changed files

Rmano

pr closed time in 5 days

issue closedcircuitikz/circuitikz

request : open push button and closed push button

Hi, Great library.

I guess currently there is only one push button style. I needed push button in both open and closed configuration. I was able to create them by changing bipoles/pushbutton/height parameter.

I guess having every switch in open and closed styles would be great.

closed time in 5 days

dilawar

PR opened circuitikz/circuitikz

Add the closed shape of normally open buttons and viceversa. enhancement

Also, add a "tip" anchor to this. Suggested by @septatrix in https://github.com/circuitikz/circuitikz/issues/128#issuecomment-731771299

image

+74 -4

0 comment

3 changed files

pr created time in 5 days

IssuesEvent

issue commentcircuitikz/circuitikz

request : open push button and closed push button

Oh that is great to know. Than I am personally in favour of having the upper end of the stem stay in the same position.

dilawar

comment created time in 11 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

I just realized that these buttons are path styles and not nodes so I think they do not even have anchors accessible from the outside. So if they do not allow one to put something at the stem manually I think it would be nice to keep the stem size and move everything down.

You can access anchors! Just name the path object: to[R, name=myr] and then you can refer to the anchors (myr.north west) etc etc. And the other way around, you can use any path style as a node: node[resistorshape](){} (the shape name is listed in the manual).

dilawar

comment created time in 11 days

issue commentcircuitikz/circuitikz

Path styles like short and R modify coordinate even if +(x,y) is used

You may also want to mention current point is local which I am currently using to get around this. It eliminates the need for named coordinates or absolute positions: (previous coordinate) {[current point is local] do something which messes up the current coordinate} automatically restored to previous coordinate

septatrix

comment created time in 11 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

I just realized that these buttons are path styles and not nodes so I think they do not even have anchors accessible from the outside. So if they do not allow one to put something at the stem manually I think it would be nice to keep the stem size and move everything down.

Otherwise I would have imagined people attaching things (e.g. lines) to the steam which would either shift or get disconnected when they are moved down but as this does not even seem possible I am in favour of keeping the stem length the same.

dilawar

comment created time in 11 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

It is possible to have both things (I can fake the size of the stem); I mean, it is possible to have the stem "going down" and maintain the label position. Or at least I think ;-)

dilawar

comment created time in 11 days

issue commentcircuitikz/circuitikz

Path styles like short and R modify coordinate even if +(x,y) is used

This is effectively a limitation of the to path handler of circuitikz. I will mark this as a bug, but I am not sure it is possible to solve it easily. The to path handler is doing a lot of things (drawing labels, setting anchors for voltages, etc.). So for now please use named coordinate to remember the initial position. I will at least add a notice about the temporary relative path movements in the manual. If you want to have a peek, the thing is in tex/pgfcircpath.tex.

septatrix

comment created time in 11 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

For me it would be most important that the text/labels remain at the same height. As their position depends on the anchors I think it would be best to make the stem longer and maintain the same anchor position. Decoupling the anchor from the stam seems like a bad idea (to me at least).

dilawar

comment created time in 11 days

issue openedcircuitikz/circuitikz

Path styles like short and R modify coordinate even if +(x,y) is used

When drawing a circuit and using path styles provided by circuitikz like short or R the current coordinates are unexpectedly modified. This is not a problem when absolute coordinates are used or relative coordinates using ++ notation. If one however uses temporary relative coordinates using + (which revert the coordinates to the previous ones after drawing the path) this leads to problems.

MWE

\documentclass{article}
\usepackage{circuitikz}

\begin{document}

\begin{circuitikz}
  \draw
    (0,0)
    {[] to[short] +(2,0)}
    +(0,0) -- ++(0,-1)
  ;
\end{circuitikz}

\end{document}

Expected output from MWE image

Actual output from MWE image

The expected output can be archived when adding current point is local in the empty brackets before the to[short] or removing the short style. However the former solution can not always be used and is cumbersome while the latter obviously becomes impossible if one wants to use styles like a resistor... I am fairly certain that tikz can handle this as decorations seem to work similar to the path styles and correctly handle these temporary relative coordinates.

created time in 12 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

Hmm, that's a good idea...

Should the stem maintain the same length or should the upper point stay in the same position? Not sure...

image

dilawar

comment created time in 12 days

issue commentcircuitikz/circuitikz

request : open push button and closed push button

I like these however I think it would be nice to have a closed variant of the normally open push button and vice versa. The difference would be that for the closed normally open button the contact would be at the top of both terminal dots and for the opened normally closed button the gap would be below the terminal circles.

dilawar

comment created time in 12 days

issue commentcircuitikz/circuitikz

Flow arrow empty shape

Of course you right. I'm just too dummy for this 😅

patrikradvanyi

comment created time in 16 days

issue commentcircuitikz/circuitikz

Flow arrow empty shape

(...) to[short,f=$I$,openarrow] (...)

yes, that could be done, but you know --- there is an infinity of possible options, for this, I added the "advanced" thing...

patrikradvanyi

comment created time in 16 days

issue closedcircuitikz/circuitikz

Flow arrow empty shape

Hi!

Can you create an option for a flow arrow which has an empty head? In Hungary this is the standard notation of the current arrow and it will be easier to use in education. I'm attached a picture about it below.

kép

Thank you! 😄

closed time in 16 days

patrikradvanyi

issue commentcircuitikz/circuitikz

Flow arrow empty shape

Oh' okay! Now it's clear! 😄 This level is too commplicated for me yet. I just wanted advise to enhance the package something like this:

(...) to[short,f=$I$,openarrow] (...)

Thak you again!

patrikradvanyi

comment created time in 16 days

issue commentcircuitikz/circuitikz

Flow arrow empty shape

This is possible already if you use the "Advanced currents, voltage and flows" (around page 154). You just define your own macro for the arrow and then apply it to your component, using the provided anchors.

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\newcommand{\myflow}[3][above]{%arguments: [options (default above)] {component name} {label to add}
    \draw [-{Triangle[open]}] (#2-Ffrom) -- (#2-Fto) node[pos=0.5, #1]{#3};
}
\begin{document}
\begin{circuitikz}
    \draw (0,0) to[short, f, name=S1] ++(3,0);
    \myflow{S1}{$I$}
\end{circuitikz}
\end{document}

image

patrikradvanyi

comment created time in 16 days

issue openedcircuitikz/circuitikz

Flow arrow empty shape

Hi!

Can you create an option for a flow arrow which has an empty head? In Hungary this is the standard notation of the current arrow and it will be easier to use in education. I'm attached a picture about it below.

kép

Thank you! 😄

created time in 16 days

issue commentcircuitikz/circuitikz

Colors of compoments not converted in dark background themes in Beamer

Notes a couple of things:

  1. if shouldn't nest tikzpictures and circuitikz, they're basically synonymous
  2. if your background is black, you should also issue \ctikzset{open poles fill=black}, otherwise, they'll be filled white.
\documentclass{beamer}

\mode<presentation>
{
 \usetheme{Pittsburgh}
 \usecolortheme{owl}% if commented out, white background
 \setbeamercovered{transparent}
}

\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usepackage[RPvoltages]{circuitikz}
\ctikzset{open poles fill=black}

\begin{document}
\begin{circuitikz}[color=white]
    \draw (0,3)   
    to [short,o-,i>=i] (2,3)  
    to [R=$R$] (2,0)
    to [short,-o](0,0);   
\end{circuitikz}
\end{document}

image

hurak

comment created time in a month

issue closedcircuitikz/circuitikz

Colors of compoments not converted in dark background themes in Beamer

It seems that the colors of components are somehow hardwired because if circuitikz is used within some dark background theme in Beamer, the components stay black, hence invisible in the dark background theme. But the connecting "wires" are correctly converted from black to white. Below is a minimum working example

\documentclass{beamer}

\mode<presentation>
{
 \usetheme{Pittsburgh}
 \usecolortheme{owl}                                      % if commented out, white background
 \setbeamercovered{transparent}
}

\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}
\begin{tikzpicture}
\begin{circuitikz}
    \draw (0,3)   
    to [short,o-,i>=i] (2,3)  
    to [R=$R$] (2,0)
    to [short,-o](0,0);   
\end{circuitikz}
\end{tikzpicture}
\end{document}```

closed time in a month

hurak

issue commentcircuitikz/circuitikz

Colors of compoments not converted in dark background themes in Beamer

Excellent! This saves my slides (from the need to be boring white) :-)

hurak

comment created time in a month

issue commentcircuitikz/circuitikz

Colors of compoments not converted in dark background themes in Beamer

Try using \begin{circuitikz}[color=white}. But yes, color is tricky, there is a whole chapter about it in the manual...

hurak

comment created time in a month

issue openedcircuitikz/circuitikz

Colors of compoments not converted in dark background themes in Beamer

It seems that the colors of components are somehow hardwired because if circuitikz is used within some dark background theme in Beamer, the components stay black, hence invisible in the dark background theme. But the connecting "wires" are correctly converted from black to white. Below is a minimum working example

\documentclass{beamer}

\mode<presentation>
{
 \usetheme{Pittsburgh}
 \usecolortheme{owl}                                      % if commented out, white background
 \setbeamercovered{transparent}
}

\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}
\begin{tikzpicture}
\begin{circuitikz}
    \draw (0,3)   
    to [short,o-,i>=i] (2,3)  
    to [R=$R$] (2,0)
    to [short,-o](0,0);   
\end{circuitikz}
\end{tikzpicture}
\end{document}```

created time in a month

issue commentcircuitikz/circuitikz

blue voltage arrow from manual label wrong rotation

@judober if you want to match the arrow size (Not necessary I think, but...) you can find info here: https://tex.stackexchange.com/questions/549347/circuitikz-arrowhead

judober

comment created time in a month

issue commentcircuitikz/circuitikz

blue voltage arrow from manual label wrong rotation

BTW, adding something as every bipole add= style could be interesting... will think about it.

judober

comment created time in a month

issue commentcircuitikz/circuitikz

blue voltage arrow from manual label wrong rotation

About your second question, there is no a "default label" for components --- and the anchors can be generated only if we have to typeset a label (this is different for i, v, f where you can just define them and have the anchors for the symbol; but notice that to have the anchors for the voltage labels, for example, you need to have the label with a least v=~ or v=\null (\null is \hbox{}, a void box).

You can always define a style for the components you use:

\tikzset{
    L+/.style={L, v=\null, i=~, f, l=~, a=~}, % use \null or ~ whatever you prefer
    V+/.style={V, v=~, i=~, f, l=~, a=~},
}

and then use them like (in your example):

\draw (150:4) to[L+, o-, l=$L_{ab}$, name=L1,] (150:2) to[V+, -*, v_={\(v_{12}\)}, name=V1] (0:0);

so that you can always override the direction or the label if you want (like to[L+, v<, ...] ...).

For the current direction, no, there is not a pre-defined function, but you can easily (well, after a bit of TikZ manual digging):

\newcommand{\darr}[1]{
        \pgfmathanglebetweenpoints{\pgfpointanchor{#1-Ifrom}{center}}{\pgfpointanchor{#1-Ito}{center}}
        \edef\myangletmp{\pgfmathresult}
        \typeout{\myangletmp}
        \node [flowarrow, rotate=\myangletmp, color=green] at (#1-Ipos){};
}

and you can use them like

	\draw (150:4) to[L+, o-, l=$L_{ab}$, name=L1,i>_] (150:2) to[V+, -*, v_={\(v_{12}\)}, name=V1] (0:0);
		\varr{V1}{$v_{12}$}
		\varr{L1}{$v_{longName}$}
		\iarr{V1}{$i$}\darr{V1}
                \iarr{L1}{$i$}\darr{L1}

image

judober

comment created time in a month

more