Is it possible to activate a LyX branch from the command line while
exporting to a PDF file?
The documentation [1] says that the following command should work, but
it does not in my tests.
lyx -x "command-sequence branch-activate b1" -E pdf2 outfile.pdf
infile.lyx
A PDF is exported but the branch "b1" is not activated.
I asked in this TeX.StackExchange question [2, minimal LyX file
attached] if there are other ways to export a specific branch and the
only answer I got works only partially.
The user scottkosty suggested
lyx -x "command-sequence branch-activate b1; buffer-export pdf2
outfile.pdf; undo; lyx-quit" infile.lyx
This solution kind of works, but the `lyx-quit` command at the end
reports an error because it is executed before the export has finished.
My questions to you:
* How come the command in the documentation does not work?
* Is it possible to tell the `lyx-quit` command to wait until the file
has been exported? Or is there a `sleep` command in LyX?
* Is there a better way to export a particular branch to a PDF file from
the command line with no human interaction?
Regards,
[1] https://wiki.lyx.org/FAQ/ImportExport#cl
[1]
https://tex.stackexchange.com/questions/444482/exporting-one-branch-from-command-line/444506#444506
--
Gioele Barabucci <gio...@svario.it>