bug-texinfo
[Top][All Lists]
Advanced

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

Re: behavior of @math with HTML output


From: Raymond Toy
Subject: Re: behavior of @math with HTML output
Date: Sun, 16 Oct 2022 22:08:17 -0700



On Fri, Oct 14, 2022 at 12:43 PM Vincent Lefevre <vincent@vinc17.net> wrote:
On 2022-10-14 08:40:58 -0700, Raymond Toy wrote:
> For one example of a texinfo doc using Mathjax, see
> https://maxima.common-lisp.dev/.  In particular, you can look at
> https://maxima.common-lisp.dev/docs/maxima_79.html.  A maxima user (who
> might be blind?) says that the MathJax-enabled formulas work really well
> with a screen reader.  Mathjax appears to support accessibility well.
>
> I don't have lynx and actually have no interest in using a text-only
> browser.

Here's what I get for bessel_y with lynx:

I was mostly responding to Patrice who asked about a doc that used mathjax.  I didn't expect this to work with a text browser that doesn't have _javascript_.

          bessel_y is defined as                                               ▒
                                                                               ▒
          \[Y_v(z) = {{\cos(\pi v)\, J_v(z) - J_{-v}(z)}\over{\sin{\pi         ▒
          v}}} \]                                                              ▒
                                                                               ▒
          when \(v\) is not an integer. When \(v\) is an integer \(n\),        ▒
          the limit as \(v\) approaches \(n\) is taken.                        ▒

With w3m, this is very similar.

But even in Firefox, this is very poorly supported: variables, such as
n in "integer n", are rendered as SVG instead of normal text.

Hmm, my default browser is Firefox.  The output looks right, but I didn't check to see how it was actually rendered.  I think texinfo 6.8 mathjax uses the SVG output instead of CHTML.  Not sure why that is and if it really matters or not.  (In my own stuff, I've used CHTML).

The consequences are:
  * These variables do not look the same as in the prototype.
    And the SVG is not scaled correctly: these variables are
    much smaller than the normal text.

Interesting.  For me SVG sizes look right, but when I switch to CHTML, everything is too small compared to the text.  Perhaps that's an artifact of the font I'm using to display normal text.
  * These variables cannot be selected, e.g. for copy-paste.

SVG can be changed to CHTML, which fixes the font size, but the
rendering is ugly, and the variables still cannot be selected.
I'm wondering why MathML (presentation markup) isn't available,
as according the test at

  http://eyeasme.com/Joe/MathML/MathML_browser_test.html

it seems to be well supported by Firefox. It is as nice as SVG,
these doesn't seem to be scaling issues, and the text can be
selected.

Possibly a bug in Mathjax?  Or because Mathjax is using SVG instead of MathML for displaying math.  I'll have to read the Mathjax docs again to know what Mathjax uses to render equations.


However, MathML wouldn't solve the issue with lynx. A better solution
would be w3m instead of lynx. I suppose that MathML could be converted
to plain HTML with XSLT.

--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


--
Ray

reply via email to

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