03-16-2022, 03:02 PM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2022
Device: None
|
Errors while uploading Sigil formatted Ebook
Hello,
I used Sigil to format my ebook into epub format. I want the reflow of my content and therefore used Sigil. I'm a total novice in HTML but managed to format using certain html tags. It opens fine in the epub reader but when I uploaded to Draft2Digital platform, it showed me a lot of errors. Like: ---------------------------------------------------------------------------------- Warning - Invalid Epub: The document you've submitted fails EpubCheck. You may proceed but some sales channels will be disabled. Read your validation errors before proceeding. Validation for current epub: 0 fatals / 571 errors / 11 warnings / 0 infos WARNING: Apple, Tolino, OverDrive, Amazon, Bibliotheca, Baker & Taylor, Hoopla, Vivlio, and BorrowBox will be disabled until this epub can pass EPUB version 2.0 rules ERROR(RSC-005): .tmp.tmpwgfs6k4m.epub/OEBPS.Text.Make it a habit to have more than two options.xhtml(17,249): Error while parsing file: text not allowed here; expected the element end-tag or element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg") ERROR(RSC-005): .tmp.tmpwgfs6k4m.epub/OEBPS.Text.Make it a habit to have more than two options.xhtml(21,145): Error while parsing file: text not allowed here; expected the element end-tag or element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg") ERROR(RSC-005): .tmp.tmpwgfs6k4m.epub/OEBPS.Text.Make it a habit to have more than two options.xhtml(23,6): Error while parsing file: element "br" not allowed here; expected the element end-tag or element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg") ---------------------------------------------------------------------------------- I need help/advice on this? Regards. |
03-16-2022, 03:21 PM | #2 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Is sounds like your epub has more than a few issues. Try installing java on your machine then install the epubcheck plugin (available in our Plugin Index). The epubcheck plugin requires java.
Then load your epub in Sigil and run the epubcheck plugin. It will create a validation window with a list of errors it found and make it easier to both see the error message and navigate to the correct place in your code to find and fix them. In your file named: "Make it a habit to have more than two options.xhtml" there appear to be errors on lines 17 (on or near column 249), line 21 (on or near column 145) and line 23 (on or near column 6), based on the epubcheck 2.0 output you copied above. A screen shot of those and surrounding lines might help. Also naming your file something like "Make it a habit to have more than two options.xhtml" is probably not the smartest decision as files with special characters including spaces may not work properly on all e-readers. Simpler is always better. Maybe use Sigil to rename it to something like chapter01.xhtml or some other appropriate simple file name. Last edited by KevinH; 03-16-2022 at 03:54 PM. |
Advert | |
|
03-17-2022, 03:43 AM | #3 |
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2022
Device: None
|
Thank you for your quick response Kevin.
|
03-17-2022, 09:16 AM | #4 |
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2022
Device: None
|
How to give multi level ol and ul
Hello
I want to know how to give multi level lists. Eg: 1. Fruits a) apple b) mango c) grapes 2. Vegetables a) tomato b) pumpkin b) broccoli i) prevents cancer ii) good for digestion iii) prevents cancer 3. Fast Food a) burger b) chips b) rolls Until now I was using the below code which rendered lot of errors as seen in the above post. ------------------------------------------------------------------------------------- <ol> <li>You're stuck in a traffic jam and are going to be late for work. Instead of wallowing in anger or getting nervous, consider how you can make the best of the situation. To begin, ask yourself logically if fuming or fretting is going to accomplish anything. No. So, why not turn on the radio and listen to some music? If you were already listening to one, do your next best.</li> <p></p> <ol list-style-type:="a"> <li>The next best option is to look around and observe other people. Seeing other people become agitated can sometimes calm you down. Other options include planning how you will compensate for the time lost in traffic. Make the important calls you were supposed to make after arriving at the office.</li> <p></p> <li>Your best friend had planned to go on vacation with you but had to cancel at the last minute. It's frustrating; you can keep feeling that way if you want to. Wait, we are discussing Reframing here.</li> <br/> <li>Ask another friend if they are available. If that isn't an option, what is the next best thing that will keep your spirits up? Can you go to your favorite place by yourself? Or should you call another friend? If you decide to call another friend, do not make the mistake of lamenting or backbiting about the friend who canceled the trip. It will only add to the negativity. If calling is not the best option, go to a movie or a spa? Even better, go out and have a bite of your favorite dish. Food certainly aids in the transformation of emotions.</li> </ol> <br/> <li>A close personal relationship comes to an end. You may feel sorry for yourself or resentful of the other person. Is there another option, such as "move on"? Yes, and how?</li> <br/> ol {list-style-type: "a"} <li>First and foremost, please don't beat yourself up for not "moving on" right away after this breakup. It is natural to feel negative, enraged, completely dejected, or even to play the blame game in your head. You may have moments when you miss your ex/best friend.</li> ------------------------------------------------------------------------------------- Please help with the code (for Sigil) for the entire multi level list. As repeating codes from one point to another didn't work Regards. |
03-17-2022, 10:49 AM | #5 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
This is not a Sigil issue so MR's more general epub forum might be a better place to ask.
But first have you tried googling "multi-level lists in html" or "nested lists in html" or something like that. You might want to google "css for line spacing" since using empty p tags in the middle of the list for spacing is not ideal. Last edited by KevinH; 03-17-2022 at 10:51 AM. |
Advert | |
|
03-17-2022, 11:33 AM | #6 |
A Hairy Wizard
Posts: 3,220
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Here are two options I came up with. The first uses embedded/nested ordered lists <ol>, the second uses divs <div>. There are some limitations and benefits to each.
However, not all ePub devices/reading apps treat ordered lists like they should and you may run across some that'll make your display ugly. If you use the <div> then you can type in exactly what you want to see. I second Kevin's aversion to using empty <p> or <br> tags just to create space...that is what your css styling is for. Ordered List: Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> .lvl1 {list-style-type: decimal} .lvl2 {list-style-type: lower-alpha} .lvl3 {list-style-type: lower-roman} .lvl1 li {margin-top:1.5em} .lvl2 li {margin-top:.5em} .lvl3 li {margin-top:.5em} </style> </head> <body> <ol class="lvl1"> <li>Fruits <ol class="lvl2"> <li>apple</li> <li>mango</li> <li>grapes</li> </ol> </li> <li>Vegetables <ol class="lvl2"> <li>tomato</li> <li>pumpkin</li> <li>broccoli <ol class="lvl3"> <li>prevents cancer</li> <li>good for digestion</li> <li>prevents cancer</li> </ol> </li> </ol> </li> <li>Fast Food <ol class="lvl2"> <li>burger</li> <li>chips</li> <li>rolls</li> </ol> </li> </ol> </body> </html> Div: 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> <title></title> <style type="text/css"> p {margin:0} div.lvl1 {margin:1em} div.lvl2 {margin:.5em 1em} div.lvl3 {margin:.5em 1em} </style> </head> <body> <div class="lvl1"> <p>1. Fruits</p> <div class="lvl2"> <p>a) apple</p> <p>b) mango</p> <p>c) grapes</p> </div> <p>2. Vegetables</p> <div class="lvl2"> <p>a) tomato</p> <p>b) pumpkin</p> <p>c) broccoli</p> <div class="lvl3"> <p>i) prevents cancer</p> <p>ii) good for digestion</p> <p>iii) prevents cancer</p> </div> </div> <p>3. Fast Food</p> <div class="lvl2"> <p>a) burger</p> <p>b) chips</p> <p>c) rolls</p> </div> </div> </body> </html> |
03-19-2022, 02:25 AM | #7 |
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2022
Device: None
|
@Turtle91 your code suggestion worked.
Bless you, KevinH and Turtle91! Thank you so much. it worked!
@KevinH, I had googled for the multi level lists and did apply the code. Although all was good the Sigil popped errors in EPUBcheck. This is what I had added: <ul> <li>Line-1</li> <li>Line-2</li> <li>Line-3 <p></p> <ol style="list-style-type: lower-alpha; padding-left: 0;"> <li style="margin-left:2em">Sub-Line-1</li> <li style="margin-left:2em">Sub-Line-2</li> <li style="margin-left:2em">Sub-Line-3</li> </ol> <p></p> </li> <li>Line-1</li> <li>Line-2</li> <li>Line-3 <p></p> <ol style="list-style-type: lower-alpha; padding-left: 0;"> <li style="margin-left:2em">Sub-Line-1</li> </ol> <p></p> </li> <li>Line-1</li> <li>Line-2</li> <li>Line-3</li> </ul> ----------------------------------------------------------------------------------- @Turtle91 this code below worked and now I don't see errors except the one at the end of this message. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> .lvl1 {list-style-type: decimal} .lvl2 {list-style-type: lower-alpha} .lvl3 {list-style-type: lower-roman} .lvl1 li {margin-top:1.5em} .lvl2 li {margin-top:.5em} .lvl3 li {margin-top:.5em} </style> </head> <body> <ol class="lvl1"> <li>Fruits <ol class="lvl2"> <li>apple</li> <li>mango</li> <li>grapes</li> </ol> </li> <li>Vegetables <ol class="lvl2"> <li>tomato</li> <li>pumpkin</li> <li>broccoli <ol class="lvl3"> <li>prevents cancer</li> <li>good for digestion</li> <li>prevents cancer</li> </ol> </li> </ol> </li> <li>Fast Food <ol class="lvl2"> <li>burger</li> <li>chips</li> <li>rolls</li> </ol> </li> </ol> </body> </html> --------------------------------------------------------------------------------------- I have one code that is still bothering me but does show up in the EPUB check. <h2 id="sigil_toc_id_75">External things that add to the stress.</h2> Its every where in my file. How do I solve this? Regards. |
03-19-2022, 09:35 AM | #8 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
We need to see the exact errors from epubcheck
|
03-19-2022, 09:40 AM | #9 |
A Hairy Wizard
Posts: 3,220
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I'm pretty sure those IDs are created by Sigil when you use the "Generate Table of Contents" function. The first link - if it is near the top of the page simply links to the page itself. If you have more links on the page, or it's further down and not at the top, then the link needs an ID to point to. If you don't provide one manually Sigil generates it for you using the template "sigil_toc_id_#". In your case the link from the .ncx would be:
"<content src="Text/{your sheet name}.xhtml#sigil_toc_id_75"/> and from an html file would be: <a href="{your sheet name}.xhtml#sigil_toc_id_75"> You could change them to something else if you really want to, but the user will never see them and they are OK. Last edited by Turtle91; 03-19-2022 at 10:09 AM. |
03-20-2022, 02:09 AM | #10 |
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2022
Device: None
|
@Turtle91 Thanks for your inputs
I'll just go with it, as long as the users don't face problems.
Regards! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Errors in opening Sigil | manon123 | Sigil | 15 | 08-01-2020 12:05 PM |
Error read while uploading to SIGIL | DeplorableBook | Sigil | 10 | 04-26-2019 07:09 PM |
Sigil validate errors | ralphiedee | Sigil | 5 | 07-10-2012 06:35 PM |
Flightcrew says Errors, but Sigil says no Errors… | Barcelona | Sigil | 4 | 02-09-2012 08:13 AM |
Sigil Formatting errors? | OrganicJerk | Sigil | 5 | 02-16-2011 09:06 PM |