Re: Anybody helps about img path

2011-05-28 Thread Manveru
2011/5/11 Enrico Forestieri for...@lyx.org:
 Julien Rioux writes:

 It's possible that there have been some changes in the 2.0 development
 that broke a call to a .bat script, I'll let someone more knowledgeable
 answer.

 Yes, batch files do not work anymore on Windows. You have to invoke your
 batch file as cmd /c file.bat.

This is probably due to fact that in 2.0 the background handling of
conversion process required rewrite of external command execution. So
instead of calling system() call which launched programs through
user's shell, now exec() call (or one of its variants) is used instead
and that call is unable to run batch as batch is a Windows shell
script closely tied to cmd.exe. To launch python script you have to
call python itself first too.

-- 
Manveru
jabber: manv...@manveru.pl
     gg: 1624001
   http://www.manveru.pl


Re: Anybody helps about img path

2011-05-28 Thread Manveru
2011/5/11 Enrico Forestieri for...@lyx.org:
 Julien Rioux writes:

 It's possible that there have been some changes in the 2.0 development
 that broke a call to a .bat script, I'll let someone more knowledgeable
 answer.

 Yes, batch files do not work anymore on Windows. You have to invoke your
 batch file as cmd /c file.bat.

This is probably due to fact that in 2.0 the background handling of
conversion process required rewrite of external command execution. So
instead of calling system() call which launched programs through
user's shell, now exec() call (or one of its variants) is used instead
and that call is unable to run batch as batch is a Windows shell
script closely tied to cmd.exe. To launch python script you have to
call python itself first too.

-- 
Manveru
jabber: manv...@manveru.pl
     gg: 1624001
   http://www.manveru.pl


Re: Anybody helps about img path

2011-05-28 Thread Manveru
2011/5/11 Enrico Forestieri :
> Julien Rioux writes:
>>
>> It's possible that there have been some changes in the 2.0 development
>> that broke a call to a .bat script, I'll let someone more knowledgeable
>> answer.
>
> Yes, batch files do not work anymore on Windows. You have to invoke your
> batch file as "cmd /c file.bat".

This is probably due to fact that in 2.0 the background handling of
conversion process required rewrite of external command execution. So
instead of calling system() call which launched programs through
user's shell, now exec() call (or one of its variants) is used instead
and that call is unable to run batch as batch is a Windows shell
script closely tied to cmd.exe. To launch python script you have to
call python itself first too.

-- 
Manveru
jabber: manv...@manveru.pl
     gg: 1624001
   http://www.manveru.pl


Re: Anybody helps about img path

2011-05-11 Thread Enrico Forestieri
Julien Rioux writes:
 
 It's possible that there have been some changes in the 2.0 development 
 that broke a call to a .bat script, I'll let someone more knowledgeable 
 answer.

Yes, batch files do not work anymore on Windows. You have to invoke your
batch file as cmd /c file.bat.

-- 
Enrico





Re: Anybody helps about img path

2011-05-11 Thread Enrico Forestieri
Julien Rioux writes:
 
 It's possible that there have been some changes in the 2.0 development 
 that broke a call to a .bat script, I'll let someone more knowledgeable 
 answer.

Yes, batch files do not work anymore on Windows. You have to invoke your
batch file as cmd /c file.bat.

-- 
Enrico





Re: Anybody helps about img path

2011-05-11 Thread Enrico Forestieri
Julien Rioux writes:
> 
> It's possible that there have been some changes in the 2.0 development 
> that broke a call to a .bat script, I'll let someone more knowledgeable 
> answer.

Yes, batch files do not work anymore on Windows. You have to invoke your
batch file as "cmd /c file.bat".

-- 
Enrico





Anybody helps about img path

2011-05-10 Thread junzhouzhao

Hello, 

When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with epstopdf 
$$i conventer, and that works well under Lyx1.6.

I am using Windows XP. My picture is located in directioy 
E:\works\relation\fig\dynamic.eps. But Lyx2.0 changes it to 
3E__works_relation_fig_dynamic.eps. 

Do anyone know the reasons please?

Many thanks!




2011-05-10 
Catch0.jpg

Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux
On 10/05/2011 8:11 AM, junzhouzhao wrote:
 
 Hello,
 
 When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with 
 epstopdf $$i conventer, and that works well under Lyx1.6.
 

Hi,

Could you please provide the actual error message you get, if any?

 I am using Windows XP. My picture is located in directioy 
 E:\works\relation\fig\dynamic.eps. But Lyx2.0 changes it to 
 3E__works_relation_fig_dynamic.eps.
 
 Do anyone know the reasons please?
 

LyX 1.6 also does this, when moving and compiling files in the temporary
folder.

 Many thanks!
 
 
 
 
 2011-05-10
 


-- 
Julien


Re: Anybody helps about img path

2011-05-10 Thread junzhouzhao
I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and exam1.eps are all under c:/.

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx. 

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
MiKTeX 2.9\miktex\bin. I tried this in cmd epstopdf.exe fig.eps, and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named epstopdf.bat and put it in folder MiKTeX
2.9\miktex\bin(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile=%~dpn1.pdf %~dpnx1

And the conventer for EPS to PDF is set to epstopdf $$i. It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time. 

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):   Message = 
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):   Opts = 
width=0.8\textwidth
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):   Before =
\includegraphics[width=0.8\textwidth]
after = 
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming C://exam1.eps
2910557309 lasted 0 ms.
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF mode
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):we have: from eps to 
pdf
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):   the orig file is:
C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):   The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf 0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
0C___exam1.eps' did not start!
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system(...) instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in LyX20\Resources\scripts.
The conventer is set to python -tt $$s/scripts/epstopdf.py $$i. 

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.






Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux

On 10/05/2011 9:23 PM, junzhouzhao wrote:

I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and exam1.eps are all under c:/.

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx.

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
MiKTeX 2.9\miktex\bin. I tried this in cmd epstopdf.exe fig.eps, and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named epstopdf.bat and put it in folder MiKTeX
2.9\miktex\bin(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile=%~dpn1.pdf %~dpnx1

And the conventer for EPS to PDF is set to epstopdf $$i. It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time.

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):  Message = 
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):  Opts = 
width=0.8\textwidth
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):  Before =
\includegraphics[width=0.8\textwidth]
after =
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming C://exam1.eps
2910557309 lasted 0 ms.
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF 
mode
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):   we have: from eps to 
pdf
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):  the orig file is:
C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):  The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf 0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
0C___exam1.eps' did not start!
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system(...) instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in LyX20\Resources\scripts.
The conventer is set to python -tt $$s/scripts/epstopdf.py $$i.

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.







It's possible that there have been some changes in the 2.0 development 
that broke a call to a .bat script, I'll let someone more knowledgeable 
answer.


--
Julien



Anybody helps about img path

2011-05-10 Thread junzhouzhao

Hello, 

When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with epstopdf 
$$i conventer, and that works well under Lyx1.6.

I am using Windows XP. My picture is located in directioy 
E:\works\relation\fig\dynamic.eps. But Lyx2.0 changes it to 
3E__works_relation_fig_dynamic.eps. 

Do anyone know the reasons please?

Many thanks!




2011-05-10 
Catch0.jpg

Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux
On 10/05/2011 8:11 AM, junzhouzhao wrote:
 
 Hello,
 
 When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with 
 epstopdf $$i conventer, and that works well under Lyx1.6.
 

Hi,

Could you please provide the actual error message you get, if any?

 I am using Windows XP. My picture is located in directioy 
 E:\works\relation\fig\dynamic.eps. But Lyx2.0 changes it to 
 3E__works_relation_fig_dynamic.eps.
 
 Do anyone know the reasons please?
 

LyX 1.6 also does this, when moving and compiling files in the temporary
folder.

 Many thanks!
 
 
 
 
 2011-05-10
 


-- 
Julien


Re: Anybody helps about img path

2011-05-10 Thread junzhouzhao
I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and exam1.eps are all under c:/.

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx. 

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
MiKTeX 2.9\miktex\bin. I tried this in cmd epstopdf.exe fig.eps, and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named epstopdf.bat and put it in folder MiKTeX
2.9\miktex\bin(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile=%~dpn1.pdf %~dpnx1

And the conventer for EPS to PDF is set to epstopdf $$i. It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time. 

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):   Message = 
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):   Opts = 
width=0.8\textwidth
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):   Before =
\includegraphics[width=0.8\textwidth]
after = 
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming C://exam1.eps
2910557309 lasted 0 ms.
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF mode
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):we have: from eps to 
pdf
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):   the orig file is:
C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):   The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf 0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
0C___exam1.eps' did not start!
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system(...) instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in LyX20\Resources\scripts.
The conventer is set to python -tt $$s/scripts/epstopdf.py $$i. 

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.






Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux

On 10/05/2011 9:23 PM, junzhouzhao wrote:

I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and exam1.eps are all under c:/.

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx.

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
MiKTeX 2.9\miktex\bin. I tried this in cmd epstopdf.exe fig.eps, and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named epstopdf.bat and put it in folder MiKTeX
2.9\miktex\bin(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile=%~dpn1.pdf %~dpnx1

And the conventer for EPS to PDF is set to epstopdf $$i. It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time.

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):  Message = 
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):  Opts = 
width=0.8\textwidth
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):  Before =
\includegraphics[width=0.8\textwidth]
after =
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming C://exam1.eps
2910557309 lasted 0 ms.
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF 
mode
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):   we have: from eps to 
pdf
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):  the orig file is:
C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):  The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf 0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
0C___exam1.eps' did not start!
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system(...) instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in LyX20\Resources\scripts.
The conventer is set to python -tt $$s/scripts/epstopdf.py $$i.

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.







It's possible that there have been some changes in the 2.0 development 
that broke a call to a .bat script, I'll let someone more knowledgeable 
answer.


--
Julien



Anybody helps about img path

2011-05-10 Thread junzhouzhao

Hello, 

When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with "epstopdf 
$$i" conventer, and that works well under Lyx1.6.

I am using Windows XP. My picture is located in directioy 
"E:\works\relation\fig\dynamic.eps". But Lyx2.0 changes it to 
"3E__works_relation_fig_dynamic.eps". 

Do anyone know the reasons please?

Many thanks!




2011-05-10 
<>

Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux
On 10/05/2011 8:11 AM, junzhouzhao wrote:
> 
> Hello,
> 
> When I updated my Lyx1.6 to Lyx2.0, there seems something wrong with 
> "epstopdf $$i" conventer, and that works well under Lyx1.6.
> 

Hi,

Could you please provide the actual error message you get, if any?

> I am using Windows XP. My picture is located in directioy 
> "E:\works\relation\fig\dynamic.eps". But Lyx2.0 changes it to 
> "3E__works_relation_fig_dynamic.eps".
> 
> Do anyone know the reasons please?
> 

LyX 1.6 also does this, when moving and compiling files in the temporary
folder.

> Many thanks!
> 
> 
> 
> 
> 2011-05-10
> 


-- 
Julien


Re: Anybody helps about img path

2011-05-10 Thread junzhouzhao
I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and "exam1.eps" are all under "c:/".

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx. 

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
"MiKTeX 2.9\miktex\bin". I tried this in cmd "epstopdf.exe fig.eps", and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named "epstopdf.bat" and put it in folder "MiKTeX
2.9\miktex\bin"(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile="%~dpn1.pdf" "%~dpnx1"

And the conventer for EPS to PDF is set to "epstopdf $$i". It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time. 

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):   Message = ""
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):   Opts = 
width=0.8\textwidth
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):   Before =
\includegraphics[width=0.8\textwidth]
after = 
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming "C://exam1.eps"
2910557309 lasted 0 ms.
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
..\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF mode
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):we have: from eps to 
pdf
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):   the orig file is:
C://exam1.eps
..\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):   The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
..\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf "0C___exam1.eps"
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
"0C___exam1.eps"' did not start!
..\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system("...") instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in "LyX20\Resources\scripts".
The conventer is set to "python -tt $$s/scripts/epstopdf.py $$i". 

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.






Re: Anybody helps about img path

2011-05-10 Thread Julien Rioux

On 10/05/2011 9:23 PM, junzhouzhao wrote:

I found anothere way to solve this problem. Hopes it works for people have this
issue.

Here are some more infor. When converting EPS to PDF.

Platform: WinXP sp3, MicTex2.9 (I use XeTex)
this is the latex article.

\documentclass{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=0.75in,bmargin=0.75in,lmargin=0.75in,rmargin=0.75in}
\usepackage{graphicx}
\usepackage{xunicode}
\begin{document}
This is a drill.
\includegraphics[width=0.8\textwidth]{exam1}
\end{document}

The lyx file and "exam1.eps" are all under "c:/".

When using Lyx to write an article, contains a EPS figure, the pdf figure always
lose some information after converting by Lyx.

I think this has nothing to do with Lyx. It seems this is due to epstopdf.exe in
"MiKTeX 2.9\miktex\bin". I tried this in cmd "epstopdf.exe fig.eps", and it
generates a same pdf lose some information in the eps fig, e.g. lagend, or X Y
title is mising.

To solve this, I write a bat named "epstopdf.bat" and put it in folder "MiKTeX
2.9\miktex\bin"(epstopdf.exe is renamed). The bat contains the following
information:

gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite
-sOutputFile="%~dpn1.pdf" "%~dpnx1"

And the conventer for EPS to PDF is set to "epstopdf $$i". It works fine under
Lyx1.6.

When I updated my Lyx to 2.0. It is wrong this time.

It seems that Lyx2.0 will copy eps to a temporal folder and conventer it to pdf
in that folder, but epstopdf.bat doesn't know the whole path. (In fact Lyx1.6
did also but epstopdf.bat know the directory.) Lyx2.0 just pops up an error
cannot find that temporal file. here are the error info.


...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(754): insetgraphics::latex:
Filename = C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(764):  Message = ""
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(779):  Opts = 
width=0.8\textwidth
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(786):  Before =
\includegraphics[width=0.8\textwidth]
after =
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(461): Comparing C://exam1.eps
and C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(592): Checksumming "C://exam1.eps"
2910557309 lasted 0 ms.
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(228): Copying C:/Documents and
Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
...\..\..\lyx-2.0.0\src\support\FileName.cpp(941): Recognised Fileformat: eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(109): findTargetFormat: PDF 
mode
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(676):   we have: from eps to 
pdf
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(682):  the orig file is:
C://exam1.eps
...\..\..\lyx-2.0.0\src\insets\InsetGraphics.cpp(731):  The original file is
C://exam1.eps
A copy has been made and convert is to be called with:
file to convert = C:/Documents and Settings/Administrator/Local
Settings/Temp/lyx_tmpdir.Hp2276/lyx_tmpbuf2/0C___exam1.eps
 from eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(372): Converting from  eps to pdf
...\..\lyx-2.0.0\src\Converter.cpp(437): Calling epstopdf "0C___exam1.eps"
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(217): Systemcall: 'epstopdf
"0C___exam1.eps"' did not start!
...\..\..\lyx-2.0.0\src\support\Systemcall.cpp(218): error The process failed to
start. Either the invoked program is missing, or you may have insufficient
permissions to invoke the program.
Error: Cannot convert file

In order to check whether bat doesn't know the whole path of the temporal eps
file. I write the bat to a python version just using os.system("...") instead
and log some information. (Because I don't know how to log in bat.) So that
python file is named to epstopdf.py. And I put it in "LyX20\Resources\scripts".
The conventer is set to "python -tt $$s/scripts/epstopdf.py $$i".

Well, I am strange that this time it works well.

But I am still confused why python works but bat doesn't work.







It's possible that there have been some changes in the 2.0 development 
that broke a call to a .bat script, I'll let someone more knowledgeable 
answer.


--
Julien