View Single Post
Old 09-30-2020, 09:16 PM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Turtle91 View Post
I have TitleCase assigned as a keyboard shortcut (Ctrl+Space) and wondered if there was a way to use that shortcut in the 'replace' section of the regex...resulting in something like:
There are a few solutions I see here.

1. Use Calibre's Functions. An example is even given in the manual:

"Automatically fixing the case of headings in the document"

2. AutoHotKey. If I want to "speed up" annoying shortcuts, I sometimes assign one of the extra buttons on my mouse.

For example, this AutoHotKey line:

Code:
XButton2::^q
assigns Ctrl+q to one of my side mouse buttons.

Then a (previously annoying) click+shortcut combo becomes a simple:

1. Left-Click
2. Side-Click
3. Left-Click
4. [...]

If you want to get fancy, you could even have AutoHotKey click the "Find" button for you too! Then all you have to do is keep pressing the side button!

Quote:
Originally Posted by hobnail View Post
Even though I was born and raised in the US I was taught that sentence case is better. E.g., see https://atmosol.com/resource-post/he...sentence-case/. Ease of regex construction for it is now another argument in its favor.
Don't know if you missed it, but there was quite a bit of Title Casing discussion in this topic a few months ago:

"Add title="" to h* based on existing TOC -- suggestion for new feature (or plugin?)"

Especially see my Posts #11, #13, and #15.

(I even spent a day writing up the ultimate "Title Casing: Everything You Didn't Know You Ever Wanted to Know" post... yet to be released though.*)

Quote:
Originally Posted by Turtle91 View Post
Yes, I am trying to get Title Case rather than Sentence case. This would be the first step, followed by a pass to change ' Of ', ' And ', ' The ', etc. to 'of, and, the. I'm sure there are plenty of other exceptions that I haven't come across yet...
Yes, lots of exceptions, especially in Chicago's rules.

But even with "easy" Sentence Case, you have to take into account things like:
  • Proper Names
  • Roman Numerals
  • Acronyms
  • Previous Punctuation
  • etc.

... It's all mentioned in my ultimate guide.*

- - - - -

(* If anyone's interested, I could send you the rough draft via PM... or you could wait until my blog gets rolling! )

Last edited by Tex2002ans; 10-01-2020 at 12:52 AM.
Tex2002ans is offline   Reply With Quote