Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty annotation elements trigger Math Processing Error #805

Closed
pkra opened this issue May 2, 2014 · 11 comments

Comments

Projects
None yet
3 participants
@pkra
Copy link
Member

commented May 2, 2014

See also mathjax/ctop#29.

I'm wondering if MathJax can be more graceful than a full Math Processing Error for the entire equation? The way I read the spec, empty annotation elements are valid (but I might be wrong).

  <math>
       <semantics> 
          <annotation> 
          </annotation> 
        </semantics> 
   </math>
@davidcarlisle

This comment has been minimized.

Copy link

commented May 2, 2014

On 2 May 2014 11:07, Peter Krautzberger notifications@github.com wrote:

See also mathjax/ctop#29 mathjax/ctop#29.

I'm wondering if MathJax can be more graceful than a full Math Processing
Error for the entire equation? The way I read the spec, empty annotation
elements are valid (but I might be wrong).


Reply to this email directly or view it on GitHubhttps://github.com//issues/805
.

an empty annotation is OK, but there should be exactly one element before
the annotation as first child of the semantics, which is the thing being
annotated. sadly the mathml2 default dtd didn't catch this and the idiom of
annotating nothing is used in some places (eg to smuggle svg in) so you
may see it in the wild.

David

http://dpcarlisle.blogspot.com/

@pkra

This comment has been minimized.

Copy link
Member Author

commented May 2, 2014

Thanks for the correction, @davidcarlisle MathJax does not throw an error if there is a non-annotation element present as first child, so this isn't a bug.

Still, it seems to me that this shouldn't cause the entire equation to break. I guess #487 might resolve this automatically but if we keep the xml parser as an option, then we might want to fix this.

@dpvc

This comment has been minimized.

Copy link
Member

commented May 2, 2014

It is not a problem of the parser, it is a bug in the HTML-CSS output jax. There are a number of places where a missing or empty element causes problems like this. It should be fixed.

@pkra

This comment has been minimized.

Copy link
Member Author

commented May 2, 2014

Thanks for the correction.

@dpvc dpvc added the Accepted label May 12, 2014

@pkra pkra added this to the Next Release milestone Aug 18, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 19, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Aug 19, 2014

The issue805 branch of my fork of MathJax includes a fix to prevent the error message.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 19, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Aug 20, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Aug 20, 2014

==> Merged.

@dpvc dpvc closed this Aug 20, 2014

@dpvc dpvc added Merged and removed Ready for Review labels Aug 20, 2014

@pkra pkra self-assigned this Jan 15, 2015

@pkra

This comment has been minimized.

Copy link
Member Author

commented Jan 16, 2015

I was writing a test when I noticed that the issue affects the CommonHTML output as well. Should I open a new item?

@pkra

This comment has been minimized.

Copy link
Member Author

commented Jan 16, 2015

On second thought, perhaps #1006 is already suitable.

pkra added a commit to mathjax/MathJax-test that referenced this issue Jan 16, 2015

@dpvc

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

I'm not sure I see the connection to 1006. In any case, I've pushed a commit that resolves the issue for semantics.

@pkra

This comment has been minimized.

Copy link
Member Author

commented Jan 16, 2015

Works for me. (I mentioned #1006 because that's also an issue about dealing with invalid MathML so I wasn't sure if they're related.)

dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Jan 20, 2015

@dpvc dpvc added Test Available and removed Test Needed labels Jan 20, 2015

@dpvc

This comment has been minimized.

Copy link
Member

commented Jan 20, 2015

==> In Testsuite

MathMLToDisplay/ErrorHandling/issue805.html

@dpvc dpvc removed the Merged label Jan 30, 2015

@dpvc dpvc added Fixed v2.5 labels Jan 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.