Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ae489cb94 |
@@ -1,11 +1,5 @@
|
||||
# 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
|
||||
- updated CeTZ to 0.3.4
|
||||
- updated to Typst 0.13.1
|
||||
|
||||
@@ -9,7 +9,7 @@ It is based on the [homonymous Python script](https://git.kb28.ch/HEL/rivet/)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="./gallery/example1.typ">
|
||||
<img src="./gallery/example1.png" width="1000px" alt="A black on white diagram showing the bit structure of a machine instruction, detailing operands, flags and selectors.">
|
||||
<img src="./gallery/example1.png" width="1000px">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -19,7 +19,7 @@ It is based on the [homonymous Python script](https://git.kb28.ch/HEL/rivet/)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="./gallery/example2.typ">
|
||||
<img src="./gallery/example2.png" width="1000px" alt="A white on blue diagram showing the bit structure of RISC-V memory instructions, detailing operands, flags and selectors.">
|
||||
<img src="./gallery/example2.png" width="1000px">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -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à !
|
||||
```typ
|
||||
#import "@preview/rivet:0.3.1": schema
|
||||
#import "@preview/rivet:0.3.0": schema
|
||||
#let doc = schema.load(yaml("path/to/schema.yaml"))
|
||||
#schema.render(doc)
|
||||
```
|
||||
+2
-2
@@ -28,9 +28,9 @@
|
||||
/// - ltr-bits (bool): If true, bits are placed with the LSB on the left instead of the right
|
||||
/// -> dictionary
|
||||
#let config(
|
||||
default-font-family: "Ubuntu Mono",
|
||||
default-font-family: "DejaVu Sans Mono",
|
||||
default-font-size: 15pt,
|
||||
italic-font-family: "Ubuntu Mono",
|
||||
italic-font-family: "Libertinus Serif",
|
||||
italic-font-size: 12pt,
|
||||
background: white,
|
||||
text-color: black,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 408 KiB |
@@ -1,6 +1,6 @@
|
||||
#import "@preview/rivet:0.3.1": schema, config
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load(yaml("./example1.yaml"))
|
||||
#let example = schema.load("/gallery/example1.yaml")
|
||||
#schema.render(example, config: config.config(
|
||||
full-page: true
|
||||
))
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 303 KiB After Width: | Height: | Size: 328 KiB |
@@ -1,6 +1,6 @@
|
||||
#import "@preview/rivet:0.3.1": schema, config
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load(yaml("./example2.yaml"))
|
||||
#let example = schema.load("/gallery/example2.yaml")
|
||||
#schema.render(example, config: config.blueprint(
|
||||
full-page: true,
|
||||
left-labels: true
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 485 KiB After Width: | Height: | Size: 490 KiB |
@@ -1,6 +1,6 @@
|
||||
#import "@preview/rivet:0.3.1": schema, config
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load(yaml("/gallery/example1.yaml"))
|
||||
#let example = schema.load("/gallery/example1.yaml")
|
||||
//#schema.render(example)
|
||||
|
||||
= Chapter 1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#import "@preview/rivet:0.3.1": *
|
||||
#import "../../src/lib.typ": *
|
||||
|
||||
#let conf = config.config(
|
||||
full-page: true,
|
||||
left-labels: true
|
||||
)
|
||||
#let alu = schema.load(yaml("./alu_instr.yaml"))
|
||||
#let alu = schema.load("/gallery/riscv/alu_instr.yaml")
|
||||
#schema.render(alu, config: conf)
|
||||
|
||||
#let branch = schema.load(yaml("./branch_instr.yaml"))
|
||||
#let branch = schema.load("/gallery/riscv/branch_instr.yaml")
|
||||
#schema.render(branch, config: conf)
|
||||
|
||||
#let mem = schema.load(yaml("./mem_instr.yaml"))
|
||||
#let mem = schema.load("/gallery/riscv/mem_instr.yaml")
|
||||
#schema.render(mem, config: conf)
|
||||
|
||||
+304
-326
@@ -1258,7 +1258,7 @@ endobj
|
||||
<<
|
||||
/Type /Font
|
||||
/Subtype /Type0
|
||||
/BaseFont /GYOGIG+UbuntuMono-Regular
|
||||
/BaseFont /TTRNKI+LibertinusSerif-Italic-Identity-H
|
||||
/Encoding /Identity-H
|
||||
/DescendantFonts [11 0 R]
|
||||
/ToUnicode 14 0 R
|
||||
@@ -1268,8 +1268,8 @@ endobj
|
||||
11 0 obj
|
||||
<<
|
||||
/Type /Font
|
||||
/Subtype /CIDFontType2
|
||||
/BaseFont /GYOGIG+UbuntuMono-Regular
|
||||
/Subtype /CIDFontType0
|
||||
/BaseFont /TTRNKI+LibertinusSerif-Italic
|
||||
/CIDSystemInfo <<
|
||||
/Registry (Adobe)
|
||||
/Ordering (Identity)
|
||||
@@ -1277,12 +1277,161 @@ endobj
|
||||
>>
|
||||
/FontDescriptor 13 0 R
|
||||
/DW 0
|
||||
/CIDToGIDMap /Identity
|
||||
/W [0 43 500]
|
||||
/W [0 0 500 1 1 444 2 2 250 3 3 527 4 4 353 5 5 307 6 6 447 7 7 357 8 8 401 9 9 783 10 10 503.00003 11 11 444 12 12 266 13 13 486 14 14 489 15 15 314 16 16 518 17 17 688 18 18 276 19 19 333 20 20 478 21 21 389 22 22 486 23 23 491 24 24 521 25 25 219 26 26 568 27 27 489 28 28 611]
|
||||
>>
|
||||
endobj
|
||||
|
||||
12 0 obj
|
||||
<<
|
||||
/Length 12
|
||||
/Filter /FlateDecode
|
||||
>>
|
||||
stream
|
||||
xœûÿÿÿ | ||||