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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2012, 03:48 PM   #1
Berzelius
Connoisseur
Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.
 
Posts: 76
Karma: 20414
Join Date: Mar 2012
Device: Kindle 4, Kindle Paperwhite 2 & Sony PRS-T1
Why all the spans in rtf to epub conversions?

If I use Calibre to convert a rtf file (originally a docx file) to an epub one and then look at the code view of the epub file in Sigil I find it is full of what seem like superfluous span tags. A typical format is:

<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.
Berzelius is offline   Reply With Quote
Old 12-18-2012, 11:05 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-19-2012, 06:11 AM   #3
Berzelius
Connoisseur
Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.
 
Posts: 76
Karma: 20414
Join Date: Mar 2012
Device: Kindle 4, Kindle Paperwhite 2 & 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'?
Berzelius is offline   Reply With Quote
Old 12-19-2012, 06:28 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 12-19-2012, 09:30 AM   #5
Berzelius
Connoisseur
Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.
 
Posts: 76
Karma: 20414
Join Date: Mar 2012
Device: Kindle 4, Kindle Paperwhite 2 & 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.
Berzelius is offline   Reply With Quote
Advert
Old 12-21-2012, 01:29 AM   #6
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
Posts: 89
Karma: 706
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.
FaceDeer is offline   Reply With Quote
Old 12-31-2012, 06:19 PM   #7
Berzelius
Connoisseur
Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.Berzelius can self-interpret dreams as they happen.
 
Posts: 76
Karma: 20414
Join Date: Mar 2012
Device: Kindle 4, Kindle Paperwhite 2 & Sony PRS-T1
Thanks for the info. It's nice to know the reason why it works.
Berzelius 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
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


All times are GMT -4. The time now is 01:57 PM.


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