Simple U-Arrow above Arrow in tikz
Since I´m having to write down a lot of biochemical reactions, I´d love to find an easier way for drawing curved arrows above other arrows in TikZ. I know that there´s an option in the chemfig package but it´s not working for any larger textsizes or if you´d like to include some figures or anything.
I´m curious if there´s any simpler solution for the U-arrow. So here´s my quite laborious way of doing the U-arrow so far:
Which gives me the following result:
My desired way of doing that would be something like this:
But I´m happy to here any other suggestions. Thanks in advance! :)
This is asking for a pic (but not with the syntax you proposed).
I define the two values radius as well as (half) the arc's angle and two styles for the two nodes that will be used by the pic chem U = {
}{} which needs two arguments for the two nodes. (The key pic text and the quotes library would allow setting the text via keys or the "â¦" syntax but using it with two nodes makes this a small task.)
For simple horizontal lines, the default styles for node 1 and node 2 would be enough. For other connections, an automatic placement of the nodes will be interesting but I want to see your use-cases first.
Here's a try with the decorations.pathreplacing TikZ library. Use the show path construction to set the lineto code:
Here the two coordinates of the segment are available with \tikzinputsegmentfirst and \tikzinputsegmentlast. Use let to compute its length:
Now we can draw the U-arrow, and scale it with respect to the path length, which is stored in \n1:
Then define a dedicated style to handle this, taken two arguments to set the arrow labels
Example: