fsmMLK / inkscapeMadeEasy

Set of python modules that extends Aaron Spike's inkex.py module, adding methods and classes to help the development of new extensions for inkscape.
GNU General Public License v3.0
202 stars 28 forks source link

Problems with packages depending on inkscapeMadeEasy #14

Closed Rigoberdo closed 2 years ago

Rigoberdo commented 3 years ago

Dear fsmMLK I really appreciate your extensions for Inkscape and I've been using them for several years. However, I'm not able to have Circuit Symbols, Cartesian axes, Plot function, etc. work on a new Windows 10 64bit PC, where I installed Inkscape 1.1 (c68e22c387, 2021-05-23) and Python 3.9 (64bit). MikTex is updated (Console 4.2.1) and so latex packages. I followed the instructions to install inkscapeMadeEasy, inkscapeCartesianPlotFunction2D, inkscapeCartesianAxes2D and inkscapeCircuitSymbols, but they don't work. Instead, inkscapeCreateMarkers works well. I attach the error log from Inkscape at the end of this message. Thank you for your help. Best regards Mauro

Error logs

**** at the beginning, for all packages

Traceback (most recent call last): File "..\AppData\Roaming\inkscape\extensions\textext\base.py", line 528, in tex_to_pdf exec_command([tex_command, self.tmp('tex')] + self.LATEX_OPTIONS) File "..\AppData\Roaming\inkscape\extensions\textext\utility.py", line 253, in exec_command raise TexTextCommandFailed(message="Command %s failed (code %d)" % (' '.join(cmd), p.returncode), textext.errors.TexTextCommandFailed: Command ..\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex.exe tmp.tex -interaction=nonstopmode -halt-on-error failed (code 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

**** for Circuit Symbols

File "circuitSymbols.py", line 567, in circuit.run() File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run self.save_raw(self.effect()) File "circuitSymbols.py", line 275, in effect self.drawResistor(root_layer, position, value=so.bipoleRLCVal, angleDeg=so.bipoleRLCRot, flagVolt=so.bipoleRLCVolt, File "..\AppData\Roaming\inkscape\extensions\inkscapeCircuitSymbols-master\drawRLC.py", line 51, in drawResistor inkDraw.text.latex(self, group, value, pos_text, fontSize=self.fontSize, refPoint='bc', preambleFile=self.preambleFile) File "..\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Draw.py", line 1288, in latex tex.run([r'--text=' + LatexCommands + LaTeXtext, '--scale-factor=1', '--preamble-file=' + preambleFile, tempFilePath],

**** for Cartesian axes

File "cartesianAxes2D.py", line 89, in axis.run() File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run self.save_raw(self.effect()) File "cartesianAxes2D.py", line 81, in effect inkPlot.axis.cartesian(self, root_layer, Xlimits, Ylimits, position, xLabel=so.xLabel, yLabel=so.yLabel, xlog10scale=so.xLog10scale, File "..\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Plot.py", line 470, in cartesian inkDraw.text.latex(ExtensionBaseObj, groupTicks, xText, [posX + offsetX, axisOrigin[1] + offsetY], textSizeSmall, File "..\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Draw.py", line 1291, in latex tex.run(

**** for Plot function

File "cartesianPlotFunction2D.py", line 182, in plot.run() File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run self.save_raw(self.effect()) File "cartesianPlotFunction2D.py", line 174, in effect inkPlot.plot.cartesian(self, root_layer, xData, yData, position, xLabel=so.xLabel, yLabel=so.yLabel, xlog10scale=so.xLog10scale, File "C:\Users\andrmau58899\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Plot.py", line 1145, in cartesian [axisObj, limits, origin] = axis.cartesian(ExtensionBaseObj, axisGroup, Xlimits, Ylimits, position, xLabel=xLabel, yLabel=yLabel, File "C:\Users\andrmau58899\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Plot.py", line 470, in cartesian inkDraw.text.latex(ExtensionBaseObj, groupTicks, xText, [posX + offsetX, axisOrigin[1] + offsetY], textSizeSmall, File "C:\Users\andrmau58899\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Draw.py", line 1291, in latex tex.run(

**** at the end, for all packages

File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run self.save_raw(self.effect()) File "..\AppData\Roaming\inkscape\extensions\textext\base.py", line 284, in effect self.do_convert(new_text, File "..\AppData\Roaming\inkscape\extensions\textext\base.py", line 357, in do_convert converter.tex_to_pdf(tex_executable, text, preamble_file) File "..\AppData\Roaming\inkscape\extensions\textext\base.py", line 532, in tex_to_pdf raise TexTextConversionError(parsed_log, error.return_code, error.stdout, error.stderr) textext.errors.TexTextConversionError: ! Package keyvalue Error: Unknown option 'per' for package siunitx.

fsmMLK commented 3 years ago

I think the newest SIunitx latex package made some changes that are not compatible with older versions (my version is quite old). Please check this and see if it fixes your problems. I will update the documentation soon.

Rigoberdo commented 3 years ago

Thank you indeed for your tip! It worked fine for inkscapeCircuitSymbols. However, it is uneffective for the other extensions (the error message is apparently unvaried). I don't know if it matters, but textext works well.

fsmMLK commented 3 years ago

Did you also modified basicLatexPackages.tex inside inkcapeMadeEasy?

Please check the second line of the file it is currently

\usepackage[per=slash]{siunitx}

and must be modified to \usepackage{siunitx}

Try it and let me know if this fix your problems.

Rigoberdo commented 3 years ago

I missed that patch. It worked like a charm! Thank you indeed!