Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-02-2013, 12:28 PM   #16
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
Correction:

Sample 1 shows what I meant about shifting lines.
But dgatwood is right when saying it's possible with steady margins. After trying several relations between font-size, line-height and margin-bottom I found this for the second example:

.dropcap {
display: block;
float: left;
font-size: 2.2em;
font-weight: bold;
line-height: 1.2em;
margin-bottom: -0.2em;
margin-top: 0em;
width: 1em (better 1.1em for serifs)
}

This seems to be acceptable.
Sorry for the confusion.

George
Attached Thumbnails
Click image for larger version

Name:	sample1.jpg
Views:	179
Size:	51.1 KB
ID:	105252   Click image for larger version

Name:	sample2.jpg
Views:	174
Size:	44.1 KB
ID:	105253  
GMcG is offline   Reply With Quote
Old 05-02-2013, 06:06 PM   #17
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
The following class, it seems to work fine with any font-size:

.dropcap {
float: left;
font-size: 4em;
font-weight: bold;
margin-top: -0.2em;
margin-bottom: -0.2em;
margin-right: 5px;
}

The curious thing is that in Kindle Previewer looks ugly but in the devices (I have K4NT) looks great.
RbnJrg is offline   Reply With Quote
Advert
Old 05-04-2013, 09:48 AM   #18
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
@ RbnJrg: If you use the float style for an element you normally need a value for the width of this element. Perhaps the Kindle Previewer is missing it and the devices accept it?
And if this is right you don't need the margin-right attribute because this is defined by the width of it.

George
GMcG is offline   Reply With Quote
Old 05-04-2013, 11:50 AM   #19
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by GMcG View Post
Correction:

Sample 1 shows what I meant about shifting lines.
But dgatwood is right when saying it's possible with steady margins. After trying several relations between font-size, line-height and margin-bottom I found this for the second example:

.dropcap {
display: block;
float: left;
font-size: 2.2em;
font-weight: bold;
line-height: 1.2em;
margin-bottom: -0.2em;
margin-top: 0em;
width: 1em (better 1.1em for serifs)
}

I tested your style, but was unable to reproduce your results. Can you please post your actual test file?

(@RbnJrg's style worked fine without any modifications.)

Last edited by Doitsu; 05-04-2013 at 06:16 PM.
Doitsu is offline   Reply With Quote
Old 05-04-2013, 04:23 PM   #20
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
The class in this example is .calibre1.

George
Attached Files
File Type: epub dropcap.epub (2.3 KB, 145 views)
GMcG is offline   Reply With Quote
Advert
Old 05-04-2013, 06:23 PM   #21
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by GMcG View Post
The class in this example is .calibre1.
George
Thanks! I just tested it, and it works fine.
Doitsu is offline   Reply With Quote
Old 05-04-2013, 08:37 PM   #22
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GMcG View Post
@ RbnJrg: If you use the float style for an element you normally need a value for the width of this element. Perhaps the Kindle Previewer is missing it and the devices accept it?
And if this is right you don't need the margin-right attribute because this is defined by the width of it.

George
Hi George:

The main difference between your solution and mine is that while you use the property "width", I use the property "margin-right" (also I use a negative "margin-top").

Why am I using the property "margin" instead of "width"?

Because -with the property "width"- the gap between the dropcap and the sorrounding text varies according with the dropcap letter. Is not the same if the letter is "I" or "E" or "M" o "W". By using the property margin-right (in pixels) that issue is not present. The following pictures shows better what I want to say. The first picture use your solution and the second picture, my solution.

I know that "technically", with the property "float" the normal is to assign a "width" and you are proceeding according the rules. But with the .kf8 format it seems that with "dropcaps" is better not to assign a width.

Best regards
Rubén
Attached Thumbnails
Click image for larger version

Name:	screen_shot-4895.gif
Views:	197
Size:	30.6 KB
ID:	105391   Click image for larger version

Name:	screen_shot-4896.gif
Views:	171
Size:	31.3 KB
ID:	105392  
RbnJrg is offline   Reply With Quote
Old 05-05-2013, 11:30 AM   #23
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
Hello Rubén,

you are right. I have copied some of your features, modified the sizes and now it looks fine.
Thank you.

George
Attached Thumbnails
Click image for larger version

Name:	dropcap-new-1.jpg
Views:	178
Size:	11.4 KB
ID:	105409   Click image for larger version

Name:	dropcap-new-2.jpg
Views:	159
Size:	8.8 KB
ID:	105410  
Attached Files
File Type: epub dropcap.epub (2.6 KB, 122 views)
GMcG is offline   Reply With Quote
Old 05-05-2013, 03:00 PM   #24
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GMcG View Post
Hello Rubén,

you are right. I have copied some of your features, modified the sizes and now it looks fine.
Thank you.

George
You're welcome!
RbnJrg is offline   Reply With Quote
Old 05-06-2013, 03:18 AM   #25
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Hey, some good discussion has been happening while my back was turned!
Thank you to everybody who has been posting, I'm learning some very good tricks.
GrannyGrump is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Total noob needs help moving books Kobo to Kindle diosaclo Amazon Kindle 2 11-28-2011 03:54 AM
Noob help Rtf to Mobi has hyphens at every syllable muddog23 Calibre 3 05-17-2010 09:13 PM
Hacks Kindle noob... purchased books can't open with Kindle Riptide Amazon Kindle 16 10-13-2009 07:30 PM
Mobi vs. ePub... kind of a noob question sorry.. jessTay ePub 8 05-21-2009 11:16 AM
preparing scanned books before PDF-ing sputnik Reading and Management 2 06-09-2008 02:00 AM


All times are GMT -4. The time now is 12:02 AM.


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