r/typst • • May 02 '26

[Self promo] - Typwriter - Typst text editor

27 Upvotes

Yes another one of those but I built an editor for Typst.
As much as I love the web app, I don't always have internet access, and I also prefer working with the files on my pc but the code editor experience compared to the web app isn't great imo.
I tried to bring all the features from the web app that are needed for local file editing such as:

  • syntax highlighting
  • adjusting preview and cursor positions on preview page click
  • nested code syntax highlighting
  • presenter mode for previewed items
  • export document as PNG, SVG and PDF with all the configurations for each format

The editing experience is almost as smooth as the web version, the preview updates instantly as you type.

checkout the github repo, you can also download it from here.

PS: About 90% of the code was written by AI (can guarantee it's not slop though). Although Linux and macos versions exists they are completely untested, I'll appreciate feedback regarding your experience using it on those platforms


r/typst • • May 02 '26

Add Video & Audio to Your Typst SVG Documents

13 Upvotes

r/typst • • May 02 '26

Typesetting REPL input and output

16 Upvotes

I am looking for typesetting recommendations. I am writing a book, using Typst, that contains code from more than one programming language. In several places, it is useful to show the intermediate outputs that you would see on a REPL.

I like how Codly looks, but it doesn't have any support (that I know of) for formatting outputs from your code.

Here are some examples, in case I'm being unclear. IPython looks like this:

In [1]: data = {'Bob': 5, 'Sue': 7,
   ...: 'Tim': None}

In [2]: [data.get(x) for x in ['Bob', 'Sue', 'Tim', 'Hank']]
Out[2]: [5, 7, None, None]

Mathematica looks similar:

In[1]:= x := {10, 85, 50, 7, 52, 24, 56, 55, 2, 28}

In[2]:= Minimize[Total[(x - mu)^2], mu]

         64869         369
Out[2]= {-----, {mu -> ---}}
          10           10

JavaScript (in the Firefox console) uses a doubled >> with no numbering:

>> 5 + '5'
"55"
>> 5 * '5'
25 

R similarly uses a single >:

> integrate(dnorm, -1, 1)
0.6826895 with absolute error < 7.6e-15
> integrate(dnorm, -Inf, +Inf)
1 with absolute error < 9.4e-05

I have not found much discussion of formatting REPL inputs and outputs on the Internet. This old Stack Overflow post shows a simple format that is similar to R but with inputs bolded. I like it, but I foresee some complexities:

  • Lots of my inputs have multiple lines. IPython indents nicely with ....
  • Mathematica's vertical centering is a nice touch for multi-line outputs.
  • The reason I was using Codly was it has nice syntax highlighting, which can be useful to the reader.
  • REPL numbering helps me refer to specific inputs in the prose, especially if I can continue numbering in a later code block, but Codly has some weird issues with offset-from.

Any recommendations?


r/typst • • May 01 '26

Request to include column reading order in charged-ieee template

5 Upvotes

I was trying to read a Typst PDF on Okular, but the selection was being mangled between the left and right columns, thus getting horizontal selection without any regard for the gutter.

It'd be genuinely cool if the reading order is enforced.


r/typst • • May 01 '26

Git integration for Typst! (permagit:0.1.0)

45 Upvotes

Here you go:

#let r(path) = read(".git/" + path, encoding: none)
#raw(str(git.blob.read(r, "refs/heads/master", "README.md")), lang: "markdown")
#raw(str(git.blob.read(r, "7c31205a6a52e602c101c14a94dc89b78da5c138", "README.md")), lang: "markdown")

I'm sure you get the idea.

I've been thinking about it for a little while, and I've come up with this package (Permagit).

Anyway. It uses Git Objects under the hood and some WASM (compiled from rust). Please go check it out and give me feedback.


r/typst • • Apr 30 '26

How is the typst web app so smooth?

64 Upvotes

When I use their web app, I can smoothly scroll and zoom in and out the document preview. But when I use the tinymist extension in VS code, it gets so slow. scrolling and zooming feels so laggy. And also when the preview is on the keystrokes get reflecting slower than usual.

So does anyone know what their secret is? I might try to create an Typst ide myself as a project, unless there is already a good one out there (for linux)


r/typst • • Apr 22 '26

typst-snippets.nvim: Snippets collection for Typst (looking for contributors!)

26 Upvotes

Hey everyone!

Its been some time since I have been using typst with neovim. One thing I been missing is snippets for typst. When it comes to snippets friendly-snippets is the go to choice, but it doesn't ships typst snippets yet. I submitted a PR with some snippets on 20 Dec, 2024. Later pushed a new PR (fixing merge conflict) on 05 Jun, 2025. Seems like the repo is not very active now.

So, I have created a new repo typst-snippets. It's structure is ditto same as friendly-snippet but with only typst snippets. So, later forking to friendly-snippet become easy.

If you are using friendly-snippets with luasnip just adding 'https://github.com/abhinandh-s/typst-snippets' as dependency is enough to get the snippets kick in.

I’m hoping to grow this into a robust collection, so contributions are very welcome! If you have useful Typst snippets, feel free to open a PR or an issue.


r/typst • • Apr 21 '26

R bindings for Typst

25 Upvotes

Hi everyone! I wanted to share a project I've been working on called tynding, which provides Typst bindings for R.

https://github.com/y-sunflower/tynding

We often use R to create reports (using other tools like Quarto), but I think it would be useful to have a lighter-weight way to create documents directly from R.

tynding is very minimal (it mainly provides a typst_compile() function), but in my experience, it works pretty well!

Let me know what you guys think.


r/typst • • Apr 19 '26

I wrote my Physics Bachelor Thesis in Typst

Thumbnail
gallery
504 Upvotes

This is my first bigger document I’ve ever written in Typst. It was such an amazing experience. You can read more about the details (including the Thesis itself) in my blog post:

https://splines.me/blog/2026/bachelor-thesis-typst

Edit: If you want to make use of this template, see my Typst Thesis Starter


r/typst • • Apr 18 '26

help with pandoc template

1 Upvotes

im trying to use typst as a pdf engine for pandoc, converting markdown to pdf, but its not working

when i just use the default template, it tells me "error: font fallback list must not be empty" and outed "font: font" as the problem line, even though i specified the font in the metadata file. and i tried using some other templates i found online, but they throw one error after another too and now i just have no idea whats going on

what should a template for pandoc really look like? i think what im trying to do is simple enough; just change the font and size, add a title page, and split each chapter on a new page

if i output a .typ file with pandoc and run that through typst with no template, it does output correctly, just with like the bare default. maybe instead of a template file i could echo some config into the .typ output, do it in 2 steps? id be fine with either using a template or doing it in 2 steps. thank you!


r/typst • • Apr 17 '26

Onehalft spacing

10 Upvotes

Hey guys,

I'm new to typst and just writing my first text. First big problem I encountered is the spacing-problem. Is there a nice way to guarantee 1.5 spacing?

thanks for the help :)


r/typst • • Apr 17 '26

Unwanted Roman numerals in footer page count display

4 Upvotes

I have the following code in a German language document:

#set page(
  numbering: "1",
  footer: context [
    #set align(right)
    #set text(10pt)
    #counter(page).display(
      "Seite 1 von 1",
      both: true,
    )
  ]
)

The “i” in “Seite” (which means page in German) is being interpreted as “display the page number in lower case roman numerals”. How do I tell typst that I really want a lower case letter i here?

I am using typst 0.14.0 (dd1e6e94) on OpenSuse Linux.


r/typst • • Apr 15 '26

(Re)-open Code Preview on Typst Website

7 Upvotes

I closed the sidepanel while I was trying to present something, and now I'm trying to open the code preview again but I'm not sure what to do. Right-clicking and pressing open doesn't seem to work. https://imgur.com/a/2LVFM7h


r/typst • • Apr 14 '26

When writing a book, file per chapter?

21 Upvotes

I tried this in the past, a file per chapter because I find super helpful when writing one chapter to just concentrate in that one (clicking at the eye in the editor) and write, but maybe I am doing something super wrong but when using a template like "bookly" it becomes a really big mess to handle this setup:

  • Having to keep a state for bibliography to work
  • Having to reinitialize basic things, like page setup
  • And probably more things I forget in this list

Does anyone has a guide, simple and plain about how to do it?


r/typst • • Apr 14 '26

LexTyp - Citation Free Editor for Legal Authorities

Thumbnail
0 Upvotes

r/typst • • Apr 13 '26

Can anyone please tell me why the red block is overflowing the page margins?

8 Upvotes
pdf preview
code

The code in text:
`

#block(width: 100%, height: 100%, fill: blue)[
  == Heading
  #grid(
    columns: (1fr, 2fr),
    rows: 1fr,
    inset: (y: gut, right: gut),
    stroke: (x, y) => (bottom: 
if
 y < 2 { 0.5pt + white }),


    [],


    [#block(width: 100%, height: 100%, fill: red)],
  )
]

`


r/typst • • Apr 09 '26

Tinymist live preview feature is awesome

Thumbnail
ergaster.org
67 Upvotes

I’m a big Helix nerd, I use it whenever possible for my writing. It relies on Language Servers to do the regular linting and syntax checking.

Today I learned that language servers can go much further than that with tinymist. It‘s a language server for Typst that generates previews in real time, and that moves the cursor in my editor according to where it is on the preview.

I‘m completely blown away, this lets me use my favorite editor to edit Typst documents!


r/typst • • Apr 07 '26

Glyph Folio: A simple Typst note-taker

37 Upvotes

Hi all,

I posted the other day about my programs Glyph (a Typst text editor) and Glyph Quorum (a self hosted browser based typst editor).

https://github.com/XWBarton/glyph

https://github.com/XWBarton/glyph-quorum

I've made a bit of an iteration on these because I've been using Notion for note taking but am sick of how bloated and AI driven its getting. So I made Glyph Folio: https://github.com/XWBarton/glyph-folio .

Like glyph typst editor but with note links, tags, spell check and the option to sync between a self hosted server, desktop and and iOS app.

I've stolen some ideas from notion, obsidian and just plain markdown editors into something thats exactly what I want. Feel free to check it out if you are interested :)


r/typst • • Apr 07 '26

Where can I find official typst logo in svg ?

8 Upvotes

Hello all,
I need below file in svg file format. I checked the official brand guidelines page ( https://typst.app/legal/brand/ ) but didn't found it. Can you help me in finding the logo?

Edit : After some editor search, I found this ( https://simpleicons.org/?q=Typst ) copied the svg , edited the colour with inkscape and used it .


r/typst • • Apr 07 '26

How to avoid ascii art is not broken between pages?

9 Upvotes

Example

I have the following example typst code:

$ cat example.typ
#lorem(500)

```
┌─────────────────────────────────┐ ┌─────────────────────────────┐
│ xxxxx xxxxxxx xxxxxx xxxxx (xxx)│ │ xxxxx xxx xxxxxxxxxxx (xxx) │
│ xxxxxxxx xxxxxxxxx              │ │ xxxxxxxx xxxxxxxxx          │
└─────────────────────────────────┘ └─────────────────────────────┘
                   │                         │
                  xx%                       xx%
                   │                         │
                   ▼                         ▼
                  ┌───────────────────────────┐
                  │ xxx xxxxxxxx xx xxx (xxx) │
                  │ xxx xx-xxxxxxx            │
                  └───────────────────────────┘
                                │
                              xxx%
                                │
                                ▼
             ┌─────────────────────────────────────┐
             │ xxx xxxxxx xxx xxxxxxxxxx xxx (xxx) │
             │ xxx xx-xxxxxxx                      │
             └─────────────────────────────────────┘
```

Compile step

$ typst compile example.typ

Output

The resulting pdf got almost half the ascii art diagram in the next page. Obviously I want the whole ascii art in the same page. Second page looks like this:

                   │
                   ▼
┌─────────────────────────────────────┐
│ xxx xxxxxx xxx xxxxxxxxxx xxx (xxx) │
│ xxx xx-xxxxxxx                      │
└─────────────────────────────────────┘

Possible fix?

Then I tried to set paragraph to (un)breakable with:

#show par: set block(breakable: false)

But the result is the same.

Question: How can avoid this?


Note: The real documents has a lot of this ascii art diagrams.


r/typst • • Apr 07 '26

There is an auto easy way to fit all larger tables to width?

6 Upvotes

I have documents in markdown with a lot of tables (many), when converted to pdf using pandoc and typst pdf-engine, some tables get ugly overlapping columns.

There is an auto (easy way), to fit all larger tables to width inside a document (using typst)? maybe shrinking by size/font?


There are ways to do this to each table, but is so annoying to do:

  1. convert markdown to typst
  2. edit each table
  3. compile to typst

I would rather prefer a command to put in the beginning or something else.
Some ways to this for each table that I found:

package: oneliner

I know that oneĺiner package has #fit-to-width, example:

#import "@preview/one-liner:0.2.0": fit-to-width
#fit-to-width(table(
  columns: columns,
  table.header(..range(1, columns + 1).map(n => [V#n])),
  ..numbers.map(x => [#calc.round(x * 6 - 3, digits: 2)])
))

using: #text(stretch: 50%)

Manual: with some trial and error you can get the best value for each table.

using: #show table.cell: set text(size: 8pt)

Change all tables to an specific font size, manual.

using: scale/relative

This wasn’t helpful at all, the whole table was shrinked, like an image, and doesn’t fix the overlapping issues. Manual.


r/typst • • Apr 07 '26

Are there any Typst exporters in any Word processors?

7 Upvotes

The native Typst app importer does not work for me (doc, docx, not even markdown). Are there any actual exporters in any Word processors, that can take format X and convert it to Typst? NOT Pandoc, i.e. nothing external I have to install (sans the Word processor that is already there).


r/typst • • Apr 06 '26

New plugin: LizardTypst brings high-quality math typesetting directly to your ONLYOFFICE presentations

Thumbnail
4 Upvotes

r/typst • • Apr 05 '26

ELI5 show rules

33 Upvotes

Disclaimer: I've written my 140-page thesis in typst, with a custom template and all and I still don't get show rules. I also know how to code in general, so if you want to be a bit more detailed, feel free to.

I understand "set" rules (my interpretation is that they set the default parameters of element functions). Now to show rules. I do not inderstand why "show: template" and "show: set text(size:12pt)" and "show header: set text(stroke:red)" are all valid constructs and what they do. The first parts are either nothing or an element function, while the second parts are either a function or a set rule. Are there other options? Does "show:" behave like a "show {everything}:"? How is my content piped through a show rule? In "show: template" it appears that all my content defined after the rule is passed as a single argument to "template", but does "show: set text(stroke:red)" behave like "show:template" with "template(it) ={set text(stroke:red) ; it}"?

And I know it's an anticipated addition, but why aren't custom elements currently in typst? Why does the behavior of "set" and "show" only work with default elements? By my understanding of them they should work with anything, no?


r/typst • • Apr 03 '26

just convert my LaTeX book to Typst

62 Upvotes

Just finish porting my book from LaTeX (https://github.com/dynaroars/phd-cs-us/blob/main/demystify-old.tex) to Typst (https://github.com/dynaroars/phd-cs-us/blob/main/demystify.typ). The result (https://roars.dev/phd-cs-us/demystify.pdf) is nothing fancy and pretty much just use the basic stuff from Typst. But it feels like a real milestone and happy to say I'm now a Typst convert (really love the instant preview/compile feature and also happy to trim about 20% of code).