![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,634
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#17 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,824
Karma: 27620684
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
↑ ↑ ↑ x-post
Quote:
BR |
|
![]() |
![]() |
Advert | |
|
![]() |
#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. |
||
![]() |
![]() |
![]() |
#19 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,151
Karma: 18843349
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.
|
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,981
Karma: 5449552
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 | |
|
![]() |
#21 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,714
Karma: 152906060
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? |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |