paolobrasolin / string-diagrams

Create string diagrams with LaTeX!
https://www.ctan.org/pkg/string-diagrams
LaTeX Project Public License v1.3c
13 stars 2 forks source link

box has an optional argument for the color (default: white) #1

Open tetrapharmakon opened 1 year ago

tetrapharmakon commented 1 year ago

usage:

\node [box=green!20] (d) {d}; (fills the box with green!20)

VS

\node [box] (d) {d}; (fills the box white)

paolobrasolin commented 1 year ago

This looks good, but I feel this is mixing concerns a bit.

Specifically, i feel that letting box be a shortcut for specifying the number of anchors (see #2) has higher priority. E.g. something like \node[box=0/1/0/2] (f) {f}; would give us f.east.1, f.west.1 and f.west.2 (and no other anchors).

Also, \node[box, fill=green] (d) {d}; feels somewhat clearer? 🤔

Lemme implement #2 and let's talk about this after that, ok?