On 05/15/2011 08:48 PM, Venable wrote:
Hi all,
I have written a couple of cygwin scripts to automate some
time-consuming repetitive tasks and would like to be able to run these
from within LyX, for example via a keyboard shortcut or a customized
button on a toolbar. Is this sort of thing possible? If so, does
anyone have advice on how to set it up?
As an example, I like to use the pdfpages package to include external
pdfs. However, I often use relative paths (e.g. when collaborating
with co-authors on Dropbox and the like), and as we know LyX cannot
handle this because of all the copying to temporary directories and so
on that LyX prefers. So, I've written a very simple script to export
the lyx file to tex and then compile using miktex. It would be great
if I didn't have to fire up CygWin and type in the command and
filename - rather, I'd prefer to designate a keyboard shortcut or menu
option within LyX that would tell cygwin to run the script and pass it
the current filename.
The only real way to do this, so far as I know, is to define a converter
that will call your script. This converter might, for example, replace
pdflatex as a LaTeX-->PDF converter. There are a number of ways to do
this, so the best way will depend on the details.
rh