Skip to content

Commit

Permalink
- Add URL extraction from bibtex entries and put it into generated bi…
Browse files Browse the repository at this point in the history
…bliography list

- Proper numeration of entries
  • Loading branch information
alexott committed May 26, 2009
1 parent a78ce92 commit 49c91d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lisp/muse-html.el
Expand Up @@ -736,14 +736,18 @@ This tag requires htmlize 1.34 or later in order to work."
"Create HTML text for given bibtex entry"
(let ((bdata (gethash entry bib nil)))
(when bdata
(let ((author (muse-html-get-bib-data "author" bdata))
(let ((author (or (muse-html-get-bib-data "author" bdata)
(muse-html-get-bib-data "ALTauthor" bdata)))
(title (muse-html-get-bib-data "title" bdata))
(year (muse-html-get-bib-data "year" bdata))
(publisher (muse-html-get-bib-data "publisher" bdata))
(url (muse-html-get-bib-data "url" bdata))
)
(concat (format "<a name=\"bib-%s\"></a>" entry)
(if author (concat author ". ") "")
(if url (concat "<a href=\"" url "\">") "")
(or title "")
(if url "</a>" "")
(if publisher
(concat ". " publisher (if year (concat ", " year) ""))
(if year (concat ", " year) "")
Expand All @@ -770,7 +774,7 @@ This tag requires htmlize 1.34 or later in order to work."
(cdr (assoc 'section-end muse-html-markup-strings))
"\n"))
(muse-insert-markup (cdr (assoc 'begin-oli muse-html-markup-strings)))
(dolist (x muse-publish-cite-list)
(dolist (x (reverse muse-publish-cite-list))
(let ((btext (muse-html-generate-bib-entry x bib)))
(when btext
(muse-insert-markup (concat (cdr (assoc 'begin-oli-item muse-html-markup-strings))
Expand Down

0 comments on commit 49c91d1

Please sign in to comment.