Skip to content

Commit

Permalink
Tweak the rendering of the bibliography to an unordered list.
Browse files Browse the repository at this point in the history
Previously, the bibliography entries have been rendered as individual paragraphs. This commit tweaks the rendering to rather use an unstyled, left-aligned, unordered list.

This essentially fixes asciidoctor#76 and relates to asciidoctor/asciidoctor-pdf#1889.
  • Loading branch information
odrotbohm committed Apr 27, 2022
1 parent bd341f1 commit 86f1e33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/asciidoctor-bibtex/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ def replace_bibitem_macros(line)
#
# Return an array of texts representing an asciidoc list.
def build_bibliography_list

result = []
result << '[.text-left]'
result << '[unstyled]'

@citations.each_with_index do |ref, index|
result << build_bibliography_item(ref, index)
result << ''
Expand Down Expand Up @@ -170,7 +174,7 @@ def build_bibitem_text(key)
# Build bibliography text for a given reference
def build_bibliography_item(key, index = 0)
index += 1
result = ''
result = '* '

begin
cptext = if @biblio[key].nil?
Expand Down

0 comments on commit 86f1e33

Please sign in to comment.