sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.66k stars 98 forks source link

SyncTeX-like support #1502

Open matteodelabre opened 2 years ago

matteodelabre commented 2 years ago

SyncTeX allows forward and backward source→output mapping for TeX documents. Common use cases include keeping the editor and PDF viewer in sync while editing a source file and finding the corresponding source line by clicking on a PDF location. These use cases are supported for example by vimtex and Okular, and also by some other editor/viewer combinations.

It is implemented by attaching source location information to each individual box, and outputting this information to a separate .synctex(.gz) file (more details on the TeX implementation and limitations). The file format is described in synctex(5).

It would be interesting to implement a similar feature in SILE.

alerque commented 2 years ago

Shouldn't be too hard to pull off. Most of the needed info is available already, it's just a matter of formatting and outputting it.