1

Now I am genreate the latex synctex file main.synctex.gz, is it possible to parse the file by myself? I want to pass the file path\line number\column number, to get the element in which page of pdf, and exactly position of element in pdf. I am using the rust language, and I did not found any package of any languge to parse the main.synctex.gz file. I also did not found the standard of main.synctex.gz.

why I want to parse the main.synctex.gz? because I am working a latex online editor, now everytime compile the latex project, the pdf will locate to the 1st page automatically.

  1. I want to remember the page number and the precisely (x,y) of pdf
  2. I want to navigate the pdf location from the source editor
  3. I still want to locate the source location from pdf viewer

I have searched from internet and found using synctex could do this job: https://www.overleaf.com/learn/how-to/How_to_jump_to_the_source_code_from_the_typeset_PDF_(SyncTeX)

that's why I want to do this job, my backend api was written by rust.

Dolphin
  • 843
  • 1
    I don't know how to parse a synctex file, but there are many other ways to exactly position an element in the pdf. Could you explain a bit more what you're trying to do? – Teepeemm Sep 29 '23 at 13:19
  • 2
    if you unzip it you'll see it's a simple format with a source file identifier and coordinates in the pdf on each line, see https://tex.stackexchange.com/a/604561/1090 – David Carlisle Sep 29 '23 at 13:23
  • I have added more background detail info of parse the synctex.gz file. – Dolphin Sep 29 '23 at 13:46
  • the answer expained some key imformation and I am trying to get some clue from there. @AlanMunn – Dolphin Sep 29 '23 at 13:48

0 Answers0