AlgebraicJulia / AlgebraicJulia/Catlab.jl
Text metrics for box labels in wiring diagram layout
- Lenguaje dominante
- Julia
- Estrellas
- 724
- Forks
- 73
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The backend-agnostic layout algorithm for wiring diagrams currently assumes that the size of a box depends only the number of its ports, not on the text label. The result is that oversize labels are handled awkwardly in the TikZ diagrams, and not at all in the Compose.jl diagrams.
The layout algorithm should incorporate backend-dependent calculation of text metrics and automatically enlarge boxes when required.
- In Compose.jl, text metrics are provided by the [text_extents](https://github.com/GiovineItalia/Compose.jl/issues/117) function.
- LaTeX/TikZ, the answer is less clear. It may not be possible to calculate sizes without somehow [invoking LaTeX itself](https://tex.stackexchange.com/q/18576). The good news is that TikZ resizes nodes to fit their contents, so a crude estimate should suffice for layout purposes.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.