Templates
The generation of arbitrary visual signatures appearances (called stamps) is provided through a Typst-based plugin system.
Parameters
The parameters given through either the config, environment or as CLI options are passed (more or less) directly to the Typst signature template. Therefore, their values should be valid Typst objects. This means that most parameters need to be wrapped into Typst content blocks [ ... ], e.g. name=[Some Name]. However, some parameters might also be used differently, like inset=3pt. Which type a parameter expects needs to be documented by the template in question.
WARNING
If the template is specified on the command line, parameters in the config are ignored.
Defaults
For some parameters default values are supplied. The following are automatically set:
height: The height of the selected signature boxwidth: The width of the selected signature boxrotation: The counter-rotation of the page containing the signature (i.e. the necessary rotation to counteract the page's rotation)date: The current time + date
Additionally, the following are extracted from the given signature:
cert_name: from the certificate's subject (id:2.5.4.3)cert_country: from the certificate's subject (id:2.5.4.6)cert_org: from the certificate's subject (id:2.5.4.10)cert_surname: from the certificate's subject (id:2.5.4.4)cert_given_name: from the certificate's subject (id:2.5.4.42)cert_title: from the certificate's subject (id:2.5.4.12)cert_initials: from the certificate's subject (id:2.5.4.43)cert_pseudonym: from the certificate's subject (id:2.5.4.65)cert_email: from the certificate's subject (id:1.2.840.113549.1.9.1)
References
To allow for some additional flexibility, parameters may contain references to others. These references are resolved before they are passed to Typst. A reference is specified by using curly braces {<name>}.
These references may very well use the default parameters.
Example:
info=[This is my custom Signature\ Date: #{date}]
INFO
All default parameters expect to be invoked from Typst code-mode, thus to use them you need to prefix them by a hash #.
The previous example resolves to:
info=[This is my custom Signature\ Date: #[13.11.2025 10:51:34 ...]]
The parameter precedence is as follows:
(Typst defaults) < config < environment < CLI optionCustom stamps
To create your own stamp, you need to create a directory which contains a typst.toml as described by the Typst documentation.
Your main Typst file (referenced as entrypoint in the config) needs to contain a function called stamp. This function will be invoked during the signature creation. It may accept arbitrary named parameters. Most of these parameters need to be supplied be the user.
To ensure the stamp fits properly within the signature box, the following boilerplate is recommended:
#let stamp(height: 0pt, width: 0pt, rotation: 0deg, ..args) = {
rotate(rotation,
box(height: height, width: width,
/* your code here */
),
reflow: true
)}To start from an existing stamp, just copy one of the directories from the templates.
Technical Details
The specified Typst package directory is copied to the local Typst cache into the resignation namespace. This can be found at:
$XDG_CACHE_HOME or ~/.cache + /typst/packages/resignation/<name>/<version>
The stamp PDF is then generated by the following Typst code:
#import "@resignation/<name>:<version>": stamp
#set page(width: auto, height: auto, margin: 0pt)
#stamp({args})Where {args} is substituted by a list of all parameters passed through either the config, environment or as CLI option.