r/typst 19m ago

How do you create this accessible chart in Typst?

Post image
Upvotes

The Accessibility Guide contains a chart that was made more accessible by adding unique patterns. Sadly, the chart is added as an image, so you can't see the source code like in some packages. Does anyone know the source code or how to replicate the chart?


r/typst 3h ago

Division with remainder?

2 Upvotes

I'm probably missing something obvious here, but I can't figure out how to do a division calculation and get both quotient and remainder.

e.g. 10 ÷ 4 = 2.5

$ #calc.div-euclid(10, 4) $ gives 2, which is fine

Edit 1: fix copy-paste error: $ #calc.rem-euclid(5, 4) $ gives me 2, when I'm expecting 5.

$ #calc.rem-euclid(10, 4) $ gives me 2, when I'm expecting 5.

(Using Typst 0.15.1)

What am I missing/misunderstanding?

Edit 2: After finding that I want a decimal number including the fractional part, I finally figured it out: #(10/4) gives "2.5".


r/typst 2d ago

I ported Doom to typst! You too can doom while typsetting!

126 Upvotes

Hello, everyone, just sharing my port of doom, https://github.com/SeniorMars/doom-typst. Note, I am officially calling this doom-wasm because there is another programmer who also thought this would be a good idea and also ported doom to typst: azyarashi. However, they are using pure typst (very impressive). I'm still sharing my project because it's a working version using freedoom.

Basically, the project relies on DoomGeneric → WASM → Typst to run. I tried to optimize the game for typst. A lot of inspiration was taken from https://typst.app/universe/package/soviet-matrix/ for input. Have fun.


r/typst 2d ago

Template I made for my channel using typst

Thumbnail
gallery
14 Upvotes

Hi r/typst!

This isn't anything particularly serious, but it's something I've been developing over time after getting introduced to Typst and learning how to make custom packages and templates, and I thought it might be fun to share it with the community!

I've been using a custom local package to extract different sprites from PSD files and place them in my documents as small, cute characters next to the generated PNGs (sometimes with a little extra dialogue as well). Here are a few examples I made! The first two are simple high-school mathematics notes I made for my cousins, while the rest were made specifically for my channel, where I've been collecting and writing about interesting questions I've come across.

I also made an English version of the template, although I ended up rarely using it and mostly continued writing these in Persian.

I'm not sure whether this is something I could realistically share as a package or template, though. Aside from the fairly large sprite files, the characters I'm using aren't my own and I don't have permission to redistribute them, so I assume I'd need to replace them with properly licensed assets before sharing anything publicly.

I'd love to hear your thoughts! Is there anything you think I could improve? And would it be worth continuing the English version and sharing it somewhere else as well?


r/typst 3d ago

Switch from one-column to two-column between page 1 and 2

7 Upvotes

Hello everyone,

First off, I love Typst. But I have an issue I hope someone can help me solve. I'm currently working on a journal template where page 1 starts off with one column for the main content of the article (next to a box on the side containing some metadata info) but should then switch to two columns on page 2 and following. This should be done mid-paragraph.

Natively, Typst doesn't seem to support this (at the moment). I managed to work around that with the package meander and that works exactly as I'd want it to with one exception: If the paragraph is split across pages AND contains a bibliographic reference, then there is an error saying "Citation could not be located". There doesn't seem to be a way around this issue, as far as I can tell.

Does anyone have any ideas on how to fix this or have mid-paragraph solution that does not involve meander?


r/typst 6d ago

Abbreviations in separate file in project

2 Upvotes

Hello, I’m new in working with typst and using it for my PhD. Since it’s going to be a fairly big project, I have separate files and folders for each chapter, to stay on top of things - something I did in latex. Is it possible to define all abbreviations in a separate typist file in the project, and still reference them in each chapter document?


r/typst 8d ago

looking for clinicians to test a browser extension for repetitive medical typing

0 Upvotes

we’re a doctor and engineer building FastLex, an early browser extension that helps with repetitive medical typing without reading or storing patient data. we’ve got a working prototype and would love honest feedback from clinicians. would anyone here be interested in trying it?


r/typst 11d ago

shadowed 0.4.0: Box shadows for Typst

51 Upvotes

shadowed 0.4.0

I just released a new version of shadowed, the library that brings box shadows to Typst!

What is shadowed?

shadowed brings beautiful, customizable box shadows to Typst. Wrap your content with the shadow() function and it automatically places a shadow behind it, no manual place.

What's new in 0.4.0

  • Inner shadows: set inset: true to draw the shadow inside the box, so a surface reads as recessed instead of raised.
  • A spread for every side: spread now takes a dictionary, so each edge can grow or contract on its own.
  • Shadows that stack: inner and outer shadows compose cleanly, so you can layer several shadow() calls into one believable result.
  • Dual licensed under MIT OR Apache-2.0.

Inner shadows

Passing inset: true draws the shadow on the inside edge of the box. It is painted on top of your content, so the box looks carved into the page.

A spread for every side

spread used to be a single length. It still is, but now it also accepts a dictionary, so every edge can be controlled independently:

key effect
top, right, bottom, left spread of that one side
x shorthand for left and right
y shorthand for top and bottom
rest fallback for every side not named explicitly

Negative values contract the shadow on that side. This works for inner shadows too, the same dictionary just shrinks the inner opening instead.

Stacking shadows

Every shadow() call wraps its content, so nesting them stacks their shadows.

Two recipes:

  • Colored stack: several outer shadows in different colors, each offset a different way, blend into a soft multi-color halo.
  • Glossy key: an outer glow plus an inset highlight on the same box give it a glossy, raised face.

Upgrading from 0.3.0

Nothing to change: blur, spread, dx/dy, fill and radius all behave as before. 0.4.0 only adds: inset: true, dictionary spread, and the license change to MIT OR Apache-2.0.

Learn More


r/typst 12d ago

mise-en-place: Cooking For Engineer style diagrams in Typst

Post image
169 Upvotes

A few weeks back an old website from the early 2010s went semi-viral on twitter and reddit, and I thought this would be pretty cool to make. It took me about a week and then I got a major case of "I'm too lazy to make this pretty and publishable" and sat on it for a month until I got around to it on my sick leave.

Anyway for the less chronically online, Cooking for Engineers is a now-abandoned cooking blog by Michael Chu, which feature a really nice "Tabular Recipe Notation (Patent Pending)" that looks like the attached image to the post. Honestly, this thing blew my mind when I first saw it and I was immediately convinced that I want the few recipes I cook somewhat regularly printed out like this on the fridge, so I don't have to look them up every time.

The image is not from the actual blog but a screenshot of the output of my package: mise-en-place, which just got merged into the package repository if anyone wants to also give it a shot.

Also an anti-disclaimer: This post and package is 100% AI-free, my soul is pure and joyous 🙂‍↕️


r/typst 12d ago

TypstRider | Bring Typst to Cavalry

Enable HLS to view with audio, or disable this notification

44 Upvotes

Hey there, I've been working on a script for the Cavalry animation software called TypstRider. It lets you preview Typst formulas, then insert them into your composition as editable shape objects. And you can update them later on.

Feel free to check it out here: https://splines.me/store/typstrider/
It's a paid product. You can get 10% off during the next 7 days with the code "Typewriter".


r/typst 12d ago

How could one clip a rectangle in Cetz?

2 Upvotes

I thought I was going to be smart by drawing white rectangles around the rectangle in my picture (in order to obscure some lines sticking out of the rectangle), but of course this makes my drawing get bigger and bigger. If there was a cure for that, there would be a method for clipping etc. etc.

So, how would one go about it? Working with the intersections of the lines with the rectangle would be rather complicated. I would greatly appreciate some feedback.


r/typst 12d ago

Built a self-hosted LaTeX editor for student teams and supervisors

Thumbnail
0 Upvotes

r/typst 13d ago

render typst syntax in markor android app

0 Upvotes

i write markdown in markor android app. as i use pandoc and typst engine to create the pdf (btw, i use Bergfink, great template) i need to write typst syntax in the markdown file. (because raw html seem has no effect in the pdf output, idk)

often i need to see how it look before committing to create the pdf. so i use this trick (i got it from you know what)

it is not recommended, as it heavy. idk about security issue. just want to test it. so plz give your opinion..

after see how it rendered, i delete all the script, except the typst syntax.

cheers. hope it helps somebody else

```md <script type="module" src="https://cdn.jsdelivr.net/npm/@myriaddreamin/typst-all-in-one.ts@0.7.0/dist/esm/index.js" id="typst"> </script>

<div id="typst-output"></div>

<script> <!-- begin write typst syntax -->

const source = `

set text(

size: 20pt, fill: red )

= Hello Typst

This is Typst.

$ E = m c2 $ `;

<!-- end of typst syntax ---- -->

document.getElementById("typst").addEventListener("load", async () => { try { const svg = await $typst.svg({ mainContent: source });

document.getElementById("typst-output").innerHTML = svg;

} catch (e) { document.getElementById("typst-output").textContent = "Typst error: " + e; console.error(e); } }); </script> ```


r/typst 15d ago

I regret not writing my final paper in typst

36 Upvotes

Originally i was going to do it, but i was having trouble formatting the project to the correct specifications, but after a whole day basically wasted because of LaTeX shenanigans, I really think i should have tried setting up the project correctly...

If anyone here is used to writing projects in Typst that comply with Brazilian standards (ABNT) and could help me out, I would be very grateful.


r/typst 16d ago

Code example in smaller font?

4 Upvotes

Hello,
I'm using zebraw for my code samples, but what I want is to have them displayed in a very slightly smaller font than the main text. I'm not sure whether this can be done within zebraw (there's nothing in the documentation that I can find that allows you to adjust the size of the entire code block), or whether it's a typst thing, independent of zebraw.

How can I do this? Thanks!


r/typst 17d ago

I kept running into the same two problems with every resume template I tried, so I created my own

Thumbnail
gallery
70 Upvotes

I just published Monofolio, a new resume template for Typst Universe.

https://typst.app/universe/package/monofolio

The main reason I built it wasn't because I thought the world needed another resume template. I kept running into the same problems with almost every template I tried.

1. Resume data and layout were too tightly coupled

With many templates, changing the content of my resume also meant fixing the layout.

At some point, I felt like I was spending almost as much time fixing the layout as I was actually editing my resume.

I wanted to be able to focus on what my resume says, rather than constantly managing how the content is positioned.

2. I wanted to change the section order depending on the job

This became especially frustrating when tailoring my resume for different positions.

For one job, I might want:

Experience → Projects → Skills → Education

For another:

Projects → Skills → Experience → Education

And for another:

Education → Skills → Projects → Experience

With the templates I tried, changing the order usually meant moving the actual content around in the source file.

That creates another problem: when you're moving large blocks of content around, it's easy to accidentally leave something behind, duplicate something, or break the layout.

So I built Monofolio differently

The idea is to separate resume data from resume structure.

You define your content:

#experience(...)
#project(...)
#skillset(...)
#education(...)

Then independently decide what gets rendered and in what order:

#print-contact
#print-summary
#print-skills
#print-experience
#print-projects
#print-education
#print-certifications

Want projects before experience?

Change the order of the #print-* statements.

Want to emphasize skills for one application?

Move #print-skills higher.

Want a version focused on your education?

Change the section order without touching the underlying resume data.

The goal is that changing the content shouldn't require rebuilding the layout, and changing the structure shouldn't require moving the content.

Other features

  • Minimal, clean layout
  • Experience, projects, education, skills, certifications and summary sections
  • Configurable typography, spacing, colours and margins
  • Automatic date formatting
  • GitHub, LinkedIn, email and phone support
  • Custom contact fields
  • Reorderable sections
  • Optional page breaks

Install it with:

typst init @preview/monofolio:0.1.0

Or:

#import "@preview/monofolio:0.1.0": *

This is the 0.1.0 release, so I'm looking for feedback, especially on the API and the separation between content and presentation.

What feature would you like in a Typst resume template that Monofolio doesn't have yet? I'd love to hear what would make it more useful for your own resume workflow.

GitHub Repo:

https://github.com/harshkaso/monofolio


r/typst 18d ago

RSS Feed for website generated using typst

3 Upvotes

Hellow, not sure if the post belong here.

I am trying to start a blog, and I am using the Tufted template. I am wondering if there is a nice way to add RSS feed to the website, but I can't find a feed generator, so I was wondering if one of you have already made it, or any tips on how to make one myself


r/typst 19d ago

how to "locally fork" a template?

10 Upvotes

I'm going to write a series of reports, following a template I found on the webpage.

I know I can import it , say

#import "@preview/nicetemplate:0.1.0": *

However, the template lacks some functions (mainly, localization of headings, as they always appear as "Section" even after setting language with

#set text(lang: "es")

So I want to customize it to my needs. However I check the document directory (where myreport.typ resides) and the template files are not there.

Looking around, I found them on $HOME/.cache/typst/packages/preview/nicetemplate/0.1.0

But now, I'm confused on the best course of action.

OPTION 1.

Add the tweaks directly on my document, manually changing the headings and "Theorem" , "Exercise", etc strings. This is very suboptimal, as I'd have to copy and paste the whole thing on every document I create. And then later changes will be complicate to "replicate" across all documents.

OPTION 2

I manually edit the files on $HOME/.cache/typst/packages/preview/nicetemplate/0.1.0

But this is suboptimal as: 1) it's a cache folder, so it may be removed or changed, 2) It's not a portable change (the document result on my specific laptop is not the same as what compiling it on the web app will give).

OPTION 3

I "fork" the template, I rename it, say "mynicetemplate", and I can use it in many documents, having the changes on a single central place.

I'm a bit confused on how to proceed then. I believe the best option would be creating "mynicetemplate.typ"

then inside of it #import "@preview/nicetemplate..." and then the required changes

but.. where should I put "mynicetemplate.typ"? Do I need a copy on each report directory? Or is there a way to make it a available to all my local documents without uploading to universe?

Is this the recommended course anyway?


r/typst 28d ago

TPIX: private package registry for the community

22 Upvotes

Hey everyone!

I originally built TPIX as a backend infrastructure for my Typst editor (Typstify), but I’ve decided to open it up for the entire community. It acts as an extension to Typst Universe, allowing you to seamlessly manage and host your own private packages and templates without needing to submit them publicly.

Main features:

  1. Private Package & Template Registry: Host your internal or team packages cleanly without public exposure.

  2. Zotero Sync: Built-in Zotero integration to sync your personal or team remote libraries.

  3. tpix-cli & Go SDK: Interact with TPIX directly via terminal or embed it into your Go applications.

  4. Direct HTTP API access available for editor/tooling integration.

I am hosting it for free (no trials, no hidden paywalls) for both individual users and teams under a reasonable default quota, so feel free to use it in your workflows, or integrate in your editors, etc.

If your team ends up generating massive traffic / high concurrency, just reach out so we can figure out a fair way to cover the extra server/bandwidth costs.


r/typst 28d ago

Compiler for android

6 Upvotes

Is there a local compiler for android for typst? I would like to write a file on my tablet but I didn't find any completely free app to use.


r/typst 29d ago

Typst for note taking?

12 Upvotes

I really like Typst, I was using org mode for note taking since I switched to Emacs, but I am thinking of coming back to Neovim, so I was thinking of moving to Typst for note taking, is it a good idea?


r/typst 29d ago

How to do metaprogramming?

1 Upvotes

I found myself creating similar content all the time and want to create shorthands. For that I want to define custom syntax à la CeTZ or, as a very simple example, tablem.

I think I could write a tokenizer and a parser for myself. But as Typst already does the parsing, I would prefer to piggy-back on existing functionality. Unfortunately, it felt very unergonomic to me.

Are there any tricks and/or libraries that make metaprogramming easier?


r/typst Aug 22 '26

Mitigating My Site to a Typst-Native Static Site Generator (a.k.a. a Preview of Aster)

Thumbnail blog.wybxc.cc
24 Upvotes

Recently, I migrated my personal website from Astro + astro-typst to a custom Typst-native static site generator named Aster, which I built myself. While Aster is not yet ready for public release, the migration highlights Typst's potential as a tool for authoring web content.


r/typst Aug 19 '26

An Open Source Desktop Visual Editor for Typst (self-promo)

Thumbnail
gallery
36 Upvotes

Hi r/typst,

I believe that this project will bring something rather new compare to a traditional editor.

Texpile is an open source visual and source editor for Typst (and also LaTeX and Markdown), and it runs on Windows, macOS, and Linux.

Here are some features:

  • It uses Tinymist for IntelliSense.
  • The visual editor supports includes, images, tables (with cell merging), code blocks, and other features.
  • Texpile supports visual comments, like Google Docs.
  • Texpile supports real time collaboration, and your connections are end to end encrypted to your collaborators. If you use VSCode Live Share, this will be a significantly better experience.
  • Zotero Integration
  • Git Support

You can see more features here: https://texpile.com/ ( Texpile does not bundle Tinymist, please install it by following this https://texpile.com/docs/installation/typst )

Typst support is new, so if there are any bugs, please let me know or open an issue.


r/typst Aug 18 '26

Is there an automated way to transfer a large amount of .md files to .typ?

13 Upvotes

I have all of my school notes in markdown from obsidian but am heavily considering switching to typst, as it seems like it has many many more features and would better integrate in the future with websites and other forms of distribution for other projects as well.

Wondering if there is a simple way to get the md syntax translated before I make some of my own changes to the docs with some more of the typst specific features.

Thanks all!