quiver icon indicating copy to clipboard operation
quiver copied to clipboard

Double squiggly arrow renders as trapezoid

Open jliptrap opened this issue 3 years ago • 6 comments

Double squiggly arrows look fine in quiver, and the generated TikZ code looks reasonable to me, but pdflatex renders the double arrow as a trapezoid with squiggly top and bottom.

BTW thank you for making quiver, it's a huge timesaver!

jliptrap avatar May 24 '21 20:05 jliptrap

I guess you're seeing something like the following? image Strangely, for some arrows this doesn't seem to be an issue: image This will require some experimentation to determine when/why the problem occurs, and whether there's a simple fix. If you figure out a way to adjust the TikZ output to address this, let me know!

varkor avatar May 25 '21 14:05 varkor

A similar problem appears when shortening squiggly arrows. On quiver it displays fine but it renders as below on my machine. image

ralphS16 avatar May 26 '21 08:05 ralphS16

Yup, I can repro both squiggly bugs exactly as above.

BTW I think quiver should be featured on the nLab.

jliptrap avatar May 26 '21 16:05 jliptrap

I've opened a TeX.SE issue about the second issue (which I imagine is related, and is slightly simpler to describe), to see whether anyone has advice on a workaround (in which case, it might be possible to adjust the quiver accordingly). I may open one for the first issue afterwards, though my experience is that often arrow decorations do not work well in combination with double arrows, and it's quite hard to fix this without a lot of TikZ experience.

If anyone figures out a way around these issues in TikZ, I would be very happy to update quiver, though at the moment I"m not familiar enough with TikZ to figure out the problem myself.

BTW I think quiver should be featured on the nLab.

@jliptrap: you'd be very welcome to add a new entry on the nLab!

varkor avatar Jun 06 '21 11:06 varkor

A similar problem appears when shortening squiggly arrows.

A solution was given on TeX.SE, which I'll add to quiver soon. I still need to ask about the first issue.

varkor avatar Jun 07 '21 11:06 varkor

I think the original issue is the same issue as the second. For instance, the following looks fine:

\[\begin{tikzcd}
	\bullet && \bullet \\
	& \bullet
	\arrow[""{name=0, anchor=center, inner sep=0}, from=1-1, to=2-2]
	\arrow[""{name=1, anchor=center, inner sep=0}, from=1-3, to=2-2]
	\arrow[from=1-3, to=1-1]
	\arrow[shorten <=6pt, shorten >=6pt, Rightarrow, squiggly={pre length=8pt, post length=8pt}, from=1, to=0]
\end{tikzcd}\]

Unfortunately, the exact pre length and post length isn't so clear for diagonals, so it'll take some experimentation to figure out how to make this draw correctly in all cases.

varkor avatar Jun 07 '21 13:06 varkor