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 03-04-2012, 07:53 PM   #1
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Help needed with codes

I haven't had any replies to a previous thread, maybe because it didn't make much sense to anyone. This one might make things clearer.

My reader shows no indent at the start of a paragraph or dialog line, so I'd like to know how to insert one, as well as force a blank line after each paragraph. I selected the Calibre option to add a blank line, but this does show up in my reader.

Studying the calibre converted code, each new paragraph is defined like this:
<p class="calibre36"><span class="calibre7"> paragraph text </span></p>
A blank line follows the end of the paragraph - ie no code.

Can anyone help? Thanks!
Hoods7070 is offline   Reply With Quote
Old 03-04-2012, 08:55 PM   #2
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Hoods7070 View Post
I haven't had any replies to a previous thread, maybe because it didn't make much sense to anyone. This one might make things clearer.

My reader shows no indent at the start of a paragraph or dialog line, so I'd like to know how to insert one, as well as force a blank line after each paragraph. I selected the Calibre option to add a blank line, but this does show up in my reader.

Studying the calibre converted code, each new paragraph is defined like this:
<p class="calibre36"><span class="calibre7"> paragraph text </span></p>
A blank line follows the end of the paragraph - ie no code.

Can anyone help? Thanks!
Find .calibre36 in the stylesheet (use Tweak and a text editor, then rebuild)
Add or edit the following:
text-indent: 2em;
margin-top: .5em;
margin-bottom: .5em;

Change the numbers to taste

Margin top and botto will affect spacing between paragraphs
indent, Doh!
theducks is offline   Reply With Quote
 
Enthusiast
Old 03-05-2012, 12:41 PM   #3
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Use Extra CSS (Properties ->Conversion - Common Options) to do this to every paragraph during conversion. For example:
Code:
p {
text-indent: 2em;
margin-top: .5em;
margin-bottom: .5em;
}
Note that Common Options includes specific option for space between paragraphs and (paragraph) indent. So if they don't work the Extra CSS might not work either. If so, my guess is that you don't actually have paragraphs (<p>) in the input ebook, but rather something that looks like them.

Last edited by wallcraft; 03-05-2012 at 12:45 PM.
wallcraft is offline   Reply With Quote
Old 03-05-2012, 09:13 PM   #4
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Thanks to both of you. I had already tried some Extra CSS codes that Kovid posted in another thread, and tried wallcraft's too, but neither lot works. Adding indents manually to the calibre class as theducks suggested doesn't work either. Free epubbooks epubs show indents perfectly, so I have NO idea what the difference is. I studied the code from both lots of CSS but don't know enough about it (beyond obvious common sense) to decipher a fix.

Interestingly, every time I re-convert a mobi file to epub, alibre assigns a different code preceding the paragraph. As the mobi file is fixed, that's a little strange. Anyway, I will keep messing around until I am TOTALLY demented and see if I can figure something out.

Thanks again.
Hoods7070 is offline   Reply With Quote
Old 03-05-2012, 10:04 PM   #5
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Hoods7070 View Post
Thanks to both of you. I had already tried some Extra CSS codes that Kovid posted in another thread, and tried wallcraft's too, but neither lot works. Adding indents manually to the calibre class as theducks suggested doesn't work either. Free epubbooks epubs show indents perfectly, so I have NO idea what the difference is. I studied the code from both lots of CSS but don't know enough about it (beyond obvious common sense) to decipher a fix.

Interestingly, every time I re-convert a mobi file to epub, alibre assigns a different code preceding the paragraph. As the mobi file is fixed, that's a little strange. Anyway, I will keep messing around until I am TOTALLY demented and see if I can figure something out.

Thanks again.
If there is a tiny error, ADE ignores the whole style.

Just to dot the i's

Look at the Links section (in CV) on a document and make sure the correct stylesheet is being called (I have yet to see a Calibre conversion stylesheet incorrectly called, but check.)
Something is blocking/overriding that code. The attribute last call takes precedence.
theducks is offline   Reply With Quote
Old 03-06-2012, 07:59 AM   #6
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Unhappy

Quote:
Originally Posted by theducks View Post
If there is a tiny error, ADE ignores the whole style.

Just to dot the i's

Look at the Links section (in CV) on a document and make sure the correct stylesheet is being called (I have yet to see a Calibre conversion stylesheet incorrectly called, but check.)
Something is blocking/overriding that code. The attribute last call takes precedence.
To the best of my understanding it is calling the correct stylesheet. I have tried fiddling with things in Sigil, including making changes to the Calibre stylesheet, tried a multitude of combinations and abominations (mine) with Calibre options and so on. (All on "clean" copies of the mobi files.) I even uninstalled and reinstalled Calibre to restore the defaults. (Odd quirk of Calibre that it retains your previous choices as defaults - no doubt you can turn that feature off somewhere. Must look.) I must be checking or NOT checking some feature, or confusing the issue with incorrect combinations. But I don't know which, or what I have done that's incorrect.

The Calibre code after conversion is showing indents, top-bottom margins, what look like correct <p> texttexttext </p> codes etc., so I am truly stumped. Other things that are not being read correctly are drop caps, chapter numbers aren't always centered, no lines/space below the chapter title etc. In other words I am basically looking at no style/formatting other than paragraph breaks. (TOC and chapters are fine.) Free epub ebooks show indents in my reader, so it is a Calibre+Geriatric Operator conversion issue.

I really do hate to let something like this beat me, but I'm close to surrender.
Hoods7070 is offline   Reply With Quote
Old 03-06-2012, 10:44 AM   #7
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Hoods7070 View Post
To the best of my understanding it is calling the correct stylesheet. I have tried fiddling with things in Sigil, including making changes to the Calibre stylesheet, tried a multitude of combinations and abominations (mine) with Calibre options and so on. (All on "clean" copies of the mobi files.) I even uninstalled and reinstalled Calibre to restore the defaults. (Odd quirk of Calibre that it retains your previous choices as defaults - no doubt you can turn that feature off somewhere. Must look.) I must be checking or NOT checking some feature, or confusing the issue with incorrect combinations. But I don't know which, or what I have done that's incorrect.

The Calibre code after conversion is showing indents, top-bottom margins, what look like correct <p> texttexttext </p> codes etc., so I am truly stumped. Other things that are not being read correctly are drop caps, chapter numbers aren't always centered, no lines/space below the chapter title etc. In other words I am basically looking at no style/formatting other than paragraph breaks. (TOC and chapters are fine.) Free epub ebooks show indents in my reader, so it is a Calibre+Geriatric Operator conversion issue.

I really do hate to let something like this beat me, but I'm close to surrender.
NOTE: Re-installing Calibre does NOT restore defaults (they are stored and carry over, even if you uninstall.)

1) You can reset ALL default Preference using the button in the Upper Right


2) Conversion settings that have been used are stored with the book and can be cleared with the reset (to current defaults) with a button on the conversions form. You can make FURTHER (fine tune) adjust to the settings from preferences, these will only apply to this book.

To get the book to again, convert with defaults, you need to do #1 THEN #2 to be back at 'factory default' settings.
theducks is offline   Reply With Quote
Old 03-06-2012, 10:43 PM   #8
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
NOTE: Re-installing Calibre does NOT restore defaults (they are stored and carry over, even if you uninstall.)
Good info on the resets, thanks - it'll help a lot; don't know how I missed that one. I did, however, uninstall Calibre with Revo, so all registry and other entries were completely removed before the reinstall, and the defaults were in fact reset. However, it's good to know how to do it the easy way. I'm walking away from this for the moment while I read up a bit on coding, my knowledge of which to date has been restricted to basic stuff for my own CSSs for my very basic web site. I will mainly have to get my head around what takes precedence over what else.
Hoods7070 is offline   Reply With Quote
Old 03-07-2012, 06:07 AM   #9
Hoods7070
Zealot
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 105
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
I'm walking away from this for the moment while I read up a bit on coding, my knowledge of which to date has been restricted to basic stuff for my own CSSs for my very basic web site. I will mainly have to get my head around what takes precedence over what else.
Well, further to my previous post, I did a bit of studying the code in the Calibre stylesheet and comparing it with the embedded codes in the book pages. It transpires that my reader just doesn't want anything to do with any Calibre codes. !@^%#^ For example, the (H2) chapter titles are not changed in any way (colour, font size) and are left justified. No blank lines, below the chapter number or anywhere else, no matter what I do, and no indents. If I can be bothered I will try to figure out a way to EASILY recode everything with some bog standard classes. I am half used to reading without indents and spaces now, and it will probably become second nature. It IS frustrating though, as in every way I love my reader/media player. Thanks for help received.
Hoods7070 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
Hiding codes Goldenrod ePub 2 02-28-2012 04:06 PM
Unutterably Silly language codes Nate the great Lounge 6 08-04-2009 04:46 PM


All times are GMT -4. The time now is 08:21 PM.


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