tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

VimTex Concerns with Integration

Open hughesjs opened this issue 2 years ago • 3 comments
trafficstars

With reference to #849 and 2280 over on VimTex, I was wondering if the concerns of the VimTex maintainer could be addressed?

Whilst it is fairly straightforward to launch the tectonic watch mode, I'd really like to have good VimTex integration.

Is this doable?

hughesjs avatar Mar 11 '23 03:03 hughesjs

We've been discussing it over https://github.com/tectonic-typesetting/tectonic/issues/986 🚀

Neved4 avatar Mar 12 '23 12:03 Neved4

Nice one, do you want me to close this as a dupe or do you think it's related but not a dupe?

hughesjs avatar Mar 13 '23 04:03 hughesjs

While this issue is not exact dupe of what we are discussing on #986, the root cause has some similarity.

I'm working on negahban to address this problem, by using hooks, instead of creating command buffers, because its superset of what watchexec main crate can does (solution implemented rn), and watchexec lib crate is an absolute mess to work with.

Things I wish to achieve with this new approach is:

  • Returning callback code, in rust, not by "adding echo" hack
  • Doing separate things if failed or not, so that it waits if there is an error, and --open flag is specified and no build is available
  • Better cross-platform support (or rather, delegating the concern to rust)

because a closure can do all watchexec does, but the command runner structure of watchexec cannot do anything a closure does, and lets not talk about its under-documented lib. also while watchexec is a mature project, unlike mine which is barely alpha, is very clumsy in structure and examples. while it was possible to handle it by making a dummy binary to collect watchexec calls, or internal flags, that would have degraded user interface of program, so I thought best I can do is to make my crate, and implement it into tectonic.

Also, I never worked with VimTex, but if it can benefit extra control on each files change, I guess there is a good chance, good things will happen about that.

p.s.: I'm not a seasoned rust programmer, so any help there, specially on doc, test, and edge-cases would be appreciated, right now the code is a clone and unwrap soup which needs some work on to become better, but MWP is already out, and I found its developer experience pretty nice. I'll look forward to your contributions!

aarmn avatar Mar 13 '23 19:03 aarmn