Zulip Chat Archive
Stream: general
Topic: commutative diagrams in doc-gen
Yury G. Kudryashov (Feb 19 2022 at 14:41):
Hi, how do we type commutative diagrams in API docs? What styles are supported (if any)? amscd? xypic? tikz? I'm looking at docs#dense_inducing.tendsto_comap_nhds_nhds
Kevin Buzzard (Feb 19 2022 at 15:07):
Are you saying you don't like γ -f→ α g↓ ↓e δ -h→ β
? Hmm, you are right: it does look better in the source.
Alex J. Best (Feb 19 2022 at 15:17):
The site uses mathjax3 so I guess amscd would work
Matthew Ballard (Feb 19 2022 at 15:18):
If not, katex supports it
Matthew Ballard (Feb 19 2022 at 15:28):
TikzJax also exists but renders slowly in my experience
Matthew Ballard (Feb 19 2022 at 15:45):
Admittedly, these last two address what is possible rather than what is currently supported. But amscd is your best bet
Patrick Massot (Feb 19 2022 at 16:25):
I think we are simply hitting the limit of what browser rendering of tex can do here. Rather than necromancing amscd we should rather switch to server-side rendering of a png (here servver-side means doc-gen side).
Matthew Ballard (Feb 19 2022 at 16:51):
Yes, I agree server side is the correct choice the majority of the time.
Eric Wieser (Feb 19 2022 at 17:33):
I think mathjax can be prerendered, which still has the advantage of being searchable unlike an image
Patrick Massot (Feb 19 2022 at 17:41):
You can prerender mathjax for what mathjax can render, and a SVG image for what it cannot
Eric Wieser (Feb 19 2022 at 17:46):
Kevin Buzzard said:
Are you saying you don't like
γ -f→ α g↓ ↓e δ -h→ β
? Hmm, you are right: it does look better in the source.
The source would work just fine if the author remembered to include ```
around it
Patrick Massot (Feb 19 2022 at 17:54):
This was written long before it made sense to put any backquote in Lean comments.
Yakov Pechersky (Feb 20 2022 at 12:30):
A recent github blog post seems relevant: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/
Last updated: Dec 20 2023 at 11:08 UTC