Opened 9 years ago

Last modified 6 years ago

#832 assigned enhancement

Handle title case/sentence case properly — at Version 4

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.
Alternatively, we could leave the entry UI as is, and use BibTeX-style curly braces to specify that letters should be capitalized as they are. This is the easier solution, but is somewhat lacking in terms of usability.

Change History (4)

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

Right. This is not implemented because it's very difficult to implement properly, and we haven't had to get to it quite yet.

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

comment:4 Changed 9 years ago by simon

  • Description modified (diff)
Note: See TracTickets for help on using tickets.