updated gallery

This commit is contained in:
Louis Heredero 2024-06-14 11:20:43 +02:00
parent b7e1db1dbd
commit 9f8bf02522
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
10 changed files with 75 additions and 0 deletions

40
gallery.bash Normal file
View 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

Binary file not shown.

BIN
gallery/example3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 KiB

23
gallery/example3.typ Normal file
View 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
View 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

Binary file not shown.