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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2023, 03:01 PM   #16
AS7
Junior Member
AS7 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2023
Location: Europe
Device: none
Hello all,

Thank you for your replies, sorry for the delay! I'm still working on this. (And I have the flu. ;_; )

@Mods Please don't close the thread just yet

To get back to my initial issue, the preview on Kobo: I've created a Kobo account, and the issue with the preview (the title page elements splitting up around images) is the same as when I uploaded the file on Kobo through Draft2Digital (as could be expected).

So I'm using Kobo, which seems to be the most "unforgiving" platform as far as CSS is concerned, as a testing ground to fix the issues with the file. So far not so good: I find the Kobo previewer's reactions to the CSS absolutely baffling.
For example, it makes a line with font-size: 0.625em; LARGER... and a line with font-size: 2em; SMALLER.

I've contacted their support about this...

When the issue is solved, anyhow, I'll post my takeaways here.

@Quoth
Quote:
If you are needing to edit CSS for anything other than an image you are not using Word paragraph styles properly.
I have 40 <blocks>, all with different CSS specs, so I'm in deep trouble, aren't I
I'd need to overhaul the entire CSS in Word then... But I have <underlines> for some paragraphs, for example. Shouldn't these be embedded in Styles? I thought that everything had to go in a Style.

@Turtle91
That's gold! Thank you for posting this visual demo!
I'd definitely buy your course or your templates
Just a question: for the line "This is the first paragraph in the chapter with a drop-cap or other special styling", how did you... hmm... well how did you form <p class="first"> to get this result?

@JSWolf
Quote:
There are some problems with the CSS. You do not want ot use line-height at all as it makes some Readers such as Kobo not work properly with the line height setting. Also, you want to spell out the margins in full as some B&N nook Readers do not like the margin shorthand. Also, if you are using a center, you also need a text indent of 0. And finally, you do not use pt in margins. You use ems. And finally, the padding of 0 is not needed.
OK, thank you! I'm adding this to the expanding List of Things to Fix™

@Jellby
Thank you for the input!

I'm a bit overwhelmed at this stage. (Time constraints...) Despite the CSS issues, the book displays well on KDP, Google Play and Apple Books, and I may not have time to perform an overhaul before the end of the year. Kobo's the problem...

Best,

AS7
AS7 is offline   Reply With Quote
Old 12-05-2023, 03:48 PM   #17
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by AS7 View Post

@Turtle91
That's gold! Thank you for posting this visual demo!
I'd definitely buy your course or your templates
Just a question: for the line "This is the first paragraph in the chapter with a drop-cap or other special styling", how did you... hmm... well how did you form <p class="first"> to get this result?
lol
I intentionally didn't include my formatting because I didn't want to distract from the point I was making. You'll find that there are many different opinions here on what is "the one true way" of styling your work. Some people have good points, some are just straight up opinion, or their reasons only apply to old devices that I don't particularly care about. My reading app of choice is very good about supporting the css standards, so I don't have a problem using css the way it was intended. Some devices/apps may not support css as well, so you would have to provide fallback styling and/or media queries to make sure it works on your target device(s).

I got that styling to work by using css pseudo-elements ::first-line and ::first-letter with the following:

Code:
CSS:
p.first               {text-indent:0; font-size:1em; clear:both}
p.first::first-letter {font-family:serif; font-size:2em; font-weight:bold;
                       float:left; margin:-.1em .1em}
p.first::first-line   {font-variant:small-caps; font-size:1.15em}

HTML:
<p class="first">This is the first paragraph in the chapter.</p>
You can obviously substitute your own styling choices as you desire.

Cheers!


Edit: One thing I don't like about use of "first-letter" is that it includes any punctuation with the first letter styling. Sometimes that can be distracting. eg “This is the first...

I've gotten used to it, but I wish the powers that be would fix that.

Last edited by Turtle91; 12-05-2023 at 03:56 PM.
Turtle91 is offline   Reply With Quote
Old 12-05-2023, 04:52 PM   #18
AS7
Junior Member
AS7 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2023
Location: Europe
Device: none
Hello Turtle91!

Quote:
You'll find that there are many different opinions here on what is "the one true way" of styling your work. Some people have good points, some are just straight up opinion, or their reasons only apply to old devices that I don't particularly care about.
Alas, I don't have the competence to distinguish between best practices and opinions at this stage But it's good to know!

Quote:
I got that styling to work by using css pseudo-elements ::first-line and ::first-letter...
Ooh I get it, thanks for teaching me about pseudo-elements! Looks like there are plenty of CSS tricks to work with.
AS7 is offline   Reply With Quote
Old 12-06-2023, 09:46 AM   #19
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,234
Karma: 126042094
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 Jellby View Post
Unless you want the margins to have a fixed size, and not to depend on the font size (which I agree won't typically be the case here).



Depends on what the "block" class will be applied to. You need padding 0 for the same reason you need text-indent 0: to cancel possibly inherited values.
If the code is written correctly, you won't have inherited padding.
JSWolf is offline   Reply With Quote
Old 12-06-2023, 09:53 AM   #20
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,234
Karma: 126042094
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 AS7 View Post
Hello Turtle91!
Ooh I get it, thanks for teaching me about pseudo-elements! Looks like there are plenty of CSS tricks to work with.
Do not use any psuedo elements. There is a lot of software out there that these will not work with. Keep it simple and psuedo elements are not simple.
JSWolf is offline   Reply With Quote
Old 12-06-2023, 09:54 AM   #21
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,234
Karma: 126042094
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@Turtle91, you should know better then to recommend code that doesn't work in a lot of cases such as psuedo elements. Yes it's valid ePub 3 code, but for a lot of software, it won't work. Keep the code as ePub 2 compatible as possible even if the eBook is ePub 3. Unless you need ePub 3 specific feature(s).
JSWolf is offline   Reply With Quote
Old 12-06-2023, 10:39 AM   #22
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
@arbiterofcorrectcode,

Or you can just read what I said...
Turtle91 is offline   Reply With Quote
Old 12-06-2023, 10:57 AM   #23
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 10,414
Karma: 82723493
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
The psuedo elements are best for web page CSS, or your own home use. not real ebooks via retail distribution. As remarked they look strange with punctuation, but any form of “different from default body style” styling of text other than maybe oblique/italic looks strange with punctuation, no matter how it's styled. There is also a theory that punctuation should not be italic and only bold in a bold heading/title.
Quoth is offline   Reply With Quote
Old 12-06-2023, 10:59 AM   #24
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
FYI:
pseudo-elements, and pseudo-classes, have been around a lot longer than ePub3. as a matter of fact that is one of the differences that may confuse some people...when to use a single colon vs a double colon (:first-line or ::first-line). The double colon was introduced in CSS3 as an attempt to differentiate between a pseudo-element and a pseudo-class. Before that (CSS1 and CSS2) a single colon was used for both. It is actually recommended to use a single colon for everything IF you are worried about backwards compatibility.

Whether a device, or software, supports pseudo elements is completely on them. Your older devices, and older ADE, don't support much of anything...but.... as I wrote... "I don't care". Does the current version of ADE (finally) fully support CSS1 (not to mention CSS2 or CSS3)??

Please make sure you read someone's post before you start arguing against it... it tends to make for bad optics.
Turtle91 is offline   Reply With Quote
Old 12-06-2023, 11:12 AM   #25
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Quoth View Post
The psuedo elements are best for web page CSS, or your own home use. not real ebooks via retail distribution. As remarked they look strange with punctuation, but any form of “different from default body style” styling of text other than maybe oblique/italic looks strange with punctuation, no matter how it's styled. There is also a theory that punctuation should not be italic and only bold in a bold heading/title.
I'd agree with the "via retail distribution" aspect...that's why I mentioned that they needed to ensure that it would work on their "targeted device" AND MY BOOKS ARE "REAL EBOOKS"!

As far as looking strange...yes, they can, as I mentioned. I wish they would fix that. As I also said, you can get used to it. What I didn't mention was that, before I got used to it, I tended to be liberal with enforcing grammar rules in that respect. For the few first-paragraphs-in-the-chapter-that-also-start-with-punctuation... I just deleted the leading punctuation.

The vast majority of readers (and, unfortunately, a good chunk of authors) don't know (or don't care) about grammar rules and they wouldn't ever notice the missing punctuation. I even tested it against my latin-teacher wife and she never noticed it... although, to be fair, Latin didn't really care so much about punctuation to begin with...

Edit:
In addition, if your device, or software, does not support the pseudo-elements, they are required to fail gracefully. ie they don't crash, they will just ignore the unknown tag. In this case it would revert to a normal looking paragraph with no indent and not wrapped around any floaters. If the device does puke on it...then it is not standards-compliant.

Last edited by Turtle91; 12-06-2023 at 12:45 PM.
Turtle91 is offline   Reply With Quote
Old 12-06-2023, 01:12 PM   #26
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 10,414
Karma: 82723493
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
The Romans would read a scroll the day before because they had much less punctuation than the Greeks, possibly often none at all!

Quote:
As far as looking strange...yes, they can, as I mentioned. I wish they would fix that. As I also said, you can get used to it. What I didn't mention was that, before I got used to it, I tended to be liberal with enforcing grammar rules in that respect. For the few first-paragraphs-in-the-chapter-that-also-start-with-punctuation... I just deleted the leading punctuation.
Yes, that's what I was trying to write. If you have any kind of fancy lead-in, then I can't see how “They” can fix it. You either delete the opening quotes, don't special style it or never start with a quotation or dialogue.

If one person is speaking and a new paragraph is needed, then the rule is that there is no closing quote, yet the start of the next paragraph has an opening quote. I'd not do an initial drop cap or an initial large cap (works better on ereaders), but if I did, I'd add a rule to our style guide:
In the case of a first paragraph with an initial drop cap or an initial large cap there should be no opening punctuation mark. Various languages might have « ¡ ¿ etc. Only use an initial drop cap or an initial large cap at the start of a chapter, section or other major break where perhaps chapter titles are not used.

I don't know why you'd ask a Latin teacher anything about grammar or punctuation. Also its connection to current English is overstated.
Quoth is offline   Reply With Quote
Old 12-06-2023, 01:20 PM   #27
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Quoth View Post
I don't know why you'd ask a Latin teacher anything about grammar or punctuation. Also its connection to current English is overstated.
lol

Because she is so much smarter than me... and I rarely can get anything past her... I take it as a win that she didn't notice the missing leading punctuation.


ANYTHING relating to rules has no place in the English language!!
I'd take Korean over English any day for having logical, consistent, rules! Alas, I was born here and raised by an English major...
Turtle91 is offline   Reply With Quote
Old 12-07-2023, 06:59 AM   #28
meinno
Junior Member
meinno began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2023
Device: Kindle
Try exporting your ebook to EPUB3 instead of EPUB2. EPUB3 has better support for custom fonts and advanced layout options. Also be sure your CSS is valid and all HTML tags are properly closed. Using the EPUB3 output profile in Calibre with the latest editor version may help resolve some of these rendering inconsistencies across retailers. Best of luck with the publishing process!
meinno is offline   Reply With Quote
Old 12-07-2023, 09:01 AM   #29
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,045
Karma: 18727051
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Welcome to MR, meinno!
Turtle91 is offline   Reply With Quote
Old 12-07-2023, 10:00 AM   #30
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 10,414
Karma: 82723493
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by Turtle91 View Post
lol

Because she is so much smarter than me... and I rarely can get anything past her... I take it as a win that she didn't notice the missing leading punctuation.
Ah, so the Latin is a rubeum allec.
Quoth 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
DRM and retailers sony_fox General Discussions 6 05-31-2013 03:40 AM
Confirmed. Xoom to appear at all retailers for $599 RockdaMan Android Devices 17 03-21-2011 11:29 AM
Consumer-friendly ebook retailers DawnFalcon News 30 02-13-2010 12:54 PM
Opus New retailers for the Opus AnemicOak Bookeen 4 10-06-2009 05:43 AM
List of Ebook Retailers? Satans Puppet Sony Reader 9 04-10-2009 05:23 AM


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


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