-
Notifications
You must be signed in to change notification settings - Fork 9
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
Equation ID #872
Comments
Figured out the last question, one way to get the diff --git a/src/codecs/jats/index.ts b/src/codecs/jats/index.ts
index ef6a6e8c..d7f1572b 100644
--- a/src/codecs/jats/index.ts
+++ b/src/codecs/jats/index.ts
@@ -2125,11 +2125,14 @@ function decodeMath(
const image = decodeGraphic(graphic, inline)
return inline ? image : [stencila.paragraph({ content: image })]
}
-
+ const equationId = attr(formula, 'id') ?? ''
+ const altText = attr(mathml, "alttext") ?? ''
// Wrapper is needed to dump the entire math element
const text = xml.dump(elem('wrapper', mathml))
return [
(inline ? stencila.mathFragment : stencila.mathBlock)({
+ id: equationId,
+ meta: {altText: altText},
mathLanguage: 'mathml',
text,
}), |
I like the idea of capturing the alttext and agree that
Happy to consider alternatives. If you would like to progress this further a PR to |
🎉 This issue has been resolved in version 0.111.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When going e.g. from JATS with MathML to JSON i noted that an id like
doesn't get an id in the resulting output.
I've changed the following
Should i make a PR for this?
Another question, could the
alttext
attribute with the original TeX or screen reader information be a separate attribute?If yes, would that have to be added in the Math schema (https://schema.stenci.la/math) or meta field?
The text was updated successfully, but these errors were encountered: