This is a work in progress while we investigate the feasibility of
supporting typst for IACR journals. It cannot be used for submissions
yet. It is based on the LaTeX iacrj.cls along with the companion
metacapture.sty for metadata capture.
This package contains several files, including the iacrj.typ template,
some documentation, and eventually a sample starter file.
If you are running typst locally on your own machine, then you will
need to install the typst compiler and the "New Computer Modern"
fonts. You can first check if the New Computer Modern fonts are
installed by inspecting typst fonts. If you don't already have them
installed, then you can download these from
CTAN using the link
"Download the contents of this package in one zip archive". In order
to install these on an Ubuntu system, save this as
newcomputermodern.zip and then follow the instructions:
mkdir -p ~/.local/share/fonts/NewComputerModern
pushd ~/.local/share/fonts/NewComputerModern
unzip ~/Downloads/newcomputermodern.zip
Affiliations are an ordered dictionary with short keys. Authors refer to these
keys using inst, either as a single string or a tuple of strings:
#show: iacrj.with(
journal: "cic",
title: "Example paper",
authors: (
(name: "Alice", inst: "uni-a"),
(name: "Bob", inst: ("uni-a", "uni-b")),
),
affiliations: (
uni-a: (name: "University A", city: "City A"),
uni-b: (name: "University B"),
),
)The keys are not printed. Dictionary insertion order determines both the superscript numbers and the order of displayed affiliations; changing that order automatically updates the numbers without changing author references. Author-side numbers link to their corresponding affiliation entries. As before, numbers are omitted with a single author or a single affiliation.
A string value such as uni-a: "University A" is shorthand for a record with
only a name. Every referenced key must exist. Affiliation arrays and numeric
inst references are no longer accepted. Anonymous documents omit authors
and affiliations from both the front matter and the queried metadata.
The anonymous option controls anonymity:
| Value | Behavior |
|---|---|
auto (default) |
Anonymous for version: "submission"; named otherwise. |
true |
Anonymous in every version. |
false |
Named in every version. |
Named submissions must be permitted by the call for papers.
Use running to override the title and author text in the running headers:
#show: iacrj.with(
journal: "cic",
title: "A paper with a long title",
authors: ("Alice Example", "Bob Example"),
running: (title: "Short title", authors: "Example and Example"),
)Both fields default to auto and can be set independently. An automatic title
uses title.short when the title is a record, or the full title otherwise.
Automatic author text joins the full names with commas. If that text exceeds
70 characters and there is more than one author, it becomes the first author's
surname followed by “et al.” The surname field is used when provided;
otherwise the last whitespace-separated word of the name is used. Supply
surname or an explicit running.authors for names that need different handling.
A single author's name is never shortened.
Running overrides do not change the title block or publishing metadata.
Anonymous documents ignore running.authors and retain the anonymous header;
anonymous: false permits the override in any version.
Pass one BibTeX filename or a tuple of filenames to the template:
#show: iacrj.with(
journal: "cic",
title: "Example paper",
authors: ("Alice",),
bibliography: ("references/strings.bib", "references/works.bib"),
)
A citation to @example.Paths are relative to the Typst project root, with an optional leading /,
not to the template or the calling file. The template reads and concatenates
these files in the supplied order, then passes the combined bytes to Typst's
native bibliography function. This lets BibTeX string aliases defined in one
file be used in another. A References section is appended automatically; do not
add a separate #bibliography(...) call. Manual calls are rejected with a
message directing you to the template's bibliography: option, even with
enable-checks: false. The small src/iacrj.csl style
approximates the LaTeX class's alphaurl style: matching bracketed alphanumeric
labels in citations and the reference list, author-sorted entries, and DOI/URL
information. It uses Typst's native bibliography rendering; the two styles are
not identical. Typst's built-in alphanumeric style supports citations only,
so it cannot render the reference list on its own. The template fixes the
bibliography style and requires citations to inherit it; changing either with
set rules or explicit element arguments is rejected when checks are enabled.
Omitting the option (or supplying ()) adds no bibliography.
The supplied filenames are recorded in the paper's metadata. The source files and combined bibliography are not part of it; how the publishing pipeline retrieves those files is still unresolved.
The template places the paper's machine-readable metadata in the document as
a metadata element labeled <iacrj-meta>, so the publishing pipeline can
query it as JSON (or YAML with --format yaml) instead of extracting it from
the PDF. From the repository root, try the included example:
typst query src/example.typ '<iacrj-meta>' --field value --one
typst eval --in src/example.typ 'query(<iacrj-meta>).first().value.title.full'Typst uses src/ as the project root for these commands, matching the
example's bibliography paths. Pass the same --input options (such as
iacrmetadata=...) as for typst compile, since the query compiles the paper
separately and the two must agree.
The record contains:
| Field | Meaning |
|---|---|
journal, version |
The selected journal and document version. |
volume, issue |
Journal issue metadata supplied by the publisher, or null. |
title |
A record with full and short title strings. |
authors |
Validated author records, including affiliation keys in inst. |
affiliations |
Validated affiliation records keyed by the supplied identifiers, in display order. |
bibliography |
The supplied BibTeX filenames, normalized to a list and kept in input order. Empty when no sources are configured. |
citekeys |
Unique cited bibliography keys as strings, sorted alphabetically, including citations in the abstract. Empty when there are no citations; uncited entries and ordinary cross-references are excluded. |
keywords |
The supplied keywords, as a list. |
license |
The SPDX license identifier, or null when none is given. |
pages |
A record with full (all pages, including references) and main (excluding bibliography-only pages) counts. Null for HTML output. |
abstract |
The abstract's original Typst markup string, not extracted PDF text or a rendered abstract. Empty when no abstract is supplied. |
doi, crossmark-date, crossmark-url |
Present only for version: "final". Unavailable values are null; the Crossmark URL requires both a DOI and a Crossmark date. |
date-received, date-accepted, date-revised, date-final |
Present only for version: "final"; the publisher's dates, or null. |
Both pages.full and pages.main include front matter. pages.full counts
all pages, including references; pages.main counts through the end of the main
text, excluding bibliography-only pages. A page shared by the main text and its
references counts towards both totals. The counts use physical page positions,
not the page counter or displayed page numbers. Without a bibliography, both
counts are equal.
Anonymous documents have an empty author list and affiliation dictionary in
the metadata; anonymous: false disables that redaction in every version. The
abstract is preserved verbatim, so authors must remove identifying information
from it and from the paper's prose themselves.
The metadata does not include the Typst source files, original BibTeX files, or concatenated bibliography data. Delivery of the referenced BibTeX files to the publishing pipeline is still unresolved.
Style checks are enabled by default. If they obstruct development or debugging,
you can temporarily add enable-checks: false to the template options:
#show: iacrj.with(
journal: "cic",
title: "Work in progress",
authors: ("Alice",),
enable-checks: false,
)This disables style checks, not the template's default formatting or metadata
validation. Manual bibliography(...) calls remain prohibited; supply files
through the bibliography: option. Restore enable-checks: true, or remove the
option, before submission. This is a development aid, not permission to change
the journal's required style.
The license option takes an SPDX identifier. Only these Creative Commons
licenses are supported: CC-BY-4.0, CC-BY-SA-4.0, CC-BY-ND-4.0,
CC-BY-NC-4.0, CC-BY-NC-SA-4.0, CC-BY-NC-ND-4.0 and CC0-1.0.
version: "final" requires a license, as \license does in iacrj.cls.
#show: iacrj.with(
journal: "cic",
license: "CC-BY-4.0",
// ...
)As in iacrj.cls, preprints and final versions show the license on the first
page's footer, linked to the license deed, with its Creative Commons badge
on the right. Submissions don't show it. A final version also shows, on the
next line, the dates from the publisher's iacrmetadata (below): Received,
Revised, Accepted and Final version, from date-received, date-revised,
date-accepted and date-final. Revised and Final version are left out when
their dates are missing. The footer is the same for all journals. Unlike
iacrj.cls, preprints have no "Date of this document" line.
The footer is placed in the bottom margin as part of the document, not as the page footer, because PDF/UA does not allow links in page footers.
The publisher supplies publication links in a metadata file named by the
iacrmetadata input, not through author-facing template arguments. For example,
a metadata file can contain:
volume=3
issue=2
doi=10.62056/a66c0l2hd
crossmark-date=2026-07-24
date-received=2026-03-01
date-accepted=2026-06-02
date-revised=2026-06-20
date-final=2026-07-24
Name the file relative to the project root (src/ for the included example):
typst compile --input iacrmetadata=main.iacrmetadata src/example.typWithout the input, the paper compiles without a volume, issue, DOI or badge.
Typst cannot test whether a file exists, so a named file that is missing is a
compilation error. A supplied file must have date-received and
date-accepted; date-revised and date-final are optional. All dates use
the YYYY-MM-DD format, and they must be in order: received ≤ accepted ≤
final, and received ≤ revised ≤ final (a revision may come before or after
acceptance). Each line is key=value; blank lines and unknown keys are
ignored, but a repeated key, a quoted value, a non-numeric volume or issue, or
a malformed DOI or date stops compilation with an error.
Use the DOI identifier, not its https://doi.org/ URL. In version: "final",
the DOI appears in the first-page header and PDF description (subject), and the
DOI, Crossmark date, and update URL are included in the paper's metadata. Preprints and submissions
do not expose these publication links.
For CiC, the DOI URL is right-aligned above the linked “Check for updates” badge,
as in the LaTeX class. ToSC and TCHES instead show DOI: ... on the issue line,
without a badge. The badge is src/icons/crossmark.svg;
check-for-updates renders it at 69pt wide by default. The badge's Crossmark
URL is derived automatically from the DOI and crossmark-date; no separate
URL is supplied. crossmark-date must use the exact YYYY-MM-DD format,
including zero-padded month and day, and represent a valid calendar date. It identifies
the PDF's last major version—normally its publication date, or the date of a
significant in-place correction. It is never inferred from the compilation date.
Without it, the DOI link is still rendered but the Crossmark badge is omitted.
version: "submission" hides the authors by default (see anonymous above) and
numbers the lines in the margin, as iacrj.cls does with lineno, so reviewers can
refer to them. Anonymity overrides do not affect line numbering.
The line-numbers option overrides this: true numbers the lines of any
version, false turns them off. The default, auto, numbers submissions only.
The template uses native Typst elements for the visible document title, abstract heading, section headings, figures, captions, lists, and footnotes. Document metadata includes the title, authors, and keywords. Author ORCID links have person-specific alternative descriptions. Styling these elements does not remove their semantics.
For accessible output, keep using native elements in the paper itself. Supply
alternative descriptions for meaningful images and mathematics, and use
table.header for table headings. Typst's
accessibility guide describes the
remaining author responsibilities.
The semantic regression fixture can also be checked with stricter export rules:
typst compile --root . --pdf-standard ua-1,a-2a tests/accessibility/test.typ accessibility.pdf- Typst and the New Computer Modern fonts, as described above.
- The valkyrie package, which the template uses to check its arguments. Typst downloads it automatically the first time you compile, so there is nothing to install.
- The ccicons package, which provides the Creative Commons images in the first-page footer. It is downloaded the same way.
- tytanic (the
ttcommand), which is only needed to run the tests intests/, not to use the template. Use a release that is built with the same Typst version that you use;tt util aboutshows it (tytanic 0.4.1 has Typst 0.15.1).
The simplest way is to download a prebuilt binary from the releases page. For example, on x86-64 Linux:
curl -LO https://github.com/typst-community/tytanic/releases/download/v0.4.1/tytanic-x86_64-unknown-linux-musl.tar.xz
tar xJf tytanic-x86_64-unknown-linux-musl.tar.xz
install -m755 tytanic-x86_64-unknown-linux-musl/tt ~/.local/bin/tt
tt --version
On other systems, pick the matching file from the releases page (for
example aarch64-apple-darwin for an Apple Silicon Mac), and make sure
the directory you put tt in is on your PATH.
Alternatively, build it from source with Cargo. Version 0.4.1 needs Rust
1.95 or newer, so update Rust first with rustup update if necessary:
cargo install --locked tytanic
All .typ files use typstyle 0.15.2 with its default settings (80 columns,
two-space indentation). Install it with:
cargo install --locked typstyle --version 0.15.2From the repository root, format or check the sources and test fixtures with:
typstyle --inplace src tests
typstyle --check src testsCI runs the same formatting check independently of the test suite.
jj does not use Git pre-commit hooks. Configure its native jj fix integration
once per clone:
jj config set --repo fix.tools.typstyle.command '["typstyle"]'
jj config set --repo fix.tools.typstyle.patterns '["glob:**/*.typ"]'
jj config set --repo aliases.fmt '["fix", "--source", "@", "--include-unchanged-files"]'Then run jj fmt before finalizing a change. It formats all matching files in
the working-copy change and its descendants, without rewriting its ancestors.
This is an explicit command, not an automatic hook; CI rejects unformatted
changes. Avoid bare jj fix unless you intend to format the broader mutable
history selected by jj's defaults.
From anywhere in the repository, run
tt run --use-system-fonts
--use-system-fonts is needed because tytanic otherwise only sees the fonts
embedded in Typst, which don't include New Computer Modern Sans and Mono.
By default tytanic stops at the first failing test; add --no-fail-fast
to run all of them.
Each test is a directory with a test.typ:
- A test with a
ref/directory compares its pages with the reference images inref/. After an intended change in the output, check the new images in the test'sout/directory, then regenerate the references withtt update --use-system-fonts. Small differences in installed font versions can make these tests fail on another machine; regenerate the references there if so. - A test without
ref/only has to compile. These useasserttogether with tytanic'scatchto check error messages.
Create a new test with tt new <name> (add -C for a compile-only test).
Layout-time style-check failures require a separate compiler invocation, since
catch only catches evaluation-time errors. Run their regression checks with:
python3 tests/style-checks/check.pyThese checks require the typst CLI and the same fonts as the main suite, and
also run in CI. They verify that template-owned set-rule changes and explicit
citation style overrides are rejected, and that the existing
enable-checks: false escape hatch still works for style checks. Manual
bibliography calls are rejected independently of that switch, whether or not
sources were supplied through the template option. The checks are diagnostics,
not a security boundary: arbitrary replacement show rules can bypass them.