pluveto / Mathink

一个无需依赖 Latex 的 Latex 风格公式编辑器, 支持用作 Inkscape 插件. Engish trans: inkscape math symbols / formula editor with latex/tex syntax. On LaTex NOT depending
45 stars 7 forks source link

Needs write access to the Inkscape extensions folder #9

Open ndl303 opened 2 years ago

ndl303 commented 2 years ago

Looks like it would be a useful extension. Unfortunately it seems I need write access to the Inkscape extensions folder which is not allowed on my machine which is managed by our system administrators.

Pressing return for the default dialog produces .NET Unhandled exception "Access to the path C:\Program Files\Inkscape\share\inkscape\extensions\Mathink\out.svg is denied".

Changing the default filename to something else, eg E:\Mathink\out.svg results in error

Traceback (most recent call last):
  File "mathink.py", line 79, in <module>
    os.startfile(os.path.abspath(os.path.dirname(output_file) + "/Mathink.GUI.exe"))
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'E:\\Mathink\\Mathink.GUI.exe'

Does not work if I leave it unchanged. Does not work if I change it. Rats! Somehow the default example of acceleration actually makes it back to the Inkscape drawing and looks really good. Now if only I could type in my own formula. Does not look like it would be too hard of a fix although I am not a C# or inkscape extensions guy.

pluveto commented 2 years ago

Try to run the Mathink.GUI.exe program first, and then insert the SVG into the document by customizing the output file. The py script will first check the existing GUI program processes in the system.

I will find time to fix it and allow users to customize the complete path

guohaoxiang commented 2 years ago

I fix the same bug by running inkscape as an administrator