-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Labels for wires #6
Comments
I'll jot down a few ideas. Generally speaking, all standard TikZ techniques work: % these are all equivalent:
\draw (A.east.1) to[red, edge node={node [blue] {f}}] (B.west.2);
\draw (A.east.1) edge [red] node [blue] {f} (B.west.2);
\draw (A.east.1) edge [red, edge label={f}] (B.west.2);
\draw (A.east.1) edge [red, "f"[blue]] (B.west.2); So, however complicated the situation gets, one can always use plain Tikz. That being said, the most harmonious syntax could be obtained by injecting the last technique from above into the \wires{ A = { east.1 = B.west.2[red, "f"[blue]] } }{} It's not pretty, but for the most common usage it reduces to \wires{
A = { east.1 = B.west.2["f"] },
}{
A.east.2["g"]
} |
@paolobrasolin Thanks! I might try the first approach... Personally my experience with cool tikz libraries is that in the end I mainly want to use the primitive (like |
Cool, @jonsterling! Then be careful about the anchor names. The current release only has |
Is there an existing issue for this?
Original problem
It would be really nice to support placing a label node on a wire, like
--f--[box]--g--
. I think with this feature, it would be possible for me to begin using this package.Proposed solution
I am not certain what the most harmonious syntax for doing this would be. One tends to need a bit of flexibility in terms of where the label node is placed, how it is aligned or rotated, etc.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: