Skip to content

Commit 08af1e3

Browse files
committed
Set custom-style to "Bibliography" on reference sections
The "Bibliography" style is applied by pandoc for reference sections, but here this has to be done by the filter, since pandoc doesn't recognize the topic bibliographies as reference sections. Closes: pandoc-ext#14
1 parent 192941b commit 08af1e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

_extensions/multibib/multibib.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ local function create_topic_bibliography (div)
135135
-- Set the classes and attributes as citeproc did it on refs_div
136136
div.classes = remove_duplicates(refs_div_with_properties.classes)
137137
div.attributes = refs_div_with_properties.attributes
138+
if FORMAT == 'odt' or FORMAT == 'docx' then
139+
-- Pandoc assignes the "Bibliography" to reference sections in Word, so
140+
-- let's do it here, too, unless it's already set.
141+
div.attributes['custom-style'] = div.attributes['custom-style']
142+
or 'Bibliography'
143+
end
144+
138145
return div
139146
end
140147

0 commit comments

Comments
 (0)