Typst templates for personal use.
Go to file
2023-11-29 19:06:29 -05:00
algs.typ update preamble style 2023-08-08 21:23:42 -04:00
chem.typ chem: add block feature to chem block 2023-08-28 19:30:31 -04:00
compsci.typ update preamble style 2023-08-08 21:23:42 -04:00
contest.typ contest.typ: added 2023-05-30 19:01:35 -04:00
general.typ update preamble style 2023-08-08 21:23:42 -04:00
gensettings.sh add localization option 2023-11-09 20:53:20 -05:00
index.typ index.typ: added 2023-08-15 21:11:15 -04:00
libs.typ libs.typ: added 2023-11-29 19:06:29 -05:00
LICENSE LICENSE: added 2023-05-20 18:33:23 -04:00
main.typ main.typ: use liberation sans font 2023-11-29 16:19:54 -05:00
math_notes.typ math_notes.typ: added 2023-05-26 21:39:00 -04:00
math_prob.typ general.typ: added 2023-05-20 12:42:38 -04:00
preview.jpg main.typ: use liberation sans font 2023-11-29 16:19:54 -05:00
problems.typ update preamble style 2023-08-08 21:23:42 -04:00
proj.typ proj.typ: added symlink to general 2023-06-02 19:29:35 -04:00
README.md main.typ: use liberation sans font 2023-11-29 16:19:54 -05:00
sfd.typ update preamble style 2023-08-08 21:23:42 -04:00

typst templates

Personal templates for Typst, a neat markdown-like typsetting system.

I have the following directory structure for these:

docs/
├── problems
│   ├── src
│   │   └── test.cpp
│   ├── test.pdf
│   └── test.typ
└── templates
    └── ...

Installation

Install dependencies:

  • ttf-liberation

Set up docs/ as a git repo.

mkdir docs
cd docs
git init

Add templates/ as a submodule.

git submodule add https://github.com/dogeystamp/typst-templates templates

Set the environment variable TYPST_ROOT to docs/ in .bashrc, .profile or equivalent. Otherwise, templates won't be able to render due to security policy.

.profile
--------

export TYPST_ROOT="$HOME/docs"

Create a settings file in docs/:

templates/gensettings.sh settings.yml

Example usage

Example usage (this is test.typ in the above tree:)

#import "/templates/problems.typ": template, source_code, status
#show: template.with(
  title: "CCC '22 J1 - Cupcake Party",
  problem_url: "https://dmoj.ca/problem/cc22j1",
  stat: "incomplete",
)

= Thought process

#lorem(20)

== Important things

#lorem(50)

#source_code("test")

Some settings are available in main.typ.

Screenshots

preview

Note that the font size is optimized for viewing the document fit to width on half a monitor.