Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2023, 11:08 AM   #1
pfeifhns
Junior Member
pfeifhns began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2022
Device: ePub
Problem: embedding <math> in a <p> </p> element

Hello,
I'm writing a math-book with SIGIL and I'm using mathml.
So far all is fine.
My problem:
if I embed a <math>-Tag in <p> and </p>, then I get an error when uploading my ebook to BoD. It says that it is not allowed to do this. Leaving out the <p> </p> tag returns the error that <p> </p> must be present. Any suggestions?

Sample code:
<p><math ><mstyle displaystyle="true"><mrow class="MJX-TeXAtom-ORD"><msub><mi>δ<!-- δ --></mi>

<mrow class="MJX-TeXAtom-ORD"><mi>i</mi>

<mi>j</mi></mrow></msub></mrow></mstyle></math>
</p>

I hope someone has a good idea.
Thanks,
Hans
pfeifhns is offline   Reply With Quote
Old 02-04-2023, 11:13 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
What is BoD? Do they follow the official epub 3.3 spec?

What does the latest EpubCheck say about this?

I guess you could try a div instead of a p since there are fewer restrictions on the contents of the div tag vs the p.
KevinH is online now   Reply With Quote
Old 02-04-2023, 11:41 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
According to the specification, the permitted content of a "p" tag is the set called "Phrasing Content".

Phrasing Content includes the "math" tag.

See https://developer.mozilla.org/en-US/...rasing_content

So whomever or whatever said a "p" tag can not include a "math" tag is simply wrong according to that spec.

Perhaps this is an extra requirement by BoD, but it is not a epub or html5/whatwg requirement.

Last edited by KevinH; 02-04-2023 at 11:46 AM.
KevinH is online now   Reply With Quote
Old 02-04-2023, 12:15 PM   #4
pfeifhns
Junior Member
pfeifhns began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2022
Device: ePub
Thank you, KevinH, for your answer. BoD ist "book on Demand", a publisher for books and e-books.
Yes, <p> may contain <math>, that' what SIGIL allows.
There is only one thing I didn't try: previously, my ebook was epub-2, than I inserted mathml. Should create a epub-3 with Sigil and copy my html to this, then I'll have another try.
Thank's a lot,
Hans
pfeifhns is offline   Reply With Quote
Old 02-04-2023, 12:28 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by pfeifhns View Post
Should create a epub-3 with Sigil and copy my html to this, then I'll have another try.
You could use KevinH's ePub3-itizer plugin for the epub3 conversion.
However, not many epub3 apps support MathML. You might have to convert the formulas to .svg images.
Doitsu is offline   Reply With Quote
Old 02-04-2023, 01:53 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, convert to epub3 since mathml is technically only supported internally by the epub3/html5 standard..

And most recent epub3 e-readers do support mathml (calibre, thorium, ade 4.5, iBooks, Readium, BlueFire, etc) but some early epub3 e-readers and most if not all epub2 readers do not support mathml. If you are targeting these older e-readers with your epub, as Doitsu said, using svg images to replace your mathml (or png images) will allow your epub to reach a larger e-reader audience.

There is (or was?) a standalone formula viewer for LibreOffice that will allow screen shots and MathJax can be used to covert straight mathml to svg.

MathJax is what Sigil's Preview uses to inline convert mathml to svg so that Preview will support mathml.

Last edited by KevinH; 02-04-2023 at 01:57 PM.
KevinH is online now   Reply With Quote
Old 02-04-2023, 06:08 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by KevinH View Post
What is BoD?
Translated page...

https://www-bod-fr.translate.goog/?_..._x_tr_pto=wapp
JSWolf is offline   Reply With Quote
Old 02-04-2023, 06:10 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by pfeifhns View Post
Thank you, KevinH, for your answer. BoD ist "book on Demand", a publisher for books and e-books.
Yes, <p> may contain <math>, that' what SIGIL allows.
There is only one thing I didn't try: previously, my ebook was epub-2, than I inserted mathml. Should create a epub-3 with Sigil and copy my html to this, then I'll have another try.
Thank's a lot,
Hans
If you convert your math to SVG per @Doitsu's suggestion, you can keep it as ePub 2 if you want.
JSWolf is offline   Reply With Quote
Old 02-04-2023, 08:02 PM   #9
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
There is (or was?) a standalone formula viewer for LibreOffice that will allow screen shots and MathJax can be used to covert straight mathml to svg.
I use an Inkscape extension, WriteTeX, that one can download from:

https://writetex.tk/

That extension converts LaTeX formulas (that can be written with LibreOffice Math) into svg images. Also is neccesary to have installed Pdf2svg converter (in Linux generally is not neccesary because is already installed by default) and TexMaker or TexStudio (because the extension uses a LaTeX compiler -I use xelatex). Results are perfect!
RbnJrg is offline   Reply With Quote
Old 02-05-2023, 05:49 AM   #10
pfeifhns
Junior Member
pfeifhns began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2022
Device: ePub
Erstmal Danke für die vielen Antworten auf mein Problem!!

Ich habe mittlerweile mein epub2 auf epub3 umgestellt ( neues epub3 erzeugt und den Inhalt dann kopiert ). Beim Hochladen bekomme ich nun den Fehler, dass nur "Flussbasiertes ePub 2.0.1" unterstützt wird. Das war's dann, alles für die Tonne!
Bleibt nur noch, dass ich meinen Anbieter definitiv wechsele.
pfeifhns is offline   Reply With Quote
Old 02-05-2023, 11:21 AM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Translation of above post:
Quote:
First of all, thank you for the many answers to my problem!!

I have now switched my epub2 to epub3 (created new epub3 and then copied the content). When uploading, I now get the error that only "flow-based ePub 2.0.1" is supported. That's it, all for the bin!

All that remains is that I will definitely change my provider.
KevinH is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem embedding font SigilBear Sigil 11 06-18-2020 10:43 AM
epub>azw3 math problem on kindle turdus Conversion 6 02-22-2019 09:23 AM
Problem with math equations PascP Calibre 3 11-17-2016 09:06 AM
Problem of math formula when converting azw3 to pdf maffia Conversion 1 05-15-2015 08:38 PM
Another font embedding problem b.tarde EPUBReader 12 03-11-2010 01:40 PM


All times are GMT -4. The time now is 09:59 PM.


MobileRead.com is a privately owned, operated and funded community.