]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.el
rm {} individually and add techreport.
[org-ref.git] / org-ref.el
index 4ad23bd0023dff86aaa39525e99965a46b7339e0..0b86ed0156fd8d76572fdb2ffdf160625cc2df0b 100644 (file)
@@ -81,11 +81,9 @@ You should use full-paths for each file."
   '(("article" . "%a, %t, <i>%j</i>, <b>%v(%n)</b>, %p (%y). <a href=\"%U\">link</a>. <a href=\"http://dx.doi.org/%D\">doi</a>.")
 
     ("book" . "%a, %t, %u (%y).")
-
+    ("techreport" . "%a, %t, %u (%y).")
     ("proceedings" . "%e, %t in %S, %u (%y).")
-
     ("inproceedings" . "%a, %t, %p, in %b, edited by %e, %u (%y)"))
-
   "String to format an entry.  Just the reference, no numbering at the beginning, etc... see the `org-ref-reftex-format-citation' docstring for the escape codes."
   :type 'string
   :group 'org-ref)
@@ -548,9 +546,13 @@ Format according to the type in `org-ref-bibliography-entry-format'."
     ;; unescape the &
     (setq output (replace-regexp-in-string "\\\\&" "&" output))
     ;; hack to replace {} around text
-    (setq output (replace-regexp-in-string " {\\(.*\\)} " " \\1 " output))
+    (setq output (replace-regexp-in-string "{" "" output))
+    (setq output (replace-regexp-in-string "}" "" output))
     ;; get rid of empty parens
     (setq output (replace-regexp-in-string "()" "" output))
+    ;; get rid of empty link and doi
+    (setq output (replace-regexp-in-string " <a href=\"\">link</a>\\." "" output))
+    (setq output (replace-regexp-in-string " <a href=\"http://dx\\.doi\\.org/\">doi</a>\\." "" output))
     (format "<li><a id=\"%s\">[%s] %s</a></li>"
            key key output)))