Category Theory
Zulip Server
Archive

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.


Stream: community: general

Topic: LaTeX support


view this post on Zulip David Spivak (Mar 23 2020 at 20:19):

$$\begin{tikzcd}A\ar[r, "f"]&B\end{tikzcd}$$

view this post on Zulip David Spivak (Mar 23 2020 at 20:20):

x2x^2

view this post on Zulip Christian Williams (Mar 23 2020 at 20:20):

yeah, we don't have tikzcd yet. but it's open source and has an active development community: chat.zulip.org

view this post on Zulip Nathanael Arkor (Mar 23 2020 at 21:28):

I think Zulip uses KaTeX, which doesn't support commutative diagrams (yet)

view this post on Zulip Nathanael Arkor (Mar 23 2020 at 21:28):

it's tracked here: https://github.com/KaTeX/KaTeX/issues/1834

view this post on Zulip Emily Pillmore (Mar 23 2020 at 21:29):

KaTeX tends to be "good enough" for most things, but yeah, you're going to have a bad time if you try and define a diagram. Take some photos until then.

view this post on Zulip Vlad Patryshev (Mar 23 2020 at 22:47):

no tikz, I guess.

view this post on Zulip Vinay Madhusudanan (Mar 24 2020 at 04:35):

Yeah, we'll have to take photos, as Emily says, or screenshots: https://tikzcd.yichuanshen.de/

view this post on Zulip Refurio Anachro (Mar 25 2020 at 17:30):

$z^2$

view this post on Zulip Fabrizio Genovese (Mar 25 2020 at 17:30):

Try with double dollar signs!

view this post on Zulip Refurio Anachro (Mar 25 2020 at 17:31):

a1a_1

view this post on Zulip Refurio Anachro (Mar 25 2020 at 17:32):

Different, but doesn't look right in the zulip app, though. I'll trust it does in a browser. Thanks @Fabrizio Genovese !

view this post on Zulip Fabrizio Genovese (Mar 25 2020 at 17:33):

In a browser it's perfect!

view this post on Zulip Refurio Anachro (Mar 25 2020 at 17:34):

The problem with diagrams in KaTeX seems to be that KaTeX supports offline rendering via node.js, which doesn't allow measuring distances the way MathJax does. I suppose .svg support would be too different from what the current code does. Disclaimer: it's been a while since I looked at that bug.

view this post on Zulip Verity Scheel (Mar 25 2020 at 17:35):

the Zulip app does a weird thing where it duplicates the LaTeX notation with plaintext, so it's hard to read, but it shows up correctly in browsers

view this post on Zulip Nathanael Arkor (Mar 25 2020 at 17:36):

@Nicholas Scheel: this is a known issue that's being tracked by https://github.com/zulip/zulip-mobile/pull/3744

view this post on Zulip Nathanael Arkor (Mar 25 2020 at 17:36):

so hopefully it'll be fixed soon!

view this post on Zulip Cyphase (Mar 31 2020 at 19:11):

The latest work is being done here; it's being actively worked on (last activity ~12 hours ago), and the lead developer of the mobile app considers it almost ready to merge. It shouldn't be long now at all.

view this post on Zulip Cyphase (Apr 02 2020 at 23:05):

Merged about five minutes ago! The issue has been closed. It should be in the next release.

view this post on Zulip Cyphase (Apr 03 2020 at 03:12):

There's been a new release of the mobile app; it's currently in beta, which shouldn't last more than 3-4 days based on past releases, at which point it'll be available to everyone on Google Play and the App Store. There's also an Android APK available now at the link.

view this post on Zulip Cyphase (Apr 04 2020 at 03:15):

The LaTeX \LaTeX -supporting version of the mobile app is now available to everyone on Google Play; the App Store takes a bit longer due to Apple's review process, but it's in the pipeline.

view this post on Zulip Eric M Downes (Apr 08 2020 at 20:37):

I'm on iOS fwiw LaTeX\LaTeX, april 8

view this post on Zulip Henry Story (Sep 05 2020 at 08:36):

Does anyone know of a document with good practices for using Latex to write Category Theory? (What is the best font for a category? etc...)

view this post on Zulip Carlos Vera (Sep 05 2020 at 09:55):

Henry Story said:

Does anyone know of a document with good practices for using Latex to write Category Theory? (What is the best font for a category? etc...)

This would be my suggestion

https://mirrors.rit.edu/CTAN/graphics/pgf/contrib/tikz-cd/tikz-cd-doc.pdf

view this post on Zulip Henry Story (Sep 05 2020 at 10:01):

Thanks @Carlos Vera, that is helpful, especially for all signs that are very recogniseable. But I was also wondering about a stylesheet, something that would answer questions such as: what is the font for the name of a category? ...
The HoTT book is online and I guess I could look there in the Tex, but I don't think those notations cover the usage of CT.

view this post on Zulip Henry Story (Sep 05 2020 at 10:04):

I have been drawing my diagrams with Omnigraffle mostly. Perhaps at some point I should move to programming them in tikz.

view this post on Zulip Carlos Vera (Sep 05 2020 at 10:05):

Henry Story said:

I have been drawing my diagrams with Omnigraffle mostly. Perhaps at some point I should move to programming them in tikz.

Oh I see, sorry, I misinterpreted your original question

view this post on Zulip Henry Story (Sep 05 2020 at 10:12):

Misinterpreted is too strong a word there :-)
Another type of question such a doc could answer would be: should I use \Rightarrow for functors?

view this post on Zulip Morgan Rogers (he/him) (Sep 05 2020 at 10:20):

I didn't expect to have strong feelings for this, but it's a visceral "no" from me on that last question :rolling_on_the_floor_laughing:

view this post on Zulip Morgan Rogers (he/him) (Sep 05 2020 at 10:26):

If you use them at all, save \Rightarrow for 2-cells (eg natural transformations, which are likely to come up), so that \Rrightarrow can be used for 3-cells and so on in a consistent way, with number of horizontal lines representing dimension of cell, if and when those become relevant.

view this post on Zulip Morgan Rogers (he/him) (Sep 05 2020 at 10:27):

Alternatively, if you never get higher than natural transformations, let the choice of style/lettering of the domain/codomain or the name of the arrow carry the distinctions between a morphism in a category and a functor between categories.

view this post on Zulip Henry Story (Sep 05 2020 at 11:08):

I got some good answers on Twitter https://twitter.com/cronokirby/status/1302185841633251328
(Who'd have thought that Twitter could be used for maths. The mind boggles)

@bblfish I've seen a bunch of different conventions for small things, so I'd guess not. In my personal notes: \mathcal{C} for arbitrary categories \bold{Set} for well known ones (\bold{Ens} if you're French or German) \hookrightarrow for monos \twoheadrightarrow for epis

- Lúcás Meier (@cronokirby)

view this post on Zulip Morgan Rogers (he/him) (Sep 05 2020 at 11:25):

All good suggestions!

view this post on Zulip Jules Hedges (Sep 05 2020 at 12:44):

Probably little known thing: You can download the source code of most papers on arXiv

view this post on Zulip John Baez (Sep 05 2020 at 18:29):

Another type of question such a doc could answer would be: should I use \Rightarrow for functors?

No, that would terribly confusing! Most importantly, nobody ever does it: they use \to. Second, functors are an 1-morphisms in Cat and 1-morphisms are denoted \to. Natural transformations are 2-morphisms in Cat so it's good to use \Rightarrow for them, e.g. α:FG\alpha : F \Rightarrow G where F,G:CDF,G : C \to D are functors.

view this post on Zulip Henry Story (Sep 05 2020 at 18:44):

Thanks. It would be useful to have a cheat sheet of a CT to latex mapping.
(all programming languages I have seen have those (eg. for scala)

view this post on Zulip John Baez (Sep 05 2020 at 18:49):

You should create one!

view this post on Zulip John Baez (Sep 05 2020 at 18:49):

You can read category theory papers and create a cheat sheet based on them.

view this post on Zulip Henry Story (Sep 05 2020 at 18:53):

ok, I guess I'll have to. I was that may have been done already :-/
I may not be the best person to do this though.

view this post on Zulip John Baez (Sep 05 2020 at 18:55):

You want it, so you're the best person to do it. (I've never heard a mathematician ask for it! It must be a computer science thing.)

view this post on Zulip Nathanael Arkor (Sep 05 2020 at 18:59):

There are some consistent notations (functors, natural transformations, adjunctions, etc.), but many notations differ between authors and papers, which I imagine would make it difficult to write down a "cheat sheet" like this. But that's not to say it's not worth trying :)

view this post on Zulip Henry Story (Sep 05 2020 at 19:03):

Perhaps this would be a good thing for a wiki actually.

view this post on Zulip John Baez (Sep 05 2020 at 19:04):

We've got the wiki:

https://wiki.functorialwiki.org/act/show/HomePage

Start a new page!

view this post on Zulip Morgan Rogers (he/him) (Sep 05 2020 at 19:21):

Henry Story said:

ok, I guess I'll have to. I was that may have been done already :-/
I may not be the best person to do this though.

If you do, I would be more than happy to give you a critique :grinning_face_with_smiling_eyes:

view this post on Zulip Henry Story (Sep 05 2020 at 19:40):

Ok, put a bit together here https://wiki.functorialwiki.org/act/show/latex_cheat

view this post on Zulip Ralph Sarkis (Sep 05 2020 at 19:54):

John Baez said:

Most importantly, nobody ever does it: they use \to. Second, functors are an 1-morphisms in Cat and 1-morphisms are denoted \to.

I really like denoting functors with \rightsquigarrow early on in my lectures in order to distinguish them from morphisms inside other categories. Once I feel the audience should be familiar with the concept of functors as morphisms in Cat\textbf{Cat}, I can drop this notation (although I usually only do so inside commutative diagrams).

view this post on Zulip John Baez (Sep 05 2020 at 19:56):

I spend a lot of time getting students used to mindblowing ideas like "functors are morphisms in the category of all categories", which tends to blow their mental fuses at first, because these "level shifts" are crucial in category theory.

view this post on Zulip John Baez (Sep 05 2020 at 19:56):

I think in general they catch on a lot faster than older people (like me) whose mental circuits are somewhat ossified.

view this post on Zulip John Baez (Sep 05 2020 at 19:57):

But, I find it helps to really talk about these level shifts and how they're confusing at first.

view this post on Zulip Nikolaj Kuntner (Sep 07 2020 at 18:03):

@John Baez on that note, I saw you being cited for a (quote) mindblowing fact (the writeup of the Borwein integral) a day ago here.

view this post on Zulip John Baez (Sep 10 2020 at 23:04):

Thanks, yes, that was a fun project I did with Greg Egan. He's the one who did the really hard calculation - I just computed by hand a bound on when the identities would break down.

view this post on Zulip John Baez (Sep 10 2020 at 23:05):

Just when you thought you understood the pattern...

view this post on Zulip Georgios Bakirtzis (Oct 16 2020 at 20:28):

Jules Hedges said:

Probably little known thing: You can download the source code of most papers on arXiv

Yeap so if you don't want people to see your weird comments you should probably use this https://github.com/google-research/arxiv-latex-cleaner :)

view this post on Zulip John Baez (Oct 16 2020 at 20:32):

So people don't see things like

\bibitem{Angelos} N.\ Angelos, Topological categories and categorical topology, \textsl{J.\ Rand.\ Math.\ } \textbf{44} (1980), 22--29. %stupid reference the referee made us add

view this post on Zulip Jules Hedges (Oct 16 2020 at 20:38):

But then you take away the fun for other people of finding your comments

view this post on Zulip John Baez (Oct 16 2020 at 20:42):

True, few people would read my papers then.

view this post on Zulip John Baez (Oct 16 2020 at 20:45):

The main reason for digging into people's LaTeX on the arXiv is to figure out how they get cool fonts, amazing diagrams, etc.

view this post on Zulip Nikolaj Kuntner (Oct 16 2020 at 20:57):

I'd peeked into "edit" on MO once or twice just because of this ;)

view this post on Zulip Fabrizio Genovese (Oct 16 2020 at 21:23):

John Baez said:

The main reason for digging into people's LaTeX on the arXiv is to figure out how they get cool fonts, amazing diagrams, etc.

Yeah, copy-pasting tikz code from other people's diagrams is 90% of the reasons why I look at other people's code. It's also why I find TiKzIt extremely disappointing.

view this post on Zulip Bob Coecke (Oct 16 2020 at 21:35):

Fabrizio Genovese said:

John Baez said:

The main reason for digging into people's LaTeX on the arXiv is to figure out how they get cool fonts, amazing diagrams, etc.

Yeah, copy-pasting tikz code from other people's diagrams is 90% of the reasons why I look at other people's code. It's also why I find TiKzIt extremely disappointing.

The only way one produces cool diagrams is by being an artist, and an artist doesn't copy. Blaming tikzit is like blaming a blank canvas for being a blank canvas.

view this post on Zulip John Baez (Oct 16 2020 at 21:38):

"Lesser artists borrow; great artists steal" - Pablo Picasso, stealing a line from Stravinsky.

view this post on Zulip Bob Coecke (Oct 16 2020 at 21:43):

John Baez said:

"Lesser artists borrow; great artists steal" - Pablo Picasso, stealing a line from Stravinsky.

Who did the cave (wo)man steal from? I consider myself in their league.

view this post on Zulip Fawzi Hreiki (Oct 16 2020 at 22:01):

Bob Coecke said:

John Baez said:

"Lesser artists borrow; great artists steal" - Pablo Picasso, stealing a line from Stravinsky.

Who did the cave (wo)man steal from? I consider myself in their league.

The monolith from 2001 perhaps.

view this post on Zulip Fabrizio Genovese (Oct 16 2020 at 23:09):

Bob Coecke said:

John Baez said:

"Lesser artists borrow; great artists steal" - Pablo Picasso, stealing a line from Stravinsky.

Who did the cave (wo)man steal from? I consider myself in their league.

They stole from nature.

view this post on Zulip David Michael Roberts (Oct 16 2020 at 23:09):

I can't believe it strips out TikZ source and replaces the code with pdf images. That's terrible, and antithetical to the arXiv philosophy. It would also play merry hell with people doing machine learning of category-theoretic diagrams using arXiv source files.

view this post on Zulip Fabrizio Genovese (Oct 16 2020 at 23:09):

The problem with code made with TiKzIt is that it's not compositional: If you draw a box in tikzit, in the tikz code you'll essentially find four points and four lines

view this post on Zulip Fabrizio Genovese (Oct 16 2020 at 23:10):

All node and edge names are also automatically generated, so there's basically no way to understand what-is-what

view this post on Zulip Fabrizio Genovese (Oct 16 2020 at 23:11):

Personally I just copy-paste components of my diagrams over and over and re-edit them as needed, but "stealing" is useful when one has to switch from some diagrammatic formalism to another. E.g. some time ago I was writing some notes and I needed to tikz some surface diagrams. I never did that before, so I had no macros/code to reuse. Taking a look at other people's paper souce code helped a lot.

view this post on Zulip Georgios Bakirtzis (Oct 17 2020 at 13:59):

David Michael Roberts said:

I can't believe it strips out TikZ source and replaces the code with pdf images. That's terrible, and antithetical to the arXiv philosophy. It would also play merry hell with people doing machine learning of category-theoretic diagrams using arXiv source files.

You choose to do this or not; the base program only strips out comments. But I am not sure what you mean here, it certainly doesn't go against arXiv if an author wants to hide hours of work (it is certainly not me though :grinning:) I think mathematicians are more prone to assign values to institution that doesn't have those values just because they behave that way in an institution.

view this post on Zulip David Michael Roberts (Oct 17 2020 at 21:39):

Well, in that case, why don't people just upload a pdf and no (La)TeX source? Mike Barr told me he didn't want to send his papers to the arXiv, though he very much makes them available for free (and is no fan of commercial publishers), because he didn't want to reveal his source. But the arXiv explicitly strongly discourages this option, so I was extending the sentiment to smaller, sub-article units produced with TeX-like code.

view this post on Zulip John van de Wetering (Oct 18 2020 at 10:24):

Why would you not want to share the source?

view this post on Zulip Georgios Bakirtzis (Oct 18 2020 at 15:32):

In my experience, it's people that are not proud of their work that are the most secretive with code/papers etc are the least proud of their work.

view this post on Zulip Georgios Bakirtzis (Oct 18 2020 at 15:32):

But that is a huge generalization (it's anecdotally true for me though)

view this post on Zulip Georgios Bakirtzis (Oct 18 2020 at 15:33):

I share but I don't want people to look at my comments predominantly because I have whole discussions with my coauthors in them, some that can be misconstrued in the context of the final product, everything else stays :)

view this post on Zulip Robert Seely (Oct 18 2020 at 16:05):

Giorgos Bakirtzis said:

I share but I don't want people to look at my comments predominantly because I have whole discussions with my coauthors in them, some that can be misconstrued in the context of the final product, everything else stays :)

:-) That's true enough - and sometimes the comments between coauthors are of a nature that might be "misinterpreted" by "outsiders" who don't get one's sense of "humour"!! ;-)
FWIW, when I've ever posted TeX source code, I've always deleted all comments as a matter of course (apart from in macro files, where they sometimes explain how the macro is to be used). The paper is supposed to be self-explaining, right?!?

view this post on Zulip John Baez (Oct 18 2020 at 16:25):

Doesn't want to reveal his source? Wow, I'd sure like to talk him out of that.

view this post on Zulip David Michael Roberts (Oct 18 2020 at 22:55):

@John Baez Please do!

view this post on Zulip Matteo Capucci (he/him) (Oct 19 2020 at 12:47):

John Baez said:

Doesn't want to reveal his source? Wow, I'd sure like to talk him out of that.

Maybe 'the source' is actually a person passing him papers, and he doesn't want to blow their cover

view this post on Zulip Matteo Capucci (he/him) (Oct 19 2020 at 12:47):

conspiracy intensifies

view this post on Zulip Jules Hedges (Oct 19 2020 at 13:23):

Robert Seely said:

sometimes the comments between coauthors are of a nature that might be "misinterpreted" by "outsiders" who don't get one's sense of "humour"!! ;-)

On the other hand, my last push to the open games public code repository contained the following comment:
-- extremely evil hack, do not think about what this does or your brain will rot

view this post on Zulip Mike Shulman (Apr 23 2021 at 19:39):

I thought at some point we could make displayed equations on zulip with triple dollar-signs. But if so, it seems to have gone away?

$$$ x^2 $$$

Does anyone know more about this?

view this post on Zulip Nathanael Arkor (Apr 23 2021 at 19:41):

You can use ```math, like a code block:

x2x^2

view this post on Zulip Nathanael Arkor (Apr 23 2021 at 19:41):

(I don't know whether triple dollar was ever an alternative syntax for this.)

view this post on Zulip Mike Shulman (Apr 23 2021 at 19:43):

Ah, that's good to know, thanks.