[latex3-commits] [latex3/latex2e] latex-lab/uf-review-05: write html template (ac81ca36)
github at latex-project.org
github at latex-project.org
Mon Jan 22 23:41:25 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : latex-lab/uf-review-05
Link : https://github.com/latex3/latex2e/commit/ac81ca368096b9450e76cf1d153bde270ebf9b02
>---------------------------------------------------------------
commit ac81ca368096b9450e76cf1d153bde270ebf9b02
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Jan 22 23:41:25 2024 +0100
write html template
>---------------------------------------------------------------
ac81ca368096b9450e76cf1d153bde270ebf9b02
required/latex-lab/latex-lab-math.dtx | 11 ++++++
required/latex-lab/testfiles-math/mathml-write.lvt | 29 +++++++++++++++
required/latex-lab/testfiles-math/mathml-write.tlg | 22 +++++++++++
.../support/mathml-AF-ex1-mathml.xml | 43 ----------------------
4 files changed, 62 insertions(+), 43 deletions(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 6d6acbd1..a82a8988 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -712,7 +712,18 @@
{
\c_sys_jobname_str-mathml-template.html
}
+ \iow_now:Ne \g_@@_writehash_iow
+ {
+ <!DOCTYPE html>
+ \iow_newline:
+ <html>
+ }
\AssignSocketPlug {tagsupport/math/mathml/write}{On}
+ \AddToHook{enddocument/afterlastpage}
+ {
+ \iow_now:Nn \g_@@_writehash_iow {<html>}
+ \iow_close:N \g_@@_writehash_iow
+ }
},
mathml/writehash .usage:n=preamble
}
diff --git a/required/latex-lab/testfiles-math/mathml-write.lvt b/required/latex-lab/testfiles-math/mathml-write.lvt
new file mode 100644
index 00000000..bab5a606
--- /dev/null
+++ b/required/latex-lab/testfiles-math/mathml-write.lvt
@@ -0,0 +1,29 @@
+\ExplSyntaxOn
+\sys_gset_rand_seed:n{1000}
+\ExplSyntaxOff
+\DocumentMetadata{testphase={phase-III,math,table,title}, pdfversion=2.0,
+ pdfstandard=ua-2,
+}
+\input{regression-test}
+\documentclass{article}
+
+
+\SHOWFILE{mathml-write-mathml-template.html}
+
+\tagpdfsetup{math-tagging={mathml/writehash}}
+\begin{document}
+\START
+\title{Math Test One}
+\author{David}
+\maketitle
+
+\section{Math Tests}
+
+Some inline math, let $x$ and $y$ satisfy $x>y$.
+
+Some text, and an equation.
+\[
+\sqrt{x^2}=\lvert x\rvert
+\]
+
+\end{document}
diff --git a/required/latex-lab/testfiles-math/mathml-write.tlg b/required/latex-lab/testfiles-math/mathml-write.tlg
new file mode 100644
index 00000000..2c8f0a2e
--- /dev/null
+++ b/required/latex-lab/testfiles-math/mathml-write.tlg
@@ -0,0 +1,22 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+WARNING: mathml missing for hash9DD4E461268C8034F5C8564E155C67A6
+====>subpart splitting deactivated
+====>grabbed math=macro:->x
+WARNING: mathml missing for hash415290769594460E2E485922904F345D
+====>subpart splitting deactivated
+====>grabbed math=macro:->y
+WARNING: mathml missing for hash10342149CD04422C7BE79506CB544AC5
+====>subpart splitting deactivated
+====>grabbed math=macro:->x>y
+WARNING: mathml missing for hashD618B2AAA114982934BBC21847962F30
+====>subpart splitting deactivated
+====>grabbed math=macro:->\sqrt {x^2}=\lvert x\rvert
+[1
+] (mathml-write.aux)
+MathML statistic
+================
+==> 0 MathML fragments read
+==> 0 different MathML fragments
+==> 4 math fragments found
+==> 0 MathML AF attached
diff --git a/required/latex-lab/testfiles-math/support/mathml-AF-ex1-mathml.xml b/required/latex-lab/testfiles-math/support/mathml-AF-ex1-mathml.xml
deleted file mode 100644
index 4d338e57..00000000
--- a/required/latex-lab/testfiles-math/support/mathml-AF-ex1-mathml.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<x>
-
- \mml{1}
- {\begin{math}x\end{math}}
- {9DD4E461268C8034F5C8564E155C67A6}
- {<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
- <mi>x</mi>
-</math>%
-}
-
-\mml{2}
-{\begin{math}y\end{math}}
-{415290769594460E2E485922904F345D}
-{%
-<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
- <mi>y</mi>
-</math>%
-}
-
-\mml{3}
-{\begin{math}x>y\end{math}}
-{10342149CD04422C7BE79506CB544AC5}
-{%
-<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">
- <mi>x</mi>
- <mo>></mo>
- <mi>y</mi>
-</math>%
-}
-
-
-\mml{4}
-{\begin{equation*}\sqrt{x^2}=\lvert x\rvert\end{equation*}}
-{D618B2AAA114982934BBC21847962F30}
-{%
-<math xmlns="http://www.w3.org/1998/Math/MathML">
- <msqrt><msup><mi>x</mi><mn>2</mn></msup></msqrt>
- <mo>=</mo>
- <mrow intent="absolute-value($x)"><mo>|</mo><mi arg="x">x</mi><mo>|</mo></mrow>
-</math>%
-}
-
-</x>
More information about the latex3-commits
mailing list.