A couple of eqn translation problems
RobertGoulding opened this issue · 5 comments
The first problem (and I don't know whether pandoc
or texmath
is at fault here). Minus signs in math expressions are translated into groff
Unicode characters. So, the minimal file
$a - b$
when passed through pandoc -t ms
comes out as
.LP
@a \[u2212] b@
instead of the correct eqn
expression a-b
. This makes a difference in spacing in the final output, because eqn
does not recognize \[u2212]
as a binary operator.
The other problem is with the TeX
expression \cdots
. The minimal file
a+b+\cdots
when processed gives:
.LP
@a + b + \[u22EF]@
And when this is passed through groff, using the standard fonts, the character \[u22EF]
is not found and is left blank in the output. But GNU eqn has the operator cdots
which can be used here. The correct eqn
output should be
.LP
@a + b + cdots@
Thanks. These are easy to fix.
Might there be similar issues with plus or times?
What about e.g. - x
where -
is unary? Does that work too or should we use the unicode there?
I believe those should be fixed, too, as GNU eqn won't put the proper spacing in for the Unicode character code.
In actual fact, I don't see any difference between the way groff
renders @ -c @
and @ \[u2212] c @
. Is there some reason that it is better to keep the unicode character rather than the ascii hyphen (which eqn
renders as a correct minus character anyway)?
Oh, and $a \times b$
in markdown correctly translates to the eqn
@ a times b @
, with all spacing correctly rendered. And markdown $a+b$
translates to @ a + b @
, again correct. The only problem is with minus.
ok, great, thanks.