Trying to get texliveonfly.py working with LyX

Richard Kimberly Heck rikiheck at lyx.org
Sun May 3 17:10:37 UTC 2020


On 5/3/20 7:17 AM, Kornel Benko wrote:
> Am Sun, 3 May 2020 11:09:17 +0200
> schrieb Yu Jin <technikmagma at gmail.com>:
>
>> texliveonfly is a python script, it can install missing packages
>> automatically while compiling.
>> I had to change the script a little bit for it to work from cmd.exe, I
>> attached it. So if I type the command (
>> "C:/texlive/2019/texmf-dist/scripts/texliveonfly/texliveonfly.py" file.tex
>> ) in cmd running in the folder where file.tex is located, and the file uses
>> not installed packages, the script installs those and then compiles latex
>> file.
>> I am currently trying to get this script working with LyX, I set it up in
>> converters latex(pdflatex) -> PDF (pdflatex), i typed it
>> ""C:/texlive/2019/texmf-dist/scripts/texliveonfly/texliveonfly.py" $$i"
>> without any additional flags.
>> This unfortunately does not work, i get error
>> "support\Systemcall.cpp (291): Systemcall:
>> '"C:/texlive/2019/texmf-dist/scripts/texliveonfly/texliveonfly.py"
>> "tlof.tex"' finished with exit code 1"
>> and a message box that an error occurred while executing the converter
>> command.
>> Strange thing is, that if the lyx file does not use any not installed
>> packages, it works, I mean the file compiles.
>> I have tried to debug it, found the line
>> "process_->start(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_);"
>> (Systemcall.cpp, line 390)
>> and the QString passed to start() there looks alright. I have also copied
>> it to another c++ project, just an epty "Hello World" like console project,
>> where I execute the same string with QProcess and it works there.
>> Any Idea why this isn't working with lyx?
>>
>> Eugene
>
> Maybe a permission problem? Do you start lyx as another user?

If you can get terminal output, then it will be clear what's wrong, I
think. This has been an issue on Windows, but I think that if you try
using -DLYX_CONSOLE=FORCE, that will help.

Riki




More information about the lyx-devel mailing list