Simplifying percentage syntax in width/height attributes
Omikhleia opened this issue · 0 comments
Whether in Djot or Markdown, for key-value attributes used as dimensions, we currently state "that any unit system supported by SILE is accepted"
Hence, e.g. ![](someimage.png){height="4cm"}
An implication, though, is that we need to use width="50%lw"
, or height="50%fh"
for frame-relative sizing... This is not very user-friendly, and probably not what most users would expect.
At our level, we can't know whether those attributes will eventually end up as SILE measurements/lengths. Of course, it could be better if SILE did it natively, but that's a bunch of packages to address (such as image and svg in the core distribution, my own embedders, ptable etc. -- and probably others I overlooked here...)
A proposal would we to:
- Automatically convert "50%" to "50%lw" for
width
(note the "lw" rather than "fw" -- I'd tend to think this is the most correct default interpretation) - Automatically convert "50%" to "50%fh" for
height