You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.
I'm curious about how mathematicians draw commutative diagram, topology diagrams, etc in their papers.
I'm aware of tikz and tikz-cd, but for complicated diagrams it's time-consuming to draw them in tikz.
Is there an alternative to tikz that people use? I heard inkscape is a reasonable alternative.
There is Quiver.
It's based on tikz though apparently
I'm aware of quiver. My question was more general but I guess I just worded it poorly.
Say, I want to draw a complicated topological figure, is there an alternative to tikz?
I've used Inkscape once upon a time; it's not bad. But in my experience stuff drawn that way tends to look "approximate" whereas stuff drawn with tikz looks "exact" because you say say numerically exactly where you want things. Then again I mostly draw commutative diagrams, where inexact placement of objects is very noticeable; for more flabby topological pictures maybe it matters less.
For large commutative diagrams, tikzcd-editor can save a lot of time.
I have recently taken to using Penrose, see e.g. this example. It outputs an SVG which you can include in a LaTeX file.
In case anyone wants a pure text option, I've been using a few custom tikz styles that use the style of tikzcd, but without being constrained to a rectangular grid. Here's one illustrative example:
8e0bd0ce-d684-4f82-81c8-cf1448d31968.jpg
this is from the "advanced" part of a latex starter repository I made for some students a few years ago:
https://gitlab.com/nilesjohnson/latex_starter/-/tree/master/advanced
I've tweaked things a bit more since then, but I haven't bothered to update the repository. If anyone is interested, any of my recent arxiv posts would have the source, and I'm happy to discuss further.
Mike Shulman said:
For large commutative diagrams, tikzcd-editor can save a lot of time.
Out of curiosity, do you suggest tikzcd-editor because you find it does a better job than quiver? (I ask because, if there are shortcomings with quiver that are stopping people using it, I'd like to address them.)
Nathanael Arkor said:
Mike Shulman said:
For large commutative diagrams, tikzcd-editor can save a lot of time.
Out of curiosity, do you suggest tikzcd-editor because you find it does a better job than quiver? (I ask because, if there are shortcomings with quiver that are stopping people using it, I'd like to address them.)
One shortcoming I noticed is there doesn't appear to be a way to get a reflexive arrow (where source = target)?
Hmm, I think I just never got around to trying quiver and updating my bookmarks. On a quick glance, the only feature that's obviously (apparently) missing is loops, as Naso mentioned. Apparently you have to use a dedicated LaTeX style file too? That's a trifle annoying but I suppose not too big a deal; it looks like it just defines some tikz styles.
I've always used xypic to draw commutative diagrams. For small and simple diagrams it's very reasonable to use. For large complex diagrams ... just a bit more patience is needed.
Naso said:
One shortcoming I noticed is there doesn't appear to be a way to get a reflexive arrow (where source = target)?
This is the main feature that tikzcd-editor has that quiver doesn't, yes. I'd be interested to know if that's what would hold people back from using it.
Mike Shulman said:
Apparently you have to use a dedicated LaTeX style file too? That's a trifle annoying but I suppose not too big a deal; it looks like it just defines some tikz styles.
On this point, the package (which defines some useful TikZ styles) was recently added to CTAN, so it should be possible simply to \usepackage{quiver}
as soon as the package is added to TeXLive :)
Actually, I just saw that it's already available with TeXLive, so this is possible now.
(If you happen to be living on the bleeding edge of TeXLive.)
One thing that annoys me about tikz-cd are the long compilation times, and that it's not compatible with tikz's external
library, which allows for tikz-images to be cached so that they don't have to be recompiled on each run. I really hope they'll fix that in future versions of tikz-cd.
If it's something that can be fixed in tikz-cd
rather than external
, you could submit a feature request on the repository.
Nathanael Arkor said:
If it's something that can be fixed in
tikz-cd
rather thanexternal
, you could submit a feature request on the repository.
Good idea, done!
Nathanael Arkor said:
Mike Shulman said:
For large commutative diagrams, tikzcd-editor can save a lot of time.
Out of curiosity, do you suggest tikzcd-editor because you find it does a better job than quiver? (I ask because, if there are shortcomings with quiver that are stopping people using it, I'd like to address them.)
I never head about tikcd-editor, and checking it out I'm saying the best feature it has over quiver is being able to parse LaTeX back to a diagram! Reflexive arrows are also nice to have but so far I never missed this feature from quiver. Also let me say IMO quiver has a better UX (feels faster to use), but that might just be because I'm quite used to it by now.
I'm saying the best feature it has over quiver is being able to parse LaTeX back to a diagram!
This may not be the case for much longer :)
I use this,
http://anggtwu.net/dednat6/tug-slides.pdf
that is a front-end for diagxy, that in its turn is a front-end for xypic. It is very extensible and I use it to generate all the diagrams in my notes and papers - see:
http://anggtwu.net/math-b.html
Many of those diagrams use extensions of Dednat6 that use Pict2e as their back-ends (partly because Pict2e is very fast). But I only know one person besides me who uses Dednat6...
Nathanael Arkor said:
On this point, the package (which defines some useful TikZ styles) was recently added to CTAN, so it should be possible simply to
\usepackage{quiver}
as soon as the package is added to TeXLive :smile:
Any chance quiver can have the option in the menu to generate an output that does not depend on custom TikZ styles?
The package is very simple, and most of the styles won't be used in a typical diagram. So you could always manually add to your preamble the styles that happen to be used in your diagrams (e.g. it's likely you'll need the curve
style, but potentially not any of the others).
It seems like it should be easy for quiver to put the property definitions directly in the code it generates rather than referring to styles. Styles, like macros, are just abbreviations, so it should be able to expand the abbreviations.
It would be simple. However, it would result in (in some cases significantly) larger exported TikZ code. If this is a trade off people find preferable to including a package, or a style in the preamble, then it's something that could be considered.
Indeed, I like to repeat as little code as possible