emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-exp-bibtex.el patch for zotero-generated citekeys


From: Nik Putnam
Subject: [O] org-exp-bibtex.el patch for zotero-generated citekeys
Date: Mon, 12 Sep 2011 15:26:06 -0500

Dear Taru and orgmode community,

Org-mode export to HTML is a really useful thing, and I love the
bibtex integration.

I had a problem exporting from org-mode to HTML, with bibtex.  I was
able to fix it with a change to a regular expression
org-exp-bibtex.el.  The diff is shown below.

(My bibtex citekeys were auto-created by zotero, and use underscores.
Some even have dashes.)

I thought this might be useful to others as well.

Thanks,

Nik

--- a/contrib/lisp/org-exp-bibtex.el
+++ b/contrib/lisp/org-exp-bibtex.el
@@ -102,8 +102,9 @@
           (save-match-data
             (insert-file-contents (concat file ".html"))
             (goto-char (point-min))
-             (while (re-search-forward "a
name=\"\\(\\w+\\)\">\\(\\w+\\)" nil t)
-               (setq oebp-cite-plist (cons (cons (match-string 1)
(match-string 2)) oebp-cite-plist)))
+             (while (re-search-forward "a
name=\"\\([a-z0-9A-Z_\\-]+\\)\">\\(\\w+\\)" nil t)
+               (setq oebp-cite-plist (cons (cons (match-string 1)
(match-string 2)) oebp-cite-plist))
+                       )
             (goto-char (point-min))
             (while (re-search-forward "<hr>" nil t)
               (replace-match "<hr/>" t t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]