Forum How do I...?

Future of math typesetting in Prince?

wrp
I am considering using Prince instead of LaTeX to maintain documentation that is heavy with math and will be published to HTML and PDF. The features and performance of Prince seem mostly adequate, but I am concerned about the equation typesetting.

I don't use bitmapped images for math, since equations should be editable, and must print cleanly.

SVG images do print very well, but they are not directly editable and the machinery to produce them is heavy.

MathML seems to be what people are focusing on now. I used to be enthusiastic about MathML a decade ago. But the following years have failed to produce a layout engine for MathML that approaches TeX in quality. I have been checking the output of the new HTML5 browsers and am not impressed.

So for now, I think the best option for editable equations with good layout and smooth printing is something like MathJax.

Considering your development plans for Prince, how do you see these options? Do you have anything in the works that might make MathML or SVG a better option?
mikeday
Now that we have JavaScript, we do aim to support MathJax in a future release of Prince. SVG is certainly an option if you have your own mechanism for converting mathematical content into SVG.
t.vogels
Has anything changed since January? Is there any progress in MathJax support for instance?
mikeday
We're still working on JavaScript/DOM improvements, and supporting scripts like MathJax and charting libraries like HighCharts and d3 is our top priority for the next release of Prince.
t.vogels
mikeday wrote:
We're still working on JavaScript/DOM improvements, and supporting scripts like MathJax and charting libraries like HighCharts and d3 is our top priority for the next release of Prince.

Thank you mikeday! That is fantastic! Prince would suddenly become much more useful for me. Do you have a rough idea about when that next release would be ready?
mikeday
At this point it is still difficult to say, as each script requires a different subset of JavaScript DOM features, each of which requires different amounts of work to support. Anyway, we're working as fast as we can. :)
t.vogels
Can you give a rough indication of when this will likely be ready? 1 week, month, half a year, a year, 10 years? I'm really waiting for this.
mikeday
Six months perhaps? We've made a lot of progress, but there is still more work to do.
t.vogels
Is there any news in Prince 9?
mikeday
We're getting closer! Prince 9 is packed with JavaScript and DOM improvements. But we can't quite run HighCharts yet, as we still need to add support for getComputedStyle and a couple of other methods. This is our highest priority at the moment, and we're actively working on it.
molson_888
What is the estimate of when you will be able to support HighCharts? This is the only reason I am not going to purchase this software, and would like to know an estimate to know if I need to come up with another solution or not. Otherwise, this software is amazing, unfortunately I need HighCharts support.
mikeday
We are working on the JavaScript DOM support needed for HighCharts as fast as we can. Unfortunately, due to the complexity of the task it is almost impossible to provide a reliable time estimate for its completion. For now the only alternative is to generate the charts externally, and save them as SVG or PNG.
emperor
Here is a StackExchange link about Prince XML and MathJax that may prove useful to the developer.
Also worth reading is this interesting article which may serve as a warning to the owners!
emperor
I wrote a proposal to extend Pandoc's (X)HTML writer with support for SvgTex.
This would allow a work flow where math is rendered by MathJax into high-quality SVG which subsequently is injected into the XHTML input for Prince XML.
More details about this work flow are contained in the proposal.

Please, express your support in favour of this proposal over at the pandoc forum!

This would solve all issues concerning typesetting and embedding math in Prince XML!
mn4367
@emperor, you may look here for a workaround. It uses a similar approach but is a lot simpler to set up. And it's available :-).
emperor
FYI, I am currently using the math2svg Lua filter, that I developed for Pandoc.
mikeday
The latest build of Prince now supports MathJax 3, as demonstrated here. :)