11-03-2023, 05:11 AM | #16 |
Grand Sorcerer
Posts: 5,599
Karma: 23164939
Join Date: Dec 2010
Device: Kindle PW2
|
|
11-03-2023, 05:12 AM | #17 | |
null operator (he/him)
Posts: 20,652
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
↑ ↑ ↑ x-post
Quote:
BR |
|
11-03-2023, 05:47 AM | #18 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
You could do something like: Find: <p class="subsq">([A-Z])([A-Z’ ]{2,}) Replace: <p class="subsq">\1\L\2 This would find:
And then replace:
But I would be very careful with this type of stuff, which is why I do a case-by-case basis replace. There are TONS of capitalization exceptions that can occur, like:
so you can't just "lowercase everything". Since this ol' 2014 post, I've since explained and cover tons of ALL CAPS -> Smallcaps + Title Casing stuff:
If you type this into your favorite search engine: Code:
smallcaps Tex2002ans site:mobileread.com Code:
acronyms Tex2002ans site:mobileread.com Quote:
In Calibre, there is a "Regex-Function" Mode now: There is already a built-in "Lower-case" one. And, in Sigil, there is now a much more powerful, bleeding-edge, List-Based Search/Replace. I brainstormed a much faster ALLCAPS-><span class="smallcaps">Smallcaps</span> workflow back in: but I have yet to write a tutorial on it. (There have been lots of enhancements in the past 9 years since this original post!!!) Last edited by Tex2002ans; 11-03-2023 at 10:32 PM. |
||
11-03-2023, 08:15 AM | #19 |
A Hairy Wizard
Posts: 3,117
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
There is also a regex function plug-in for Sigil that is similar to Calibre’s. It is more of a proof of concept that someone could polish and hopefully incorporate into Sigil at some point. But it should do the trick for a simple ALLCAPS to Title Case.
|
11-03-2023, 08:36 AM | #20 |
Sigil Developer
Posts: 7,714
Karma: 5444398
Join Date: Nov 2009
Device: many
|
If it needs to work in Calibre, then perhaps asking in that the calibre forum would be a good idea.
|
11-03-2023, 03:54 PM | #21 | |
Bibliophagist
Posts: 36,405
Karma: 145748708
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
You might also want to check the syntax difference between the PCRE2 regex used by Sigil and the Python regex used by calibre though I've seen statements that calibre uses PCRE. A useful site would be Regex101 which allows you to test regex using different engines. And please note that in your example, you would need to manually change kade back to Kade. Last edited by DNSB; 11-03-2023 at 03:57 PM. Reason: Perhaps I should have read the second page before replying? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin to trasform database to upper case | Xwang | Plugins | 21 | 08-07-2019 06:03 PM |
upper case | schaf | Kobo Reader | 2 | 04-10-2013 07:23 PM |
upper case to sentence case conversion | cybmole | Sigil | 8 | 01-20-2011 06:03 AM |
Classic Little icon for page turning on the upper right gets stuck. | MangaEbooker | Barnes & Noble NOOK | 3 | 10-07-2010 02:25 PM |
Buy Sony PRS-505 Ornamental Plates both lower and upper | pnyc | Flea Market | 2 | 05-24-2009 11:17 AM |