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 04-03-2015, 01:27 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Calibre changes drop cap on converting epub -> azw3

I have a book using drop caps I coded in epub.

used this css:

Code:
.Dropcap {
	float:left;
	font-size:5em;
	line-height:1;
	margin-bottom:-0.275em;
	margin-right:0.05em;
	margin-top:-0.06em;
}
which makes a 3-line high drop cap.

In chapters that begin with a quote, I put the quote and the first letter in the span:

Code:
 <p class="noindent"><span class="Dropcap">&lsquo;D</span>o you want to go see some paintings?&rsquo; I ask
And that works (though I would like to use a hanging quote, if anyone has a simple way to do that?)

So I run this through Calibre to make AZW3, and notice that the chapters beginning with a quote are only two line drop caps.
Looking at the code, it's created a new style for those.

Code:
.Dropcap {
  float: left;
  font-size: 5em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
.Dropcap1 {
  float: left;
  font-size: 2em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
The original Dropcap is exactly as I made it, but there is now a "Dropcap1" which is 2em high, not 5.

So I used Calibre editor to change those chapters to just "Dropcap", that worked.

Why did Calibre do this?
AlanHK is offline   Reply With Quote
Old 04-03-2015, 01:31 AM   #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,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the setting in the look & feel section of the conversion dialog to not rescale font sizes.
kovidgoyal is offline   Reply With Quote
Old 04-03-2015, 02:32 AM   #3
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by kovidgoyal View Post
Use the setting in the look & feel section of the conversion dialog to not rescale font sizes.
Thanks, that did it!

But why was it rescaling those instances?
AlanHK is offline   Reply With Quote
Old 04-03-2015, 02:35 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,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Font rescaling rescales all font sizes in the book. The user manual has a section explaining how it works. http://manual.calibre-ebook.com/conv...size-rescaling
kovidgoyal is offline   Reply With Quote
Old 02-07-2020, 05:16 PM   #5
increase
Connoisseur
increase began at the beginning.
 
increase's Avatar
 
Posts: 86
Karma: 10
Join Date: Jan 2020
Device: kindle
Using Drop Caps

Quote:
Originally Posted by AlanHK View Post
I have a book using drop caps I coded in epub.

used this css:

Code:
.Dropcap {
	float:left;
	font-size:5em;
	line-height:1;
	margin-bottom:-0.275em;
	margin-right:0.05em;
	margin-top:-0.06em;
}
which makes a 3-line high drop cap.

In chapters that begin with a quote, I put the quote and the first letter in the span:

Code:
 <p class="noindent"><span class="Dropcap">&lsquo;D</span>o you want to go see some paintings?&rsquo; I ask
And that works (though I would like to use a hanging quote, if anyone has a simple way to do that?)

So I run this through Calibre to make AZW3, and notice that the chapters beginning with a quote are only two line drop caps.
Looking at the code, it's created a new style for those.

Code:
.Dropcap {
  float: left;
  font-size: 5em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
.Dropcap1 {
  float: left;
  font-size: 2em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
The original Dropcap is exactly as I made it, but there is now a "Dropcap1" which is 2em high, not 5.

So I used Calibre editor to change those chapters to just "Dropcap", that worked.

Why did Calibre do this?
I tried this and it works on epub3 o n an android using 4.2.2 but the drop cap does not appear in android 7.

Is there any way around this?
increase is offline   Reply With Quote
Old 02-07-2020, 05:22 PM   #6
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 increase View Post
I tried this and it works on epub3 o n an android using 4.2.2 but the drop cap does not appear in android 7.

Is there any way around this?
1) Android is not a e-book viewer. It is a OS . Moon+ is a viewer.
In the viewer you need to set (allow) it to use Publishers fonts and stylesheets/ (Good luck. Not all allow this, nor do it properly when they do )
theducks is offline   Reply With Quote
Old 02-07-2020, 05:27 PM   #7
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,970
Karma: 128903378
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 theducks View Post
1) Android is not a e-book viewer. It is a OS . Moon+ is a viewer.
In the viewer you need to set (allow) it to use Publishers fonts and stylesheets/ (Good luck. Not all allow this, nor do it properly when they do )
In otherwords, most Android ePub apps are garbage because they don't respect the CSS.
JSWolf is offline   Reply With Quote
Old 02-07-2020, 05:30 PM   #8
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 JSWolf View Post
In otherwords, most Android ePub apps are garbage because they don't respect the CSS.
The Authors know their way is better
FWIW it does get REAL tricky trying to allow users to make all their adjustments. If it was jus Scaling, then playing with Body, might be enough, allowing the rest
theducks is offline   Reply With Quote
Old 02-07-2020, 05:35 PM   #9
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,970
Karma: 128903378
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 theducks View Post
The Authors know their way is better
FWIW it does get REAL tricky trying to allow users to make all their adjustments. If it was jus Scaling, then playing with Body, might be enough, allowing the rest
You've responded to a post that's been moved as part of a new thread.
JSWolf is offline   Reply With Quote
Old 02-07-2020, 05:39 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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JSWolf View Post
You've responded to a post that's been moved as part of a new thread.
My error I moved the wrong posts in the wrong thread :lol:

BR
BetterRed is online now   Reply With Quote
Old 02-07-2020, 05:51 PM   #11
increase
Connoisseur
increase began at the beginning.
 
increase's Avatar
 
Posts: 86
Karma: 10
Join Date: Jan 2020
Device: kindle
OK, I am using moon reader pro and it seems you have to set the moonreader options

1. Load the ebook.
2. Tap in the center of your tablet screen in order that the menu appears in the bottom.
3. Tap in the Options icon (the last one on the right side).
4. Select "Miscellaneous".
5. ENABLE "Show 'Preview with publisher formatting' Button on top bar".
6. UNCHECK "Disable CSS styles".

Then they display
increase is offline   Reply With Quote
Old 02-07-2020, 07:01 PM   #12
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 increase View Post
OK, I am using moon reader pro and it seems you have to set the moonreader options

1. Load the ebook.
2. Tap in the center of your tablet screen in order that the menu appears in the bottom.
3. Tap in the Options icon (the last one on the right side).
4. Select "Miscellaneous".
5. ENABLE "Show 'Preview with publisher formatting' Button on top bar".
6. UNCHECK "Disable CSS styles".

Then they display
That is what I was trying to say without knowing which you had.
FWIW I have the same app. I use it to check my work when other devices (my K4nt and Kobo) are not doing what I thought I did.
theducks is offline   Reply With Quote
Old 02-10-2020, 05:55 PM   #13
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 283
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
<style>
dropcap, h1 ~ p:first-of-type:first-letter, h2 + p:first-letter, h2 + img + p:first-letter, h2 + img + img + p:first-letter {
color: red;
font-size: 2em;
line-height: 1em;
float: none;
/*float:none makes TALLcap*/}
dropcap, h1 + p, h2 + p, h1 + img + p, h2 + img + p, h2 + img + img + p {
text-indent: 0;}</style>

The above works good for me. I put the dummy word 'dropcap' first to alphabetize the css. The 'text-indent:0;' makes the first paragraph of a chapter nonindented for the dropcap. I inserted 'img' in between 'h1' and 'p' because quite often I want a dropcap after an h1 which is followed by an image, then a p. This method automatically takes care of any double-quote starting the first paragraph. I prefer a TALLcap to a DROPcap, but it is a one word change. You can add h3 etc. if necessary. With this method you do not have to do anything at all in the text itself. Best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-02-10 16-51-03.png
Views:	233
Size:	636.8 KB
ID:	177061   Click image for larger version

Name:	Screenshot from 2020-02-10 16-53-39.png
Views:	302
Size:	766.2 KB
ID:	177062  
rjwse@aol.com is offline   Reply With Quote
Old 02-11-2020, 04:42 PM   #14
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,970
Karma: 128903378
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 rjwse@aol.com View Post
<style>
dropcap, h1 ~ p:first-of-type:first-letter, h2 + p:first-letter, h2 + img + p:first-letter, h2 + img + img + p:first-letter {
color: red;
font-size: 2em;
line-height: 1em;
float: none;
/*float:none makes TALLcap*/}
dropcap, h1 + p, h2 + p, h1 + img + p, h2 + img + p, h2 + img + img + p {
text-indent: 0;}</style>

The above works good for me. I put the dummy word 'dropcap' first to alphabetize the css. The 'text-indent:0;' makes the first paragraph of a chapter nonindented for the dropcap. I inserted 'img' in between 'h1' and 'p' because quite often I want a dropcap after an h1 which is followed by an image, then a p. This method automatically takes care of any double-quote starting the first paragraph. I prefer a TALLcap to a DROPcap, but it is a one word change. You can add h3 etc. if necessary. With this method you do not have to do anything at all in the text itself. Best regards, Pop
That's not a dropcap. It's a raised cap. Depending no how larger the raised cap is, it may not look good on a Kindle eBook.
JSWolf is offline   Reply With Quote
Old 02-12-2020, 12:32 PM   #15
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 283
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
convert tallcap to dropcap

Sorry if I was not clear. change 'float;none' to 'float:left' and the tallcap will descend. Tweak 'line-height' and 'font-size' to taste. best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-02-12 11-26-11.png
Views:	193
Size:	402.2 KB
ID:	177100  
rjwse@aol.com is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting AZW3 to Epub Lyn2012 Conversion 17 10-06-2014 08:47 AM
Raised Drop Cap Image Followed by Small Caps RyanMcSwain ePub 10 09-04-2014 10:12 AM
Drop cap bug on Paperwhite dgatwood Kindle Formats 11 04-10-2014 04:14 AM
Aura HD Drop Cap coding help, please MacEachaidh Kobo Reader 13 08-15-2013 01:18 PM
Using CSS in Word to make a Drop Cap work in an Epub brewt ePub 3 01-31-2009 06:00 PM


All times are GMT -4. The time now is 01:42 AM.


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