Re: running cygwin or unix script from within lyx

2011-05-16 Thread Venable
On Sun, May 15, 2011 at 9:06 PM, Richard Heck rgh...@comcast.net wrote:

 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


Dear Richard,

Thanks a lot for this comment. What are some of the alternative ways to
define a converter, and what are the sort of details that would be useful to
know in deciding?

This particular task is incredibly simple (export to tex, compile), and I'm
not necessarily wedded to using CygWin, that's just what I happen to be most
comfortable with.


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard




Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard





However, the converter is executed in a temporary folder, which is 
precisely what the user wanted to avoid (and the reason to write the 
script in the first place). I miss how you can get around this.


--
Julien



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 05:45 PM, Julien Rioux wrote:
 On 16/05/2011 5:39 PM, Richard Heck wrote:
 On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

 Converters are defined under ToolsPreferencesFile HandingConverters.
 See section 3.3 of the Customization manual for the details of the
 syntax. Basically, any stupid script can act as a converter. It just
 needs to take certain arguments, and you need to tell LyX what they are.
 Lots of converters are already defined there, so you can also mimic
 them.


 However, the converter is executed in a temporary folder, which is
 precisely what the user wanted to avoid (and the reason to write the
 script in the first place). I miss how you can get around this.

Sorry, I must have missed that part.

Richard



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 6:11 PM, Richard Heck wrote:

On 05/16/2011 05:45 PM, Julien Rioux wrote:

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic
them.



However, the converter is executed in a temporary folder, which is
precisely what the user wanted to avoid (and the reason to write the
script in the first place). I miss how you can get around this.


Sorry, I must have missed that part.

Richard



I believe copiers could help here, but I do not understand them/never 
used them.


Cheers,
Julien


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 06:12 PM, Julien Rioux wrote:
 On 16/05/2011 6:11 PM, Richard Heck wrote:
 On 05/16/2011 05:45 PM, Julien Rioux wrote:
 On 16/05/2011 5:39 PM, Richard Heck wrote:
 On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

 Converters are defined under ToolsPreferencesFile
 HandingConverters.
 See section 3.3 of the Customization manual for the details of the
 syntax. Basically, any stupid script can act as a converter. It just
 needs to take certain arguments, and you need to tell LyX what they
 are.
 Lots of converters are already defined there, so you can also mimic
 them.


 However, the converter is executed in a temporary folder, which is
 precisely what the user wanted to avoid (and the reason to write the
 script in the first place). I miss how you can get around this.

 Sorry, I must have missed that part.


 I believe copiers could help here, but I do not understand them/never
 used them.

Well, I guess we'll see, but on reading this again it looks as if the
problem was supposed to be that certain of his scripts fail because of
the copying to a tempdir. I guess my thought must have been that this
could be done by running the script in the tempdir, but then maybe you
have to know where the original file lives.

Richard



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Venable
On Sun, May 15, 2011 at 9:06 PM, Richard Heck rgh...@comcast.net wrote:

 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


Dear Richard,

Thanks a lot for this comment. What are some of the alternative ways to
define a converter, and what are the sort of details that would be useful to
know in deciding?

This particular task is incredibly simple (export to tex, compile), and I'm
not necessarily wedded to using CygWin, that's just what I happen to be most
comfortable with.


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard




Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard





However, the converter is executed in a temporary folder, which is 
precisely what the user wanted to avoid (and the reason to write the 
script in the first place). I miss how you can get around this.


--
Julien



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 05:45 PM, Julien Rioux wrote:
 On 16/05/2011 5:39 PM, Richard Heck wrote:
 On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

 Converters are defined under ToolsPreferencesFile HandingConverters.
 See section 3.3 of the Customization manual for the details of the
 syntax. Basically, any stupid script can act as a converter. It just
 needs to take certain arguments, and you need to tell LyX what they are.
 Lots of converters are already defined there, so you can also mimic
 them.


 However, the converter is executed in a temporary folder, which is
 precisely what the user wanted to avoid (and the reason to write the
 script in the first place). I miss how you can get around this.

Sorry, I must have missed that part.

Richard



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 6:11 PM, Richard Heck wrote:

On 05/16/2011 05:45 PM, Julien Rioux wrote:

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under ToolsPreferencesFile HandingConverters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic
them.



However, the converter is executed in a temporary folder, which is
precisely what the user wanted to avoid (and the reason to write the
script in the first place). I miss how you can get around this.


Sorry, I must have missed that part.

Richard



I believe copiers could help here, but I do not understand them/never 
used them.


Cheers,
Julien


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 06:12 PM, Julien Rioux wrote:
 On 16/05/2011 6:11 PM, Richard Heck wrote:
 On 05/16/2011 05:45 PM, Julien Rioux wrote:
 On 16/05/2011 5:39 PM, Richard Heck wrote:
 On 05/16/2011 04:05 PM, Venable wrote:

 What are some of the alternative ways to define a converter, and what
 are the sort of details that would be useful to know in deciding?

 Converters are defined under ToolsPreferencesFile
 HandingConverters.
 See section 3.3 of the Customization manual for the details of the
 syntax. Basically, any stupid script can act as a converter. It just
 needs to take certain arguments, and you need to tell LyX what they
 are.
 Lots of converters are already defined there, so you can also mimic
 them.


 However, the converter is executed in a temporary folder, which is
 precisely what the user wanted to avoid (and the reason to write the
 script in the first place). I miss how you can get around this.

 Sorry, I must have missed that part.


 I believe copiers could help here, but I do not understand them/never
 used them.

Well, I guess we'll see, but on reading this again it looks as if the
problem was supposed to be that certain of his scripts fail because of
the copying to a tempdir. I guess my thought must have been that this
could be done by running the script in the tempdir, but then maybe you
have to know where the original file lives.

Richard



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Venable
On Sun, May 15, 2011 at 9:06 PM, Richard Heck  wrote:

> 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
>

Dear Richard,

Thanks a lot for this comment. What are some of the alternative ways to
define a converter, and what are the sort of details that would be useful to
know in deciding?

This particular task is incredibly simple (export to tex, compile), and I'm
not necessarily wedded to using CygWin, that's just what I happen to be most
comfortable with.


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 04:05 PM, Venable wrote:
>
> What are some of the alternative ways to define a converter, and what
> are the sort of details that would be useful to know in deciding?
>
Converters are defined under Tools>Preferences>File Handing>Converters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard




Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under Tools>Preferences>File Handing>Converters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic them.

Richard





However, the converter is executed in a temporary folder, which is 
precisely what the user wanted to avoid (and the reason to write the 
script in the first place). I miss how you can get around this.


--
Julien



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 05:45 PM, Julien Rioux wrote:
> On 16/05/2011 5:39 PM, Richard Heck wrote:
>> On 05/16/2011 04:05 PM, Venable wrote:
>>>
>>> What are some of the alternative ways to define a converter, and what
>>> are the sort of details that would be useful to know in deciding?
>>>
>> Converters are defined under Tools>Preferences>File Handing>Converters.
>> See section 3.3 of the Customization manual for the details of the
>> syntax. Basically, any stupid script can act as a converter. It just
>> needs to take certain arguments, and you need to tell LyX what they are.
>> Lots of converters are already defined there, so you can also mimic
>> them.
>>
>
> However, the converter is executed in a temporary folder, which is
> precisely what the user wanted to avoid (and the reason to write the
> script in the first place). I miss how you can get around this.
>
Sorry, I must have missed that part.

Richard



Re: running cygwin or unix script from within lyx

2011-05-16 Thread Julien Rioux

On 16/05/2011 6:11 PM, Richard Heck wrote:

On 05/16/2011 05:45 PM, Julien Rioux wrote:

On 16/05/2011 5:39 PM, Richard Heck wrote:

On 05/16/2011 04:05 PM, Venable wrote:


What are some of the alternative ways to define a converter, and what
are the sort of details that would be useful to know in deciding?


Converters are defined under Tools>Preferences>File Handing>Converters.
See section 3.3 of the Customization manual for the details of the
syntax. Basically, any stupid script can act as a converter. It just
needs to take certain arguments, and you need to tell LyX what they are.
Lots of converters are already defined there, so you can also mimic
them.



However, the converter is executed in a temporary folder, which is
precisely what the user wanted to avoid (and the reason to write the
script in the first place). I miss how you can get around this.


Sorry, I must have missed that part.

Richard



I believe copiers could help here, but I do not understand them/never 
used them.


Cheers,
Julien


Re: running cygwin or unix script from within lyx

2011-05-16 Thread Richard Heck
On 05/16/2011 06:12 PM, Julien Rioux wrote:
> On 16/05/2011 6:11 PM, Richard Heck wrote:
>> On 05/16/2011 05:45 PM, Julien Rioux wrote:
>>> On 16/05/2011 5:39 PM, Richard Heck wrote:
 On 05/16/2011 04:05 PM, Venable wrote:
>
> What are some of the alternative ways to define a converter, and what
> are the sort of details that would be useful to know in deciding?
>
 Converters are defined under Tools>Preferences>File
 Handing>Converters.
 See section 3.3 of the Customization manual for the details of the
 syntax. Basically, any stupid script can act as a converter. It just
 needs to take certain arguments, and you need to tell LyX what they
 are.
 Lots of converters are already defined there, so you can also mimic
 them.

>>>
>>> However, the converter is executed in a temporary folder, which is
>>> precisely what the user wanted to avoid (and the reason to write the
>>> script in the first place). I miss how you can get around this.
>>>
>> Sorry, I must have missed that part.
>>
>
> I believe copiers could help here, but I do not understand them/never
> used them.
>
Well, I guess we'll see, but on reading this again it looks as if the
problem was supposed to be that certain of his scripts fail because of
the copying to a tempdir. I guess my thought must have been that this
could be done by running the script in the tempdir, but then maybe you
have to know where the original file lives.

Richard



Re: running cygwin or unix script from within lyx

2011-05-15 Thread Richard Heck

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



Re: running cygwin or unix script from within lyx

2011-05-15 Thread Richard Heck

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



Re: running cygwin or unix script from within lyx

2011-05-15 Thread Richard Heck

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