fit
rpic extension, inspired by Pikchr. fit sizes a box, ellipse or
circle to the text already attached to it — no more guessing wid.
.PS
box "short" fit
move
box "a considerably longer label" fit
move
ellipse "two" "lines" fit
.PERules
- Only text before
fitcontributes to the fitted size; later text stays attached but doesn’t resize. - Explicit dimensions win:
wid/htkeep their values on boxes and ellipses,rad/diamon circles. - Using
fitwith no preceding visible text is an error. - The metrics are rpic’s text estimates — practical and backend-stable,
but approximate. With
texlabelsmath, metrics are exact, so fitted math boxes are tight:
.PS
texlabels = 1
box "$e^{j\pi} + 1 = 0$" fit
.PEClassic input without fit keeps its dpic-compatible dimensions.