forked from HEL/rivet-typst
Descriptions and values are drawn as a single line that never wraps. Because a diagram is scaled to fit the width it is rendered into, the longest label is what decides that scale: one long description makes the whole diagram -- bit cells, indices and every other label with it -- shrink until that line fits. A register whose fields carry a sentence each is then unreadable at any page width, and since each diagram is measured on its own, a document full of them renders every one at a different size. Setting description-width wraps labels at that width instead, so the length of a description no longer decides how large the diagram is drawn. Values wrap at the same right edge as the description they belong to, and the option composes with left-labels, force-descs-on-side and ltr-bits. Wrapping means a label is no longer one line tall, so labels can no longer be spaced by a fixed line height. Each is now offset by the height it actually occupies, measured before it is placed, which is why render gained a context block. The option defaults to none, which keeps the single-line behaviour on the original code paths. With it unset every diagram in the gallery renders byte-identical to before.
1.4 KiB
1.4 KiB
Changelog
[Unreleased]
- Added
description-widthconfig option, wrapping descriptions and values instead of drawing them on a single line
[v0.3.1] - 2026-06-14
- Support for non-consecutive ranges (#13)
- Prevent drawing separators on starting lines of fields (#17)
- Fix end line on non-consecutive ranges ending at the highest bit not being draw (#18)
- Add documentation for
startproperty of structures (61f13df815f)
[v0.3.0] - 2025-05-03
- updated CeTZ to 0.3.4
- updated to Typst 0.13.1
- updated Tidy to 0.4.2
- updated Codly to 1.3.0 and codly-languages to 0.1.8
- added
ltr-bitsconfig option - added a "Loading" section to the manual
[v0.2.0] - 2025-02-23
- updated CeTZ to 0.3.2
- updated to Typst 0.13.0
- fixed missing bit index on dependencies
- updated docs (Tidy, codelst -> codly)
[v0.1.0] - 2024-10-02
- prepared for publication in Typst Universe
[v0.0.2] - 2024-06-15
Added
widthparameter toschema.renderfor easier integrationall-bit-iconfig option- colored ranges
- format specification in the manual
[v0.0.1] - 2024-05-19
- initial version
- ported all features from the python package