Epub possible to get drop cap?

I would like to use drop cap in epub.

I tried both versions in custom css:
.heading-1 + p::first-letter { font-size: 200%;}
.heading-2 + p::first-letter { font-size: 3rem;}

I use amend custom stylesheet
This to achieve the result like:
Screen Shot 2021-10-04 at 12.07.30

But, to no avail.

Is it the syntax that is wrong, or is it not possible?

Anyone?

How do you have things set up for the output? If you’re just using the default Ebook format as a starting point, then if you examine the HTML this won’t work because titles tend to be distant from the first paragraph.

That aside, there is a dedicated option for adding a classed span to the first letter of a section layout. I’ve posted detailed instructions in this thread.

Hello Amber,

Thanks for coming back.

I have tried everything you pointed me to, to no avail.
To be honest, it is too complicated to do this. Of course most of us are not programmers. On the other hand, one could dream of a solution where one tick off for double size first letters in new chapters, as easy one now can choose small caps in section formats.

It can’t be that difficult to apply such a thing. In a competitors software, not telling which, it was as simple as adding (h2 + p::first-letter { font-size: 200%;}) into a style sheet for epub. That’s it. (I tried it, it didn’t work in Scrivener)

I hope it will be possible in the future, but for now, I guess I will have to settle for small caps on the few first words. :disappointed_relieved:

I will rather try to write something…

Sorry, I’m a little confused, and double-checked the link I sent to make sure it didn’t go to something involving programming. But I think we’re on the same page about what you want and what this simple four-point checklist would give you.

On the other hand, one could dream of a solution where one tick off for double size first letters in new chapters, as easy one now can choose small caps in section formats.

That’s what we essentially provide, it’s in step 3, and from what you’re saying it sounds like you’re already in the right place to see the checkbox.

If you have that ticked, then perhaps the issue is that you’re still using the same CSS that doesn’t work, rather than changing it to make use of the class added to the letter? If so, then yeah it still wouldn’t work. That option makes the HTML look like this:

<p><span class="first-letter">T</span>est of the feature.</p>

Thus, the CSS you want would look more like:

.first-letter { font-size: 200%; }

I just tested that and it works fine.