Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving coupler2 in a place different than (0,0) leaves pieces around #239

Closed
afcuttin opened this issue Jul 1, 2019 · 6 comments · Fixed by #241
Closed

Moving coupler2 in a place different than (0,0) leaves pieces around #239

afcuttin opened this issue Jul 1, 2019 · 6 comments · Fixed by #241
Assignees

Comments

@afcuttin
Copy link

afcuttin commented Jul 1, 2019

If I move coupler2 in a place different than (0,0), some pieces are left around (arrows and label)
In the following code, node A is placed in (0,0), and coupler2 in (2,2).
The pieces around node A do not move according to coupler2 node definition.

Everything works properly if I use coupler node, instead.

fig-fat.pdf

\documentclass[border=2cm,a4paper]{standalone}
\usepackage{siunitx}
\usepackage{pgfplots}
\pgfplotsset{
        compat=newest,
    }
\usepackage{circuitikz}

\def\coord(#1){coordinate(#1)}
\def\coord(#1){node[circle, red, draw, inner sep=1pt,pin={[red, overlay, inner
sep=0.5pt, font=\tiny, pin distance=0.1cm, pin edge={red, overlay
,}]45:#1}](#1){}}

\begin{document}
\begin{circuitikz}
	\node (a) at (0,0) [red] {A};
	\draw
	(2,2) node[coupler2](c1) {\SI{3}{dB}};
	\draw
	(c1.1) \coord(1) % to[short,-o] ++(-0.5,0) \coord(1)
	(c1.2) \coord(2) % to[short,-o] ++(0.5,0) \coord(2)
	(c1.3) \coord(3) % to[short,-o] ++(0.5,0) \coord(3)
	(c1.4) \coord(4) % to[short,-o] ++(-0.5,0) \coord(4)
	;
\end{circuitikz}
\end{document}

@Rmano Rmano added the bug label Jul 1, 2019
@Rmano Rmano self-assigned this Jul 1, 2019
@Rmano
Copy link
Collaborator

Rmano commented Jul 1, 2019

This is quite scary. The problem seems to be that the arc + arrow operation messes with the origin of the shape coordinates, and I really do not know why. I made a pull request that should fix this for you, but if anybody has any idea on what's really happening, please, tell me.

@afcuttin
Copy link
Author

afcuttin commented Jul 2, 2019

Thanks for handling it right away!
For the time being, I'm using coupler

@Rmano
Copy link
Collaborator

Rmano commented Jul 2, 2019

I will merge the fix during this morning, as soon as possible... It will be in the git version soon!

@Rmano Rmano closed this as completed in #241 Jul 2, 2019
Rmano added a commit that referenced this issue Jul 2, 2019
Fix problem with coupler2
See #239
@afcuttin
Copy link
Author

afcuttin commented Jul 2, 2019

Thanks!
Just out of curiosity, when will this update be propagated to CTAN (and then, available with the TeXLive manager)?

@Rmano
Copy link
Collaborator

Rmano commented Jul 2, 2019

I do not know exactly. I will wait for the fix to #234 (the author is working on it), and given the last days' experience, I'll let you find another couple of bugs ;-) (BTW, thanks a lot). I will surely do a release before my vacations, that is, around the end of July.

@afcuttin
Copy link
Author

afcuttin commented Jul 4, 2019

I'll let you find another couple of bugs ;-) (BTW, thanks a lot).

Happy to help! The package is really nice! IT Takes a bit to learn to use it, but is really nice and promising.

Rmano added a commit to Rmano/circuitikz that referenced this issue Jul 13, 2019
This is mainly a bugfix release.
     - Added the option to have "dotless" P-MOS (to use with arrowmos option)
       see circuitikz#243
     - Fixed a (puzzling) problem with coupler2
       see circuitikz#239
     - Fixed a compatibility problem with newer PGF (>3.0.1a)
       see circuitikz#243

Thanks to Alessandro Cuttin https://github.com/afcuttin for helping
with bug hunting and fixing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants