View Single Post
Old 04-02-2021, 08:04 AM   #38
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
A bit of a play around (whilst admitting I don't really know what I'm doing) seems to indicate something more is needed than just detecting 'script type="text/x-mathjax-config"'.

Inspecting the preview window with a <math ...> line and grabbed the inserted MathJax script and added that to a "simple" file, but it doesn't render:

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <script type="text/x-mathjax-config"></script>
  <script type="text/javascript" async="async" src="file:///C:/Program Files/Sigil/polyfills/MJ/MathJax.js?config=local/SIGIL_EBOOK_MML_SVG"></script>
</head>
<body>
<p>
\(\frac{\sqrt{a}}{b}\)
</p>
</body>
</html>


Using the random google-found script line I mentioned earlier does render:

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <script type="text/x-mathjax-config"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
<p>
\(\frac{\sqrt{a}}{b}\)
</p>
</body>
</html>


I'm hoping(!) that I can get this simple sample to render:
Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <script type="text/x-mathjax-config"></script>
</head>
<body>
<p>
\(\frac{\sqrt{a}}{b}\)
</p>
</body>
</html>

Last edited by snarkophilus; 04-02-2021 at 08:14 AM. Reason: Add spoiler tags around XML
snarkophilus is offline   Reply With Quote