For those who have not encountered it, **quiver** is a web-based editor for commutative and pasting diagrams. Currently, **quiver** just exports to tikz-cd, but we’re currently working on the ability to export embeddable `<iframe>`

s.

The diagrams on the nLab are a mix of MathJax `array`

s and screenshots from LaTeX output (e.g. see the page for Kan extensions), neither of which look very good and are difficult to modify. I wanted to suggest the possibility of using **quiver** to render these diagrams. This would mean that diagrams would look consistent, good at any screen resolution, and be easy to modify. Furthermore, nLab readers would be able to save any of the diagrams on the nLab as tikz-cd so they could use them without having to copy them out manually.

I’d like to hear what people think of this idea: if there’s general support, then we can discuss how to go about implementing this. (For instance, I imagine it would be best to host a version of **quiver** on the nLab itself, so that the nLab is not relying on an external service.)

Formulas are rendered as LaTeX and not itex when using tikzcd, e.g. \begin{tikzcd} Id \end{tikzcd} produces $I d$ as opposed to $Id$. Is there a way to fix this?

]]>Is there a way (or a convenient way, or a standard way) of writing string diagrams on the nLab? In particular I could use something for just usual symmetric monoidal categories.

]]>(a) Is this a useful sort of thing to add?

(b) If so, any thoughts on what other articles would be enhanced by them? Now that I've worked out how to draw string diagrams and extract them to pngs, I might as well do a bunch more!

A few obvious candidates:

* "string diagram" itself

* everything mentioned there, especially symmetric, braided etc. monoidal categories;

* "monad"

* (weak) higher variants of monads and adjunctions

(c) Any comments on, or constructive criticism of, the diagrams? (Too big? Too small? Style?...) ]]>

In the article functor (homotopytypetheory) I am trying to draw a pentagon of equalities. Now Mathjax doesn’t come with long equalities so I tried to draw an SVG but as you can see my SVG skills are: ¯_(ツ)_/¯.

What is the best way to go about this?

For reference this is Lemma 9.2.10 from the HoTT Book.

]]>This is a thread to collect methods to produce symbols signifying higher cells, especially with current nLab software.

Another arrow-related thread is this, though not for higher cells.

]]>Following on from the discussion on the cafe, I've discovered that tikz (a fairly sophisticated LaTeX picture package) can be converted to SVG. Basically, running htlatex (from the TeX4ht package) on a latex document with tikz pictures in produces SVG versions of the pictures. There are a few limitations, mainly to do with text, but it seems to work.

However, including SVGs in Instiki doesn't seem to work exactly. Compare the picture in the sandbox with the original SVG:

For more examples, see the page of my talk on Comparative Smootheology at the Ottawa conference which is here.

The trick, from the pgf manual, is to load the correct output driver *before* loading the Ti_k_Z package. The line is:

```
\def\pgfsysdriver{pgfsys-tex4ht.def}
```

I got this hint originally from someone's user page on Wikipedia, but it's covered fully in the PGF manual.

]]>There is a problem with how the pentagon graphics at *monoidal category > pentagon* is displayed:

at least on my system, every single label of the vertices has its last two characters chopped off.

(This diagram is included, of course, at *monoidal category*).

In a seminar I’m teaching, I wanted to share some of the relationships between some of the different sorts of objects that might be called “presentations of $\infty$-categories”. I ended up with this diagram. (Incidentally, I don’t know if “diagrams” is actually the correct category for this nforum discussion; if not, anyone should feel free to change it.)

But so, it occurred to me that this might be pedagogically useful to others. In particular, it might make sense to link on the nLab somewhere, though I don’t know where offhand. So I would appreciate any comments or suggestions on this front. (I’d be fine with hearing the opinion that it’s not worth putting on the nLab; I know it’s super rough, and I definitely wouldn’t be offended.)

Of course, it’d be better if this were a texed diagram instead of a picture, but I don’t have the time to do that right now. On the other hand, I think most aspects are more-or-less self-explanatory to someone who’s in the know, but definitely not everything. So I’ll at least make a few comments.

The lowercased objects such as $cat$, $relcat$, etc., are “strict” objects, i.e. their objects have

*sets*of objects. For example, $cat$ is reflective inside of $sSet$, whereas $Cat \subset Cat_\infty$ is a full ($\infty$-)subcategory.The “flag” hanging off to the left comes logically before the rest of the diagram. That is, the interpretation of the rest of the diagram is premised on the facts contained therein.

Things pretty much commute “as much as you would expect” (for a diagram involving a bunch of adjoints), with the following caveats.

The upper-left triangle (describing the two different ways of extracting an adjunction of $\infty$-categories from an enriched adjunction of simplicial model categories) isn’t (yet) known to commute.

The corresponding triangle for Quillen equivalences is known to commute. (I think? Actually I’m not sure how to prove this offhand…)

The pentagon with $modelcat^\delta_{sSet}$ at the top-left

*doesn’t*commute.However, the two ways of proceeding from $modelcat^\delta_{sSet}$ down to $Cat_\infty$ are naturally equivalent (although I guess “naturally equivalent” is kind of a weak assertion for a pair of functors off of a discrete category; maybe there’s something slightly better to say). This is a result of Dwyer–Kan.

This is all elaborated upon much more fully in the appendix to my “simplicial spaces” paper.

]]>On an nLab page, I want to make a commutative diagram whose nodes are PNGs. The obvious way to do this would be to have an array environment, and put images with the ! [ AltText ] (URL) syntax in some of the array locations. But embedding an image like this doesn’t seem to work in a math environment. Any ideas?

]]>I’m not sure I’ve chosen the correct category (Diagrams), but various images at product of simplices seem to be broken. It looks like they were first compiled by Urs.

]]>I stumbled upon a nice finite state machine generator here. It basically allows you to draw FSMs in HTML5 Canvas, and it exports them to PNG, SVG, or LaTeX. The actual javascript is over here. I’m currently working on making it better suited for making diagrams, but I don’t know javascript, so it will take quite a while! I thought I might as well post it here, because I think we all know the struggle of typesetting diagrams. For very rudimentary examples, however, all you really need to do is remove the instances of

\draw [black] (x,y) circle (3);

For example, here’s a pullback diagram that I made in just under four minutes:

\documentclass[12pt]{article}

\usepackage{tikz}

\begin{document} \begin{center} \begin{tikzpicture}[scale=0.2] \tikzstyle{every node}+=[inner sep=0pt] \draw (40.4,-49.7) node {$A$}; \draw (62.7,-27.7) node {$B$}; \draw (62.7,-49.7) node {$C$}; \draw (40.4,-27.7) node {$P$}; \draw (26.3,-14.9) node {$Q$}; \draw [black] (62.7,-30.7) – (62.7,-46.7); \fill [black] (62.7,-46.7) – (63.2,-45.9) – (62.2,-45.9); \draw (63.2,-38.7) node [right] {$g$}; \draw [black] (43.4,-49.7) – (59.7,-49.7); \fill [black] (59.7,-49.7) – (58.9,-49.2) – (58.9,-50.2); \draw (51.55,-50.2) node [below] {$f$}; \draw [black] (40.4,-30.7) – (40.4,-46.7); \fill [black] (40.4,-46.7) – (40.9,-45.9) – (39.9,-45.9); \draw (40.9,-38.7) node [right] {$p_A$}; \draw [black] (43.4,-27.7) – (59.7,-27.7); \fill [black] (59.7,-27.7) – (58.9,-27.2) – (58.9,-28.2); \draw (51.55,-28.2) node [below] {$p_B$}; \draw [black] (29.287,-14.632) arc (93.14628:48.10544:43.245); \fill [black] (60.54,-25.62) – (60.28,-24.71) – (59.61,-25.46); \draw (47.99,-16.45) node [above] {$q_B$}; \draw [black] (38.075,-47.805) arc (-131.55229:-184.33485:36.321); \fill [black] (38.08,-47.81) – (37.81,-46.9) – (37.15,-47.65); \draw (27.76,-35.16) node [left] {$q_A$}; \draw [black] (28.52,-16.92) – (38.18,-25.68); \fill [black] (38.18,-25.68) – (37.92,-24.78) – (37.25,-25.52); \draw (29.45,-21.79) node [below] {$\exists!q$}; \end{tikzpicture} \end{center}

\end{document}

Hopefully this helps at least one person out, and I’ll post a follow up if I ever manage to get it up and running as a good tool for typesetting mathematics.

Cheers,

Harrison Smith.

]]>At Bousfield localization of model categories, there is a diagram, a square, (just after the text ’The top left triangle of this lift in turn gives a square’) in which the labels on the left hand arrows interfere with those on the right hand ones. I checked in both Firefox and Safari and in both the diagram looks wrong, but the effect is different in the two cases. Is there a quick fix for this or should we reword the text slightly and remove the labels?

]]>Let $U,V$ be functors between categories $C$ and $X$.

Why a dinatural transformation $\{*\}\xrightarrow{\cdot \cdot}\hom_X(U-,V-)$ is a function which selects a natural transformation $U\xrightarrow{\cdot} V$ ?

Does anyone have a suggestion for how to typeset in Instiki commuting squares with some kind of indication that they are supposed to be cartesian, i.e. pullbacks?

For the page that i am currently writing I now put put a “pb” in the center, as in

$\array{ A &\to& B \\ \downarrow & pb & \downarrow \\ C &\to& D }$But that’s just a hack. There must be some better option.

What would you do?

]]>I am attempting to edit terminal coalgebra, and trying to get rid of the very ugly integral signs (in display lines) which I had used for wreath products. Apparently the latex command $\backslash$wreath is not supported here. Any suggestions?

]]>Packages for drawing syntactic tress: this blog. See also about TikZ solution here.

]]>There's lots more tweaking and stuff that I could do, but there comes a point where it's useful to have other points of view ...

I've been working on a program with the original intention of converting xymatrix diagrams into SVG. It got a bit bigger and is on the way to being a LaTeX to XHTML+MathML+SVG converter. If you want to try it out, you can play with it here:

http://www.math.ntnu.no/~stacey/PHPLaTeX

The two main selling points are:

- It's written entirely in PHP, so it's quite portable.
- It tries to emulate TeX's method of parsing a document by reading and expanding tokens. This means that it can process macros.

So if you write `\newcommand{\R}{\mathbb{R}}`

then you'll be able to use `\R`

for for the rest of your document.

It's an **alpha** release, if even that, so don't expect it to do anything right. Also, you can't cut-and-paste the diagrams into the n-lab because it uses something that Jacques doesn't allow. However, if my method of getting MathML embedded into SVG produces reasonable results, then I don't think it would be hard to add support for the extra bits. (Instiki sanitises incoming SVGs and so has to be told to let through stuff.)

Anyway, have fun playing with it if you feel so inclined. Let me know what's missing (I know that there's lots missing, but if you tell me then that tells me what to prioritise), and what it does wrong. You can download the source if you feel so inclined using `bzr`

(just point it to the same place).

Oh, and it currently only supports **LaTeX** maths environments. I'll put in support for dollars later since so many people use them (though they really ought to know better).

I have found that diagrams prepared in Inkscape were difficult to input if you imported them into the online svg editor (There was some loss of parts of the picture). I tried direct copy and paste of the svg file and it worked well. This may be documented somewhere,but I thought that mentioning it here might be useful.

]]>I have a diagram at products of simplices produced using code cogs and xymatrix. I don’t work! The problem is that instiki does not seem to like the usual less than sign, $\lt$, but then \xymatrix does not like \lt.

]]>For those interested in exporting nLab pages to LaTeX documents, Jacques Distler has put together a script to convert any SVG pictures to PDF (which can then be included via `\includegraphics`

or other means). The full story can be found on his blog. Of particular note is the fact that this was actually used for a recent paper.

There are a lot of instances on the lab of stackrel’d pairs of arrows, which look pretty silly;:

We can produce double arrows simply by typing

A$\rightrightarrows$B and $N\leftleftarrows Z$

To produce larger numbers of arrows, I believe that you’re forced to use xypic.

]]>I missed this one being installed because my Instiki RSS feed wasn't working properly, but this is fantastic.

Jacques has included an SVG editor into Instiki. When you are editing a page, there's a new button to press just above the list of formatting hints and tips. When you click on it, you get an SVG editor in a new window. "Saving" the image copies the SVG to the relevant place in the document (you have to click in the document *before* you start creating your SVG).

So get drawing in SVG!

]]>In another thread we were discussing ways to produce nicely typeset diagrams.

A detailed description of four different ways to produce diagrams, of which at least two ways produce *nicely typeset* diagrams is described -- with copy-and-pasteable examples -- at

How to draw commutative diagrams and pictures

Since that page is a bit long. I have copied one simple example for the CodeCogs/xypic solution currently at [[Sandbox]].

Have a look!

]]>