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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2013, 11:28 AM   #1
tbuyus
Junior Member
tbuyus began at the beginning.
 
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">&nbsp;</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.
tbuyus is offline   Reply With Quote
Old 03-19-2013, 12:23 AM   #2
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
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.
dgatwood is offline   Reply With Quote
Advert
Old 03-19-2013, 09:24 AM   #3
tbuyus
Junior Member
tbuyus began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2013
Device: kobo/kindle/epub
Quote:
Originally Posted by dgatwood View Post
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.
Thanks D.

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.
Attached Thumbnails
Click image for larger version

Name:	unicode_font_joy.jpg
Views:	299
Size:	79.3 KB
ID:	103159  
tbuyus is offline   Reply With Quote
Old 03-28-2013, 10:39 AM   #4
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,514
Karma: 126422064
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.
JSWolf is offline   Reply With Quote
Old 03-30-2013, 12:48 AM   #5
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
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.
Well, yes, if you want to do it cleanly. Most of us would settle for "not likely to break".
dgatwood is offline   Reply With Quote
Advert
Old 03-30-2013, 06:19 AM   #6
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 03-30-2013, 09:15 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 03-30-2013, 09:09 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,514
Karma: 126422064
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 dgatwood View Post
Well, yes, if you want to do it cleanly. Most of us would settle for "not likely to break".
Cleanly is most likely not to break. And if it does get broken, cleanly is a lot easier to fix.
JSWolf is offline   Reply With Quote
Old 03-31-2013, 08:01 AM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by Toxaris View Post
That bug has been squashed. It was in the Qt4 framework and Sigil now uses version 5.
Hooray! It also got rid of the unwanted highlighting bug too!
mrmikel is offline   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
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


All times are GMT -4. The time now is 06:03 AM.


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