AlgebraicJulia / AlgebraicJulia/Catlab.jl

Text metrics for box labels in wiring diagram layout

Abierto
#72 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement graphics
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

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.