-
|
I'm working on typst export of diagrams. Reading the code and the comments, I'm not entirely sure I understand what a k-cell conceptually is. Are 1-cells arrows, and 2-cells natural transformations ? Or are some (simple) arrows higher level sometimes ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Yes, that's right. A 0-cell is a vertex/object, a 1-cell is an edge whose The only subtlety is that each edge actually has two levels: the "actual" level is calculated as one more than the maximum of the source Line 7479 in 4fee690 This is used to sort edges by those they depend on, e.g. when exporting to LaTeX (so that objects are exported first, then edges between objects, then edges between edges between objects, and so on). The other is the "visual" level, which corresponds to the "Level" slider in the quiver UI: this is how the edge is rendered, e.g. as a single arrow, double arrow, and so on. By default, the visual level is set to the actual level, but the user can override that. In the LaTeX export, for instance, you can see the actual level being used to sort the edges: Line 482 in 4fee690 and the visual level to choose which kind of arrow to output: Lines 674 to 689 in 4fee690 In the comments "k-cell" tends to refer generally to either an object or an edge, for which the actual |
Beta Was this translation helpful? Give feedback.
Yes, that's right. A 0-cell is a vertex/object, a 1-cell is an edge whose
levelis 1, a 2-cell is an edge whoselevelis 2, and so on.The only subtlety is that each edge actually has two levels: the "actual" level is calculated as one more than the maximum of the source
leveland the targetlevel, for instance, in the following:quiver/src/ui.mjs
Line 7479 in 4fee690
This is used to sort edges by those they depend on, e.g. when exporting to LaTeX (so that objects are exported first, then edges between objects, then edges between edges between objects, and so on). The other is the "visual" l…