gbranden pushed a commit to branch master
in repository groff.
commit 2b1ac62922d9fca8662d81663b00629243764a16
Author: Nguyễn Gia Phong <[email protected]>
AuthorDate: Wed Jul 8 11:14:03 2026 +0900
[eqn]: Emit better-formed XHTML/MathML. (1/3)
* src/preproc/eqn/box.cpp
(half_space_box::output)
(full_space_box::output)
(thick_space_box::output)
(thin_space_box::output):
* src/preproc/eqn/other.cpp
(overline_char_box::output)
(overline_box::output)
(underline_char_box::output)
(underline_box::output): Emit numeric character references, not named
entities, when generating MathML, because GNU eqn supports MathML only
when producing XHTML.
Begins fixing <https://savannah.gnu.org/bugs/?68499>.
---
ChangeLog | 17 +++++++++++++++++
src/preproc/eqn/box.cpp | 8 ++++----
src/preproc/eqn/other.cpp | 8 ++++----
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5b860735b..a0b3a0319 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2026-07-08 Nguyễn Gia Phong <[email protected]>
+
+ * src/preproc/eqn/box.cpp
+ (half_space_box::output)
+ (full_space_box::output)
+ (thick_space_box::output)
+ (thin_space_box::output):
+ * src/preproc/eqn/other.cpp
+ (overline_char_box::output)
+ (overline_box::output)
+ (underline_char_box::output)
+ (underline_box::output): Emit numeric character references, not
+ named entities, when generating MathML, because GNU eqn supports
+ MathML only when producing XHTML.
+
+ Begins fixing <https://savannah.gnu.org/bugs/?68499>.
+
2026-07-13 G. Branden Robinson <[email protected]>
* src/devices/grohtml/post-html.cpp (get_html_entity): Emit
diff --git a/src/preproc/eqn/box.cpp b/src/preproc/eqn/box.cpp
index 76b1a6e04..95a6139ee 100644
--- a/src/preproc/eqn/box.cpp
+++ b/src/preproc/eqn/box.cpp
@@ -654,7 +654,7 @@ void half_space_box::output()
if (output_format == troff)
printf("\\h'%dM'", half_space);
else if (output_format == mathml)
- printf("<mtext> </mtext>");
+ printf("<mtext> </mtext>");
else
assert("unimplemented output format");
}
@@ -669,7 +669,7 @@ void full_space_box::output()
if (output_format == troff)
printf("\\h'%dM'", full_space);
else if (output_format == mathml)
- printf("<mtext>  </mtext>");
+ printf("<mtext>  </mtext>");
else
assert("unimplemented output format");
}
@@ -684,7 +684,7 @@ void thick_space_box::output()
if (output_format == troff)
printf("\\h'%dM'", thick_space);
else if (output_format == mathml)
- printf("<mtext>  </mtext>");
+ printf("<mtext>  </mtext>");
else
assert("unimplemented output format");
}
@@ -699,7 +699,7 @@ void thin_space_box::output()
if (output_format == troff)
printf("\\h'%dM'", thin_space);
else if (output_format == mathml)
- printf("<mtext> </mtext>");
+ printf("<mtext> </mtext>");
else
assert("unimplemented output format");
}
diff --git a/src/preproc/eqn/other.cpp b/src/preproc/eqn/other.cpp
index 9781b7b92..72c5be63f 100644
--- a/src/preproc/eqn/other.cpp
+++ b/src/preproc/eqn/other.cpp
@@ -184,7 +184,7 @@ void overline_char_box::output()
get_param("x_height"));
}
else if (output_format == mathml)
- printf("<mo>¯</mo>");
+ printf("<mo>¯</mo>");
}
void overline_char_box::debug_print()
@@ -240,7 +240,7 @@ void overline_box::output()
else if (output_format == mathml) {
printf("<mover accent='false'>");
p->output();
- printf("<mo>¯</mo></mover>");
+ printf("<mo>¯</mo></mover>");
}
}
@@ -364,7 +364,7 @@ void underline_char_box::output()
printf("\\v'-%dM/2u'", 7 * get_param("default_rule_thickness"));
}
else if (output_format == mathml)
- printf("<mo>_</mo>");
+ printf("<mo>_</mo>");
}
void underline_char_box::debug_print()
@@ -422,7 +422,7 @@ void underline_box::output()
else if (output_format == mathml) {
printf("<munder accent='true'>");
p->output();
- printf("<mo>¯</mo></munder>");
+ printf("<mo>¯</mo></munder>");
}
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit