[Top][All Lists]

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

[elpa] externals/org d1900ad 1/2: ol-bibtex: Added url and doi as option

From: ELPA Syncer
Subject: [elpa] externals/org d1900ad 1/2: ol-bibtex: Added url and doi as optional entries for BiBTeX export
Date: Thu, 1 Jul 2021 17:57:13 -0400 (EDT)

branch: externals/org
commit d1900adfbe81813ebc0f655470631739fe19ee3d
Author: Eric S Fraga <e.fraga@ucl.ac.uk>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    ol-bibtex: Added url and doi as optional entries for BiBTeX export
    * lisp/ol-bibtex.el: :doi and :url entries added to optional list of
    entries to export to BiBTeX when present in the properties.
    * etc/ORG-NEWS: added news item noting this change.
 etc/ORG-NEWS      |  3 +++
 lisp/ol-bibtex.el | 31 +++++++++++++++++--------------
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 956f1cf..3f39719 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -349,6 +349,9 @@ argument is present.  You can also set =:async no= to force 
it off
 Async evaluation is disabled during export.
 ** Miscellaneous
+*** =org-bibtex= includes =doi= and =url= entries when exporting to BiBTeX
+=doi= and =url= entries have been made optional for some publication
+types and will be exported if present for those types.
 *** Missing or empty placeholders in "eval" macros are now =nil=
 They used to be the empty string.
 *** =org-goto-first-child= now works before first heading
diff --git a/lisp/ol-bibtex.el b/lisp/ol-bibtex.el
index 57b240d..4970be9 100644
--- a/lisp/ol-bibtex.el
+++ b/lisp/ol-bibtex.el
@@ -145,59 +145,59 @@
      (:description . "An article from a journal or magazine")
      (:required :author :title :journal :year)
-     (:optional :volume :number :pages :month :note))
+     (:optional :volume :number :pages :month :note :doi))
      (:description . "A book with an explicit publisher")
      (:required (:editor :author) :title :publisher :year)
-     (:optional (:volume :number) :series :address :edition :month :note))
+     (:optional (:volume :number) :series :address :edition :month :note :doi))
      (:description . "A work that is printed and bound, but without a named 
publisher or sponsoring institution.")
      (:required :title)
-     (:optional :author :howpublished :address :month :year :note))
+     (:optional :author :howpublished :address :month :year :note :doi :url))
      (:description . "")
      (:required :author :title :booktitle :year)
-     (:optional :editor :pages :organization :publisher :address :month :note))
+     (:optional :editor :pages :organization :publisher :address :month :note 
:doi :url))
      (:description . "A part of a book, which may be a chapter (or section or 
whatever) and/or a range of pages.")
      (:required (:author :editor) :title (:chapter :pages) :publisher :year)
-     (:optional :crossref (:volume :number) :series :type :address :edition 
:month :note))
+     (:optional :crossref (:volume :number) :series :type :address :edition 
:month :note :doi))
      (:description . "A part of a book having its own title.")
      (:required :author :title :booktitle :publisher :year)
-     (:optional :crossref :editor (:volume :number) :series :type :chapter 
:pages :address :edition :month :note))
+     (:optional :crossref :editor (:volume :number) :series :type :chapter 
:pages :address :edition :month :note :doi))
      (:description . "An article in a conference proceedings")
      (:required :author :title :booktitle :year)
-     (:optional :crossref :editor (:volume :number) :series :pages :address 
:month :organization :publisher :note))
+     (:optional :crossref :editor (:volume :number) :series :pages :address 
:month :organization :publisher :note :doi))
      (:description . "Technical documentation.")
      (:required :title)
-     (:optional :author :organization :address :edition :month :year :note))
+     (:optional :author :organization :address :edition :month :year :note 
:doi :url))
      (:description . "A Master’s thesis.")
      (:required :author :title :school :year)
-     (:optional :type :address :month :note))
+     (:optional :type :address :month :note :doi :url))
      (:description . "Use this type when nothing else fits.")
-     (:optional :author :title :howpublished :month :year :note))
+     (:optional :author :title :howpublished :month :year :note :doi :url))
      (:description . "A PhD thesis.")
      (:required :author :title :school :year)
-     (:optional :type :address :month :note))
+     (:optional :type :address :month :note :doi :url))
      (:description . "The proceedings of a conference.")
      (:required :title :year)
-     (:optional :editor (:volume :number) :series :address :month 
:organization :publisher :note))
+     (:optional :editor (:volume :number) :series :address :month 
:organization :publisher :note :doi))
      (:description . "A report published by a school or other institution.")
      (:required :author :title :institution :year)
-     (:optional :type :address :month :note))
+     (:optional :type :address :month :note :doi :url))
      (:description . "A document having an author and title, but not formally 
      (:required :author :title :note)
-     (:optional :month :year)))
+     (:optional :month :year :doi :url)))
   "Bibtex entry types with required and optional parameters.")
 (defvar org-bibtex-fields
@@ -207,6 +207,7 @@
     (:booktitle    . "Title of a book, part of which is being cited.  See the 
LaTeX book for how to type titles.  For book entries, use the title field 
     (:chapter      . "A chapter (or section or whatever) number.")
     (:crossref     . "The database key of the entry being cross referenced.")
+    (:doi          . "The digital object identifier.")
     (:edition      . "The edition of a book for example, 'Second'.  This 
should be an ordinal, and should have the first letter capitalized, as shown 
here; the standard styles convert to lower case when necessary.")
     (:editor       . "Name(s) of editor(s), typed as indicated in the LaTeX 
book.  If there is also an author field, then the editor field gives the editor 
of the book or collection in which the reference appears.")
     (:howpublished . "How something strange has been published.  The first 
word should be capitalized.")
@@ -223,6 +224,7 @@
     (:series       . "The name of a series or set of books.  When citing an 
entire book, the title field gives its title and an optional series field gives 
the name of a series or multi-volume set in which the book is published.")
     (:title        . "The work’s title, typed as explained in the LaTeX book.")
     (:type         . "The type of a technical report for example, 'Research 
+    (:url          . "Uniform resource locator.")
     (:volume       . "The volume of a journal or multi-volume book.")
     (:year         . "The year of publication or, for an unpublished work, the 
year it was written.  Generally it should consist of four numerals, such as 
1984, although the standard styles can handle any year whose last four 
nonpunctuation characters are numerals, such as '(about 1984)'"))
   "Bibtex fields with descriptions.")
@@ -507,6 +509,7 @@ ARG, when non-nil, is a universal prefix argument.  See
        :key (cdr (assoc "=key=" entry))
        :author (or (cdr (assoc "author" entry)) "[no author]")
+       :doi (or (cdr (assoc "doi" entry)) "[no doi]")
        :editor (or (cdr (assoc "editor" entry)) "[no editor]")
        :title (or (cdr (assoc "title" entry)) "[no title]")
        :booktitle (or (cdr (assoc "booktitle" entry)) "[no booktitle]")

reply via email to

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