What commands should I run manually to repeat all the steps LyX makes to generate a final output (like pdflatex PDF) for a specific document? I need it for using in a report generator written in another language.
I've looked into "LaTeX Log", but is seems like having outputs of commands, not commands itself.
lyx -e pdf2 yourfile.lyx
will produce a PDF file with LyX. You can often run external commands from languages with asystem
command.lyx
, but can I run this:lyx -e pdf2 yourfile.tex
?lyx -e pdf2 yourfile.tex
will not work. You could input external material by using Insert > File > Child Document. Or if you want something more customizable Insert > File > External Material (see Help > Customization for more information on this). Or you could use Python to do substitutions: wiki.lyx.org/Examples/PLyXSystem or you could do the substitutions directly in the .lyx file (it has its own format but it's just text) and then uselyx -e pdf2 yourfile.lyx
.readLines
andgsub
?