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