03-18-2013, 11:28 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2013
Device: kobo/kindle/epub
|
span in span: is this problematic?
Hello Forum,
This is my first post and I hope it is okay. I have a technical issue with an epub that I am trying to edit. I have taken a public domain epub from project gutenberg and run one of the main html (item_002.html) files through some software I have written (that adds accents to the letters. The accents are part of a code I have created that indicates what sound each letter in a word makes). I have then regenerated the file containing the html containing the new text. In my scheme this results in some of the silent letters needing to be surrounded with font tags (see below), to make them grey. <p style="font-size:0.91em; line-height:normal; margin-bottom:0pt; text-indent:8pt"> <span style="font-family:Times, serif"><span>Krâmèŕ lêànèd back. "Yöü can sêê τħé siťüâţìòn. Hõ<font color="gray">w</font> can wê dêàl wiτħ a </span></span></p><p style="font-size:0.91em; line-height:normal; margin-bottom:0pt; text-indent:8pt"><span style="font-family:Times, serif"><span>factòŕ lîkè τħis? Τħé pèŕfect vãrïáblè." </span></span></p><p style="font-size:0.91em; line-height:normal; margin-bottom:0pt; text-indent:8pt"><span style="font-family:'Courier New', monospace"> </span></p> In the above example I have highlighted the mark-up surrounding the 'w' in the word 'how'. The software has made 2 changes to the original file. 1) it has placed each phrase in its own span - and added the accents 2) it has greyed the w in 'how' - (the o has been accented to indicate that it carries the 'ow' sound. This makes the 'w' redundant and hence why I want it in grey - signifying it is not to be pronounced) However, when I replace the original file with the new one, re-zip into the epub, and then open it in ADE it does not display this modified section of the book. Does anyone have any ideas what might be causing this? Thanks very much for any help Tob. |
03-19-2013, 12:23 AM | #2 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
When you say that it isn't displaying the section, do you mean that the entire HTML file doesn't show up, that a paragraph is missing, that the contents of the span is missing, or something else entirely?
BTW, you shouldn't use the font tag. It isn't a supported tag in EPUB, and ADE has this tendency to explode in flames when it sees things it doesn't recognize. Use <span style="color: gray;">...</span> instead. |
Advert | |
|
03-19-2013, 09:24 AM | #3 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2013
Device: kobo/kindle/epub
|
Quote:
I've done the graying as you suggest, but found the main problem was that my html transformation algorithms were missing trailing '/s' in the meta tags <meta blah blah blah /> and the links tag <link style..... /> So nearly done now, just having a few unicode character coverage issues that I need to address. Look at the output I'm getting from ADE in the attachment. My initial searches on this suggest I may need to embedd a font. I remember using a SIL something-or-other once when using unicode. |
|
03-28-2013, 10:39 AM | #4 |
Resident Curmudgeon
Posts: 76,055
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The best (and most reliable and easiest to edit) way to do is is to not use styles in the XML but to use classes. Put the code in the CSS and use a class.
|
03-30-2013, 12:48 AM | #5 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
|
Advert | |
|
03-30-2013, 06:19 AM | #6 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Be aware that you need to check in a device or viewer for device as regards embedded fonts. In the past, Sigil has not shown embedded fonts but this may be changed because of the upgraded underlying software.
|
03-30-2013, 09:15 AM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
That bug has been squashed. It was in the Qt4 framework and Sigil now uses version 5.
|
03-30-2013, 09:09 PM | #8 |
Resident Curmudgeon
Posts: 76,055
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
03-31-2013, 08:01 AM | #9 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex and span | JSWolf | Sigil | 7 | 01-23-2013 06:35 AM |
how do I span more than one line with regex | BartB | Sigil | 3 | 12-11-2011 05:12 PM |
Remove <br /> together with span, and only span | Razzia | Recipes | 3 | 05-30-2011 06:55 PM |
Trouble removing span class | mufc | Recipes | 3 | 03-18-2011 03:29 PM |
'Heading color' and 'p class span' | mufc | Recipes | 7 | 12-22-2010 09:02 PM |