zotero / zoterobib

ZoteroBib is a free online bibliography generator from the makers of Zotero
https://zbib.org
Other
68 stars 19 forks source link

Apply sentence-case rules to dependent styles based on parent #262

Closed dstillman closed 3 years ago

dstillman commented 3 years ago

When using a dependent style, both sentence-case conversion and subtitle uppercasing should apply based on the parent style if not triggered by the dependent style. An example would be selecting Zoology in the Middle East, which is a dependent style of APA and should trigger both modes.

See https://github.com/zotero/zotero/commit/693cd926d55d1b257c28e0da5a70172db1ab6986 for the relevant commit for uppercase subtitles in the client — basically, if the regexp doesn't match the parent, it's checked again against the parent.

For what it's worth, in the CSL project we're recommending UUIDs for new styles, so while it doesn't matter now, in the future it may be helpful to be able to match against other parts of the style such as the title. If it's easy to restructure this to have access to the full metadata, that may be helpful later.

(Also note the slight change to the academy-of-management part of the subtitle-uppercasing regexp.)

dstillman commented 3 years ago

I think something is wrong with the test here? I'm seeing the prompt for all sorts of styles — e.g., AMA, Vancouver, Freshwater Science (but not Freshwater Biology)…

dstillman commented 3 years ago

Disregard, this is correct.