Matthew Butterick

Results 190 comments of Matthew Butterick

Since so many formatting operations depend on the resolved locations of certain elements, I’m starting to wonder whether we ought to have some kind of query language to find certain...

(Of course, not a new idea — XML has XPath, HTML has CSS selectors, etc.)

> wondering why you chose to define q-expressions as a subset of x-expressions To reduce the biggest barrier to adoption. Q-expressions are a stand-in for any data serialization format, all...

I’ve just pushed an update that adds drawing quads (`line` and `text` to start, though more to come) and`parent` and `repeat` attributes that can be used to repeat & position...

Also, though I’m not claiming Quad’s anchor-attachment model solves all layout problems, it’s already there at the low level, so at the high level, I think it makes more sense...

How should a `quadwriter/markdown` image be scaled and positioned, by default?

By the principle of least user labor, it doesn’t seem like `quadwriter` should rely on the native size of the image file, because that would impose a lot of new...

A Racket `pict` is just a precursor object to a rendered file. So unless I misunderstand, the `pict->quad` could be as simple as this, where you render your `pict` object...

That doesn’t help with the scaling / positioning, which I have to think about more.

> I would scale the image using the DPI metadata in the original file BTW are you certain that PNG files carry DPI metadata? I have not found evidence of...