LaTeXText icon indicating copy to clipboard operation
LaTeXText copied to clipboard

Update Inkscape 1.0 and Python3

Open seignovert opened this issue 5 years ago • 4 comments

Hi,

After upgrading to Inkscape 1.0 on macOS, I was running into the same issue as #24.

This PR includes:

  • [x] Changes to match the latest inkex requirements
  • [x] Change OptionParser to ArgumentParser dependency.
  • [x] Fixes some depreciation warnings.
  • [x] Add macOS paths to find PDF2SVG_PATH
  • [x] Change from Mac OS to Darwin for the platform name on macOS.
  • [x] Add Python3 check on SvgTransformer for multiplication matrix function (instead of comment/uncomment function).

I tried to keep Python 2 and Python 3 compatibility but with the recent changes in Inkscape 1.0 it might not work for older versions. Additional tests may be required before merging it. And it might be relevant to update install.sh as well based on the version of Inkscape installed.

Moreover, the location of the extension folder on macOS is now at /Users/<USERNAME>/Library/Application\ Support/org.inkscape.Inkscape/config/inkscape/extensions/ and no longer in ~/.config/inkscape/extensions/ (cf. Edit > Preferences > System: User extensions).

I hope this would help to re-enable this great plug-in for Inkscape users who migrated to 1.0.

seignovert avatar Jan 16 '20 22:01 seignovert

Your changes look good to me. Have you tried if it still works with Inkscape 0.92.4? I would prefer if we could have the same code base at least for inkscape 0.92.3, 0.92.4 and 1.0 for a little time until everyone has updated.

seebk avatar Jan 25 '20 18:01 seebk

Are there any updates on this, now that Inskscape 1.0 has been released?

gasteigerjo avatar May 05 '20 20:05 gasteigerjo

For those on Linux: substituting you latextext.py with this pull request is (almost) enough to fix it. If it still doesn't work, try to find manually where you have pf2svg on your machine and fix the python script accordingly. It doesn't sound ideal, but this "dirty" fix has allowed me to have latextext.

marlasca23 avatar Jul 30 '20 13:07 marlasca23

I've tested out this PR and it has worked well so far for me. Thanks for your work on this @seignovert!

matthuszagh avatar Nov 26 '21 20:11 matthuszagh