Closed bdarcus closed 6 months ago
If and when you have time, @denismaier, any thoughts on titles?
Just a quick question for clarification: what do you mean with main title?
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.
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.
Substitution and title requirements (different formatting when substituted; not now supported here, and may be tricky with this approach), and why the conditional:
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:
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
conditions
to the template components; it will have some limitations, I think, but should workFor titles:
Still thinking on this given the above.
Ok, a couple of ideas:
use macros instead of rendering the title directly. In this macro, using conditionals wouldn't be to painful, or would it?
I think the pattern matching idea could be quite nice. It's actually close to what biblatex does: https://github.com/plk/biblatex/blob/083c54d7ab9e09d254c5b0ce1b508fd10074e48c/tex/latex/biblatex/biblatex.def#L579C32-L579C32 defines the field formats for the title (first the default format, then diverging formats for special types). In styles you'll then just use \printfield
to actually print the title using the defined format. (I think there's a way to override it if that should be necessary.)
regarding conditionals: one way to go could be to provide conditionals
, but also some syntactic sugar.
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.
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
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.
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.
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:
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:
monograph-title
andcomponent-title
probably), just like in #100 for the parent title; could easily be extended later to include additional conditions, liketype
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.