Mailing List Archive


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

Re: [tlug] Poll: OpenOffice or LibreOffice?



Darren Cook writes:
 > > Here's the LaTeX:
 > > 
 > > \newcommand{\fend}[2]{\int_{#1}\limits #2_{#1,#1}}
 > > 
 > > $$\textstyle \fend{c}{(\gamma'\cdot{}\gamma)} =
 > >   \left[\fend{c}{\gamma'}\right] \circ \left[\fend{c}{\gamma }\right]$$
 > 
 > Curious about pandoc's mathML functionality I've been trying that, but
 > it appears to get stuck on defining a new function. ...and I don't know
 > enough Tex to inline the function manually [1].  (It might just be me
 > missing some commandline option.)

I'm not surprised.  It probably only understands the subset of TeX
needed for math.  It might understand plain TeX's \def but I haven't
used that since 1985 or thereabouts. :-)  Here's the expanded version.
It should work in any version of TeX or LaTeX with Computer Modern
fonts (and most other font families, too).

$$\textstyle \int_{c}\limits (\gamma'\cdot{}\gamma)_{c,c} = 
  \left[ \int_{c}\limits \gamma'_{c,c} \right] \circ
  \left[ \int_{c}\limits \gamma_{c,c} \right]$$


 > Have a look at 17 at http://johnmacfarlane.net/pandoc/demos.html
 > You can click "math.text" to see the source, and then click the *.html
 > filenames to see the output. E.g.
 > http://johnmacfarlane.net/pandoc/demo/mathMathML.html

None of these are very good, except for the --mathjax version.  I'd
use a PDF in preference to any of the others if the math was an
important part of the page's content.  MathWebTeX might be acceptable
(but it's missing two characters, both of which I've actually used!)

Unfortunately there are also formatting issues due to poor style in
the TeX itself.  For example, the integral should be written

    $$\int_0^1 x\,dx$$

not

    $$\int_0^1 x dx$$

TeX doesn't take the hint from the spacing of the latter, although
theoretically it could.

 > The equations are looking nice and scaleable in Firefox, at least.

MathJax is truly scaling!  The glyphs are sharp-edged (down to the
antialias level!) even at 400%.  I wonder how that's done, but
unfortunately all the magic is in the script, which is invoked from
the MathJax site, not included in the HTML. :-(  (But that can
probably be configured.)  Some of the others appear to be simply
pixmaps that are scaled by FireFox (or in my case, Chrome) rather than
outline fonts, and they get fuzzy before 150%.

 > Another limit (and again I may just not know how to do it) is I cannot
 > seem to get an equation in a line.  E.g. in the below, the $$\sqrt{x^2 +
 > y^2}$$ appears on its own line.

That's by design.  The doubled $$ means "math display", which creates
a new paragraph and inserts an aesthetic amount of vertical space
around the formula.  Change the $$ to a single $ to get inline math.
Not very discoverable, but given the frequency with which math mode is
used in TeX, you can understand why Knuth gave it a very compact syntax.

 > This has $$\textstyle {\int_{#1}\limits c_{#1,#1}}{(\gamma'\cdot{}\gamma)} =
 >   \left[\fend{c}{\gamma'}\right] \circ \left[\fend{c}{\gamma }\right]$$
 > some latex inlined.

That should give you an error from TeX since \fend isn't defined.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links