Title Case with Initials

9 views
Skip to first unread message

Michael Parkinson

unread,
Feb 10, 2024, 2:34:55 PMFeb 10
to TextSoap
How to avoid Capitalize with Title Case making some letters lower case such as initials.  For example, "S. A. Cosby" becomes "S. a. Cosby" when using Capitalize with Title Case.  Is there another method?

Mark Munz

unread,
Feb 10, 2024, 2:42:25 PMFeb 10
to text...@googlegroups.com
Right now, I think the Title Case cleaner evaluates words, ignoring punctuation like periods (which would represent initials).
There are a lot of complex rules that go into Title Case (the approach is based on the one John Gruber originally offered up), so I don't know what it will take to support initials in the title case.
For now, a workaround would be to wrap it in a custom cleaner. Apply the Title Case cleaner, then add a Find/Replace and look for \b[:lower:]\. and replace with $u$0

image.png



On Sat, Feb 10, 2024 at 11:34 AM Michael Parkinson <mpm...@gmail.com> wrote:
How to avoid Capitalize with Title Case making some letters lower case such as initials.  For example, "S. A. Cosby" becomes "S. a. Cosby" when using Capitalize with Title Case.  Is there another method?

--
You received this message because you are subscribed to the Google Groups "TextSoap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to textsoap+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/textsoap/d6f661fc-9955-4f4f-8606-942f39d502b5n%40googlegroups.com.


--
Mark Munz
unmarked software
https://textsoap.com/

Michael Parkinson

unread,
Feb 10, 2024, 2:50:56 PMFeb 10
to text...@googlegroups.com
Thank you.  Your suggestion works great.  Exactly what I was looking for.

Michael

On Feb 10, 2024, at 11:42 AM, Mark Munz <unma...@gmail.com> wrote:

Right now, I think the Title Case cleaner evaluates words, ignoring punctuation like periods (which would represent initials).
There are a lot of complex rules that go into Title Case (the approach is based on the one John Gruber originally offered up), so I don't know what it will take to support initials in the title case.
For now, a workaround would be to wrap it in a custom cleaner. Apply the Title Case cleaner, then add a Find/Replace and look for \b[:lower:]\. and replace with $u$0

<image.png>



On Sat, Feb 10, 2024 at 11:34 AM Michael Parkinson <mpm...@gmail.com> wrote:
How to avoid Capitalize with Title Case making some letters lower case such as initials.  For example, "S. A. Cosby" becomes "S. a. Cosby" when using Capitalize with Title Case.  Is there another method?

--
You received this message because you are subscribed to the Google Groups "TextSoap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to textsoap+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/textsoap/d6f661fc-9955-4f4f-8606-942f39d502b5n%40googlegroups.com.


--
Mark Munz
unmarked software
https://textsoap.com/


--
You received this message because you are subscribed to a topic in the Google Groups "TextSoap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/textsoap/3nvW7FxnL8E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to textsoap+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/textsoap/CACc%3DZdzeHNVLA2atR%3D2pQsvjuaLLOTfox0xNwcDp5XszGM%2BHBg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages