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.

HTH,
Jürgen

Reply via email to