bdarcus / csln

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

Titles #106

Closed bdarcus closed 6 months ago

bdarcus commented 1 year ago

As I've been experimenting (see #100), titles turn out to be deceptively tricky.

The way CSL 1.0 works, we have:

The problem is, formatting of each of those depends on their type; hence a primary reason for the conditional.

For example, it's extremely common to render component titles quoted, and otherwise render them in italics.

With #100, I now have this:

bibliography: 
  template:
    - contributor: author
      form: long
    - date: issued
      form: year
    - title: title # QUESTION
    - title: parent-monograph # NOTE
      prefix: In 
      emph: true
    - title: parent-serial # NOTE
      emph: true
    - date: issued
      form: month-day
    - number: volume
    - variable: doi

The "note": these components only render if there's a value for them. So in effect, they are simple conditionals.

The "question": what to do with the main title?

Options:

  1. add top-level config options for this, per #104, which are in effect like standardized 1.0 macros
  2. split that title type into two (monograph-title and component-title probably), just like in #100 for the parent title; could easily be extended later to include additional conditions, like type

The first is probably more complex, the second would result in more verbose templates.

PS - I am aware of needing to think about related titles other than parents/containers; ideally they can be easily added.

bdarcus commented 1 year ago

If and when you have time, @denismaier, any thoughts on titles?

denismaier commented 1 year ago

Just a quick question for clarification: what do you mean with main title?

bdarcus commented 1 year ago

Yeah: I can see that's ambiguous.

The work title; CSL 1.0 "title".

Main and sub stuff will be handled the same as the dates example above: with the "form" field.

The "title" values just specify which data to get. So this is just saying, if there's a serial parent title, use it.

title: parent-serial

I'm really trying to find a way to avoid a 1.0-like conditional.

bdarcus commented 1 year ago

Reading through some of the history, to avoid making a dumb mistake ...

Here's the original discussion thread that documents the decision to add macros.

https://sourceforge.net/p/xbiblio/mailman/xbiblio-devel/thread/D221FAB5-D1A8-47F5-98A9-E1EE825641E6%40simonster.com/#msg3519484

Substitution and title requirements (different formatting when substituted; not now supported here, and may be tricky with this approach), and why the conditional:

https://sourceforge.net/p/xbiblio/mailman/xbiblio-devel/thread/C123BC3B.17AD1%25simon%40simonster.com/#msg3519323

Note: I think the conditional design (BTW, Simon suggested calling it this rather than choose at that point) is maybe a consequence of it's being XML, and can be different here if we need it. See #20 for details.

Why we ditched the required article, book, chapter "fallback" templates:

https://sourceforge.net/p/xbiblio/mailman/xbiblio-devel/thread/5222DFE8-7FE4-4C5F-BBFA-29116282E996%40muohio.edu/#msg3519424](https://sourceforge.net/p/xbiblio/mailman/xbiblio-devel/thread/fbb7c5df0907040952r7e0c9ae8hbe9050916e0a4099%40mail.gmail.com/#msg22959134)

A suggested list of standardized macro names:

https://sourceforge.net/p/xbiblio/mailman/message/18358554/

Aside: this quote of mine seems to have stuck in the back of my brain!

It's a bad idea IMHO to treat publisher and place as ... flat fields in ways that are inconsistent with other structures (notably contributor).

A publisher is an organization responsible for distributing some citable thing. It has a name, and it has an address (place).

Initial upshot of the above suggests these make sense

For titles:

Still thinking on this given the above.

denismaier commented 12 months ago

Ok, a couple of ideas:

By the way, while we're at titles, biblatex also has a booktitle and a maintitle, so there should probably another level in the hierarchy.

bdarcus commented 12 months ago

The BibLaTeX examples are indeed interesting. They basically use type lists for the conditions; something like:

- title: title
  types: [ article, post ]

... biblatex also has a booktitle and a maintitle, so there should probably another level in the hierarchy.

Would not booktitle basically be this parent-monograph?

And what's maintitle?

Another option there is to add the relation field.

- title: main
  relation: parent
denismaier commented 12 months ago

Bruce D'Arcus. An essay concerning reference lists. In Collected Works, Vol. 5: On citations and references... Book title: volume title Maintitle: Collected Works

So, just another level in the hierarchy.

bdarcus commented 11 months ago

I think, on reflection, the primary issue is only with primary titles.

Given my general uncertainty about whether we really need a template conditional, and what the ideal design should be, my impulse is to be more minimal early on; something like at the top-level

  titles:
    primary:
    - class: component # chapter and article titles render the same
      type: [article, chapter] # just for illustration; probably wouldn't need here
      style: [quote]
    default:
      style: [emph]

Final decisions on what all this should look like would really need input and testing from domain experts (e.g. style authors/editors), and/or #29 #45, but I need a reasonable solution now to actually implement a basic Chicago style.