-2

I am trying to install the LaTeXText extension on Inkscape and it does not seem to be working. The problem is with the following lines of code:

    class RenderLatexEffect(inkex.Effect):
    def __init__(self):
        inkex.Effect.__init__(self)
        add_options(self.OptionParser)
        self.OptionParser.set_conflict_handler("resolve")

The error I get is that it claims self.OptionParser does not have a set_conflict_handler method, which is strange because an optparse object should have it. I know optparse is deprecated, but I don't see any reason why this wouldn't work. I haven't been able to find anyone with the same problem.

If you want to see it in bigger context, you can find the relevant file (extension/latextext.py) here

  • You might want to report issues with an extension to its author: https://github.com/seebk/LaTeXText/issues - or are you asking for concrete help in fixing it? Or you may want to have a look into alternatives, e.g. https://textext.github.io/textext/ . – Moini Jul 29 '20 at 23:41
  • @Moini apparently this is a well-known issue. After Inkscape updated to 1.0, LaTexText didn't update. – Sofía Marlasca Aparicio Jul 31 '20 at 04:49

1 Answers1

0

Will post an answer now that I have figured it out in case anyone else is struggling with the same thing.

The issue is that Inkscape updated to 1.0 but LaTeXText did not update for this new version. There is a pull request in GitHub to do this (https://github.com/seebk/LaTeXText/pull/27) but it has not been approved yet.

Even using the changes suggested by the pull request, it didn't work on my machine. The pdf2svg paths need fixing for Linux (I believe the pull request fixed it for OsX, not sure about Windows). You can manually change this path in the script latextext.py.