Function: org-cite-basic--format-author-year

org-cite-basic--format-author-year is a byte-compiled function defined in oc-basic.el.gz.

Signature

(org-cite-basic--format-author-year CITATION FORMAT-CITE FORMAT-REF INFO)

Documentation

Format CITATION object according to author-year format.

FORMAT-CITE is a function of three arguments: the global prefix, the contents, and the global suffix. All arguments can be strings or secondary strings.

FORMAT-REF is a function of four arguments: the reference prefix, as a string or secondary string, the author, the year, and the reference suffix, as a string or secondary string.

INFO is the export state, as a property list.

Source Code

;; Defined in /usr/src/emacs/lisp/org/oc-basic.el.gz
;;; "Export" capability
(defun org-cite-basic--format-author-year (citation format-cite format-ref info)
  "Format CITATION object according to author-year format.

FORMAT-CITE is a function of three arguments: the global prefix, the contents,
and the global suffix.  All arguments can be strings or secondary strings.

FORMAT-REF is a function of four arguments: the reference prefix, as a string or
secondary string, the author, the year, and the reference suffix, as a string or
secondary string.

INFO is the export state, as a property list."
  (org-export-data
   (funcall format-cite
            (org-element-property :prefix citation)
            (org-cite-mapconcat
             (lambda (ref)
               (let ((k (org-element-property :key ref))
                     (prefix (org-element-property :prefix ref))
                     (suffix (org-element-property :suffix ref)))
                 (funcall format-ref
                          prefix
                          (or (org-cite-basic--get-author k info) "??")
                          (or (org-cite-basic--get-year k info) "????")
                          suffix)))
             (org-cite-get-references citation)
             org-cite-basic-author-year-separator)
            (org-element-property :suffix citation))
   info))