06-02-2022, 09:48 AM | #91 | ||
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
EDIT: By the way, the Calibre Ebook Viewer, is also based on chromium/WebEngine, and there the epub is displayed correctly (no blank pages). So, if the issue were produced by some interaction between video card/drivers and chromium/WebEngine, Calibre Viewer wouldn't be able to display the epub perfectly. Last edited by RbnJrg; 06-02-2022 at 10:13 AM. |
||
06-02-2022, 11:04 AM | #92 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
FWIW, Readium and Calibre viewer use very different javascript than Bibi. So a bug can easily be tickled in one reader / graphics driver / webengine and not in another.
Are you by chance using a display/desktop/theme with its own widget decorations that could be adding margins after body? Does the problem still exist if you choose other desktop themes? |
Advert | |
|
06-02-2022, 11:52 AM | #93 |
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
I'm using Adwaita and in window manager I'm using the default theme, so they are native themes that comes with Arch. And by changing themes, the issue persists.
|
06-02-2022, 11:58 AM | #94 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Thanks for testing and reporting back. I am again out of ideas. Perhaps DiapDealer can figure out how to recreate it.
|
01-29-2024, 05:04 PM | #95 |
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
A Readium plugin bug?
Hi Kevin and Diap;
I know that Sigil has a built-in version of MathJax but since MathJax can also display equations written in TeX and that TeX formulas are easier to write than the MathML ones, I added to an epub3 the tex-svg.js script from MathJax to see how well (o not) works. I must say that works everywhere (Sigil, Calibre, Thorium, Foliate, Koodo Reader, NeatReader, etc., etc.) and even works the right click menu of MathJax (for example, open the epub in BibiReader; go to the page where are the TeX formulas; do right click and select "Show Math As > MathML Code" and you'll see the TeX formula translated to MathML) BUT it doesn't work in ADE 4.5x (doesn't matter to me) and in the Readium Sigil plugin (this is indeed important), where the the page with TeX equations can't be load (a curious thing because it works fine in Bibi Reader and EpubJS Reader, the others Sigil plugin). Please, when your time permits, can you check if is a Readium plugin bug? Many thanks in advance. PS: I attach an epub with both, MathML and TeX equations; the page with MathML formulas is loaded without issues in Readium, but the page with TeX formulas can not. As you will be able to see, the epub has included the mml-svg.js script. This is not necessary because Sigil can show MathML formulas without the MathJax script but I included it so you can see that Sigil, even when it has its own copy of MathJax, it honors the script because with it, the right click menu is available but when you suppress the .js file, MathML equations still are displayed (because of the MathJax built-in copy) but the right click menu is not working anymore. Last edited by RbnJrg; 01-29-2024 at 05:08 PM. |
Advert | |
|
01-29-2024, 06:39 PM | #96 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
TeX equations are not part of the epub3 spec. The spec talks only about mathml. In fact, the MathJax configuration that Sigil uses actually disables TeX support to minimize the size of the plugin itself. Also the TeX equations requires additiinal html and css support as well as the mathjax fonts. Supporting it in Sigil will not happen as it interferes with click to sync between Preview and CodeView, bloats MathJax, and is not epub3 spec compliant.
As for the Readium Reader plugin, it does not support Mathml at all without additional code to pull it in over the net. My guess is that is what you are running into. So supporting TeX equations I will leave for other |
01-29-2024, 08:05 PM | #97 | |
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
I see I didn't explain myself very well.
What do I ask then? What I ask is why Readium is not loading the javascript files. I think is a bug but I can't know it because I don't have the way to trace the script loading in Readium (I don't have an "Inspector" there). If you can trace the script when is loaded by the plugin, I will thank if you can tell me where the error happens. That is what I'm asking (I don't need you do anything with Sigil). But if you can't do that, is ok, no problem. Last edited by RbnJrg; 01-29-2024 at 08:16 PM. |
|
01-29-2024, 09:45 PM | #98 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I will take a look at your math test epub and the ReadiumReader plugin to see if I can see why that js will not work, hopefully tomorrow afternoon my time when I have some free time.
|
01-29-2024, 11:06 PM | #99 |
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
01-30-2024, 11:49 AM | #100 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
The easiest way to debug this is to edit the ReadiumReader plugin.py file to always return -1 (so that the stderr messages are printed to the PluginRunner main window).
If I do that and try to open your epub in Readium Reader and navigate to the Tex xhtml file, I see this error message: ERROR: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/epub_content/tmp05wraghf/OEBPS/Misc/mml-svg.js:1: Uncaught TypeError: Cannot read properties of undefined (reading 'loader') So this means that the 'loader' object is undefined. My guess it is conflicts with the MathJax.js version that is stored inside the ReadiumReader. But that is just a guess. |
01-30-2024, 11:55 AM | #101 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
If I remove the mml-svg.js and the associated script tag, the mathml document still works (as you said it uses the internal MathJax.js file that is part of the plugin), then I receive the following error message:
ERROR: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61019: Uncaught TypeError: Cannot read properties of undefined (reading 'Browser') So the code appears to try reading the 'Browser" object but failing. |
01-30-2024, 12:22 PM | #102 |
Wizard
Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Many thanks Kevin. It's very strange; I thinked that could be something linked with the MathJax contextual menu, in conflict with the Readium one. But is not that according to your words. If the issue is only with the plugin, well, it wouldn't be so serious, but I'm afraid of the issue is also present on others programs and apps that employ the Readium engine. Thorium (based on Readium) honors the script and displays without problems TeX equations, but, will be able to say the same regarding others programs based on Readium?
Thanks for your help Kevin and I will post here a solution if I can find anyone. |
01-30-2024, 12:24 PM | #103 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I enabled more dumps from the javascript console by editing plugin.py and now I am seeing the following:
Code:
INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:60843: EPUB doc iframe LOAD URI: INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:60844: file:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/epub_content/tmp9355e5xb/OEBPS/Text/Section0002.xhtml INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61156: EPUB doc base href: INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61157: file:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/epub_content/tmp9355e5xb/OEBPS/Text/Section0002.xhtml INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61014: MathJax VERSION: undefined // undefined // 3.2.2 ERROR: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61019: Uncaught TypeError: Cannot read properties of undefined (reading 'Browser') the following: Code:
INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61157: file:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/epub_content/tmp9355e5xb/OEBPS/Text/Section0001.xhtml ERROR: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/epub_content/tmp9355e5xb/OEBPS/Misc/mml-svg.js:1: Uncaught TypeError: Cannot read properties of undefined (reading 'loader') INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:61014: MathJax VERSION: 2.7.5 // 2.7.5 // 2.7.5 INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:50391: ReflowableView content resized ... 550 1371 Section0001.xhtml INFO: file:///Users/kbhend/Library/Application%20Support/sigil-ebook/sigil/plugins/ReadiumReader/viewer/cloud-reader-lite/scripts/readium-js-viewer_all_LITE.js:50401: ... ignored (identical dimensions). But the second page fails becuase the MathJax.Hub has no Browser object created at all. My guess is the mix of MathJax versions is the culprit here. |
01-30-2024, 01:11 PM | #104 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
My guess is anything based on Readium Cloud Reader Lite will need to use a tex-svg codebase that works with MathJax 2.7.x and not MathJax 3.2.2.
Readium's MathJax.js strips out Tex support to save space and speed up loading and because Tex is not a part of the epub3 spec. Just like Sigil does. Your MathJax 3 based tex-svg.js works in Sigil as Sigil is MathJax 3.2.2 based. I am not sure if any Readium Readers are MathJax 3 based as very few groups have adopted MathJax 3 so far. |
01-30-2024, 01:20 PM | #105 |
Sigil Developer
Posts: 7,898
Karma: 5449552
Join Date: Nov 2009
Device: many
|
According to Readium, MathJax.js single file version is based on MathJax 2.75 and according to its build script:
https://github.com/readium/MathJax-s...aster/build.js That MathJax Readium version should already support TeX input (see the Readium comment line) UPDATE Edit: I think I am reading that incorrectly. The first line specifies the use of TeX fonts not the TeX input. So Readium has no TeX input support. Last edited by KevinH; 01-30-2024 at 02:11 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] ePub3-itizer - epub3 output plugin for Sigil | KevinH | Plugins | 435 | 01-19-2023 09:46 PM |
Errors Using plugins with Sigil | increase | Plugins | 3 | 03-06-2020 05:08 AM |
Sigil Plugins! | DiapDealer | Sigil | 33 | 03-19-2016 08:18 PM |
Sigil Plugins (for Sigil 0.7xx Alpha) | DiapDealer | Sigil | 15 | 09-27-2014 05:21 PM |
An epub3 version of Sigil ? | apulia03 | Sigil | 9 | 11-28-2012 01:07 AM |