Compare commits
6 Commits
refactor/r
...
release/v0
| Author | SHA1 | Date | |
|---|---|---|---|
|
2228f22352
|
|||
|
a909398fbd
|
|||
| 05de90890f | |||
|
|
9b83b4c4a8 | ||
| df7899ee4b | |||
| b6f2fd99b8 |
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v0.3.1] - 2026-06-14
|
||||||
|
- Support for non-consecutive ranges ([#13](https://git.kb28.ch/HEL/rivet-typst/pulls/13))
|
||||||
|
- Prevent drawing separators on starting lines of fields ([#17](https://git.kb28.ch/HEL/rivet-typst/pulls/17))
|
||||||
|
- Fix end line on non-consecutive ranges ending at the highest bit not being draw ([#18](https://git.kb28.ch/HEL/rivet-typst/pulls/18))
|
||||||
|
- Add documentation for `start` property of structures ([61f13df815f](https://git.kb28.ch/HEL/rivet-typst/commit/6f13df815f99fd6be8b6b3a02b4d53bcc8fe0aff))
|
||||||
|
|
||||||
## [v0.3.0] - 2025-05-03
|
## [v0.3.0] - 2025-05-03
|
||||||
- updated CeTZ to 0.3.4
|
- updated CeTZ to 0.3.4
|
||||||
- updated to Typst 0.13.1
|
- updated to Typst 0.13.1
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ For more information, see the [manual](manual.pdf)
|
|||||||
|
|
||||||
To use this package, simply import `schema` from [rivet](https://typst.app/universe/package/rivet) and call `schema.load` to parse a schema description. Then use `schema.render` to render it, et voilà !
|
To use this package, simply import `schema` from [rivet](https://typst.app/universe/package/rivet) and call `schema.load` to parse a schema description. Then use `schema.render` to render it, et voilà !
|
||||||
```typ
|
```typ
|
||||||
#import "@preview/rivet:0.3.0": schema
|
#import "@preview/rivet:0.3.1": schema
|
||||||
#let doc = schema.load(yaml("path/to/schema.yaml"))
|
#let doc = schema.load(yaml("path/to/schema.yaml"))
|
||||||
#schema.render(doc)
|
#schema.render(doc)
|
||||||
```
|
```
|
||||||
18820
manual.pdf
18820
manual.pdf
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
#let version = version(0,3,0)
|
#let version = version(0,3,1)
|
||||||
|
|
||||||
#import "config.typ"
|
#import "config.typ"
|
||||||
#import "schema.typ"
|
#import "schema.typ"
|
||||||
@@ -387,8 +387,10 @@
|
|||||||
}
|
}
|
||||||
let range-boundaries = ()
|
let range-boundaries = ()
|
||||||
for r in struct.ranges.values() {
|
for r in struct.ranges.values() {
|
||||||
let i = to-real-i(if config.ltr-bits {r.start} else {r.end})
|
let start-i = to-real-i(if config.ltr-bits {r.start} else {r.end})
|
||||||
range-boundaries.push(i)
|
let end-i = to-real-i(if config.ltr-bits {r.end} else {r.start}) + 1
|
||||||
|
range-boundaries.push(start-i)
|
||||||
|
range-boundaries.push(end-i)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw colors
|
// Draw colors
|
||||||
@@ -472,9 +474,9 @@
|
|||||||
shapes += draw-text(range_.name, txt-col, name-x, name-y, fill: bg-col)
|
shapes += draw-text(range_.name, txt-col, name-x, name-y, fill: bg-col)
|
||||||
|
|
||||||
// paint end line only if needed
|
// paint end line only if needed
|
||||||
|
let is-not-limit = if config.ltr-bits { start-i != 0 } else { end-i != struct.bits - 1 }
|
||||||
if (
|
if (
|
||||||
start-i != 0
|
is-not-limit
|
||||||
and end-i != struct.bits - 1
|
|
||||||
and ranges
|
and ranges
|
||||||
.at(
|
.at(
|
||||||
i
|
i
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rivet"
|
name = "rivet"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
compiler = "0.13.1"
|
compiler = "0.13.1"
|
||||||
repository = "https://git.kb28.ch/HEL/rivet-typst"
|
repository = "https://git.kb28.ch/HEL/rivet-typst"
|
||||||
entrypoint = "src/lib.typ"
|
entrypoint = "src/lib.typ"
|
||||||
|
|||||||
Reference in New Issue
Block a user