Open tiarno opened 9 years ago
Hello tiarno, thanks for the heads up. Would you mind sending me a pull request for this change, so I can just approve it?
hi agrbin, I will send a pull request soon; my fork has some issues right now but I'll be back in touch soon, and it will have just the one fix. thx.
This "fix" has caused a major regression and rendered svgtex completely useless on GNU/Linux (Xubuntu LTS 14.04). On all my browsers (Firefox, Chrome, etc.), I now only see one or more horizontal lines instead of any formula. Reverting https://github.com/agrbin/svgtex/commit/baacbe9c990fd8d73f357e849acae92c4ed8b23e fixes the problem.
Sorry for the trouble and glad you could revert. I will follow up after some research. I was validating the elements according to http://www.w3.org/TR/SVG11/struct.html#UseElementHrefAttribute which worked on my windows box. It doesn't make sense to me for an xlink to have multiple hrefs; once I have a fix that works for linux as well I'll repost for consideration.
As far as I can tell, it is an error to have multiple hrefs. http://www.w3.org/TR/xlink11/ With @serge-stroobandt's results, my guess is that the code I submitted creates another error while fixing the multiple href problem.
@tiarno You are welcome. I have no problem at all with sticking to standards, but it has to work. Unfortunately, I am not an expert at all on SVG nor xlink. So, I am afraid I cannot really tell you what is going wrong, apart from not seeing any formulas at all in my browsers, only a few horizontal lines despite a succesful svgtex run. Do you have capability for testing on Linux?
@serge-stroobandt : no argument here--working is the first thing the code has to do regardless of validation. I cannot test on Linux, but I can on Mac and Windows. I will play around with it and make sure it will work on all platforms before another pull request. Sorry for the trouble.
The SVG result contains 'use' elements that have duplicate xlink:href elements. That is, using two terminal windows (this is win7)
The resulting SVG has 'use' elements like this:
What I did to fix it was to replace line 73 in engine.js, which inserts the attribute, with this conditional block: