07-23-2018, 07:02 PM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Jul 2018
Device: iBooks on iPad Pro
|
How to write fraction value using html?
Hello forum
Im using the code ⁄ to generate a fraction with HTML in Calibre, its working fine in the preview mode (picture 2) but not the final EPUB-file. The code is (picture 1): Code:
<p class="rightalm"><span style="font-size:70%;"><sup>7</sup>⁄<sub>3</sub></span> 1911.</p> “This page contains the following errors: error on line 88 at column 69: Entity 'frasl' not defined Below is a rendering of the page up to the first error.” (picture 3) Any idea what is wrong? and how to solve the problem so I can display the fraction symbol? Regards Dan Last edited by degn; 07-23-2018 at 07:07 PM. |
07-23-2018, 08:10 PM | #2 | |
Bibliophagist
Posts: 36,622
Karma: 146499190
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Using Sigil as the editor, if I remove the DOCTYPE declaration, I get the following error from epubcheck: Code:
Col: 69: FATAL(RSC-016): Fatal Error while parsing file 'The entity "frasl" was referenced, but not declared.'. Just in case, what I am referring to as the DOCTYPE declaration follows after the ?xml line. 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"> Last edited by DNSB; 07-23-2018 at 08:24 PM. Reason: fat fingered typos strike again! More at 11! |
|
Advert | |
|
07-23-2018, 09:08 PM | #3 |
creator of calibre
Posts: 44,006
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Unless you have turned off entity replacement in the editor settings, typing ⁄ in the editor will simply give you the ⁄ unicode character which will work everywhere. Or use the Fix HTML tool which will automatically replace the entities for you in all html files.
|
07-24-2018, 07:29 AM | #4 |
Member
Posts: 12
Karma: 10
Join Date: Jul 2018
Device: iBooks on iPad Pro
|
Hi DNSB
replacing with & # 8260; worked fine, thanks. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML input plugin stripping text within toc tags in child html file | nimblebooks | Conversion | 3 | 02-21-2012 03:24 PM |
Calibre Recipe HTML content differs from raw html of index.html. | krunk | Calibre | 4 | 09-20-2010 09:48 PM |
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks | leo315 | enTourage Archive | 2 | 05-10-2010 02:40 PM |
Write Fast, Write Slow? | Moejoe | Writers' Corner | 14 | 03-25-2009 09:55 AM |
Fraction of ebooks vs paper books read? | chlorine | Lounge | 26 | 02-15-2009 12:43 PM |