05-29-2024, 05:35 AM | #1 |
Enthusiast
Posts: 26
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
|
Enlarged first letter in the text. (DOCX to EPUB)
Greetings,
I am using Calibre to make EPUBs, with DOCX (from LibreOffice) as input format. I am wondering if it is possible to somehow make the "Drop Cap" function (ie. that the initial letter in a chapter is enlarged) remain in the output EPUB? So far, this got lost in conversion. Would be very grateful for any advice! |
05-29-2024, 06:10 AM | #2 |
creator of calibre
Posts: 44,526
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The demo docx file here https://manual.calibre-ebook.com/con...word-documents has a dropcaps that is retained on conversion.
|
Advert | |
|
05-30-2024, 05:38 AM | #3 |
Enthusiast
Posts: 26
Karma: 10
Join Date: May 2024
Device: Kobo, Clara
|
Thank you so much, that is indeed valuable, and shows that it is possible.
I wonder if the reason could be that I made the input file with LibreOffice, so perhaps it is not a "completely authentic" DOCX... Anyhow, I suppose one way to fix the issue for my book would be to open the demo file after EPUB conversion in the calibre editor and see what code is used to gnerate this effect, and then simply copy it and simply paste it into my project.... Thank you so much! |
05-30-2024, 07:07 AM | #4 |
Well trained by Cats
Posts: 30,442
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Drop caps or Big first letters have been discussed in various places here at MR. (hint: Search. Also note they tend to be dissed as not all devices support and can cause 'returns' in the marketplace)
The CSS code snippet is not huge, and can be tuned to conditions. Depending on where in the Page you want to use one, the REGEX to wrap the character(s) in a Dropcap Span can be quite simple. eg drop wanted on the first Paragraph after the Chapter head Code:
(</h3>\s+<p class=fp">)([A-Z]} \1 <span class="dropcap">\2</span> remember to handle leading quote character you use |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Docx text type and sizes in tables | tage fredheim | Conversion | 6 | 05-20-2020 01:04 AM |
docx to epub - White rectangles around text? | geministarz6 | Conversion | 2 | 05-07-2018 04:58 PM |
List numbers cut off when text is enlarged! How to fix? | fluoresce | ePub | 2 | 05-10-2017 01:55 PM |
EPUB to DOCX Missing Text | neumaticpoetic | Conversion | 3 | 07-19-2016 05:53 PM |
Docx to Epub... NO TEXT! | pastorjamie | Calibre | 5 | 12-10-2013 09:42 PM |