groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff ChangeLog MORE.STUFF src/preproc/eqn/box....


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog MORE.STUFF src/preproc/eqn/box....
Date: Mon, 05 Feb 2007 15:24:56 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Werner LEMBERG <wl>     07/02/05 15:24:56

Modified files:
        .              : ChangeLog MORE.STUFF 
        src/preproc/eqn: box.cpp delim.cpp eqn.h eqn.man lex.cpp 
                         limit.cpp list.cpp main.cpp other.cpp over.cpp 
                         pile.cpp script.cpp special.cpp sqrt.cpp 
                         text.cpp 

Log message:
        * src/preproc/eqn/eqn.man: Revised.
        
        * src/preproc/eqn/text.cpp (map, special_char_boc::output): Use
        `const'.
        (spacing_type): Fix typo.
        (special_to_entity): Use `const'.
        Remove unused variable.
        * src/preproc/eqn/other.cpp (font_box::output): Use `const'.
        
        Formatting, copyright years.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1041&r2=1.1042
http://cvs.savannah.gnu.org/viewcvs/groff/MORE.STUFF?cvsroot=groff&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/box.cpp?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/delim.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/eqn.h?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/eqn.man?cvsroot=groff&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/lex.cpp?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/limit.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/list.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/main.cpp?cvsroot=groff&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/other.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/over.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/pile.cpp?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/script.cpp?cvsroot=groff&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/special.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/sqrt.cpp?cvsroot=groff&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/groff/src/preproc/eqn/text.cpp?cvsroot=groff&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1041
retrieving revision 1.1042
diff -u -b -r1.1041 -r1.1042
--- ChangeLog   5 Feb 2007 09:43:46 -0000       1.1041
+++ ChangeLog   5 Feb 2007 15:24:56 -0000       1.1042
@@ -1,3 +1,14 @@
+2007-02-05  Werner LEMBERG  <address@hidden>
+
+       * src/preproc/eqn/eqn.man: Revised.
+
+       * src/preproc/eqn/text.cpp (map, special_char_boc::output): Use
+       `const'.
+       (spacing_type): Fix typo.
+       (special_to_entity): Use `const'.
+       Remove unused variable.
+       * src/preproc/eqn/other.cpp (font_box::output): Use `const'.
+
 2007-02-05  Eric S. Raymond  <address@hidden>
 
        * src/devices/grotty/grotty.man: \m[] and \M[] aren't portable,
@@ -23,6 +34,79 @@
 
        * MORE.STUFF: More-stuff entries for doclifter and pic2plot.
 
+
+       Add support for MathML output to eqn.  
+
+       The strategy used is very simple and relies on the fact that the box
+       models of eqn and Presentation MathML differ in only trivial ways. 
+       It leaves the grammar and existing internal object structures
+       unchanged.  A new global, `output_format', is defined as an
+       enumerated type with values {troff, mathml}.  Most of the functions
+       and methods that emit actual output acquire a top-level conditional,
+       dispatching on this global, which has one arm for troff mode and one
+       for MathML mode.  In most cases the MathML arm is drastically
+       simpler.
+
+       (This strategy could be easily generalized to support other output
+       formats.  TeX is a possibility that leaps to mind.)
+
+       The only even moderately tricky changes are in the lexer.  Some of
+       the predefined macros used constructs like `up', `down', `fwd',
+       `back', and `vcenter' that have no equivalents in MathML.  I
+       attacked this problem in these ways:
+
+       1. I eliminated three uses of `back' to compose characters in favor
+          of using equivalent groff specials `\(<<', `\(>>', and `\(<>'
+          that did not exist when these macros were written.  (This will be
+          a quality improvement for troff users.)
+
+       2. I eliminated one use of `vcenter' by using \\(md.  (Likewise...)
+
+       3. I then split the table of pre-definitions in three; one large
+          common table and two small troff-specific and MathML-specific
+          tables.  Use of troff-only operations (up, down, back, fwd,
+          vcenter) is now confined to the former.  The latter now uses
+          `size big' and drops out the explicit positioning operations,
+          counting on MathML processors to do them.
+
+       POTENTIAL TROUBLE SPOTS:
+
+       Here are notes for reviewers on places I'm not 100% sure I've done
+       the right thing:
+
+       * In the process of preparing the troff table, I translated three
+         definitions (dot_def, dotdot_def, and utilde def) that previously
+         used explicit \v escapes to use `up' and `down' instead.  I
+         modeled the new definitions on the way `vec' and `dyad' work, but
+         it's possible I got something subtle wrong.
+
+       * I'm not certain the MathML implementation of font_box::output() is
+         right, because I don't quite get what the switcheroo between
+         `current_roman_font' and `old_roman_font' is supposed to
+         accomplish.  It does seem to generare good MathML, though.
+
+       Finally, I made one purely cosmetic change in `text.cpp'; I replaced
+       with an enum some magic numbers for spacing types that I thought
+       were too ugly to live.
+
+       REMAINING ISSUES:
+
+       The entirety of eqn is translated when `-TMathML' is specified, 
+       with the following exceptions...
+
+       Limitations that cannot be fixed include non-support for special,
+       up/down/fwd/back, and vcenter.
+
+       Limitations that might be fixable include non-support for mark and
+       lineup.  I will investigate further, but if these can be implemented
+       at all it's going to be in a very complicated and nasty way.
+
+       The way character boxes are output means that each digit of a
+       multi-digit number gets its own <mn></mn> tag pair in the MathHTML. 
+       While this is not technically wrong for Presentation MathML, it is
+       ugly and inefficient.  Fixing this will require implementing a
+       little state machine in the `text.cpp' output method.
+
        * src/preproc/eqn/box.cpp, src/preproc/eqn/delim.cpp, 
        src/preproc/eqn/eqn.h, src/preproc/eqn/eqn.man, 
        src/preproc/eqn/lex.cpp, src/preproc/eqn/limit.cpp,
@@ -32,6 +116,8 @@
        src/preproc/eqn/sqrt.cpp, src/preproc/eqn/text.cpp,
        src/preproc/eqn/eqn.man: MathML output mode.
 
+       * NEWS: Document it.
+
 2007-02-02  Eric S. Raymond  <address@hidden>
 
        * src/roff/groff/groff.man: Converted to use .SY/.OP/.YS

Index: MORE.STUFF
===================================================================
RCS file: /cvsroot/groff/groff/MORE.STUFF,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- MORE.STUFF  3 Feb 2007 05:44:10 -0000       1.19
+++ MORE.STUFF  5 Feb 2007 15:24:56 -0000       1.20
@@ -151,6 +151,7 @@
 The plotutils package is available at
 
   http://www.gnu.org/software/plotutils/
+
 miscellaneous
 -------------
 

Index: src/preproc/eqn/box.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/box.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/preproc/eqn/box.cpp     3 Feb 2007 05:32:47 -0000       1.4
+++ src/preproc/eqn/box.cpp     5 Feb 2007 15:24:56 -0000       1.5
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004
+/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -253,9 +253,9 @@
     printf(".eo\n");
     printf(".as " LINE_STRING " \"%s\n", s);
     printf(".ec\n");
-  } else if (output_format == mathml) {
-    fputs(s, stdout);
   }
+  else if (output_format == mathml)
+    fputs(s, stdout);
 }
 
 void set_minimum_size(int n)
@@ -349,7 +349,8 @@
       printf(".ne \\n[" HEIGHT_FORMAT "]u-%dM>?0+(\\n["
             DEPTH_FORMAT "]u-%dM>?0)\n",
             b->uid, body_height, b->uid, body_depth);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<math>");
     b->output();
     printf("</math>");

Index: src/preproc/eqn/delim.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/delim.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/delim.cpp   3 Feb 2007 05:32:48 -0000       1.3
+++ src/preproc/eqn/delim.cpp   5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.
@@ -384,7 +385,8 @@
     p->output();
     if (right)
       printf("\\*[" RIGHT_DELIM_STRING_FORMAT "]", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mrow><mo>%s</mo>", left);
     p->output();
     printf("<mo>%s</mo></mrow>", right);

Index: src/preproc/eqn/eqn.h
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/eqn.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/preproc/eqn/eqn.h       3 Feb 2007 05:32:49 -0000       1.4
+++ src/preproc/eqn/eqn.h       5 Feb 2007 15:24:56 -0000       1.5
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.

Index: src/preproc/eqn/eqn.man
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/eqn.man,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- src/preproc/eqn/eqn.man     3 Feb 2007 05:32:50 -0000       1.11
+++ src/preproc/eqn/eqn.man     5 Feb 2007 15:24:56 -0000       1.12
@@ -1,5 +1,6 @@
 .ig
-Copyright (C) 1989-2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+Copyright (C) 1989-2000, 2001, 2004, 2005, 2007
+  Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -32,13 +33,6 @@
 ..
 .
 .
-.de TQ
-.  br
-.  ns
-.  TP \\$1
-..
-.
-.
 .\" The BSD man macros can't handle " in arguments to font change macros,
 .\" so use \(ts instead of ".
 .tr \(ts"
@@ -48,20 +42,11 @@
 .
 .
 .SH NAME
address@hidden@eqn \- format equations for troff
address@hidden@eqn \- format equations for troff or MathML
 .
 .
 .SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'address@hidden@eqn 'u
-.ti \niu
-.B @address@hidden
-.de OP
-.  ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.  el .RB "[\ " "\\$1" "\ ]"
-..
+.SY @address@hidden
 .OP \-rvCNR
 .OP \-d xy
 .OP \-T name
@@ -70,9 +55,8 @@
 .OP \-s n
 .OP \-p n
 .OP \-m n
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
+.RI [ files\|.\|.\|. ]
+.YS
 .
 .LP
 It is possible to have whitespace between a command line option and its
@@ -97,11 +81,10 @@
 .B eqn
 cannot be processed with Unix troff;
 it must be processed with GNU troff.
-If no files are given on the command line, the standard input
-will be read.
+If no files are given on the command line, the standard input is read.
 A filename of
 .B \-
-will cause the standard input to be read.
+causes the standard input to be read.
 .
 .LP
 .B eqn
@@ -116,7 +99,7 @@
 .BR @MACRODIR@ .
 If it exists,
 .B eqn
-will process it before the other input files.
+processes it before the other input files.
 The
 .B \-R
 option prevents this.
@@ -130,6 +113,7 @@
 .
 .
 .SH OPTIONS
+.
 .TP
 .BI \-d xy
 Specify delimiters
@@ -168,7 +152,7 @@
 The minimum point-size is\~\c
 .IR n .
 .B eqn
-will not reduce the size of subscripts or superscripts to
+does not reduce the size of subscripts or superscripts to
 a smaller size than\~\c
 .IR n .
 .
@@ -181,11 +165,11 @@
 with a value of\~\c
 .BR 1 ;
 .B eqnrc
-will use this to provide definitions appropriate for the output device.
-However, if the specified device is "MathML", the output will be
+uses this to provide definitions appropriate for the output device.
+However, if the specified device is \[lq]MathML\[rq], the output is
 MathML markup rather than troff commands, and 
 .B eqnrc
-will not be loaded at all.
+is not loaded at all.
 The default output device is
 .BR @DEVICE@ .
 .
@@ -215,7 +199,7 @@
 command.
 This option is deprecated.
 .B eqn
-will normally set equations at whatever the current point size
+normally sets equations at whatever the current point size
 is when the equation is encountered.
 .
 .TP
@@ -226,8 +210,8 @@
 This option is deprecated. 
 Normally
 .B eqn
-makes sets subscripts and superscripts at 70% 
-of the size of the surrounding text.
+sets subscripts and superscripts at 70% of the size of the
+surrounding text.
 .
 .
 .SH USAGE
@@ -238,7 +222,7 @@
 GNU
 .B eqn
 emits Presentation MathML output when invoked with the 
-,B -T MathML
+.B "-T\~MathML"
 option.
 .
 .LP
@@ -358,11 +342,20 @@
 .
 .SS New primitives
 .TP
-.IB big\ e1
+.BI big\  e
 Enlarges the expression it modifies; intended to have semantics like 
-CSS 'large'.  In troff output, the point size is increased by 5; in 
-MathML output, the expression is wrapped in an <mstyle mathsize='big'>
-pair.
+CSS `large'.
+In troff output, the point size is increased by\~5;
+in MathML output, the expression uses
+.
+.RS
+.IP
+.EX
+<mstyle \%mathsize='big'>
+.EE
+.RE
+.
+.TP
 .IB e1\  smallover\  e2
 This is similar to
 .BR over ;
@@ -404,6 +397,7 @@
 { type "operator" vcenter size +5 \e(*S }
 .RE
 .
+.IP
 (Note that vcenter is silently ignored when generating MathML.)
 .
 .TP
@@ -415,7 +409,7 @@
 .I e2
 is assumed to be at the correct height for a lowercase letter;
 .I e2
-will be moved down according if
+is moved down according to whether
 .I e1
 is taller or shorter than a lowercase letter.
 For example,
@@ -448,7 +442,7 @@
 .I e2
 is assumed to be at the correct height for a character without a descender;
 .I e2
-will be moved down if
+is moved down if
 .I e1
 has a descender.
 .B utilde
@@ -470,8 +464,7 @@
 .I text
 is not subject to macro expansion because it is quoted;
 .I text
-will be split up and the spacing between individual characters
-will be adjusted.
+is split up and the spacing between individual characters is adjusted.
 .
 .TP
 .BI nosplit\  text
@@ -485,10 +478,10 @@
 .IP
 but because
 .I text
-is not quoted it will be subject to macro expansion;
+is not quoted it is subject to macro expansion;
 .I text
-will not be split up
-and the spacing between individual characters will not be adjusted.
+is not split up
+and the spacing between individual characters is not adjusted.
 .
 .TP
 .IB e\  opprime
@@ -504,14 +497,14 @@
 .B opprime
 the\~\c
 .B 1
-will be tucked under the prime as a subscript to the\~\c
+is tucked under the prime as a subscript to the\~\c
 .B A
 (as is conventional in mathematical typesetting),
 whereas with
 .B prime
 the\~\c
 .B 1
-will be a subscript to the prime character.
+is a subscript to the prime character.
 The precedence of
 .B opprime
 is the same as that of
@@ -524,7 +517,7 @@
 .BR uaccent .
 In unquoted text a\~\c
 .B '
-that is not the first character will be treated like
+that is not the first character is treated like
 .BR opprime .
 .
 .TP
@@ -538,7 +531,7 @@
 When the macro is called,
 the string
 .B 0s
-will contain the output for\~\c
+contains the output for\~\c
 .IR e ,
 and the number registers
 .BR 0w ,
@@ -547,7 +540,7 @@
 .BR 0skern ,
 and
 .BR 0skew
-will contain the width, height, depth, subscript kern, and skew of\~\c
+contain the width, height, depth, subscript kern, and skew of\~\c
 .IR e .
 (The
 .I "subscript kern"
@@ -558,7 +551,7 @@
 accent over the object should be placed.)
 The macro must modify
 .B 0s
-so that it will output the desired result with its origin at the current
+so that it outputs the desired result with its origin at the current
 point, and increase the current horizontal position by the width
 of the object.
 The number registers must also be modified so that they correspond to the
@@ -732,7 +725,7 @@
 .  TP
 .B minimum_size
 .B eqn
-will not set anything at a smaller point-size than this.
+doesn't set anything at a smaller point-size than this.
 The value is in points.
 .
 .TP
@@ -742,14 +735,20 @@
 primitive emboldens an equation
 by overprinting two copies of the equation
 horizontally offset by this amount.
-(This parameter is not used in MathML mode; instead, fat text is
-wrapped in an <mstyle mathvariant='bold'> tag pair.)
+This parameter is not used in MathML mode; instead, fat text uses
+.
+.RS
+.IP
+.EX
+<mstyle mathvariant='bold'>
+.EE
+.RE
 .
 .TP
 .B over_hang
-A fraction bar will be longer by twice this amount than
+A fraction bar is longer by twice this amount than
 the maximum of the widths of the numerator and denominator;
-in other words, it will overhang the numerator and
+in other words, it overhangs the numerator and
 denominator by at least this amount.
 .
 .TP
@@ -759,7 +758,7 @@
 or
 .B under
 is applied to a single character,
-the line will be this long.
+the line is this long.
 Normally,
 .B bar
 or
@@ -774,7 +773,7 @@
 .B left
 and
 .B right
-primitives will have a combined height and depth of at least this many
+primitives have a combined height and depth of at least this many
 thousandths of twice the maximum amount by which the sub-equation that
 the delimiters enclose extends away from the axis.
 .
@@ -784,7 +783,7 @@
 .B left
 and
 .B right
-primitives will have a combined height and depth
+primitives have a combined height and depth
 not less than the difference of
 twice the maximum amount by which the sub-equation that
 the delimiters enclose extends away from the axis
@@ -837,29 +836,29 @@
 .B num1
 The
 .B over
-command will shift up the numerator by at least this amount.
+command shifts up the numerator by at least this amount.
 .
 .TP
 .B num2
 The
 .B smallover
-command will shift up the numerator by at least this amount.
+command shifts up the numerator by at least this amount.
 .
 .TP
 .B denom1
 The
 .B over
-command will shift down the denominator by at least this amount.
+command shifts down the denominator by at least this amount.
 .
 .TP
 .B denom2
 The
 .B smallover
-command will shift down the denominator by at least this amount.
+command shifts down the denominator by at least this amount.
 .
 .TP
 .B sup1
-Normally superscripts will be shifted up by at least this amount.
+Normally superscripts are shifted up by at least this amount.
 .
 .TP
 .B sup2
@@ -867,63 +866,63 @@
 or numerators of
 .B smallover
 fractions
-will be shifted up by at least this amount.
+are shifted up by at least this amount.
 This is usually less than sup1.
 .
 .TP
 .B sup3
 Superscripts within denominators or square roots
-or subscripts or lower limits will be shifted up by at least
+or subscripts or lower limits are shifted up by at least
 this amount.
 This is usually less than sup2.
 .
 .TP
 .B sub1
-Subscripts will normally be shifted down by at least this amount.
+Subscripts are normally shifted down by at least this amount.
 .
 .TP
 .B sub2
 When there is both a subscript and a superscript, the subscript
-will be shifted down by at least this amount.
+is shifted down by at least this amount.
 .
 .TP
 .B sup_drop
-The baseline of a superscript will be no more
+The baseline of a superscript is no more
 than this much amount below the top of the object on
 which the superscript is set.
 .
 .TP
 .B sub_drop
-The baseline of a subscript will be at least this much below
+The baseline of a subscript is at least this much below
 the bottom of the object on which the subscript is set.
 .
 .TP
 .B big_op_spacing1
-The baseline of an upper limit will be at least this
+The baseline of an upper limit is at least this
 much above the top of the object on which the limit is set.
 .
 .TP
 .B big_op_spacing2
-The baseline of a lower limit will be at least this
+The baseline of a lower limit is at least this
 much below the bottom of the object on which the limit is set.
 .
 .TP
 .B big_op_spacing3
-The bottom of an upper limit will be at least this much above the
+The bottom of an upper limit is at least this much above the
 top of the object on which the limit is set.
 .
 .TP
 .B big_op_spacing4
-The top of a lower limit will be at least this much below
+The top of a lower limit is at least this much below
 the bottom of the object on which the limit is set.
 .
 .TP
 .B big_op_spacing5
-This much vertical space will be added above and below limits.
+This much vertical space is added above and below limits.
 .
 .TP
 .B baseline_sep
-The baselines of the rows in a pile or matrix will normally be
+The baselines of the rows in a pile or matrix are normally
 this far apart.
 In most cases this should be equal to the sum of
 .B num1
@@ -933,21 +932,21 @@
 .TP
 .B shift_down
 The midpoint between the top baseline and the bottom baseline
-in a matrix or pile will be shifted down by this much from the axis.
+in a matrix or pile is shifted down by this much from the axis.
 In most cases this should be equal to
 .BR axis_height .
 .
 .TP
 .B column_sep
-This much space will be added between columns in a matrix.
+This much space is added between columns in a matrix.
 .
 .TP
 .B matrix_side_sep
-This much space will be added at each side of a matrix.
+This much space is added at each side of a matrix.
 .
 .TP
 .B draw_lines
-If this is non-zero, lines will be drawn using the
+If this is non-zero, lines are drawn using the
 .B \eD
 escape sequence, rather than with the
 .B \el
@@ -958,7 +957,7 @@
 .TP
 .B body_height
 The amount by which the height of the equation exceeds this
-will be added as extra space before the line containing the equation
+is added as extra space before the line containing the equation
 (using
 .BR \ex ).
 The default value is 85.
@@ -966,7 +965,7 @@
 .TP
 .B body_depth
 The amount by which the depth of the equation exceeds this
-will be added as extra space after the line containing the equation
+is added as extra space after the line containing the equation
 (using
 .BR \ex ).
 The default value is 35.
@@ -976,18 +975,18 @@
 If this is non-zero,
 then
 .B ndefine
-will behave like
+behaves like
 .B define
 and
 .B tdefine
-will be ignored,
+is ignored,
 otherwise
 .B tdefine
-will behave like
+behaves like
 .B define
 and
 .B ndefine
-will be ignored.
+is ignored.
 The default value is\~0
 (This is typically changed to\~1 by the
 .B eqnrc
@@ -1012,19 +1011,19 @@
 where
 .I n
 is between 1 and\~9,
-will be replaced by the
+is replaced by the
 .IR n-th
 argument if the macro is called with arguments;
 if there are fewer than
 .I n\~\c
-arguments, it will be replaced by nothing.
+arguments, it is replaced by nothing.
 A word containing a left parenthesis where the part of the word
 before the left parenthesis has been defined using the
 .B define
 command
-will be recognized as a macro call with arguments;
+is recognized as a macro call with arguments;
 characters following the left parenthesis
-up to a matching right parenthesis will be treated as comma-separated
+up to a matching right parenthesis are treated as comma-separated
 arguments;
 commas inside nested parentheses do not terminate an argument.
 .
@@ -1034,7 +1033,7 @@
 .B define
 command, but
 .I name
-will not be recognized if called with arguments.
+is not recognized if called with arguments.
 .
 .TP
 .BI include\ \(ts file \(ts
@@ -1052,7 +1051,7 @@
 .B .EQ
 or
 .B .EN
-will be ignored.
+are ignored.
 .
 .TP
 .BI ifdef\  name\ X\ anything\ X
@@ -1149,10 +1148,10 @@
 command described above.
 A type of
 .B letter
-will cause a character to be set in italic type.
+causea a character to be set in italic type.
 A type of
 .B digit
-will cause a character to be set in roman type.
+causea a character to be set in roman type.
 .
 .
 .SH FILES
@@ -1163,12 +1162,15 @@
 .SH MATHML MODE LIMITATIONS
 MathML is designed on the assumption that it cannot know the exact
 physical characteristics of the media and devices on which it will
-be rendered.  It does not support fine control of motions and sizes
-to the same degree troff does. Thus:
+be rendered.
+It does not support fine control of motions and sizes to the same
+degree troff does.
+Thus:
+.
 .IP * 
 .B eqn
 parameters have no effect on the generated MathML.
-.LP
+.
 .IP *
 The 
 .BR special,
@@ -1176,46 +1178,56 @@
 .BR down ,
 .BR fwd ,
 and
-.BR back ,
-operations cannot be implemented, and will yield a
-MathML <merror> message instead.  
+.B back
+operations cannot be implemented, and yields a
+MathML `<merror>' message instead.  
+.
 .IP *
 The
 .B vcenter
 keyword is silently ignored, as centering on the math axis is the
 MathML default.
+.
 .IP *
-Characters that eqn over troff sets extra large - notably the integral
-sign - may appear too small and need to have their <mstyle> wrappers 
+Characters that
+.B eqn
+over troff sets extra large \(en notably the integral sign \(en
+may appear too small and need to have their `<mstyle>' wrappers 
 adjusted by hand.
+.
 .LP
 As in its troff mode,
 .B eqn
-in MathML mode leaves the .EQ and .EN delimiters in place for 
-displayed equations, but emits no explicit delimiters around
-inline equations.  They can, however, be recognized as strings
-that begin with <math> and end with </math> and do not cross
-line boundaries.
+in MathML mode leaves the
+.B .EQ
+and
+.B .EN
+delimiters in place for displayed equations, but emits no explicit
+delimiters around inline equations.
+They can, however, be recognized as strings that begin with `<math>'
+and end with `</math>' and do not cross line boundaries.
+.
 .LP
 See the 
 .B BUGS
 section for translation limits specific to 
 .BR eqn .
 .
+.
 .SH BUGS
-Inline equations will be set at the point size that is current at the
+Inline equations are set at the point size that is current at the
 beginning of the input line.
 .
 In MathML mode, the
-.BR mark,
+.B mark
 and
 .B lineup
-features don't work.  These could, in theory, be implemented with 
-<maligngroup> elements.
+features don't work.
+These could, in theory, be implemented with `<maligngroup>' elements.
 .
 In MathML mode, each digit of a numeric literal gets a separate
-<mn></mn> pair and decimal points get an <mo></mo>.  This is
-allowed by the specification, but inefficient.
+`<mn>\:</mn>' pair, and decimal points are tagged with `<mo>\:</mo>'.
+This is allowed by the specification, but inefficient.
 .
 .
 .SH "SEE ALSO"

Index: src/preproc/eqn/lex.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/lex.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/preproc/eqn/lex.cpp     3 Feb 2007 05:32:51 -0000       1.4
+++ src/preproc/eqn/lex.cpp     5 Feb 2007 15:24:56 -0000       1.5
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2005, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -301,7 +301,8 @@
       def->is_simple = 1;
       macro_table.define(troff_defs[i].name, def);
     }
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     for (i = 0; i < sizeof(mathml_defs)/sizeof(mathml_defs[0]); i++) {
       definition *def = new definition[1];
       def->is_macro = 1;

Index: src/preproc/eqn/limit.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/limit.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/limit.cpp   3 Feb 2007 05:32:52 -0000       1.3
+++ src/preproc/eqn/limit.cpp   5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.
@@ -167,19 +168,22 @@
     p->output();
     printf(DELIMITER_CHAR);
     printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     if (from != 0 && to != 0) {
       printf("<munderover>");
       p->output();
       from->output();
       to->output();
       printf("</munderover>");
-    } else if (from != 0) {
+    }
+    else if (from != 0) {
       printf("<munder>");
       p->output();
       from->output();
       printf("</munder>");
-    }  else if (to != 0) {
+    }
+    else if (to != 0) {
       printf("<mover>");
       p->output();
       to->output();

Index: src/preproc/eqn/list.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/list.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/list.cpp    3 Feb 2007 05:32:53 -0000       1.3
+++ src/preproc/eqn/list.cpp    5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2007 Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.

Index: src/preproc/eqn/main.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/main.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/preproc/eqn/main.cpp    3 Feb 2007 07:26:32 -0000       1.5
+++ src/preproc/eqn/main.cpp    5 Feb 2007 15:24:56 -0000       1.6
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2005
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2005, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -309,7 +309,8 @@
       if (strcmp(device, "ps:html") == 0) {
        device = "ps";
        html = 1;
-      } else if (strcmp(device, "MathML") == 0) {
+      }
+      else if (strcmp(device, "MathML") == 0) {
        output_format = mathml;
        load_startup_file = 0;
       }

Index: src/preproc/eqn/other.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/other.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/other.cpp   3 Feb 2007 05:32:55 -0000       1.3
+++ src/preproc/eqn/other.cpp   5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.
@@ -77,7 +78,8 @@
           SKEW_FORMAT "]u)'",
           p->uid, ab->uid, p->uid);
     p->output();
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mover accent='true'>");
     p->output();
     ab->output();
@@ -131,7 +133,8 @@
     p->output();
     printf(DELIMITER_CHAR);
     printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mover accent='true'>");
     p->output();
     ab->output();
@@ -172,9 +175,9 @@
     printf((draw_flag ? "\\D'l%dM 0'" : "\\l'%dM\\&\\(ru'"),
           accent_width);
     printf("\\v'%dM/2u+%dM'", 7*default_rule_thickness, x_height);
-  } else if (output_format == mathml) {
-    printf("<mo>&macr;</mo>");
   }
+  else if (output_format == mathml)
+    printf("<mo>&macr;</mo>");
 }
 
 void overline_char_box::debug_print()
@@ -226,7 +229,8 @@
       printf("\\l'\\n[" WIDTH_FORMAT "]u\\&\\(ru'", p->uid);
     printf(DELIMITER_CHAR);
     p->output();
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mover accent='false'>");
     p->output();
     printf("<mo>&macr;</mo></mover>");
@@ -304,7 +308,8 @@
     p->output();
     printf(DELIMITER_CHAR);
     printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<munder accent='true'>");
     p->output();
     ab->output();
@@ -350,9 +355,9 @@
     printf((draw_flag ? "\\D'l%dM 0'" : "\\l'%dM\\&\\(ru'"),
           accent_width);
     printf("\\v'-%dM/2u'", 7*default_rule_thickness);
-  } else if (output_format == mathml) {
-    printf("<mo>&lowbar;</mo>");
   }
+  else if (output_format == mathml)
+    printf("<mo>&lowbar;</mo>");
 }
 
 void underline_char_box::debug_print()
@@ -406,7 +411,8 @@
       printf("\\l'\\n[" WIDTH_FORMAT "]u\\&\\(ru'", p->uid);
     printf(DELIMITER_CHAR);
     p->output();
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<munder accent='true'>");
     p->output();
     printf("<mo>&macr;</mo></munder>");
@@ -450,7 +456,8 @@
     printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid);
     p->output();
     printf("\\s[\\n[" SIZE_FORMAT "]u]", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mstyle mathsize='%s'>", size);
     p->output();
     printf("</mstyle>");
@@ -503,17 +510,21 @@
     p->output();
     current_roman_font = old_roman_font;
     printf("\\f[\\n[" FONT_FORMAT "]]", uid);
-  } else if (output_format == mathml) {
-    char *mlfont = f;
+  }
+  else if (output_format == mathml) {
+    const char *mlfont = f;
     // bold and italic are already in MathML; translate eqn roman here
     switch (f[0]) {
-    case 'I': case 'i':
+    case 'I':
+    case 'i':
       mlfont = "italic";
       break;
-    case 'B': case 'b':
+    case 'B':
+    case 'b':
       mlfont = "bold";
       break;
-    case 'R': case 'r':
+    case 'R':
+    case 'r':
     default:
       mlfont = "normal";
       break;
@@ -552,7 +563,8 @@
     printf("\\h'-\\n[" WIDTH_FORMAT "]u'", p->uid);
     printf("\\h'%dM'", fat_offset);
     p->output();
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<mstyle mathvariant='double-struck'>");
     p->output();
     printf("</mstyle>");
@@ -596,8 +608,10 @@
     printf("\\v'%dM'", -n);
     p->output();
     printf("\\v'%dM'", n);
-  } else if (output_format == mathml) {
-    printf("<merror>eqn vertical motion cannot be expressed in 
MathML</merror>");
+  }
+  else if (output_format == mathml) {
+    printf("<merror>eqn vertical motion cannot be expressed "
+          "in MathML</merror>");
     p->output();
   }
 }
@@ -633,8 +647,10 @@
   if (output_format == troff) {
     printf("\\h'%dM'", n);
     p->output();
-  } else if (output_format == mathml) {
-    printf("<merror>eqn horizontal motion cannot be expessed in 
MathML</merror>");
+  }
+  else if (output_format == mathml) {
+    printf("<merror>eqn horizontal motion cannot be expessed "
+          "in MathML</merror>");
     p->output();
   }
 }

Index: src/preproc/eqn/over.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/over.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/over.cpp    3 Feb 2007 05:32:57 -0000       1.3
+++ src/preproc/eqn/over.cpp    5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -177,7 +177,8 @@
     fputs(draw_flag ? " 0'" : "\\&\\(ru'", stdout);
     printf("\\v'%dM'", axis_height);
     printf("\\h'%dM'", null_delimiter_space);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     // FIXME: passing a displaystyle attribute doesn't validate.
     printf("<mfrac>");
     num->output();

Index: src/preproc/eqn/pile.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/pile.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/preproc/eqn/pile.cpp    3 Feb 2007 05:32:58 -0000       1.4
+++ src/preproc/eqn/pile.cpp    5 Feb 2007 15:24:56 -0000       1.5
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2004, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.
@@ -96,13 +97,21 @@
     printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
     printf("\\v'-(%du*\\n[" BASELINE_SEP_FORMAT "]u)'", col.len - 1, uid);
     printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     char *av;
     switch (col.align) {
-      case LEFT_ALIGN: av = "left"; break;
-      case RIGHT_ALIGN: av = "right"; break;
-      case CENTER_ALIGN: av = "center"; break;
-      default: assert(0);
+    case LEFT_ALIGN:
+      av = "left";
+      break;
+    case RIGHT_ALIGN:
+      av = "right";
+      break;
+    case CENTER_ALIGN:
+      av = "center";
+      break;
+    default:
+      assert(0);
     }
     printf("<mtable columnalign='%s'>", av);
     for (int i = 0; i < col.len; i++) {
@@ -226,7 +235,8 @@
        printf("\\h'%dM'", column_sep);
     }
     printf("\\h'%dM'", matrix_side_sep);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     int n = p[0]->len; // Each column must have the same number of rows in it
     printf("<mtable>");
     for (int i = 0; i < n; i++) {
@@ -234,10 +244,17 @@
       for (int j = 0; j < len; j++) {
        char *av;
        switch (p[j]->align) {
-       case LEFT_ALIGN: av = "left"; break;
-       case RIGHT_ALIGN: av = "right"; break;
-       case CENTER_ALIGN: av = "center"; break;
-       default: assert(0);
+       case LEFT_ALIGN:
+         av = "left";
+         break;
+       case RIGHT_ALIGN:
+         av = "right";
+         break;
+       case CENTER_ALIGN:
+         av = "center";
+         break;
+       default:
+         assert(0);
        }
        printf("<mtd columnalign='%s'>", av);
        p[j]->p[i]->output();

Index: src/preproc/eqn/script.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/script.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/preproc/eqn/script.cpp  3 Feb 2007 05:32:59 -0000       1.4
+++ src/preproc/eqn/script.cpp  5 Feb 2007 15:24:56 -0000       1.5
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004
+/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -189,25 +189,27 @@
     }
     printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
           uid, p->uid);
-  } else if (output_format == mathml) {
+  }
+  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) {
+    }
+    else if (sup != 0) {
       printf("<msup>");
       p->output();
       sup->output();
       printf("</msup>");
-  } else if (sub != 0) {
+  }
+  else if (sub != 0) {
       printf("<msub>");
       p->output();
       sub->output();
       printf("</msub>");
     }
-
   }
 }
 

Index: src/preproc/eqn/special.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/special.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/special.cpp 3 Feb 2007 05:33:01 -0000       1.3
+++ src/preproc/eqn/special.cpp 5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2007 Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.

Index: src/preproc/eqn/sqrt.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/sqrt.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/sqrt.cpp    3 Feb 2007 05:33:03 -0000       1.3
+++ src/preproc/eqn/sqrt.cpp    5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2003
+/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2003, 2007
    Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
@@ -166,7 +166,8 @@
     printf(DELIMITER_CHAR);
 
     printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     printf("<msqrt>");
     p->output();
     printf("</msqrt>");

Index: src/preproc/eqn/text.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/preproc/eqn/text.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/preproc/eqn/text.cpp    3 Feb 2007 05:33:04 -0000       1.3
+++ src/preproc/eqn/text.cpp    5 Feb 2007 15:24:56 -0000       1.4
@@ -1,5 +1,6 @@
 // -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2007
+   Free Software Foundation, Inc.
      Written by James Clark (address@hidden)
 
 This file is part of groff.
@@ -24,8 +25,8 @@
 #include "ptable.h"
 
 struct map {
-  char *from;
-  char *to;
+  const char *from;
+  const char *to;
 };
 
 struct map entity_table[] = {
@@ -390,13 +391,12 @@
         {"DI", "&diams;"},     // ISOpub: diamond suit
 };
 
-char *special_to_entity(const char *sp)
+const char *special_to_entity(const char *sp)
 {
   struct map *mp;
-  char *entity;
   for (mp = entity_table; 
        mp < entity_table + sizeof(entity_table)/sizeof(entity_table[0]); 
-       mp++){
+       mp++) {
     if (strcmp(mp->from, sp) == 0)
       return mp->to;
   }
@@ -438,7 +438,7 @@
   s_closing,
   s_punctuation,
   s_inner,
-  s_suppress,
+  s_suppress
 };
 
 const char *spacing_type_table[] = {
@@ -589,7 +589,8 @@
       fputs("\\&", stdout);            // suppress ligaturing and kerning
     if (font_type != LETTER_TYPE)
       fputs("\\fP", stdout);
-  } else if (output_format == mathml) {
+  }
+  else if (output_format == mathml) {
     if (isdigit(c))
       printf("<mn>");
     else if (char_table[c].spacing_type)
@@ -660,8 +661,9 @@
     printf("\\,\\[%s]\\/", s);
     if (font_type != LETTER_TYPE)
       printf("\\fP");
-  } else if (output_format == mathml) {
-    char *entity = special_to_entity(s);
+  }
+  else if (output_format == mathml) {
+    const char *entity = special_to_entity(s);
     if (entity != NULL)
       printf("<mo>%s</mo>", entity);
     else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]