Good morning,

I recently have become enamored of Typst for document creation. It’s fast, it’s approachable, it’s cross platform, and it’s extremely capable even in preview beta. I never really got the swing of LaTeX with all the backslash/curlybrace mayhem.

In any event, I find myself actually working on a long technical document in Typst in Emacs. There does exist typst-ts-mode so thanks tree-sitter and all those people who manage the grammar libraries for it. However I’m finding myself in need of a better way of navigating the huge document to get to sections I want to do.

I looked into the baked-in bookmarks and I could probably use that capability, though I was hoping for more of an customizeable outline mode. Manually setting the bookmarks for an entire document seems tedious. I mainly just want to navigate by headings and that would be sufficient.

What do people use for this sort of thing (possibly in the LaTeX world?) Just bookmarks with some sort of automated way of populating the bookmarks? I did check the typst-ts-mode and while there are some functions there for compiling, there don’t seem to be any functions for navigating by semantic structures. Perhaps that’s baked into tree-sitter itself?

Anyhow, any help greatly appreciated here.

  • remillardOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I tried turning outline mode on, however it turned off typst-ts-mode, so I may have to just work with imenu and see about tweaking it as /u/mickeyp suggests above.