Skip to content

Commit 1b58789

Browse files
authored
Prepare public release for typst@v0.13.1 (#61)
- Update list of available typst versions - Update template rendering script - Do not fail fast on teplate rendering - Check in all released `typst.toml` - Add script for release preparation - Use proper package entrypoint - Update package metadatas - Fix warnings in `jmlr` template - Fix warnings in `tmlr` template - Fix packaging issue of `cvpr` template - Remove references to example papers. - Remove bullet point on indentation in obsolete Typst v0.11. - Remove `return` statement from footer. - Fix packaging issue of `jmlr` template - Remove all references on example papers. - Fix typos. - Fix missing anchor on colored links and broken links. - Fix packaging issue of `rlj` template - Remove all references to example papers. - Specify explicitely tempalte version. - Fix packaging issue of `tmlr` template - Specify explicitely template version. - Remove all references on example papers. - Make absolute link on colored annotation anchor in `README.md` - Check in final edits
1 parent ca62e36 commit 1b58789

25 files changed

Lines changed: 436 additions & 78 deletions

.github/scripts/render-templates.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
#!/usr/bin/env bash
2+
# A simple script to check that a template can be rendered with a specific
3+
# version of `typst` compiler.
4+
#
5+
# PREFIX=build .github/scripts/render-templates.sh 0.14.0
26

37
function render-template() {
48
local typstc=${1-typst}
59
local root=${2-.}
6-
typst compile "${root}/main.typ" \
10+
${typstc} compile "${root}/main.typ" \
711
--diagnostic-format=short \
812
--format=pdf \
913
--root="${root}"
1014
}
1115

12-
typstc=typst
16+
typstc="typst"
17+
if [ -n "${PREFIX}" ]; then
18+
typstc="${PREFIX}/bin/$typstc"
19+
fi
20+
1321
typst_version=${1}
1422
if [ -n "${typst_version}" ]; then
15-
typstc="typst-${typst_version}"
23+
typstc="${typstc}-${typst_version}"
1624
fi
1725

1826
if ! command -pv "${typstc}" >/dev/null; then
@@ -28,7 +36,10 @@ if [ -z "${roots}" ]; then
2836
exit 0
2937
fi
3038

39+
rc=0 # Accumulate failures.
3140
while IFS= read -r root; do
3241
echo "try to render template located at ${root}"
33-
render-template "$typstc" "$root"
42+
render-template "$typstc" "$root" || rc=1
3443
done <<< "${roots}"
44+
45+
exit "$rc"

.github/workflows/on-push.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ jobs:
3232
container:
3333
image: 'ghcr.io/daskol/typst-templates'
3434
strategy:
35+
fail-fast: false
3536
matrix:
36-
typst-version: ['0.12.0', '0.13.0', '0.13.1']
37+
typst-version:
38+
- '0.12.0'
39+
- '0.13.0'
40+
- '0.13.1'
3741
steps:
3842
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3943
- name: Compile all

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
*.bst
55
*.log
66
*.out
7+
8+
# Ignore build directory (prefix for `typst-*` compilers).
9+
/build

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ FILENAME=typst-x86_64-unknown-linux-musl.tar.xz
2525
prefix=${1-/usr}
2626
echo "use prefix ${prefix}"
2727

28-
declare -a vers=('0.11.0' '0.11.1' '0.12.0' '0.13.0' '0.13.1')
28+
declare -a vers=('0.12.0' '0.13.0' '0.13.1' '0.14.0' '0.14.1' '0.14.2')
2929
for ver in "${vers[@]}"; do
3030
echo "install typst ${ver} to prefix ${prefix}"
3131
curl -LO "$REPO/releases/download/v$ver/$FILENAME"

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
all:
2+
3+
.PHONY: image
4+
image:
5+
docker build -t ghcr.io/daskol/typst-templates .
6+
7+
.PHONY: test
8+
test:
9+
docker run --rm -ti \
10+
-e PREFIX=$(PWD)/build \
11+
-v $(PWD):$(PWD) \
12+
-w $(PWD) \
13+
ghcr.io/daskol/typst-templates \
14+
.github/scripts/render-templates.sh

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ typst init @preview/lucky-icml
6666

6767
## Utilities
6868

69+
### Colored Annotations
70+
6971
Typst of version 0.10.0 does not produce colored annotations. In order to
7072
mitigate the issue, we add [a simple script](colorize-annotations.py) to the
7173
repository. The script is plain and simple. One can use it as follows.
@@ -77,7 +79,20 @@ repository. The script is plain and simple. One can use it as follows.
7779

7880
It is written with PyMuPDF library and inserts colored annotation.
7981

82+
## CI/CD
83+
84+
At the moment, CI/CD pipeline tries only to render all available templates with
85+
a specific version of `typst` compiler. In order to run CI/CD checks locally,
86+
one can use container image `ghcr.io/daskol/typst-templates` to run script
87+
[`render-templates.sh`][render-templates.sh]. End-to-end command for local
88+
check follows.
89+
90+
```bash
91+
make image test
92+
```
93+
8094
[1]: https://portal.core.edu.au/conf-ranks/?search=A*&by=rank&source=CORE2023&sort=aacronym
8195
[2]: https://typst.app/
8296
[tracl]: https://typst.app/universe/package/tracl/
8397
[alexanderkoller]: https://github.com/alexanderkoller
98+
[render-templates.sh]: .github/scripts/render-templates.sh

cvpr/README.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ typst init @preview/blind-cvpr
1313

1414
Typst will create a new directory with all the files needed to get you started.
1515

16-
## Example Papers
17-
18-
Here are an example paper in [LaTeX][1] and in [Typst][2].
19-
2016
## Configuration
2117

2218
This template exports the `cvpr2022` and `cvpr2025` styling rule with the
@@ -45,7 +41,7 @@ function in a show rule. If you want to change an existing project to use this
4541
template, you can add a show rule at the top of your file.
4642

4743
```typst
48-
#import "@preview/blind-cvpr:0.5.0": cvpr2025
44+
#import "@preview/blind-cvpr:0.7.0": cvpr2025
4945
5046
#show: cvpr2025.with(
5147
title: [LaTeX Author Guidelines for CVPR Proceedings],
@@ -71,25 +67,6 @@ template, you can add a show rule at the top of your file.
7167
- In case of US Letter, column sizes + gap does not equals to text width (2 *
7268
3.25 + 5/16 != 6 + 7/8). It seems that correct gap should be 3/8.
7369

74-
- At the moment of Typst v0.11.0, it is impossible to indent the first paragraph
75-
in a section (see [typst/typst#311][3]). The workaround is to add indentation
76-
manually as follows.
77-
78-
```typst
79-
== H2
80-
81-
#h(12pt) Manually as space for the first paragraph.
82-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.
83-
84-
// The second one is just fine.
85-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.
86-
```
87-
88-
Also, we add `indent` constant as a shortcut for `h(12pt)`.
89-
90-
This issue is relevant to CVPR 2022. In the 2025 template there is no
91-
indentaino of the first paragraph in section.
92-
9370
- At the moment Typst v0.11.0 does not allow flexible customization of citation
9471
styles. Specifically, CVPR 2022 citation lookes like `[42]` where number is
9572
colored hyperlink. In order to achive this, we shouuld provide custom
@@ -120,8 +97,6 @@ template, you can add a show rule at the top of your file.
12097
+ CVPR 2022 conference [web site][4].
12198
+ CVPR 2025 conference [web site][5].
12299

123-
[1]: example-paper.latex.pdf
124-
[2]: example-paper.typst.pdf
125100
[3]: https://github.com/typst/typst/issues/311
126101
[4]: https://cvpr2022.thecvf.com/author-guidelines#dates
127102
[5]: https://cvpr.thecvf.com/Conferences/2025

cvpr/cvpr2022.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
footer-descent: 23.4pt, // Visually perfect.
317317
footer: if accepted != none and not accepted {
318318
let ix = context counter(page).get().first()
319-
return align(center, text(size: font-size.normal, [#ix]))
319+
align(center, text(size: font-size.normal, [#ix]))
320320
},
321321
)
322322

cvpr/typst.toml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
[[document]]
1+
[package]
2+
name = "blind-cvpr"
3+
version = "0.7.0"
4+
compiler = "0.13.1"
5+
entrypoint = "cvpr.typ"
6+
repository = "https://github.com/daskol/typst-templates"
7+
authors = ["Daniel Bershatsky <https://github.com/daskol>"]
8+
license = "MIT"
9+
description = """
10+
CVPR-style paper template to publish at the Computer Vision and Pattern
11+
Recognition (CVPR) conferences."""
12+
keywords = [
13+
"Computer Vision and Pattern Recognition", "CVPR",
14+
"Artificial Intelligence", "AI",
15+
"Computer Vision", "CV",
16+
"Deep Learning", "DL",
17+
"Machine Learning", "ML",
18+
]
19+
categories = ["paper"]
20+
disciplines = ["computer-science", "mathematics"]
21+
22+
[template]
23+
path = "template"
224
entrypoint = "main.typ"
25+
thumbnail = "thumbnail.png"

iclr/main.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "/logo.typ": LaTeX, LaTeXe
2-
#import "/iclr2025.typ": iclr2025
2+
#import "/iclr.typ": iclr2025
33

44
#let author-note = footnote[
55
Use footnote for providing further information about author (webpage,

0 commit comments

Comments
 (0)