Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Rainer M Krug r.m.krug at gmail.com writes:

 
 
 On 30/03/12 00:08, Xi Zhang wrote:
  Richard Heck rgheck at comcast.net writes:
  
  
  On 03/29/2012 05:39 PM, Xi Zhang wrote:
  I am writing something using LyX in Windows.
  
  I just want a simple funtion that every time I run pdfletex, the pdf file
  can
  be copied to the same folder in which the lyx file is. As these files 
will
  be
  sycronized by Dropbox, I can reat it on iPhone or iPad.
  
  Why don't you just export the file? Then it is put in that folder.
  
  I know that this has been discribed in Customization.lyx as a simple
  example. However, I have no idea of how
  Python works and how to make photocopier.sh executable.
  
  That example is for Linux or OSX.
  
  Richard
  
  
  
  
  Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it
  automatically as well.
 
 Change the keybinding Shift-Control-r (refresh preview) to export the format 
you want, and I think
 you can even disable the overwrtite confirmation dialog.
 
 Cheers,
 
 Rainer
 
  
 

Thanks guys. 

I added a new shortcut as command-sequence buffer-view pdf2; buffer-export 
pdf2;.

I guess that there is no changes between these two commands, so the file won't 
be compiled twice. But I am not sure. 

It works sometimes, but the preview is updated immediately whilst the stored 
file is updated after a long time. 

The option in Preferences that overwritten on export has been changed 
to all files.

I don't why. Any idea?



Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang

For now, I just added to shortcuts, one for buffer-view and one for export. 
They works fine. 

Just wonder why cannot put them together. 




Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Finally, I realized part of function that I want, though not satisfactorily. 

I found that a pdf file in a temp folder is updated very time I pdflatex. Say, 
C:\Users\XXX\AppData\Local\Temp\lyx_tmpdir.Hp2836\lyx_tmpbuf2. Every time 
pdflatex open the viewer, it opens the this file.

Thus the viewer for pdflatex is defined as SumatraView.bat, which is

start  /D %~dp1 /B SumatraPDF.exe -reuse-instance -inverse-
search lyxeditor.exe %%f %%l %~nx1
copy %~1 D:\Dropbox\PDFs /Y

The first line are openning the pdfviewer and passing inverse search 
parameters.

The second copies the file from the temporary folder to the Dropbox folder.  

Everytime I pdflatex, the PDF is copied to the specified folder. 

However, there is one more thing I would like to do: instead of putting it in 
a specific folder, I have the PDF file be put in the same folder as the lyx 
file is. 

I have checked that when pdflated run the pdf viewer, only the path of the 
temporary file is passed to SumatraView.bat.

Anyone have any suggestions on how to get the path of the lyx file? 

Thanks in advance!

Best, Xi



Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Rainer M Krug r.m.krug at gmail.com writes:

 
 
 On 30/03/12 00:08, Xi Zhang wrote:
  Richard Heck rgheck at comcast.net writes:
  
  
  On 03/29/2012 05:39 PM, Xi Zhang wrote:
  I am writing something using LyX in Windows.
  
  I just want a simple funtion that every time I run pdfletex, the pdf file
  can
  be copied to the same folder in which the lyx file is. As these files 
will
  be
  sycronized by Dropbox, I can reat it on iPhone or iPad.
  
  Why don't you just export the file? Then it is put in that folder.
  
  I know that this has been discribed in Customization.lyx as a simple
  example. However, I have no idea of how
  Python works and how to make photocopier.sh executable.
  
  That example is for Linux or OSX.
  
  Richard
  
  
  
  
  Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it
  automatically as well.
 
 Change the keybinding Shift-Control-r (refresh preview) to export the format 
you want, and I think
 you can even disable the overwrtite confirmation dialog.
 
 Cheers,
 
 Rainer
 
  
 

Thanks guys. 

I added a new shortcut as command-sequence buffer-view pdf2; buffer-export 
pdf2;.

I guess that there is no changes between these two commands, so the file won't 
be compiled twice. But I am not sure. 

It works sometimes, but the preview is updated immediately whilst the stored 
file is updated after a long time. 

The option in Preferences that overwritten on export has been changed 
to all files.

I don't why. Any idea?



Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang

For now, I just added to shortcuts, one for buffer-view and one for export. 
They works fine. 

Just wonder why cannot put them together. 




Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Finally, I realized part of function that I want, though not satisfactorily. 

I found that a pdf file in a temp folder is updated very time I pdflatex. Say, 
C:\Users\XXX\AppData\Local\Temp\lyx_tmpdir.Hp2836\lyx_tmpbuf2. Every time 
pdflatex open the viewer, it opens the this file.

Thus the viewer for pdflatex is defined as SumatraView.bat, which is

start  /D %~dp1 /B SumatraPDF.exe -reuse-instance -inverse-
search lyxeditor.exe %%f %%l %~nx1
copy %~1 D:\Dropbox\PDFs /Y

The first line are openning the pdfviewer and passing inverse search 
parameters.

The second copies the file from the temporary folder to the Dropbox folder.  

Everytime I pdflatex, the PDF is copied to the specified folder. 

However, there is one more thing I would like to do: instead of putting it in 
a specific folder, I have the PDF file be put in the same folder as the lyx 
file is. 

I have checked that when pdflated run the pdf viewer, only the path of the 
temporary file is passed to SumatraView.bat.

Anyone have any suggestions on how to get the path of the lyx file? 

Thanks in advance!

Best, Xi



Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Rainer M Krug  gmail.com> writes:

> 
> 
> On 30/03/12 00:08, Xi Zhang wrote:
> > Richard Heck  comcast.net> writes:
> > 
> >> 
> >> On 03/29/2012 05:39 PM, Xi Zhang wrote:
> >>> I am writing something using LyX in Windows.
> >>> 
> >>> I just want a simple funtion that every time I run pdfletex, the pdf file
> > can
> >>> be copied to the same folder in which the lyx file is. As these files 
will
> > be
> >>> sycronized by Dropbox, I can reat it on iPhone or iPad.
> >>> 
> >> Why don't you just export the file? Then it is put in that folder.
> >> 
> >>> I know that this has been discribed in Customization.lyx as a simple
> > example. However, I have no idea of how
> >> Python works and how to make photocopier.sh executable.
> >>> 
> >> That example is for Linux or OSX.
> >> 
> >> Richard
> >> 
> >> 
> > 
> > 
> > Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it
> > automatically as well.
> 
> Change the keybinding Shift-Control-r (refresh preview) to export the format 
you want, and I think
> you can even disable the "overwrtite confirmation" dialog.
> 
> Cheers,
> 
> Rainer
> 
> > 
> 

Thanks guys. 

I added a new shortcut as "command-sequence buffer-view pdf2; buffer-export 
pdf2;".

I guess that there is no changes between these two commands, so the file won't 
be compiled twice. But I am not sure. 

It works sometimes, but the preview is updated immediately whilst the stored 
file is updated after a long time. 

The option in Preferences that "overwritten on export" has been changed 
to "all files".

I don't why. Any idea?



Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang

For now, I just added to shortcuts, one for buffer-view and one for export. 
They works fine. 

Just wonder why cannot put them together. 




Re: Customize Copier in LyX

2012-03-30 Thread Xi Zhang
Finally, I realized part of function that I want, though not satisfactorily. 

I found that a pdf file in a temp folder is updated very time I pdflatex. Say, 
C:\Users\XXX\AppData\Local\Temp\lyx_tmpdir.Hp2836\lyx_tmpbuf2. Every time 
pdflatex open the viewer, it opens the this file.

Thus the viewer for pdflatex is defined as SumatraView.bat, which is

start "" /D "%~dp1" /B "SumatraPDF.exe" -reuse-instance -inverse-
search "lyxeditor.exe %%f %%l" %~nx1
copy %~1 D:\Dropbox\PDFs /Y

The first line are openning the pdfviewer and passing inverse search 
parameters.

The second copies the file from the temporary folder to the Dropbox folder.  

Everytime I pdflatex, the PDF is copied to the specified folder. 

However, there is one more thing I would like to do: instead of putting it in 
a specific folder, I have the PDF file be put in the same folder as the lyx 
file is. 

I have checked that when pdflated run the pdf viewer, only the path of the 
temporary file is passed to SumatraView.bat.

Anyone have any suggestions on how to get the path of the lyx file? 

Thanks in advance!

Best, Xi



Customize Copier in LyX

2012-03-29 Thread Xi Zhang
I am writing something using LyX in Windows. 

I just want a simple funtion that every time I run pdfletex, the pdf file can 
be copied to the same folder in which the lyx file is. As these files will be 
sycronized by Dropbox, I can reat it on iPhone or iPad.

I know that this has been discribed in Customization.lyx as a simple example. 
However, I have no idea of how Python works and how to make photocopier.sh 
executable.

I don't have too much time to look into this and it will be highly appreciated 
if anyone can give me a simple script or compiled file to have this function.

Thanks in advance!

Best regards,
Xi Zhang



Re: Customize Copier in LyX

2012-03-29 Thread Xi Zhang
Richard Heck rgheck at comcast.net writes:

 
 On 03/29/2012 05:39 PM, Xi Zhang wrote:
  I am writing something using LyX in Windows.
 
  I just want a simple funtion that every time I run pdfletex, the pdf file 
can
  be copied to the same folder in which the lyx file is. As these files will 
be
  sycronized by Dropbox, I can reat it on iPhone or iPad.
 
 Why don't you just export the file? Then it is put in that folder.
 
  I know that this has been discribed in Customization.lyx as a simple 
example. However, I have no idea of how
 Python works and how to make photocopier.sh executable.
 
 That example is for Linux or OSX.
 
 Richard
 
 


Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it automatically as well. 



Customize Copier in LyX

2012-03-29 Thread Xi Zhang
I am writing something using LyX in Windows. 

I just want a simple funtion that every time I run pdfletex, the pdf file can 
be copied to the same folder in which the lyx file is. As these files will be 
sycronized by Dropbox, I can reat it on iPhone or iPad.

I know that this has been discribed in Customization.lyx as a simple example. 
However, I have no idea of how Python works and how to make photocopier.sh 
executable.

I don't have too much time to look into this and it will be highly appreciated 
if anyone can give me a simple script or compiled file to have this function.

Thanks in advance!

Best regards,
Xi Zhang



Re: Customize Copier in LyX

2012-03-29 Thread Xi Zhang
Richard Heck rgheck at comcast.net writes:

 
 On 03/29/2012 05:39 PM, Xi Zhang wrote:
  I am writing something using LyX in Windows.
 
  I just want a simple funtion that every time I run pdfletex, the pdf file 
can
  be copied to the same folder in which the lyx file is. As these files will 
be
  sycronized by Dropbox, I can reat it on iPhone or iPad.
 
 Why don't you just export the file? Then it is put in that folder.
 
  I know that this has been discribed in Customization.lyx as a simple 
example. However, I have no idea of how
 Python works and how to make photocopier.sh executable.
 
 That example is for Linux or OSX.
 
 Richard
 
 


Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it automatically as well. 



Customize Copier in LyX

2012-03-29 Thread Xi Zhang
I am writing something using LyX in Windows. 

I just want a simple funtion that every time I run pdfletex, the pdf file can 
be copied to the same folder in which the lyx file is. As these files will be 
sycronized by Dropbox, I can reat it on iPhone or iPad.

I know that this has been discribed in Customization.lyx as a simple example. 
However, I have no idea of how Python works and how to make photocopier.sh 
executable.

I don't have too much time to look into this and it will be highly appreciated 
if anyone can give me a simple script or compiled file to have this function.

Thanks in advance!

Best regards,
Xi Zhang



Re: Customize Copier in LyX

2012-03-29 Thread Xi Zhang
Richard Heck  comcast.net> writes:

> 
> On 03/29/2012 05:39 PM, Xi Zhang wrote:
> > I am writing something using LyX in Windows.
> >
> > I just want a simple funtion that every time I run pdfletex, the pdf file 
can
> > be copied to the same folder in which the lyx file is. As these files will 
be
> > sycronized by Dropbox, I can reat it on iPhone or iPad.
> >
> Why don't you just export the file? Then it is put in that folder.
> 
> > I know that this has been discribed in Customization.lyx as a simple 
example. However, I have no idea of how
> Python works and how to make photocopier.sh executable.
> >
> That example is for Linux or OSX.
> 
> Richard
> 
> 


Every time I pdflatex, I want this to be done automatically, as Dropbox 
uploads it automatically as well.