![]() |
#1 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
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. |
![]() |
![]() |
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
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. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
However, not many epub3 apps support MathML. You might have to convert the formulas to .svg images. |
|
![]() |
![]() |
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
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. |
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,948
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,948
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
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! |
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#11 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
Join Date: Nov 2009
Device: many
|
Translation of above post:
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |