emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/org 82bb04b 2/3: oc-biblatex: Spell out multicite comma


From: ELPA Syncer
Subject: [elpa] externals/org 82bb04b 2/3: oc-biblatex: Spell out multicite commands instead of guessing them
Date: Sun, 12 Dec 2021 09:57:32 -0500 (EST)

branch: externals/org
commit 82bb04be221f8498dfce323d2455887469ed6853
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    oc-biblatex: Spell out multicite commands instead of guessing them
    
    * lisp/oc-biblatex.el (org-cite-biblatex-export-citation): Provide
    full multicite command name.
    (org-cite-biblatex--command): Use name instead of guessing it from
    base name.
---
 lisp/oc-biblatex.el | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/lisp/oc-biblatex.el b/lisp/oc-biblatex.el
index 1a83bd0..8496a91 100644
--- a/lisp/oc-biblatex.el
+++ b/lisp/oc-biblatex.el
@@ -170,18 +170,18 @@ INFO is the export state, as a property list."
             ;; a \relax unconditionally.
             "\\relax")))
 
-(defun org-cite-biblatex--command (citation info base &optional multi no-opt)
-  "Return biblatex command using BASE name for CITATION object.
+(defun org-cite-biblatex--command (citation info name &optional multi no-opt)
+  "Return BibLaTeX command NAME for CITATION object.
 
 INFO is the export state, as a property list.
 
-When optional argument MULTI is non-nil, generate a \"multicite\" command when
-appropriate.  When optional argument NO-OPT is non-nil, do not add optional
-arguments to the command."
-  (format "\\%s%s"
-          base
-          (if (and multi (org-cite-biblatex--multicite-p citation))
-              (concat "s" (org-cite-biblatex--multi-arguments citation info))
+When optional argument MULTI is non-nil, use it as a multicite
+command name when appropriate.  When optional argument NO-OPT is
+non-nil, do not add optional arguments to the command."
+  (if (and multi (org-cite-biblatex--multicite-p citation))
+      (format "\\%s%s" multi (org-cite-biblatex--multi-arguments citation 
info))
+    (format "\\%s%s"
+            name
             (org-cite-biblatex--atomic-arguments
              (org-cite-get-references citation) info no-opt))))
 
@@ -241,15 +241,15 @@ INFO is the export state, as a property list."
      ;; "text" style.
      (`(,(or "text" "t") . ,variant)
       (pcase variant
-        ((or "caps" "c")            '("Textcite" t))
-        (_                          '("textcite" t))))
+        ((or "caps" "c")            '("Textcite" "Textcites"))
+        (_                          '("textcite" "textcites"))))
      ;; Default "nil" style.
      (`(,_ . ,variant)
       (pcase variant
-        ((or "bare" "b")            '("cite" t))
-        ((or "caps" "c")            '("Autocite" t))
-        ((or "bare-caps" "bc")      '("Cite" t))
-        (_                          '("autocite" t))))
+        ((or "bare" "b")            '("cite" "cites"))
+        ((or "caps" "c")            '("Autocite" "Autocites"))
+        ((or "bare-caps" "bc")      '("Cite" "Cites"))
+        (_                          '("autocite" "autocites"))))
      ;; This should not happen.
      (_ (error "Invalid style: %S" style)))))
 



reply via email to

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