Comments (5)
Describe the solution you'd like We can use the new synctex feature (explained in user202729/luatex@0831bb6#commitcomment-139418652 ) (if the feature is available with the installed synctex version that is)
To be honest, I don't quite understand how to use the new synctex feature based on that comment (and the linked threads).
Also, it looks like this stuff is brand new and not really available in any releases yet? That is, the PR jlaurens/synctex#75 is not even merged yet. But perhaps I'm misunderstanding this?
The main question is: How should I update VimTeX to take use this new feature?
Another option is to use the C interface
libsynctex
, but I think this would complicate the distribution process (require the user to compile C and/or distribute platform-dependent executables)
Yes, this seems too complicated.
from vimtex.
Basically the feature works like this:
Currently, in vimtex you have a command <Plug>(vimtex-view)
that invokes synctex view ...
.
The problem with this approach is that each time you invoke the executable, it has to parse the synctex file (which let's say takes 1-2 second), then the executable exits immediately, so the parsing result is lost and next time it needs to be parsed again.
With the new change, you invoke the synctex executable with --interactive
, then the executable will remain there in the background, the next time you want to invoke synctex view …
, you just pass it to the standard input of the executable.
Indeed, it's not available in any release yet. This is just a proposal to see if you're interested in implementing it (or at least have it implemented, I can try to pull request in the latter case).
On the vimtex side, I think an implementation would need to:
- keep track of the running synctex job as well as the latexmk job
- change the logic as needed to use the synctex job instead of spawning a new process
- other bookkeeping stuff (e.g. on
\lx
plugin reload, terminate the synctex job as well, and on\ll
... should the synctex job be kept running?)
from vimtex.
Currently, in vimtex you have a command
<Plug>(vimtex-view)
that invokessynctex view ...
.
Well, that's not quite right. VimTeX never really uses synctex
explicitly, except in a single specific sub case: It is used for the MuPDF viewer, because MuPDF does not have built-in support for synctex.
Instead, the viewers use synctex behind the scenes.
So, IMHO, it would make much more sense to delegate this responsibility to the viewers. Then it would also benefit users who don't use VimTeX.
With the new change, you invoke the synctex executable with
--interactive
, then the executable will remain there in the background, the next time you want to invokesynctex view …
, you just pass it to the standard input of the executable.
I'm curious: Does synctex --interactive
work be creating a daemon process such that subsequent standard synctex ...
calls will reuse the daemon process?
That is, would it sort of suffice for VimTeX to start this daemon process when someone invokes the viewer, and then just ensure to kill it when the specific LaTeX project is closed?
from vimtex.
That's interesting, I made a wrong assumption. Looks like it's zathura's fault then.
I'm curious: Does synctex --interactive work be creating a daemon process such that subsequent standard synctex ... calls will reuse the daemon process?
Unfortunately, no. But that sounds like a nice idea.
from vimtex.
That's interesting, I made a wrong assumption. Looks like it's zathura's fault then.
No problem!
from vimtex.
Related Issues (20)
- VimTex not working when configured to load on "event = "BufEnter *.tex"" in Lazy.nvim HOT 1
- What is warnings.pm? HOT 2
- Toggle to revert changes made in issue 2401 HOT 2
- Mainfile detection fails when \input is in enumerate environment HOT 4
- l:file not defined in function vimtex#compiler#compile_selected(type) HOT 4
- Setup text argument in user-defined command HOT 3
- Wrong TeXMathZone result from `vimtex#syntax#stack()` HOT 5
- Compilation failed when using xelatex HOT 2
- Compilation fail with option "-c" HOT 10
- Can't open .tex files... sort of? HOT 3
- Zathura issues with finding Window ID HOT 2
- Disabling "latexmk is not executable" message on startup HOT 3
- Cannot create directory: file already exists error when compiling HOT 7
- Continuous mode for OpenBSD fails due to option HOT 8
- citekey: link to BibDesk HOT 49
- Concealing subscript letters stopped working HOT 4
- [help] Is there possible way for another plugin to get mainfile path that vimtex finds? HOT 1
- Viewer (evince) opening on top of neovim instance instead of new window HOT 1
- Support for nofile buffers (e.g. AirLatex) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.