Uploaded image for project: 'Apache Freemarker'
  1. Apache Freemarker
  2. FREEMARKER-97

Header capitalization using standard styles

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.28
    • None
    • engine
    • None

    Description

      FreeMarker offers a couple of simple algorithms for changing the case of titles:

      Neither of these capitalize the text in ways that adhere to various standard styles:

      Consider the following texts:

      • On iPhone the Transcript Extends Outside of Screen Frame
      • PEAR And GNA Report Performance
      • BCMailPlusFTPClient Sends Document without Document ID
      • JWebUnit: Non-PEN Orders main.xhtml Meta Refresh Tag Issue

      These are correct as written and must not be adjusted by an algorithm that changes the text title. There are a couple of web sites that produce the expected titles (note that the second site capitalizes the word "without," which implies the algorithm does not use Chicago conventions):

      There are a variety of implementations that perform such a feat:

      These implementations do not require a whitelist. (So "iPhone" and "ClassName" will remain as given.) Apache Commons' WordUtils class does not implement Chicago Style, and I suspect it is also a fairly simple algorithm.

      Since ?capitalize and ?cap_first are taken, I propose ?title_case with an optional parameter (default is Chicago):

      • chicago
      • ap
      • apa
      • mla

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            thangalin T X
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: