Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2014, 02:05 PM   #1
u238110
Connoisseur
u238110 began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
Confused about this code

I have an ebook that has spacing at the end of its xhtml documents, for example, in the below example the last word in the document is powder and nwhat follows is what looks like some pretty complicated code, but the way it looks in the output is just a little extra space between the last word and the end of the document. If anybody can shed some insight on it, that would be great.

u238110 is offline   Reply With Quote
Old 08-03-2014, 02:21 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Depending on what exactly classes calibre8/calibre7/calibre13/calibre30 are, your assumption is correct.

Also, it looks like the paragraphs themselves have spans too. You may want to merge them somehow.
eschwartz is offline   Reply With Quote
Advert
Old 08-03-2014, 02:25 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
To be perfectly honest, spacing AFTER the very last word of a reflowable document doesn't make a whole lot of sense in the first place.

But without the original document that calibre used to generate that particular code when converting, it's hard to say why it did it the way it did. It has to make the best of whatever it gets handed.
DiapDealer is offline   Reply With Quote
Old 08-03-2014, 02:32 PM   #4
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Looks like there are some non-breaking spaces after the last word.
Because they only occur at the end of the document, I don't think they will form a problem. You could just erase them, if they bother you.
JLius is offline   Reply With Quote
Old 08-03-2014, 03:49 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
They add extra space at the end. Probably a conversion from Word or other editor that does 'paged' media layouts.
In most case: no prob.
In some cases: you might get a blank screen before the start of the next chapter
theducks is offline   Reply With Quote
Advert
Old 08-03-2014, 05:49 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I used to see that sort of thing when I converted RTF or filtered HTML. Since I switched to converting DOCX the classes I see usually see are .calibre and .calibre1 and .block thru .blocknn (typically < 10).

Quote:
Originally Posted by DiapDealer View Post
To be perfectly honest, spacing AFTER the very last word of a reflowable document doesn't make a whole lot of sense in the first place.
- not sure it makes much sense in a paged document, most (all ?) printers will auto throw a page at the end of document, some can print a standard 'end of document' page from a different bin loaded with different coloured paper :lol:

BR
BetterRed is offline   Reply With Quote
Old 08-03-2014, 05:52 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BetterRed View Post
I used to see that sort of thing when I converted RTF or filtered HTML. Since I switched to converting DOCX the classes I see usually see are .calibre and .calibre1 and .block thru .blocknn (typically < 10).


- not sure it makes much sense in a paged document, most (all ?) printers will auto throw a page at the end of document, some can print a standard 'end of document' page from a different bin loaded with different coloured paper :lol:

BR
Most are dumb and still have to run down to the 'footer' code, even if it is nil
theducks is offline   Reply With Quote
Old 08-03-2014, 07:12 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Even my ancient Decwriter throws a form feed at eof, from memory so did a flexowriter, maybe not an asr33 though :lol:
BetterRed is offline   Reply With Quote
Old 08-03-2014, 07:23 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BetterRed View Post
Even my ancient Decwriter throws a form feed at eof, from memory so did a flexowriter, maybe not an asr33 though :lol:
The FF is not until the footer has been printed. There may be many blank lines till it gets there. then it prints those (even if blank), then does the FF.

This is not a printer limitation, but a Program that needs to accommodate a footer.
theducks is offline   Reply With Quote
Old 08-03-2014, 07:51 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
My source code files don't have footers When I print one of those on my Decwriter it throws a page at eof and it's been doing so since I rescued it from being sent to the dump 30+ years ago - gads its noisy though.

BR
BetterRed is offline   Reply With Quote
Old 08-04-2014, 12:28 AM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
From my investigation of code like this, they are very often lines that are supposed to be at the start of the next chapter. If a conversion of a single file does a split at the headers, then anything that was intended to be at the start of the chapter ends up at the end of the previous chapter file. After a conversion of something like this, I have found the anchor used by the in-line ToC to be at the end of the previous chapter. But this code looks like a separator between the end of one chapter and the start of the next. Or code to push the chapter title down the page.
davidfor is offline   Reply With Quote
Old 08-04-2014, 01:18 PM   #12
u238110
Connoisseur
u238110 began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
Thanks for all the input, guys.
u238110 is offline   Reply With Quote
Old 08-04-2014, 05:35 PM   #13
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
I must be the only user who actually prefers about 2-4 blank lines at the end of any chapter/file (or whatever). I find this helpful because, while scrolling down the text, you hit the eof - at the bottom of the screen.

Unfortunately, this makes it hard to be sure that you've reached the actual end of text and not some typo, malformed mark-up, or whatever. So I use the extra space as a means of letting me see that I've come to the end. Then if I start reading the next page/chapter and the flow of words doesn't make sense, I know that there is something odd going on.

And it's not just me having lost my mind or anything.
Sabardeyn is offline   Reply With Quote
Old 08-04-2014, 05:51 PM   #14
u238110
Connoisseur
u238110 began at the beginning.
 
Posts: 91
Karma: 10
Join Date: Feb 2014
Location: Long Island, NY
Device: Aura, N514KUBKKEP, 4.7.10.413
What's the most orthodox way to add that space, Sabardeyn?
u238110 is offline   Reply With Quote
Old 08-04-2014, 08:22 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Wherever possible I terminate all books with The End centred and small caps

I also hacked the Modify PI to put a book jacket at the end of the book.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
After I Edit Code, Save, and Convert, all my Code Edits are Gone lukewrussell Calibre 1 03-14-2014 08:05 PM
So Confused! TLActor Which one should I buy? 7 03-26-2011 09:47 AM
Let's create a source code repository for DR 800 related code? jraf iRex 3 03-11-2010 12:26 PM
Unutterably Silly Do you ever get confused ... poshm Lounge 10 01-18-2010 09:57 AM
I'm getting confused besca147 Sony Reader 10 01-25-2009 08:06 PM


All times are GMT -4. The time now is 10:28 AM.


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