Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on references/links? #35

Open
gasche opened this issue Mar 24, 2024 · 2 comments
Open

Clicking on references/links? #35

gasche opened this issue Mar 24, 2024 · 2 comments

Comments

@gasche
Copy link
Contributor

gasche commented Mar 24, 2024

Does the TeXpresso viewer support jumping to the destination of a reference?

(When working on scientific LaTeX documents it is very useful to be able to follow references, and also to have a shortcut to go back to where we where before following it.)

@let-def
Copy link
Owner

let-def commented Mar 24, 2024

No it doesn't, but it is possible in principle. It is a bit involved so I won't do that anytime soon, but the plan is roughly:

  1. Parse PDF annotations. References are communicated as side data using the WTF XML protocol of PDF annotations. These are made available in the DVI file via specials that are ignored at the moment. Interpreting these specials is necessary to render and to find the zones sensitive to clicks.

  2. Resolve local references. I am not 100% clear how this will work, but I think it should be modeled roughly on the design of SyncTeX support.
    Backward references can be handled by scanning the existing part of the document. If the reference is not resolved this way, it is likely a forward reference: keep rendering until resolving the reference or ending the document.

What might complicate this plan is dealing multiple passes, but I think auxiliary files are not needed for hyperref to work (unlike document outlines and page number references, "tying the knot" is mostly done by the document reader not by the TeX engine).

@leanhdung1994
Copy link

My favorite packages cleveref and autonum produce auxiliary files and require multiple passes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants