typst 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/ext/typst/src/compiler-new.rs +771 -0
- data/lib/typst.rb +25 -23
- metadata +32 -4
- data/ext/typst/Cargo.lock +0 -2840
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26c5aa0d53ccc72726e84813f15e44c7af5058644e303e7a717c6e434f3491f9
|
4
|
+
data.tar.gz: e2a4c340aed40a83c85b2fbb369ecf6925b354d5bd01d794168933dfc3999a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 064b3692ae5e033d33e6c2960ec53112a61abb76d1c69a66d07ea75f2ff284044fb85d9eefc9c7d510c3bc1f07f4447a2e2edf4983d864b696e36b418abdfab2
|
7
|
+
data.tar.gz: 38409e19ae6faaea38db473515a24df16d0e1bb2cd42fad113557e8e8ca13bfda4e9564976e68bf53ea4ae7624c9433d8a8679b30438a4bb39f7803b73677e5f
|
data/README.md
CHANGED
@@ -91,6 +91,16 @@ font_bytes = File.read("Example.ttf")
|
|
91
91
|
|
92
92
|
t = Typst::Pdf.from_s(main, dependencies: { "template.typ" => template, "icon.svg" => icon }, fonts: { "Example.ttf" => font_bytes })
|
93
93
|
|
94
|
+
# Pass values into a typst template using sys_inputs
|
95
|
+
sys_inputs_example = %{
|
96
|
+
#let persons = json(bytes(sys.inputs.persons))
|
97
|
+
|
98
|
+
#for person in persons [
|
99
|
+
#person.name is #person.age years old.\\
|
100
|
+
]
|
101
|
+
}
|
102
|
+
Typst::Pdf.from_s(sys_inputs_example, sys_inputs: { "persons" => [{"name": "John", "age": 35}, {"name": "Xoliswa", "age": 45}].to_json }).write("sys_inputs_example.pdf")
|
103
|
+
|
94
104
|
# From a zip file that includes a main.typ
|
95
105
|
# zip file include flat dependencies included and a fonts directory
|
96
106
|
Typst::Pdf::from_zip("working_directory.zip")
|