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 05-29-2024, 04:35 AM   #1
MGA
Enthusiast
MGA began at the beginning.
 
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!
MGA is offline   Reply With Quote
Old 05-29-2024, 05:10 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: 44,075
Karma: 22669822
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.
kovidgoyal is offline   Reply With Quote
Old 05-30-2024, 04:38 AM   #3
MGA
Enthusiast
MGA began at the beginning.
 
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!
MGA is offline   Reply With Quote
Old 05-30-2024, 06:07 AM   #4
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: 30,050
Karma: 57259778
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>
(there is more REGEX elegant code to get it done, but this works )
remember to handle leading quote character you use
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Docx text type and sizes in tables tage fredheim Conversion 6 05-20-2020 12:04 AM
docx to epub - White rectangles around text? geministarz6 Conversion 2 05-07-2018 03:58 PM
List numbers cut off when text is enlarged! How to fix? fluoresce ePub 2 05-10-2017 12:55 PM
EPUB to DOCX Missing Text neumaticpoetic Conversion 3 07-19-2016 04:53 PM
Docx to Epub... NO TEXT! pastorjamie Calibre 5 12-10-2013 08:42 PM


All times are GMT -4. The time now is 08:34 AM.


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