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

Auto reload not working when using latexmk -pvc #106

Open
Vozf opened this issue Jun 2, 2024 · 11 comments
Open

Auto reload not working when using latexmk -pvc #106

Vozf opened this issue Jun 2, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@Vozf
Copy link

Vozf commented Jun 2, 2024

I have the pdf compiled with latexmk and the extension doesn't reflect the changes instantly, I need to alt tab to see the changes while the default ubuntu viewer works perfectly

@Vozf
Copy link
Author

Vozf commented Jun 2, 2024

Screencast from 02-06-24 20:51:32.webm
Here's the video. The change of focus to ubuntu pdf reader is exactly alt tab. Until I alt tab no changes will be displayed in intelij

@PHPirates
Copy link
Collaborator

Thanks for the video. It looks like you are compiling from the terminal tool window. Why are you not using run configurations?

I tested by opening a log file, and after compiling from the terminal the editor only shows the updated file after changing focus, so this is intellij behavior and has nothing to do with the pdf viewer.

@Vozf
Copy link
Author

Vozf commented Jun 4, 2024

I'm compiling from terminal because latexmk with files watch recompiles the pdf way faster than compiling from scratch every time like texify does. If that's not fixable by you I guess you may close the issue.
Thanks for the investigation

@PHPirates
Copy link
Collaborator

That makes sense, I just tested and also when I provide the -pvc flags in the run configuration the pdf does not refresh. Thanks for pointing that out, I will have a look to see if it is possible to work around this behaviour on TeXiFy's side.

@PHPirates PHPirates added enhancement New feature or request and removed support labels Jun 5, 2024
@PHPirates PHPirates changed the title Auto reload not working Auto reload not working when using latexmk -pvc Jun 5, 2024
@andrew-selvia
Copy link

I also face this limitation, though my context is slightly different. I leverage my build tool's ability to automatically watch files for changes in order to recompile my document. The PDF does not automatically update when this occurs, unfortunately.

Workarounds include:

  • Manually clicking the refresh button each time
  • Switching to another window, then returning

Out of curiosity, is there any command I could run to force the PDF viewer to refresh? If so, I could simply add it as a step in my build. 🤔

@PHPirates
Copy link
Collaborator

Depends, what build tool are you using?

@andrew-selvia
Copy link

sbt

@PHPirates
Copy link
Collaborator

Hm, that is more difficult indeed as I don't know of any way we could provide an api to force a refresh. Maybe we can implement a file watch in this plugin so that it works regardless of using TeXiFy or not.

@andrew-selvia
Copy link

Making the PDF reload automatically on changes regardless of origin (i.e., TeXiFy, build tool, etc.) would certainly be best. Thank you for considering! 😅

@breandan
Copy link

breandan commented Dec 5, 2024

For what it's worth, I use the TeXShop PDF viewer on MacOS (bundled with MacTeX) with the "Automatic Preview Update" option enabled, as described here. This is the only reliable method I've found to refresh the PDF and maintain the scroll position after recompilation. Ideally, it would be nice if this feature were supported within the IDE plugin, but having an external viewer is the next best solution.

@andrew-selvia
Copy link

@breandan Thank you for sharing! I can confirm that TeXShop exhibits the desired behavior. Would be great to see it come to the PDF viewer in IntelliJ eventually.

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

No branches or pull requests

4 participants