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

Entry arrow inconsistent #613

Closed
lapreindl opened this issue Mar 2, 2022 · 4 comments · Fixed by #614
Closed

Entry arrow inconsistent #613

lapreindl opened this issue Mar 2, 2022 · 4 comments · Fixed by #614
Assignees

Comments

@lapreindl
Copy link

Hi,
input arrow inconsistent at [>] and [inputarrow] ... is it wanted? If I want consistency in my document I'll just use [inputarrow], but if there's an easier way ...

regards, Laurenz

see this example

(A)

\begin{circuitikz}
\draw
    (0,0) node(in){}
    (in) to ++(1,0) to [twoport, t={$\frac{k_\mathrm{I}}{s}$},>] ++(1,0) to ++(1,0) to [twoport, t={$\frac{1}{1+sT_1}$},>] ++(1,0) to ++(1,0) node[inputarrow]{}
;
\end{circuitikz}

(B)

\begin{circuitikz}
\draw
    (0,0) node(in){}
    (in) to ++(1,0) to [twoport, t={$\frac{k_\mathrm{I}}{s}$},name=A] ++(1,0) to ++(1,0) to [twoport, t={$\frac{1}{1+sT_1}$},name=B] ++(1,0) to ++(1,0) node[inputarrow]{}
    (A.w) node[inputarrow]{}
    (B.w) node[inputarrow]{}
;
\end{circuitikz}

(A)
a1

(B)
b1

@Rmano
Copy link
Collaborator

Rmano commented Mar 2, 2022

Not exactly "wanted". The problem is that the > is trying to put the tip of the arrow exactly on the border, taking into account the linewidth; then the line overruns the tip and so you see this.
This is effectively ugly. I'll see...

Rmano added a commit to Rmano/circuitikz that referenced this issue Mar 2, 2022
Refactor input arrow code; still need to check round bocks.
Morevoer, this is a matter of taste, maybe I'll add an option.
If merged, will fix circuitikz#613
@Rmano
Copy link
Collaborator

Rmano commented Mar 2, 2022

I have an (experimental, I have to study it a bit) patch to fix it, in PR #614, but I have to ponder it a bit more --- the shift was there for a lot of time, and a reason for it must exist.

Notice however that you have to take care the imperfection on the last (output) arrow by yourself, like this:

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[]
 \draw
    (0,0) node(in){}
    (in) -- ++(1,0) to [twoport, t={$\frac{k_\mathrm{I}}{s}$},>,name=A] ++(1,0) 
    -- ++(1,0) node[inputarrow, anchor=west]{};
    \draw [color=red, opacity=0.3] ([yshift=3mm]A.w) node[inputarrow]{};
\end{tikzpicture}
\end{document}

This is the output with the patch applied (should apply also to 1.4.6, but I do not guarantee it...)

image

@lapreindl
Copy link
Author

Hi,
thank you for your commit!
keep up the great work!

regards, Laurenz

(C)

\begin{circuitikz}
\draw
     (0,0) node(in){}
     (in) to ++(1,0) to [twoport, t={$\frac{k_\mathrm{I}}{s}$},>] ++(1,0) to ++(1,0) to [twoport, t={$\frac{1}{1+sT_1}$},>] ++(1,0) to ++(1,0) node[inputarrow, anchor=west]{};
;
\end{circuitikz}\\
\begin{circuitikz}
 \draw
     (0,0) node(in){}
     (in) to ++(1,0) to [twoport, t={$\frac{k_\mathrm{I}}{s}$},name=A] ++(1,0) to ++(1,0) to [twoport, t={$\frac{1}{1+sT_1}$},name=B] ++(1,0) to ++(1,0) node[inputarrow, anchor=west]{}
    (A.w) node[inputarrow]{}
    (B.w) node[inputarrow]{}
;
\end{circuitikz}

c1
c2

@Rmano
Copy link
Collaborator

Rmano commented Mar 2, 2022

reopening, I will close it when and if the PR is merged (thanks!).

@Rmano Rmano reopened this Mar 2, 2022
@Rmano Rmano self-assigned this Mar 2, 2022
@Rmano Rmano closed this as completed in #614 Mar 2, 2022
Rmano added a commit to Rmano/circuitikz that referenced this issue Apr 22, 2022
In this version, several internal changes have been included in order to
streamline and organize better the components and to change the
management of color. The changes are pretty deep and subtle, so a bug or
unexpected behaviour is always possible. You can use the 1.4.6 rollback
point in case of trouble, but be sure to report any bug.

- Added connectors shapes, and included the BNC into that class; thanks
  to [Alexander Sauter for suggesting them and helping in the
  design](circuitikz#611)
- Added nullator and norator shapes, suggested by [user atticus-sullivan
  on GitHub](circuitikz#615)
- Added buzzer and reversed buzzer bipoles, suggested by [user
  Michael.H](https://tex.stackexchange.com/q/640501/38080)
- Added "dot" anchors to inductances
- Added "boxed only" option for some circular blocks, suggested by [user
  myzinsky](circuitikz#621)
- Added DIN antenna shape, suggested by [user
  myzinsky](circuitikz#620)
- Fixed block/input arrow connection, thanks to [Laurenz Preindl for
  reporting](circuitikz#613)
- Fixed a problem with generic tunable arrows, noticed thanks to [this
  question on TeX.SX](https://tex.stackexchange.com/q/637182/38080)

Internal changes:

- Added a generic drawing function for shapes, which are now drawn
  always in background
- Added a hook system to be able to change component drawing settings
  per-shape, per-class or globally
- All the 250+ shapes are now "protected" by possible external arrow and
  arced corners parameters
- Completely changed the management of the shapes' color, thanks to
  [GitHub user
  muzimuzhi](circuitikz#605)
Rmano added a commit that referenced this issue Apr 22, 2022
CTAN release 1.5.0 (2022-04-22)

In this version, several internal changes have been included in order to
streamline and organize better the components and to change the
management of color. The changes are pretty deep and subtle, so a bug or
unexpected behaviour is always possible. You can use the 1.4.6 rollback
point in case of trouble, but be sure to report any bug.

- Added connectors shapes, and included the BNC into that class; thanks
  to [Alexander Sauter for suggesting them and helping in the
  design](#611)
- Added nullator and norator shapes, suggested by [user atticus-sullivan
  on GitHub](#615)
- Added buzzer and reversed buzzer bipoles, suggested by [user
  Michael.H](https://tex.stackexchange.com/q/640501/38080)
- Added "dot" anchors to inductances
- Added "boxed only" option for some circular blocks, suggested by [user
  myzinsky](#621)
- Added DIN antenna shape, suggested by [user
  myzinsky](#620)
- Fixed block/input arrow connection, thanks to [Laurenz Preindl for
  reporting](#613)
- Fixed a problem with generic tunable arrows, noticed thanks to [this
  question on TeX.SX](https://tex.stackexchange.com/q/637182/38080)

Internal changes:

- Added a generic drawing function for shapes, which are now drawn
  always in background
- Added a hook system to be able to change component drawing settings
  per-shape, per-class or globally
- All the 250+ shapes are now "protected" by possible external arrow and
  arced corners parameters
- Completely changed the management of the shapes' color, thanks to
  [GitHub user
  muzimuzhi](#605)
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