bdarcus / csln

Reimagining CSL
Mozilla Public License 2.0
12 stars 0 forks source link

Make "presets" pervasive? #89

Open bdarcus opened 1 year ago

bdarcus commented 1 year ago

Idea

I need to think more on the details, but the idea is to have pervasive options for "presets", that bundle together "custom" logic that in CSL 1.0 are defined in macros.

So the way that would work is to define some X number of such presets, which are based on 1.0 styles, and then extend as needed. That gets the benefits of my earlier shared components, without need to distribute them apart from the code.

For sure there are wrinkles, but I'm trying to avoid need for conditionals, and make authoring or editing a style as simple as possible.

I may also want to enforce a more strict separation between global options and local templates.

Strategies

Edit: I've elected path 2 for now, starting with Chicago author-date.

To do that right, however, I see two options:

  1. 29 and #45 to see what's practical; to automate a lot of it.

  2. better/easier, just hand-author a complete author-date style, either Chicago and APA, and see how this might work

The first goes general to concrete, and the second the reverse.


I'm toying now with extending some of the design tweaks, so one could do something like this:

title: ABC journal
processing: author-date # preset processing
dates: long # preset dates
contributors: long # preset contributors
titles: apa # preset titles
citation:
  template:
    - contributor: author

Originally posted by @bdarcus in https://github.com/bdarcus/csln/issues/49#issuecomment-1604980433

bdarcus commented 1 year ago

@denismaier - as followup to the ping, this is what I'm experimenting with, just with YAML (no code ATM).

https://github.com/bdarcus/csln/blob/main/processor/examples/chicago-ad-experiment.yaml