CVSROOT: /sources/groff
Module name: groff
Changes by: Eric S. Raymond <esr> 07/02/03 05:32:59
Modified files:
src/preproc/eqn: script.cpp
Log message:
The -TMathML option for eqn.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/script.cpp?cvsroot=groff&r1=1.3&r2=1.4
Patches:
Index: script.cpp
===================================================================
RCS file: /sources/groff/groff/src/preproc/eqn/script.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- script.cpp 26 May 2005 21:02:00 -0000 1.3
+++ script.cpp 3 Feb 2007 05:32:59 -0000 1.4
@@ -168,6 +168,7 @@
void script_box::output()
{
+ if (output_format == troff) {
p->output();
if (sup != 0) {
printf("\\Z" DELIMITER_CHAR);
@@ -188,6 +189,26 @@
}
printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
uid, p->uid);
+ } else if (output_format == mathml) {
+ if (sup != 0 and sub != 0) {
+ printf("<msubsup>");
+ p->output();
+ sub->output();
+ sup->output();
+ printf("</msubsup>");
+ } else if (sup != 0) {
+ printf("<msup>");
+ p->output();
+ sup->output();
+ printf("</msup>");
+ } else if (sub != 0) {
+ printf("<msub>");
+ p->output();
+ sub->output();
+ printf("</msub>");
+ }
+
+ }
}
void script_box::hint(unsigned flags)
_______________________________________________
Groff-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff-commit