|
|
#1 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Mar 2012
Device: Kindle 4 & Sony PRS-T1
|
Why all the spans in rtf to epub conversions?
<span class="none1">text text text</span> Quite often it will simply split a word, for example the word "to" is split here: . . . it is beginning t</span><span class="none1">o mean . . . I'd say that, without exception, every paragraph contains at least one example, often many more than one. It doesn't seem to have any effect at all on the text as read, I'm just curious as to what is going on. |
|
|
|
|
|
#2 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,473
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Those spans correspond to formatting instructions in the rtf file. Open your rtf in a text editor like notepad and you will see the same thing.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Mar 2012
Device: Kindle 4 & Sony PRS-T1
|
Thanks for the reply.That's another of life's little mysteries cleared up.
![]() As you suggested, I had a look at an rtf file in Notepad and I was astonished by the sheer amount of formatting code. No wonder I'd always found rtf files so large! Apart from increasing the size of the epub file and being visually annoying when looking at the code is there any disadvantage to all these 'spans'? |
|
|
|
|
|
#4 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,473
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Some epub viewers may have trouble with lots of spans, though I dont know of any offhand.
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#5 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Mar 2012
Device: Kindle 4 & Sony PRS-T1
|
I've just done a little experiment in Sigil and I was rather surprised to find that a bulk deletion of the opening span tags (they all seemed to be either class="none1" or class="none2") also removed the corresponding closing tags.
|
|
|
|
|
|
#6 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() Posts: 28
Karma: 666
Join Date: Nov 2012
Device: Kobo Touch
|
Sigil automatically runs an HTML tidy process on save (and in a couple of other situations) that ensures that it never saves malformed HTML to disk. Cleaning up stray closing tags is a pretty safe thing for it to do.
I also frequently take advantage of it to add closing tags as well. For example, I sometimes do a search and replace to turn "<p>Chapter" into "<h2>Chapter", and then the tidy step turns the corresponding </p> tags into </h2> tags. A quick and dirty way to format chapter headers, though it's important to manually check to make sure it generates a nice table of contents to catch any glitches. |
|
|
|
|
|
#7 |
|
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Mar 2012
Device: Kindle 4 & Sony PRS-T1
|
Thanks for the info. It's nice to know the reason why it works.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with ePub conversions | WIKYD | Conversion | 2 | 03-18-2012 09:32 PM |
| mobi, rtf, and odt conversions | alansplace | Calibre | 8 | 11-30-2010 03:54 AM |
| Conversions from RTF (to mobi/epub) | Gwen Morse | Calibre | 6 | 10-14-2010 06:00 AM |
| Help with images in EPUB conversions, please | jackie_w | Calibre | 11 | 10-30-2009 03:29 PM |
| Calibre PDF conversions - LRF/EPUB vs RTF | jackie_w | Calibre | 14 | 09-22-2009 03:06 PM |