On Sun, 26 Jun 2016 23:15:00 -0400 Scott Kostyshak <skost...@lyx.org> wrote:
> Why not use use the following? > > lyx --export pdf4 $mainname.lyx > > It creates a PDF directly so you don't have to manually run xelatex. Why not, indeed! Here's another one. This script is meant to recompile and tell the user when the compile is finished. It's intended to replace LyX's Ctrl+Alt+R, which on my heavily modified book document class gives wrong results (it doesn't display the varying width lines on section, subsection and subsubsection). So, within LyX, instead of pressing Ctrl+Alt+r, I press Ctrl+Shift+g, which is a window manager hotkey to run the following script: ======================================================= #!/bin/sh mainname=ch20 cd /d/at/books/manager_utp inform_begin () { msg="I_hear_you:_$1" cmd="zenity --info --timeout=2 --text=$msg" ### Run I hear you message in bg so process runs immediately $cmd & } inform_success () { msg="PDF_file_$1_has_been_rebuilt" cmd="zenity --info --timeout=5 --text=$msg" $cmd } inform_failure () { msg="FAILURE_FAILURE_FAILURE!!!_Rebuild_of_PDF_file_$1_failed" cmd="zenity --warning --timeout=60 --text=$msg" $cmd } inform_begin $mainname.pdf rm $mainname.tex rm $mainname.aux rm $mainname.pdf rm $mainname.log rm $mainname.dvi lyx --export pdf4 $mainname.lyx #lyx --export pdf5 $mainname.lyx if [ -f $mainname.pdf ]; then inform_success $mainname.pdf else inform_failure $mainname.pdf fi ======================================================= You'll note the export to PDF4, which, you're right, is MUCH faster than the alternatives, but still gives a correctly formatted PDF. SteveT Steve Litt June 2016 featured book: Troubleshooting: Why Bother? http://www.troubleshooters.com/twb