Bug 121913 - Introduce title style capitalization
Summary: Introduce title style capitalization
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CaseFolding
  Show dependency treegraph
 
Reported: 2018-12-05 00:39 UTC by gs_garcia
Modified: 2022-08-26 13:47 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gs_garcia 2018-12-05 00:39:48 UTC
Description:
When setting the Effect of a Style to 'Title' case, the word 'and' is capitalized when it shouldn't be. LOs validation here should be updated to allow for title case but exclude non-title case words.

Actual Results:
N.A.

Expected Results:
N.A.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: TextDocument
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no
Comment 1 Dieter 2018-12-05 08:40:36 UTC
I would treat this as a proposal for enhancement.
Comment 2 Xisco Faulí 2019-01-10 12:14:32 UTC
I can't reproduce it in

Version: 6.3.0.0.alpha0+
Build ID: b8f497a06d585dbae3adadb4d177fe84fdb1b5fa
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Steps to reproduce:
1. Write "you and I"
2. Change style to Title.
-> and is capitalized ?

Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 3 QA Administrators 2019-07-10 02:54:21 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2019-08-19 07:08:40 UTC Comment hidden (obsolete)
Comment 5 João Paulo 2022-08-18 22:27:57 UTC
(In reply to Xisco Faulí from comment #2)
> I can't reproduce it in
> 
> Version: 6.3.0.0.alpha0+
> Build ID: b8f497a06d585dbae3adadb4d177fe84fdb1b5fa
> CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
> Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> Calc: threaded
> 
> Steps to reproduce:
> 1. Write "you and I"
> 2. Change style to Title.
> -> and is capitalized ?
> 
> Please provide a clearer set of step-by-step instructions on how to
> reproduce the problem.
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' once the steps are provided

I think the bug reporter did mean that the "title case" is the "Capitalize Every Word" setting located at Menu Styles, Edit Style, Font Effects, Effects, Case.

Indeed, there are words that should not be capitalized, according to several style guides (Chicago, APA, Ap, MLA -- they don't agree for every word that should not be capitalized).  For example, in the Chicago Style Guide, the word "and" should not be capitalized, so:

"you and I", when applied the "title case"/"capitalize every word" should become "You and I" and not "You And I.

To do this kind of enhancement, LibreOffice should have a list of words to never capitalize, for every language, when the "Capitalize Every Word" is set.  Of course, the "Capitalize Every Word" setting should have its name changed to "Title Case".  Of course, populating those lists should not be a priority, as each user will follow a different rule.

I think it is a useful feature, as I myself do that manually on my paragraphs that are formatted with heading styles.
Comment 6 João Paulo 2022-08-18 22:36:52 UTC
I forgot the Menu Format, Text, Capitalize Every Word.

If it were to be implemented a list of words that should not be capitalized, they should be applied on the Menu Format, Text, Capitalize Every Word.

Why?

Because if it were to be implemented on the style level, every user which opened the document would have a different capitalization style (which could make undesirable text reflows), unless the list of words is saved with the document itself.

As the Menu Format, Text, Capitalize Every Word does not change the character style, but rather change the characters themselves, the document appearance would not change between users with different lists of words that should not be capitlized, and there would be no need to save those lists with the document itself.

Those were my 2 pennies on this subject.
Comment 7 Dieter 2022-08-19 07:11:00 UTC
Reproducible for me with

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: df3b7599f5ad92337a495224f53a1299cc82e97e
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

1. Make sure that "Capitalize Every Word" is enabled in paragraph style "Title" -> Font Effects -> Effects -> Case
2. Write "you and I" and assign PS "Title"

Actual result:
"You And I"

Enhancement request
Give optin to exclude "and" and other word from capitalization


cc: Design-Team for further input and decision
Comment 8 Heiko Tietze 2022-08-19 08:53:40 UTC
Font effects > Case offers "Capitalize Every Word" (likewise the command under Format > Text). So the expectation of a true title style capitalization is wrong (although desirable).

Besides, it might be difficult to implement. English excludes short conjunctions, articles and prepositions while rules in other languages are different. Kind of similar issue in bug 121779 (fixed by Mike) dealing with lowercase first letter (like mRNA, iPhone). These words are excluded via a list. Don't think that works well here.
Comment 9 Mike Kaganski 2022-08-19 09:05:41 UTC
I would support an idea of a new capitalization rule like that (as a separate feature), but I really have no idea how would that work with style machinery; the concern that it would result in different appearance on different systems would possibly create troubles; that would also make it ~impossible to fix that feature in new versions - every new or changed word in a "do not capitalize this" list could change someone's existing document.

Not having it in style (only in the Format->Text menu, as proposed in comment 6) could work. But tightly coupled with dictionaries - something for Laszlo?
Comment 10 V Stuart Foote 2022-08-25 14:20:49 UTC
IIUC, "Capitalize Every Word" used for Title style is a simple ICU lib based transliteration?

If so, would require considerable additional logic to also apply some locale specific handling to apply a wordlist of exceptions, e.g. for conjunctions in en-US to comply with some style guide or CSL spec.  Changes would also likely break the <Shift><F3> cycle case the same way adding the Sentence case transliteration did.

IMHO NAB and simply => WF
Comment 11 Heiko Tietze 2022-08-25 14:49:28 UTC
From the UX POV it's a valuable option for case cycling and as an attribute for the paragraph style to apply at headings. Although it depends a lot on the language and might be only relevant for English. Miklos mentioned ICU as a potential source for solution. And regarding the paragraph style we have to make sure it exists in the official ODF format.