问题描述:

I find my Inkscape 0.91 for Windows 7 64-bit has problems in rendering

LaTeX. What I did was:

1) Extensions - Render - LaTeX

2) Enter "test" in LaTeX input

3) Click "Apply".

Then, a cmd.exe window will pop out and just hang there. If I close

this window, I get:

Inkscape has received additional data from the script executed. The

script did not return an error, but this may indicate the results will

not be as expected.

^Cinvalid LaTeX input:

test

temporary files were left in:

c:\users\admini~1\appdata\local\temp\inkscape-zxdypk

Could anyone please help? Thanks!

PS: latex, dvips, gs, and pstoedit are already in system path.

Shawn


Update on 2015-08-02:

I looked into the temporary files, and saw the eq.out file like this:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit)

entering extended mode

! I can't find file `c:/users/admini'.

<to be read again>

\protect

<*> c:/users/admini~

1/appdata/local/temp/inkscape-wawis7/eq.tex

Please type another input file name:

Seems like a problem with Line 127 of the eqtexsvg.py file, that

Windows does not take this type of string as a valid file path.

Is that so? Is it non-trivial to fix it?

Shawn

网友答案:

I encountered the same problem and found some hack around it. It is not really a proper solution but it seems to work for me.

Looking at the errors and the structure of eqtexsvg.py it seems that the script wants to open a temporary directory, execute the LaTeX file in that directory, and then delete it again. It seems it somehow can't open the temporary folder in the "users" directory.

What I did to fix this was:

  1. Open eqtexsvg.py (can be done with any text editor)
  2. Change the line "base_dir = tempfile.mkdtemp("", "inkscape-");" into "base_dir = "<directory of your choice>"". I put in some directory on my documents hard drive.
  3. Remove the line "os.rmdir(base_dir)"
  4. Save the file again

That did it for me. It basically makes that eqtexsvg.py makes the temporary directory in some other location specified by you, where it can reach it. Note that the script automatically deletes the files it generates afterwards automatically. Removing the line (step 3) prevents it from removing the directory as well.

I don't claim this is a clean or nice solution, but at least it fixed the problem for me.

相关阅读:
Top