forked from HEL/rivet-typst
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4b42898bf | ||
|
|
5ac65afaff | ||
|
|
472562596f
|
||
|
|
39e6acaed8
|
||
|
|
6cc3cfcd00
|
||
|
|
861c25026b
|
||
|
|
768e63fd46
|
||
|
|
2678aee584
|
||
|
|
2228f22352
|
||
|
|
a909398fbd
|
||
|
|
05de90890f | ||
|
|
9b83b4c4a8 | ||
|
|
3e74ad15ee | ||
|
|
2d56678d43 |
@@ -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
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ It is based on the [homonymous Python script](https://git.kb28.ch/HEL/rivet/)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="./gallery/example1.typ">
|
<a href="./gallery/example1.typ">
|
||||||
<img src="./gallery/example1.png" width="1000px">
|
<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.">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -19,7 +19,7 @@ It is based on the [homonymous Python script](https://git.kb28.ch/HEL/rivet/)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="./gallery/example2.typ">
|
<a href="./gallery/example2.typ">
|
||||||
<img src="./gallery/example2.png" width="1000px">
|
<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.">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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à !
|
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)
|
||||||
```
|
```
|
||||||
+2
-2
@@ -28,9 +28,9 @@
|
|||||||
/// - ltr-bits (bool): If true, bits are placed with the LSB on the left instead of the right
|
/// - ltr-bits (bool): If true, bits are placed with the LSB on the left instead of the right
|
||||||
/// -> dictionary
|
/// -> dictionary
|
||||||
#let config(
|
#let config(
|
||||||
default-font-family: "DejaVu Sans Mono",
|
default-font-family: "Ubuntu Mono",
|
||||||
default-font-size: 15pt,
|
default-font-size: 15pt,
|
||||||
italic-font-family: "Libertinus Serif",
|
italic-font-family: "Ubuntu Mono",
|
||||||
italic-font-size: 12pt,
|
italic-font-size: 12pt,
|
||||||
background: white,
|
background: white,
|
||||||
text-color: black,
|
text-color: black,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 378 KiB |
@@ -1,6 +1,6 @@
|
|||||||
#import "../src/lib.typ": schema, config
|
#import "@preview/rivet:0.3.1": schema, config
|
||||||
|
|
||||||
#let example = schema.load("/gallery/example1.yaml")
|
#let example = schema.load(yaml("./example1.yaml"))
|
||||||
#schema.render(example, config: config.config(
|
#schema.render(example, config: config.config(
|
||||||
full-page: true
|
full-page: true
|
||||||
))
|
))
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 303 KiB |
@@ -1,6 +1,6 @@
|
|||||||
#import "../src/lib.typ": schema, config
|
#import "@preview/rivet:0.3.1": schema, config
|
||||||
|
|
||||||
#let example = schema.load("/gallery/example2.yaml")
|
#let example = schema.load(yaml("./example2.yaml"))
|
||||||
#schema.render(example, config: config.blueprint(
|
#schema.render(example, config: config.blueprint(
|
||||||
full-page: true,
|
full-page: true,
|
||||||
left-labels: true
|
left-labels: true
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 490 KiB After Width: | Height: | Size: 485 KiB |
@@ -1,6 +1,6 @@
|
|||||||
#import "../src/lib.typ": schema, config
|
#import "@preview/rivet:0.3.1": schema, config
|
||||||
|
|
||||||
#let example = schema.load("/gallery/example1.yaml")
|
#let example = schema.load(yaml("/gallery/example1.yaml"))
|
||||||
//#schema.render(example)
|
//#schema.render(example)
|
||||||
|
|
||||||
= Chapter 1
|
= Chapter 1
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#import "../../src/lib.typ": *
|
#import "@preview/rivet:0.3.1": *
|
||||||
|
|
||||||
#let conf = config.config(
|
#let conf = config.config(
|
||||||
full-page: true,
|
full-page: true,
|
||||||
left-labels: true
|
left-labels: true
|
||||||
)
|
)
|
||||||
#let alu = schema.load("/gallery/riscv/alu_instr.yaml")
|
#let alu = schema.load(yaml("./alu_instr.yaml"))
|
||||||
#schema.render(alu, config: conf)
|
#schema.render(alu, config: conf)
|
||||||
|
|
||||||
#let branch = schema.load("/gallery/riscv/branch_instr.yaml")
|
#let branch = schema.load(yaml("./branch_instr.yaml"))
|
||||||
#schema.render(branch, config: conf)
|
#schema.render(branch, config: conf)
|
||||||
|
|
||||||
#let mem = schema.load("/gallery/riscv/mem_instr.yaml")
|
#let mem = schema.load(yaml("./mem_instr.yaml"))
|
||||||
#schema.render(mem, config: conf)
|
#schema.render(mem, config: conf)
|
||||||
|
|||||||
+327
-305
@@ -1258,7 +1258,7 @@ endobj
|
|||||||
<<
|
<<
|
||||||
/Type /Font
|
/Type /Font
|
||||||
/Subtype /Type0
|
/Subtype /Type0
|
||||||
/BaseFont /TTRNKI+LibertinusSerif-Italic-Identity-H
|
/BaseFont /GYOGIG+UbuntuMono-Regular
|
||||||
/Encoding /Identity-H
|
/Encoding /Identity-H
|
||||||
/DescendantFonts [11 0 R]
|
/DescendantFonts [11 0 R]
|
||||||
/ToUnicode 14 0 R
|
/ToUnicode 14 0 R
|
||||||
@@ -1268,8 +1268,8 @@ endobj
|
|||||||
11 0 obj
|
11 0 obj
|
||||||
<<
|
<<
|
||||||
/Type /Font
|
/Type /Font
|
||||||
/Subtype /CIDFontType0
|
/Subtype /CIDFontType2
|
||||||
/BaseFont /TTRNKI+LibertinusSerif-Italic
|
/BaseFont /GYOGIG+UbuntuMono-Regular
|
||||||
/CIDSystemInfo <<
|
/CIDSystemInfo <<
|
||||||
/Registry (Adobe)
|
/Registry (Adobe)
|
||||||
/Ordering (Identity)
|
/Ordering (Identity)
|
||||||
@@ -1277,161 +1277,12 @@ endobj
|
|||||||
>>
|
>>
|
||||||
/FontDescriptor 13 0 R
|
/FontDescriptor 13 0 R
|
||||||
/DW 0
|
/DW 0
|
||||||
/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]
|
/CIDToGIDMap /Identity
|
||||||
|
/W [0 43 500]
|
||||||
>>
|
>>
|
||||||
endobj
|
endobj
|
||||||
|
|
||||||
12 0 obj
|
12 0 obj
|
||||||
<<
|
|
||||||
/Length 12
|
|
||||||
/Filter /FlateDecode
|
|
||||||
>>
|
|
||||||
stream
|
|
||||||
xœûÿÿÿ | |||||||