On Mon, Nov 1, 2010 at 3:05 PM, Richard Heck <[email protected]> wrote: > On 11/01/2010 12:53 PM, Jürgen Spitzmüller wrote: >> >> Tim Wescott wrote: >> >>> >>> I want to be able to write Lyx documents, then convert them to pdf >>> format from the command line -- this is for a moderately complex >>> website, which I would like to generate using a makefile. >>> >>> Is there a way to do this from the command line? I assume I have to do >>> this: >>> >>> lyx<insert magic here> myfile.lyx >>> >> >> juer...@linux-r4p5:~> lyx -help >> Usage: lyx [ command line switches ] [ name.lyx ... ] >> Command line switches (case sensitive): >> [...] >> -e [--export] fmt >> where fmt is the export format of choice. >> Look on Tools->Preferences->File formats->Format >> to get an idea which parameters should be passed. >> -i [--import] fmt file.xxx >> where fmt is the import format of choice >> and file.xxx is the file to be imported. >> -f [--force-overwrite] what >> where what is either `all', `main' or `none', >> specifying whether all files, main file only, or no >> files, >> respectively, are to be overwritten during a batch >> export. >> Anything else is equivalent to `all', but is not >> consumed. >> -version summarize version and build info >> Check the LyX man page for more details. >> >> So, >> >> lyx -e pdf2 myfile.lyx >> >> exports to PDF via pdflatex. >> >> > > And if you're wondering where "pdf2" comes from, the answer is that this is > the identifier LyX uses for that format. Look under Tools>Preferences>File > Formats and ...>Converters for the various options. > > rh > >
I would very much like to learn more about running lyx from the command line. Do these comments apply to Windows? Are there any help documents with simple examples? I did not see anything in the User Guide or Extended. Many thanks in advance.
