Render Latex formula improvement

Flesh out your ideas for new or improved Inkscape features before submitting a request.
KaKiLa
Posts: 5
Joined: Fri Apr 01, 2011 8:30 pm

Render Latex formula improvement

Postby KaKiLa » Fri Apr 01, 2011 9:10 pm

Hi all,

I am using the Render Latex formula extension.
I noticed that you can pass packages but not option to those packages
I modified eqtexsvg.py so it parses the following string in the "Additional packages (comma-separated)" option
[opt1]pkgname1,[opt2]pkgname2,...

If the packages are asked to be "semi-colon" separated (instead of comma separated), then is really easy to be more general
[opt1,opt2]pkgname1; [opt1,opt2,opt3]pkgname2; ....

Anyway, here is the diff old_eqtexsvg.py new_eqtexsvg.py

Code: Select all

<     pkglist = pkgstring.replace(" ","").split(",")
---
>     pkglistWithOpt = pkgstring.replace(" ","").split(",")
>     pkglist=[]
>     optlist=[]
>     for pkg in pkglistWithOpt:
>         [optlst,pkgname] = pkg.split("]")
>         pkglist.append(pkgname)
>         optlist.append(optlst[1:])
>
36,37c43,44
<     for pkg in pkglist:
<         header += "\\usepackage{%s}\n" % pkg
---
>     for i,pkg in enumerate(pkglist):
>         header += "\\usepackage[%s]{%s}\n" % (optlist[i],pkg,)


do you think it can be extended like this in future versions?

Thanks

JPi

Seyman
Posts: 1
Joined: Tue Feb 18, 2014 12:16 am

Re: Render Latex formula improvement

Postby Seyman » Tue Feb 18, 2014 12:19 am

Thanks a lot for your tip, it works great!

It would really be a good idea to use this in future versions.


Return to “Inkscape Ideas”