Hi,

 I'm trying to automate the generation of Postscript from my LyX documents
(using LyX 1.0.2). I actually got it working using the target

.lyx.dvi:
        lyx $< &
        while test ! -p lyxpipe.in ; do sleep 2 ; done
        echo "LYXCMD:oops:buffer-export:dvi" > lyxpipe.in
        echo "LYXCMD:oops:lyx-quit" > lyxpipe.in
        while test -p lyxpipe.in ; do sleep 2 ; done

in my Makefiles. I really do want to use Makefiles, because the creation
of a Postscript file involves more steps than just invoking LyX -- for
example, xfig graphics have to be transfig'd to eps.

 The above target has a number of disadvantages:

  - It requires the entry `\serverpipe "./lyxpipe"' in my lyxrc file.
  - I don't really need a LyX Server when working interactively.
  - I need a working $DISPLAY.
  - I can't directly export to Postscript; "buffer-export:postscript"
    pops open a menu.
  - Having to synchronize with LyX is a pain.
  - No error checking is done. What if document processing fails? The
    dvi might be incomplete, but I don't notice.
  - Someone else (including myself) might run lyx from the same
    directory already, so the Makefile would talk to the existing
    lyx.

 Well, I'm actually surprised that the above does work ;) but it would
certainly be easier to have some support on the command line, for example

  lyx -o file.dvi file.lyx

 If turning X off is not possible, I'd at least love to have a command-
line option to pass lyxrc options, like `\serverpipe'.

        Frank


-- 
 + Frank Pilhofer                        [EMAIL PROTECTED]  +
 |                                      http://www.uni-frankfurt.de/~fp/ |
 +---- Life would be a very great deal less weird without you.  - DA ----+

Reply via email to