-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listing all styles, including dependents #6
Comments
There is a second part to this question, which is that I can't do a |
It's just a missing feature. You're absolutely right that the dependent folder should be searched when loading styles, I just never got around to implementing it, because I never needed dependent styles myself. |
Got it. I'll try to contribute a PR or two that adds these, but I'm a bit confused since this may be touching several of the repositories. For example, even if I get a But now that I understand it's a missing feature, I can make headway - thanks! |
(closed by accident) |
Actually, scratch my last comment - the processor works just fine, it's just that some of the dependent styles are missing a bibliography node, such as: CSL::Style.load('dependent/homo-journal-of-comparative-human-biology.csl').bibliography
# returns nil I'm still a beginner in the world of CSL/citeproc, so apologies if I am overly confused. |
Right, perfectly obvious. For this to work the bibliography needs to be loaded from the dependent's parent |
Yes, the three repos are a bit cumbersome. The decision to extract Anyway, yes, to use dependent styles you would basically just load their independent parent. Also see here for a related discussion. There is already some functionality to load the corresponding independent style so what's missing, mostly, is a convenient way to list all styles and load them by name. If I remember correctly, a dependent style could in theory include their own locale which would have to be merged into the independent style. I think that's the only case that can result in different output when using a dependent style versus using the independent parent directly. (However, the last time I checked there was no dependent style in the official repository that defined their own locale). Apart from being able to list all dependent styles, I think it would make sense for the processor to load an independent parent automatically if you pass it a dependent style. |
I may be missing something here, so this may be a question rather than a feature request.
When I try to list all available CSL styles on the local filesystem via:
I seem to be missing out on all of the styles under
dependent/
. For now I have resorted to add my own code to look specifically inCSL::Style.root + "/dependent
, but shouldn't this be part of the official API?Or am I misunderstanding something about the dependent styles in CSL?
I would expect to see
.list
return the same as:Thanks for any advice!
The text was updated successfully, but these errors were encountered: