On Fri, 11 Aug 2006 10:51:38 +0200
Georg Baum <[EMAIL PROTECTED]> wrote:

> Russell Davie wrote:
> 
> > Hi,
> > 
> > How is it possible to have a automatic update of pdf file so the pdf can
> > viewed as the lyx file is been created?
> > 
> > Are there command line options that can be set that would enable this?
> > 
> > My plan is, if possible, to have a cron job calling a script to generate
> > pdf from lyx which is then displayed on a viewer: kpdf which can watch for
> > changes in pdf.
> 
> lyx -e pdf2 xxx.lyx
> 
> See also `lyx --help' and `man lyx'. This does also work with all other
> exportable formats. pdf2 is the name of the "PDF (pdflatex)" format. See
> the preferences for the names of other formats.
> 
> 
> Georg
> 

I tried that and it complained about jpeg images that were in the lyx file.  

terminal output:
LyX: LaTeX Error: Unknown graphics
extension: .jpeg.: ...aching_graphics_pulse-radial-artery.jpeg}

The would not happen if turning into a pdf using lyx manually (with mouse 
clicks) with all the different ways of making a pdf
dvipdf, pdflatex, ps2pdf

What did work was to turn it into a ps, then use ps2pdf to make a pdf

lyx -e ps XXX.lyx ; ps2pdf XXX.ps

While this worked on the command line,  it didn't work as a cron job.  The cron 
command would only do the first section and would not do ps2pdf (?).  ps2pdf 
would not work as a cron job even as a separate cron command!

cron entry:
0-59 * *  *  *  /usr/local/bin/lyx1.4.2 -e ps /tmp/xxx.lyx  ; /usr/bin/ps2pdf 
/tmp/xxx.ps

This soon fills up the inbox with messages and to stop it add ">>/dev/null  
2>&1" after /tmp/xxx.lyx and before ";".

I searched the wiki for documentation on the command line use of Lyx and coln't 
find much. 
Where else could this be found?  

TIA

Russell 

Reply via email to