Oicana

Dependencies

An Oicana template can use any Typst package. Public packages can be found in the Typst Universe. You can also install private packages locally and use them in Oicana templates. Using dependencies works just as for any other Typst document.

Example

Take a look at the example Oicana template dependencydependency. It uses the awesome cetzcetz package to draw a diagram based on an input.

Local packages

A locally installed package can have any namespace. A common one is @local@local, but feel free to use your company name or any other identifier. To install a local Typst package, you can use a community developed tool or manually copy files to the right place.

Typship

Typship is a tool for Typst package development and publishing. Its CLI can install local Typst packages for you. To install a package into the @local@local namespace, run typship install localtypship install local in the package directory.

Manual

Installing a Typst package means that Typst can find it at {data-dir}/typst/packages/{namespace}/{name}/{version}{data-dir}/typst/packages/{namespace}/{name}/{version}. Here, {data-dir}{data-dir} is:

  • XDG_DATA_HOMEXDG_DATA_HOME or ~/.local/share~/.local/share on Linux
  • ~/Library/Application Support~/Library/Application Support on macOS
  • %APPDATA%%APPDATA% on Windows


For example, on Linux:

  1. Store a package in ~/.local/share/typst/packages/local/my-package/1.0.0~/.local/share/typst/packages/local/my-package/1.0.0
  2. Import all items from the package with #import "@local/my-package:1.0.0": *#import "@local/my-package:1.0.0": * in a Typst document


For more information on packages, please refer to Typst's packages repository.