Open flizotte opened 8 years ago
I'm not sure how you would be able to get around this issue as in this case the mathml (or LaTeX) is inserted as text so could be annotated just like any other text.
Is there a problem with this as even if someone does add an annotation into the middle of the equation text then that doesn't actually break anything?
Thanks a lot for your quick reply.
The mathml (displayed by the Wiris filter) generates an error message when the filter is on.So one cannot really break it by inserting an annotation.
But if I temporarily turn the filter off, I can then add an annotation within the mathml tag and then it breaks. But this is not likely to happen.
With LateX, it is different. The equation show up, but it is surronded by two tags.
I'm afraid I don't have a solution for this.
We use both mathml and latex without problems - but we have our own filter that converts these to images, so you can never annotate within them.
One point confuses me with your screen grab of latex - this is showing the annotation span html, but within the annotation page interface - is this a copy and paste of the html of a wiki page?
For LaTeX, step by step... All in wysiswig. Edit mode
View mode
Annotate mode
It looks like the WIRIS filter doesn't strip any other content it doesn't want/understand, it looks like our in-house maths filter does and so we hadn't noticed this problem.
I'm struggling to think of a way around this, the annotation spans need to be added before the filter is run (this is due to positioning, they are recorded based on the source text). If there are spaces in the text the wiki code will add an annotation span regardless - I'm not sure how it would tell this particular text is an equation (other than guessing based on the contents). Sorry!
I was reported this issue in Ouwiki (2014042800) running on Moodle 2.8.9.
Teachers want to annotate pages containing MathML generated by Wiris. But an annotation mark gets inserted in the MathML syntax:
«math Annotation markerxmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfrac»«mrow»«mn»25«/mn»«mo»,«/mo»«mn»0«/mn»«mo»§#160;«/mo»«mi»m«/mi»«mi»L«/mi»«mo»§#160;«/mo»«/mrow»«mrow»«mn»25«/mn»«mo»,«/mo»«mn»0«/mn»«mo»§#160;«/mo»«mi»m«/mi»«mi»L«/mi»«/mrow»«/mfrac»«mo»§#215;«/mo»«mfrac»«mrow»«mn»0«/mn»«mo»,«/mo»«mn»10«/mn»«mo»§#160;«/mo»«mi»m«/mi»«mi»o«/mi»«mi»l«/mi»«/mrow»«mrow»«mn»1000«/mn»«mo»§#160;«/mo»«mi»m«/mi»«mi»L«/mi»«/mrow»«/mfrac»«mo»§#215;«/mo»«/math»
This is because there is a space between math and xmlns.
I also tested with LaTeX and I get a span before and after: .
Is there any way the annotation form could display properly MathML and LaTeX?