rschroll / litex

A LaTeX plugin for Light Table
GNU General Public License v3.0
28 stars 1 forks source link

External commands for file eval #24

Open viveknallur opened 7 years ago

viveknallur commented 7 years ago

Hi, First off, thanks for a fabulous plugin. I seem to be unable to pass "pdflatex" as an external command to the file eval trigger. Context: I use the Linux subsystem on windows (so far I've got the best of both worlds in userspace), and while LightTable is running as a Windows binary, my Latex installation is inside WLS. On a typical windows command line, I can run call pdflatex like so:

prompt>bash -c "pdflatex file.tex"

and this works fine. However, with a litexrc like so:

{ "file": { "commands": ["external-command bash -c pdflatex -interaction=nonstopmode %f"] },
  "project": { "filename": "%p",
               "commands": ["external-command bash -c pdflatex -interaction=nonstopmode --synctex=1 %f",
                            "external-command bash -c bibtex %b",
                            "external-command bash -c pdflatex -interaction=nonstopmode --synctex=1 %f"]}}

Pressing ctrl+enter does nothing. Nothing shows up on the console, the status pane says "Connected to PDF Viewer" and in the PDF Viewer pane is a message saying "The system cannot find the path specified"

Perhaps I'm doing something horribly wrong [and I do recognize that running lighttable from within WLS, while compiling a file within WLS would be the sensible thing to do. But I just can't seem to get lighttable working within WLS].

viveknallur commented 7 years ago

Just as context for running linux binaries from windows commandshell, here's the way it's documented to work: https://msdn.microsoft.com/en-us/commandline/wsl/interop