TeX - LaTeX Asked by olinarr on June 3, 2021
I am trying to make a diagram with arrows between arrows.
Here is how it currently looks:
with code:
begin{tikzcd}
& a arrow[ld, "Rei"', no head, ""{name=r1}] arrow[rd, "Rei", no head, ""{name=r2}] &
b arrow["Neu"', no head, loop, distance=2em, in=305, out=235] &
& c arrow[d, "PosRes", no head]
& & d
& arrow[no head, from=r1, to=r2, dashed]
end{tikzcd}
I would like that dashed line to be straight. It appears to me that this happens because the arrow is "pointing" to the label of the right-most "Rei" arrow. I would like it to point to the center of it, so that the line is straight. However, I cannot find how to do this. Is there a general way to specify that the "arrow between arrows" should point to the center of each arrow (rather than the labels)? If not, what would be a good way to achieve this?
You could specify the to
coordinate as the point on the same height as r1
, but below r2
. Additionally you can use shorten >
(and shorten <
, if needed) to adjust the length. Something like to=r1-|r2, shorten >=0.5em
.
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}
& a arrow[ld, "Rei"', no head, ""{name=r1}] arrow[rd, "Rei", no head, ""{name=r2}] &
b arrow["Neu"', no head, loop, distance=2em, in=305, out=235] &
& c arrow[d, "PosRes", no head]
& & d
& arrow[no head, from=r1, to=r1-|r2, dashed,shorten >=0.5em]
end{tikzcd}
end{document}
Correct answer by gernot on June 3, 2021
Almost the same as @gernot answer (+1, he beat me for a minute, but my code is wee bit shorter):
documentclass{standalone}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[arrows=-]
& a arrow[ld, "mathrm{Rei}"', ""{name=r1}]
arrow[rd, "mathrm{Rei}" , ""{name=r2}]
&
b arrow["mathrm{Neu}"', loop, distance=2em, in=305, out=235]
&
& c arrow[d, "mathrm{PosRes}"]
& & d
& arrow[from=r1, to=r2 |-r1, dashed, shorten >=0.5em]
end{tikzcd}
end{document}
Answered by Zarko on June 3, 2021
My code it is off-topic with the tag, but also the forgotten xy package can do the same code like tikz-cd
. Here there is my MWE:
documentclass[a4paper,12pt]{article}
usepackage{mathtools}
usepackage[all]{xy}
begin{document}
xymatrix@R=3pc@C=4pc{ar @{} [dr] |{hspace{2.1cm} -------}
& a ar@{-}[dl]_{mathrm{Rei}} ar@{-}[dr]^{mathrm{Rei}}&
b ar@{-}@(dl,dr)_{mathrm{Neu}}& & c ar@{-}[d]^{mathrm{Pos,Res}}
& & d
}
end{document}
The line are right...if you make a zoom you get the straight lines.
Answered by Sebastiano on June 3, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP