Package Information
- Last Updated
- Minimum Typst Version
- 0.13.1
- Authors
- Stefano Volpe
- Categories
- text
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/color-my-agda:0.2.02. Import in your Typst file
Add this to your .typ file:
#import "@preview/color-my-agda:0.2.0": *Color My Agda
An unofficial Typst package providing syntax highlight for Agda.
Use
The package exposes a single styling function.
init-color-my-agda(content) -> content
You would usually use this in a show
rule. For example, the
following two lines:
#import "@preview/color-my-agda:0.2.0": init-color-my-agda
#show: init-color-my-agda
style all subsequent agda raw blocks, such as
```agda
module hello-world where
open import Agda.Builtin.IO using (IO)
open import Agda.Builtin.Unit using (⊤)
open import Agda.Builtin.String using (String)
postulate putStrLn : String → IO ⊤
{-# FOREIGN GHC import qualified Data.Text as T #-}
{-# COMPILE GHC putStrLn = putStrLn . T.unpack #-}
main : IO ⊤
main = putStrLn "Hello world!"
```
Grammar
The Agda grammar used by this package is a Sublime
Syntax file. It is automatically
generated from the official TextMate grammar provided by
Agda. The commit used
for the generation is currently ba5005841ff9bdc5186af68befd58ed456fc7a8c,
which is targeting Agda 2.8.0.
The converter used is Sublime Syntax
Convertor.