I’m new to typst and seriously envisaging my LaTeX workflow with this very nice alternative (kudos to hte author!). For this I’m wondering if the typst command can generate synctex files (or equivalent ?) so editors can correlate the source doc with the generated pdf ?
I may have missed it but I didn’t see the option in the CLI help…
Those previewers are not PDF based at all, because PDF is significantly slower.
As the name implies, synctex is fairly tied to TeX, which typst is not. It’s probably possible to jury-rig something together, but that sounds like a lot of effort for a standard that’s only supported in a handful of PDF readers. Especially because the best way to preview typst isn’t though PDF anyway.
All,
Thanks the answers, I’ve indeed found a solution based on tinymist (which I’ve managed to have working with emacs ;)).
But as noted above far the preview is only through a web browser, not in a pdf viewer.
Regarding synctex, I understood the synctex files have a generic format linking position in a text file (the source) to a position in a PDF file, so the source is necessarily a TeX/LaTeX file ? It’s very possible I’m missing some points…
Those previewers are not PDF based at all, because PDF is significantly slower.
I use sioyek, and it’s not “significantly slower” I tried and it has almost instant reload while I type.
To have inverse/forward search work we just need two functions in the lsp to tell it where we are in the pdf or have it tell the pdf preview where to jump.
Does somebody know if this is already doable using tinymist?
The live preview provided by tinymist is not a pdf file but, I think, an svg file. It looks exactly like the pdf, but isn’t.
In VS Code/tinymist you select “preview”, which pops up in an integrated tab. It looks so much like a built-in latex pdf viewer that it’s easy to get confused.
Then you get instant live preview and two-way syncing.