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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06f404ad033d71b2031a08e646614ab5340727441aa1da453aa7755ed12ea0a7
4
- data.tar.gz: 9d7ed83cb3f3e87688b216be9ec111d5948110955ee4d3734281706d63430448
3
+ metadata.gz: 26c5aa0d53ccc72726e84813f15e44c7af5058644e303e7a717c6e434f3491f9
4
+ data.tar.gz: e2a4c340aed40a83c85b2fbb369ecf6925b354d5bd01d794168933dfc3999a94
5
5
  SHA512:
6
- metadata.gz: 9e4d70e2585ea792ab65fc440bcd9aaa57b1bfccdfbcddb6f37980b2fa061f9cef92668f7a7ec00c4b5b181bb67e5e9cf960e72421be6448186bc77b1bd68003
7
- data.tar.gz: e95d548a3a9c11e4d7fb7ca6ec9acd401068c85227ce509cb10c467dbbf668a51069e683372b0525afcb77e08f71d0362b7e8ffdaa8c1b0688cc2dc831609019
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")