Skip to content

Commit 9c03af7

Browse files
tarlebwlupton
authored andcommitted
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: #14
1 parent 7574925 commit 9c03af7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

_extensions/multibib/multibib.lua

+7
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ local function create_topic_bibliography (div)
184184
-- Set the classes and attributes as citeproc did it on refs_div
185185
div.classes = remove_duplicates(refs_div_with_properties.classes)
186186
div.attributes = refs_div_with_properties.attributes
187+
if FORMAT == 'odt' or FORMAT == 'docx' then
188+
-- Pandoc assignes the "Bibliography" to reference sections in Word, so
189+
-- let's do it here, too, unless it's already set.
190+
div.attributes['custom-style'] = div.attributes['custom-style']
191+
or 'Bibliography'
192+
end
193+
187194
return div
188195
end
189196

0 commit comments

Comments
 (0)