bug-texinfo
[Top][All Lists]
Advanced

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

Re: Idea to support math in HTML output


From: Gavin Smith
Subject: Re: Idea to support math in HTML output
Date: Tue, 31 May 2016 19:34:57 +0100

On 30 May 2016 at 23:01, Oliver Heimlich <address@hidden> wrote:
> Hello,
>
> I would like to do something about the missing support of the @math
> macro in HTML output. It has always bugged me that this macro does
> nothing for non-PDF output, since the TeX-syntax math is pretty useless
> for many readers of the final document. So, it would be better to have
> @math support for PDF and HTML at least.

Good, this is a feature that several people have missed.

> The basic idea is to use the @math macro with TeX's math syntax and
> produce HTML with MathML from that. Thus, the user can have the same
> Texinfo input for both PDF and HTML output.

Sounds good to me.

>
> Some details that I have figured out already:

All of these look fine.

> 4. There seems to be support for latex2html in Texinfo (L2H…
> customization variables), although this is well hidden in the manual. I
> can't get it to work on my system (don't know why) and as far as I
> understand, it would render the math as images (png), which I don't find
> very useful nowadays.

Yes, it renders the math as images. It is possible for it to work, but
it can be a bit of a struggle. I got it to work once. There is also
support for a program called tex2ht, but I've never used it.

The presence of the support for latex2html is by no means an argument
against implementing your proposed functionality.

> Some outstanding issues:
>
> - I am unfamiliar with perl and have to learn it. Also I have to get
> familiar with Texinfo hacking, since I am only a Texinfo user at the
> moment. Shouldn't be problems.

I'm sure you can learn enough Perl to get by. I can't say that I
completely know Perl either, but it doesn't stop me ;-)

>
> - I have to find a way to bundle / integrate / use the other perl module
> LaTeXML into Texinfo.

There are already Perl modules that are bundled into Texinfo, so this
should be possible, as long as the licences permit it.

> - How should I contribute code? Would you prefer a patch file?

The changes may be quite disruptive to the source code so they should
be developed separately at first. I'm thinking of making another
Texinfo release soon, and after that it should be okay to commit
changes directly into the main code repository, once we can get that
arranged for you.

To get started, I'd suggest:
* Clone the SVN repository
* Try and make a simple change to the HTML-producing code, for example
to alter the output for @math. This would give you a better idea of
how it works.

>
>
> Looking forward to hear your comments and suggestions on this idea.
>
> Best
> Oliver
>
> [1] http://dlmf.nist.gov/LaTeXML/
> [2] e. g. http://dlmf.nist.gov/4.12
> [3] http://caniuse.com/#feat=mathml
> [4]
> http://docs.mathjax.org/en/latest/config-files.html#the-mml-htmlormml-configuration-file
> [5] http://asciimath.org/
>



reply via email to

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