Oicana

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.tomltypst.toml file and a Typst source file with some static content.

Template with static content

Create a main.typmain.typ file with the following content. If you are using the online Typst editor, it should already have created an empty file for you.



                                  
= Hello from Typst

                                  


                                  
Compiling this template will always result in the same document.

                                  
We will add inputs later on in the #text(fill: blue, weight: "bold")[Getting Started Guide].

                                  
= Hello from Typst

                                  


                                  
Compiling this template will always result in the same document.

                                  
We will add inputs later on in the #text(fill: blue, weight: "bold")[Getting Started Guide].

                                  
= Hello from Typst

                                  


                                  
Compiling this template will always result in the same document.

                                  
We will add inputs later on in the #text(fill: blue, weight: "bold")[Getting Started Guide].

                                  
= Hello from Typst

                                  


                                  
Compiling this template will always result in the same document.

                                  
We will add inputs later on in the #text(fill: blue, weight: "bold")[Getting Started Guide].

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 texttext function to write "Getting Started Guide" in blue and bold.


Please refer to Typst's online documentation for more information.

The preview of main.typmain.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 TinymistTinymist, press CtrlCtrl + KK followed by VV while the main.typmain.typ file is open.


To make an Oicana template out of this Typst project, we need to put a typst.tomltypst.toml file next to main.typmain.typ and define some metadata.



                                  
[package]

                                  
name = "example"

                                  
version = "0.1.0"

                                  
entrypoint = "main.typ"

                                  


                                  
[tool.oicana]

                                  
manifest_version = 1

                                  
[package]

                                  
name = "example"

                                  
version = "0.1.0"

                                  
entrypoint = "main.typ"

                                  


                                  
[tool.oicana]

                                  
manifest_version = 1

                                  
[package]

                                  
name = "example"

                                  
version = "0.1.0"

                                  
entrypoint = "main.typ"

                                  


                                  
[tool.oicana]

                                  
manifest_version = 1

                                  
[package]

                                  
name = "example"

                                  
version = "0.1.0"

                                  
entrypoint = "main.typ"

                                  


                                  
[tool.oicana]

                                  
manifest_version = 1


The manifest file gives our template the name exampleexample, the semantic version 0.1.00.1.0, and defines the entrypoint as main.typmain.typ. The tool.oicanatool.oicana section only configures the Oicana manifest version for now.

Packaging

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 packoicana pack. This will create a file called example-0.1.0.zipexample-0.1.0.zip.