From 9ebbfd6d0c013f13eb56569a08ae5c99c680b758 Mon Sep 17 00:00:00 2001 From: zorkow Date: Mon, 25 Sep 2023 14:29:39 +0200 Subject: [PATCH 1/2] Renames latex attribute to data-latex. --- ts/semantic_tree/semantic_mathml.ts | 4 ++-- ts/semantic_tree/semantic_util.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/semantic_tree/semantic_mathml.ts b/ts/semantic_tree/semantic_mathml.ts index 7b4334ef3..288b54497 100644 --- a/ts/semantic_tree/semantic_mathml.ts +++ b/ts/semantic_tree/semantic_mathml.ts @@ -624,8 +624,8 @@ export class SemanticMathml extends SemanticAbstractParser { ); // TODO (Euro): This should be safed earlier together with other attributes, // before processing is even called! - if (mml.hasAttribute('latex')) { - SemanticMap.LatexCommands.set(mml.getAttribute('latex'), mml.textContent); + if (mml.hasAttribute('data-latex')) { + SemanticMap.LatexCommands.set(mml.getAttribute('data-latex'), mml.textContent); } return node; } diff --git a/ts/semantic_tree/semantic_util.ts b/ts/semantic_tree/semantic_util.ts index fb85b50a4..b17d84515 100644 --- a/ts/semantic_tree/semantic_util.ts +++ b/ts/semantic_tree/semantic_util.ts @@ -210,7 +210,7 @@ export function addAttributes(to: SemanticNode, from: Element) { if (key.match(/texclass$/)) { to.attributes['texclass'] = attrs[i].value; } - if (key.toLowerCase() === 'latex') { + if (key.toLowerCase() === 'data-latex') { to.attributes['latex'] = attrs[i].value; } if (key === 'href') { From 6c73d520c9830f3f09df1ad563febb6e451f1662 Mon Sep 17 00:00:00 2001 From: zorkow Date: Tue, 26 Sep 2023 14:35:15 +0200 Subject: [PATCH 2/2] Update to latest version of MathJax use of latex elements. --- sre-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sre-tests b/sre-tests index 2e5e26a15..5afc4cdcc 160000 --- a/sre-tests +++ b/sre-tests @@ -1 +1 @@ -Subproject commit 2e5e26a15e864d7bf438e9e8c488572efa58c941 +Subproject commit 5afc4cdcc10727959d15f8d968cb99d4749095a9