Conversation
- Size annotations from displayed rows, including wrapping, ranges, and skips. - Round outside fills and strokes using one source grid, supporting pagination, columns, and nested blocks. - Reserve border space within layout bounds. - Preserve alias text sizing and inherited theme/syntax paths; require resolved paths or bytes for explicit resource arguments. - Preserve native references while keeping code and annotation text accessible in PDF output. - Add compact regressions, refresh visual baselines, and add PDF/UA-1 compilation and text extraction checks to CI. Fixes #140 Fixes #139 Fixes #134 Fixes #107 Fixes #95 Fixes #99 Fixes #113
Also fix tests to match new default behaviour (auto fill).
…and #127), small perf improvements + tests
|
Would it be possible to add the Add a field for format: e.field("format", e.types.option(function), doc: __doc("number-format"), default: __default("number-format")),Call format on the body: display: it => (it.format)(it.body),In 1.3.0, I have used this to style the line numbers and also add a link to the line number (e.g., to a website that explains a bash command). For example, I would do: #import "@preview/percencode:0.1.0": percent-encode
#let number-format(number) = {
let rawblock = query(selector(raw).before(here())).last()
let number-text = text(size: 10pt, fill: dark-grey)[#number]
if rawblock.lang == "bash" {
let line-text = rawblock.lines.at(number - 1).text
link("https://explainshell.com/explain?cmd=" + percent-encode(line-text), number-text)
} else {
number-text
}
}
#show: codly.number-set_(
format: number-format,
) |
|
@MBradbury You're right, but I'll do it a bit differently, I'll give EDIT: this is in fact how I originally intended for it to work, but as I was prototyping I probably forgot 🙈 |
|
Ah yes, the old code was "smart" in that regard, I'll fix that too. Thanks! Don't hesitate if you find anythign else. |
|
Just tested the latest commit and I was able to adapt my code in #141 (comment) to work with the changes, thanks very much! |

Near complete rewrite of codly:
Disclosure: AI was used in the making of this code, mostly around building/improving the tests & to help me do roadmap of issue fixing/tracking, there were so many at this point I was struggling to keep up. Almost none of the actual library code is AI generated.