Create an Oicana template
Create a new directory and open it in your IDE with Typst support, or start a new empty document in the online Typst editor. The simplest Oicana template consists of a typst.toml
typst.toml
file and a Typst source file with some static content.
Create a main.typ
main.typ
file with the following content. If you are using the online Typst editor, it should already have created an empty file for you.
Note
If you are new to Typst, this might look a bit confusing to you. This code snippet is using Typst's markdown mode. The "=" is a heading and the normal text is just that, normal text. A "#" denotes a function call and we use the built-in text
text
function to write "Getting Started Guide" in blue and bold.
Please refer to Typst's online documentation for more information.
The preview of main.typ
main.typ
should show the title and text.
Note
The online Typst editor automatically shows a preview. In an IDE, you might need to open the preview. For example, if you use VS code with Tinymist
Tinymist
, press Ctrl
Ctrl
+ K
K
followed by V
V
while the main.typ
main.typ
file is open.
To make an Oicana template out of this Typst project, we need to put a typst.toml
typst.toml
file next to main.typ
main.typ
and define some metadata.
The manifest file gives our template the name example
example
, the semantic version 0.1.0
0.1.0
, and defines the entrypoint as main.typ
main.typ
. The tool.oicana
tool.oicana
section only configures the Oicana manifest version for now.
Note
If you are using the online Typst editor, you will have to download the project for the next step.
To compile the template through Oicana integrations, like the C# one we are about to use, it has to be packaged. Navigate into the template directory in a terminal and execute oicana pack
oicana pack
. This will create a file called example-0.1.0.zip
example-0.1.0.zip
.