freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T X (JIRA)" <>
Subject [jira] [Commented] (FREEMARKER-97) Header capitalization using standard styles
Date Mon, 16 Jul 2018 17:27:00 GMT


T X commented on FREEMARKER-97:

Great question, [~ddekany]. The phrase _because of_, is commonly thought of as a preposition;
by itself, _because_ is also considered by some to be a subordinating conjunction. The _Chicago
Manual of Style_ doesn't capitalize any prepositions, as you pointed out, excepting at the
start of a sentence. Additionally, conjunctions are not capitalized.


This is a bit of a rabbit hole, though:


I'd suggest leaving both mid-line occurrences lowercase, which also simplifies the code.
(Note that the other online converters always capitalize _because_, regardless of _of_.)

> Header capitalization using standard styles
> -------------------------------------------
>                 Key: FREEMARKER-97
>                 URL:
>             Project: Apache Freemarker
>          Issue Type: Wish
>          Components: engine
>    Affects Versions: 2.3.28
>            Reporter: T X
>            Priority: Minor
> 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:
>  * [Chicago Manual of Style|]
>  * [Associated Press|]
>  * [MLA Style Manual|]
>  * [APA Style|]
> 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
>  * []
>  * []
> There are a variety of implementations that perform such a feat:
> * [JavaScript|]
> * [Perl|]
> * [PHP|]
> 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

This message was sent by Atlassian JIRA

View raw message