Skip to content
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

multiple-bibliographies: Set the div attributes and classes according to the attributes of the cs:bibliography element #160

Merged
merged 3 commits into from
Feb 9, 2021

Conversation

badumont
Copy link
Contributor

@badumont badumont commented Feb 8, 2021

In the CSL stylesheet, the element cs:bibliography may carry various attributes determining the rendering of the bibliography that citeproc converts into classes and attributes for the references div. As the filter simply puts the partial bibliographies created by citeproc into the custom divs, these classes and attributes are not set (excepted csl-bib-body). I propose to store the div created by citeproc in order to copy its classes and attributes to the custom divs.

It has the side effect that all classes and attributes manually set by the user for the corresponding divs will be ignored. I think it more as a feature than as a drawback, since one probably should not do this anyway, but modify the CSL file instead. However, if the possibility of overriding the CSL file is desired (to use different layouts across the document?), the proposed modification can be expanded so that each class or attribute of refs_div_with_properties is added to div only if it is not already set.

@tarleb tarleb merged commit 1090d1e into pandoc:master Feb 9, 2021
@tarleb
Copy link
Member

tarleb commented Feb 9, 2021

Excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants