prep for release v0.0.2 #1
40
gallery.bash
Normal file
40
gallery.bash
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
PDFS=false
|
||||
|
||||
while getopts "p" flag
|
||||
do
|
||||
case "${flag}" in
|
||||
p) PDFS=true;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Generating gallery images"
|
||||
|
||||
set -- ./gallery/example*.typ
|
||||
cnt="$#"
|
||||
i=1
|
||||
for f
|
||||
do
|
||||
f2="${f/typ/png}"
|
||||
echo "($i/$cnt) $f -> $f2"
|
||||
typst c --root ./ "$f" "$f2"
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
if [ "$PDFS" = true ]
|
||||
then
|
||||
echo
|
||||
echo "Generating gallery PDFs"
|
||||
|
||||
set -- ./gallery/*.typ
|
||||
cnt="$#"
|
||||
i=1
|
||||
for f
|
||||
do
|
||||
f2="${f/typ/pdf}"
|
||||
echo "($i/$cnt) $f -> $f2"
|
||||
typst c --root ./ "$f" "$f2"
|
||||
i=$((i+1))
|
||||
done
|
||||
fi
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 376 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 303 KiB After Width: | Height: | Size: 302 KiB |
BIN
gallery/example3.pdf
Normal file
BIN
gallery/example3.pdf
Normal file
Binary file not shown.
BIN
gallery/example3.png
Normal file
BIN
gallery/example3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 487 KiB |
23
gallery/example3.typ
Normal file
23
gallery/example3.typ
Normal file
@ -0,0 +1,23 @@
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load("/gallery/example1.yaml")
|
||||
//#schema.render(example)
|
||||
|
||||
= Chapter 1
|
||||
#lorem(50)
|
||||
|
||||
= Chapter 2
|
||||
#lorem(50)
|
||||
|
||||
== Section 2.1
|
||||
|
||||
#lorem(20)
|
||||
|
||||
#figure(
|
||||
schema.render(example, config: config.config(all-bit-i: false)),
|
||||
caption: "Test schema"
|
||||
)
|
||||
|
||||
#lorem(20)
|
||||
|
||||
= Chapter 3
|
12
gallery/example3.yaml
Normal file
12
gallery/example3.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
structures:
|
||||
main:
|
||||
bits: 32
|
||||
ranges:
|
||||
31-24:
|
||||
name: op
|
||||
23-16:
|
||||
name: r1
|
||||
15-8:
|
||||
name: r2
|
||||
7-0:
|
||||
name: r3
|
BIN
gallery/test.pdf
BIN
gallery/test.pdf
Binary file not shown.
Loading…
Reference in New Issue
Block a user