11-03-2023, 06:11 AM | #16 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
|
11-03-2023, 06:12 AM | #17 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
↑ ↑ ↑ x-post
Quote:
BR |
|
Advert | |
|
11-03-2023, 06:47 AM | #18 | ||
Wizard
Posts: 2,304
Karma: 12587727
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 11:32 PM. |
||
11-03-2023, 09:15 AM | #19 |
A Hairy Wizard
Posts: 3,225
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/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, 09:36 AM | #20 |
Sigil Developer
Posts: 8,160
Karma: 5450818
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.
|
Advert | |
|
11-03-2023, 04:54 PM | #21 | |
Bibliophagist
Posts: 40,579
Karma: 157444380
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 04: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 07:03 PM |
upper case | schaf | Kobo Reader | 2 | 04-10-2013 08:23 PM |
upper case to sentence case conversion | cybmole | Sigil | 8 | 01-20-2011 07:03 AM |
Classic Little icon for page turning on the upper right gets stuck. | MangaEbooker | Barnes & Noble NOOK | 3 | 10-07-2010 03:25 PM |
Buy Sony PRS-505 Ornamental Plates both lower and upper | pnyc | Flea Market | 2 | 05-24-2009 12:17 PM |