Improvements for dependent styles

People often need styles that differ only in minor aspects from already existing styles. But at the moment we have only independent styles and completely dependent styles. So even if we need only small adjustments, we still have to create a new independent copy of an existing style. This works but it is not very convenient and it also makes updates more complicated.

What I suggest is a mechanism where dependent styles could override certain aspects of their parents, like you could redefine a certain macro or cs:citation etc.

I can see the appeal, but I’d be worried that a more flexible system would create unexpected problems with dependency maintenance. For example, a style that is the same as its parent but swap out the author macro might be unexpectedly changed if the parent changes.

1 Like

Sure, but I think we are in a similar situation already, albeit in different ways. Right now, you copy an existing style and apply some tweaks. But then there are updates in the original style, some item type is formatted more accurately, some bugs get corrected or so. Now you’ll have to merge those changes into your own modified copy, but only if you know about the changes in the first place.

I agree that it wouldn’t be a good idea to use an inheritance based approach for styles in the repository, at least not in the absence of a clever warning mechanism. But I think this could nevertheless be extremely useful for personal/local adjustments of existing styles, like when you’re supposed to write a research paper and the rules at your department say “please follow MLA 8th edition, except for this: always include the place of publication.” Of course, those who were using such an approach would need to make sure for themselves that nothings breaks.

It’s a valid conversation to have, but I’d like to respectfully push back:

  1. The macro system was intended in part as a way to avoid needless duplication (though it only goes so far of course).
  2. CSL styles are effectively self-contained (notwithstanding the aliasing of dependent styles), and there’s value in that, per @bwiernik.
  3. Any problems we have are mostly a consequence of lack of fully-realized infrastructure. Better UIs, AI-based style assembly wizards, etc. would resolve, or at least substantially improve, this situation.

Just for the record: Looks like this has been there before…