Native macOS / iOS Typst Text Editor

I absolutely love Typst.

Especially as someone who’d been experimenting with new formats for a very long time. I’ve known about Typst for a long time but i only just now got into using it.

(I only wish Typst used LaTeX’s \ for code. It’s so easy to type from the keyword and it’s visually minimal. Whereas # is just more work to type. The PureScript language redid a whole multitude of infix functions precisely for keyboard writing efficiency and for something that’s invoked so frequently it should have been something that’s easy to type… But I digress.)

I would love to bring this to a broader audience. But the ecosystem support is limited. Right now I’m working on a proposal for a particular online university, I would love to mention Typst but there has to be broader ecosystem support outside the walled garden of a single platform.

Web based editors aren’t ideal for a multitude of reasons. My dev text editor isn’t comfortable when it comes to writing long form essays, papers and other such content.

Web based editors are especially problematic as someone who prefers the native ‘feel’ as do many apple users.

Text selection and overall text functionality is terrible on the web compared to what’s possible with native text rendering frameworks.

Here’s an example of an old project I hacked out using TextKit2 for rendering markdown:

github.com/SuperSwiftMarkup/SuperSwiftMarkdownPrototype

Notice how I was able to support full and uniform text selection across all richly formatted markdown block types including tables and moreover including multiline cursors.

TextKit2 is like a low level browser rendering engine with a lazy line by line rendering pipeline. It’s a very incredibly difficult framework to work with but the results are unparalleled.

This is very tentative, but I’d be curious if it’d be possible to support some level of richly formatted Typst documents within a native text editor. So you’d get the best of both worlds. This would probably involve a specially written compiler frontend that can emit a partially evaluated AST for formatting (as my markdown example uses internally, its also why it doesn’t yet support editing, too much work for a proof of concept since I’d have to move to a lossless AST.)

Any interest among the Typst community for collaboration / brainstorming or just spitballing such an idea?

I (long retired ex Linguistics/Translation academic) have been experimenting with Typst and also love it. I have no experience of coding before starting to get to grips with Typst. I am a Mac-user.

What I am working on at the moment is integrating Typst into Scrivener without needing MarkDown/Pandoc/Quarto. Basically, with Typst installed on the Mac, calling packages from Typst Universe and setting up template details as front matter in Scrivener, and setting up compile to plain text with the paths set in the processing pane is pretty straightforward… I still need to sort out bibliography access, though.

Scrivener is very flexible, so its binder hierarchy and style system can be used to inject code, reducing the need to type it in everywhere. The other great benefits of Scrivener are the ability to move chunks of text around easily, and the integration of research documents into a project, making them easier to access than having them spread through multiple open windows. It has a companion iOS/iPadOS app, which can sync through Dropbox, though it is less powerful, being designed for working on the go, rather than as a fully-fledged alternative platform.

Let’s be clear, I have been using Scrivener for coming up to 20 years, so what is straightforward to me can seem opaque to those who come new to it.

That said, there may be other possibilities. A forum member recently posted a showcase for Inkhaven, which seems to me to be a Typst-oriented alternative to Scrivener. I believe it might be programmed in Rust, and presumably would work on Mac, though I don’t know about iOS.

:slight_smile:
Mark

1 Like

Further to the above, there is also a native iOS/iPadOS Typst editor called Inkpond, which is available from the App Store. It was showcased on Discord, but I can’t find it here.

I have only tried it briefly on my iPad Pro. It seemed to work well, but I did find one irritation, though I haven’t yet tried to find a way round it.

I was trialling setting up a table, but the Return key is bound to autocomplete parameters, so even though I only wanted to set columns and stroke, every time I tapped Return to create a new line for me to enter data, it entered a new table parameter for setting even though I wanted the default. That became so irritating, I gave up for the moment. I’m planning to send feedback on that.

:slight_smile:
Mark

I’m genuinely curious to learn what you and other see as the specific limitations here. On MacOS, I’m quite happy using VS Code, plus a plugin that allows me write natively in typst code and immediately preview or generate a pdf. I’ve found it quite flexible and powerful, and it doens’t require me to learn a new app or change my workflow.

Obviously, that does not solve the problem on iOS. But my own experience has been that with the command line and VS Code, I’m not really missing anything. I use typst all the time on my Mac, and never go to the web app.

1 Like