Opened 9 years ago
Last modified 6 years ago
#832 assigned enhancement
Handle title case/sentence case properly — at Version 3
| Reported by: | codec | Owned by: | simon |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | export | Version: | 1.5 |
| Keywords: | Cc: | erazlogo |
Description (last modified by simon)
Some styles require title case ("Article Title Here"), while others require sentence case ("Article title here"). At the moment, a transform to title case is implemented (although it's not customizable). Unfortunately, sentence case is a much harder situation. Transforming titles like "Glycogen: a Trojan horse for neurons" and "Characterization of the SKN7 ortholog of Aspergillus fumigatus" from their title case equivalents will not be possible by algorithms alone.
Suppose we provide an icon to toggle between title/sentence case in the edit pane. Then, if the user modifies something beyond the capitalization in either form, we determine the minimum number of deletes and inserts to transform it (classic dynamic programming problem), and if this includes insertion of a new word, we capitalize it/put it in lower case as appropriate. This will require some modifications to the database schema, but is, as far as I can tell, the most intuitive all-encompassing solution.
Change History (3)
comment:1 Changed 9 years ago by simon
- Component changed from uncategorized to export
- Milestone set to 1.5 Alpha 1
- Owner changed from dstillman to simon
- Status changed from new to assigned
comment:2 Changed 9 years ago by codec
Yes, no problem. In practice I don't think its a big deal, but I thought it worth recording.
comment:3 Changed 9 years ago by simon
- Description modified (diff)
- Priority changed from minor to major
- Summary changed from enforce-case formatting is supported. to Handle title case/sentence case properly
Right. This is not implemented because it's very difficult to implement properly, and we haven't had to get to it quite yet.