Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
On Sat, Aug 13, 2022 at 8:30 AM András Simonyi wrote: > > Dear All, > > On Tue, 9 Aug 2022 at 17:38, Rudolf Adamkovič wrote: > > > THANK YOU for working on this! I have tried the "locators" style, and > > it works great. At last, we can write in the APA style with no hacks! > > thanks for your kind words, I'm glad that you find the additions useful. > > > P.S. Not a fan of using "ti" for the title. I would go for "T" for > > "Title", or "p" for "publication", or "s" for "subject", or something > > like that. > > interesting, it didn't occur to me that we could use capital letters > as well, certainly an alternative to consider. I'm not a fan; I think it would open a can-of-worms vis-a-vis the latex processors and commands. > Another solution could be to make the whole mapping customizable as > it's done, I think, in the case of the biblatex export processor. I actually think the case for this is weakest with the oc-csl processor. Here, there is no style -> command mapping; it's just direct. So effectively the style names and shortcuts are just aesthetic. And changing them means the citations are then tied to the export processor, and the specific user. Bruce
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
Dear All, On Tue, 9 Aug 2022 at 17:38, Rudolf Adamkovič wrote: > THANK YOU for working on this! I have tried the "locators" style, and > it works great. At last, we can write in the APA style with no hacks! thanks for your kind words, I'm glad that you find the additions useful. > P.S. Not a fan of using "ti" for the title. I would go for "T" for > "Title", or "p" for "publication", or "s" for "subject", or something > like that. interesting, it didn't occur to me that we could use capital letters as well, certainly an alternative to consider. Another solution could be to make the whole mapping customizable as it's done, I think, in the case of the biblatex export processor. best wishes, András
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
András Simonyi writes: > - cite/locators or cite/l to cite only the locators, and THANK YOU for working on this! I have tried the "locators" style, and it works great. At last, we can write in the APA style with no hacks! P.S. Not a fan of using "ti" for the title. I would go for "T" for "Title", or "p" for "publication", or "s" for "subject", or something like that. Rudy -- "It is no paradox to say that in our most theoretical moods we may be nearest to our most practical applications." -- Alfred North Whitehead, 1861-1947 Rudolf Adamkovič [he/him] Studenohorská 25 84103 Bratislava Slovakia
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
András Simonyi writes: > Dear All, > > On Sun, 7 Aug 2022 at 11:45, Ihor Radchenko wrote: > >> LGTM in general, but please add a proper commit message. > [...] >> Also, it would be useful to explain a bit what bibentry stands for. > > thanks, I've attached a new patch implementing these recommendations. Thanks! Applied onto main via c7d484130 with minor amendments adding "." at the end of comment sentences. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c7d484130c19c0a1fe172a8d76b9cfc296d2ed54 -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
Dear All, On Sun, 7 Aug 2022 at 11:45, Ihor Radchenko wrote: > LGTM in general, but please add a proper commit message. [...] > Also, it would be useful to explain a bit what bibentry stands for. thanks, I've attached a new patch implementing these recommendations. best wishes, András From 361e78eca47d2a6472064ae37d43e9c1e131faa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= Date: Tue, 2 Aug 2022 11:32:17 +0200 Subject: [PATCH] oc-csl: Add support for title, locators and bibentry citation styles * lisp/oc-csl.el: Register the newly added citation styles "title", "locators and "bibentry" as supported by the "csl" export processor. (org-cite-csl--create-structure-params): Add support for the creation of citation structures with the new citation styles. --- lisp/oc-csl.el | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 0b2fe5c41..7fcc1f1f2 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -61,11 +61,16 @@ ;; - noauthor (na), including bare (b), caps (c) and bare-caps (bc) variants, ;; - nocite (n), ;; - year (y), including a bare (b) variant, -;; - text (t). including caps (c), full (f), and caps-full (cf) variants, +;; - text (t), including caps (c), full (f), and caps-full (cf) variants, +;; - title (ti), including a bare (b) variant, +;; - locators (l), including a bare (b) variant, +;; - bibentry (b), including a bare (b) variant, ;; - default style, including bare (b), caps (c) and bare-caps (bc) variants. ;; -;; Using "*" as a key in a nocite citation includes all available items in -;; the printed bibliography. +;; Using "*" as a key in a nocite citation includes all available +;; items in the printed bibliography. The "bibentry" citation style, +;; similarly to biblatex's \fullcite, creates a citation which is +;; similar to the bibliography entry. ;; CSL styles recognize "locator" in citation references' suffix. For example, ;; in the citation @@ -349,6 +354,21 @@ a property list." (pcase variant ((or "bare" "b") '(:mode year-only :suppress-affixes t)) (_ '(:mode year-only + ;; "bibentry" style + (`(,(or "bibentry" "b") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode bib-entry :suppress-affixes t)) + (_ '(:mode bib-entry + ;; "locators" style + (`(,(or "locators" "l") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode locator-only :suppress-affixes t)) + (_ '(:mode locator-only + ;; "title" style + (`(,(or "title" "ti") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode title-only :suppress-affixes t)) + (_ '(:mode title-only ;; "text" style. (`(,(or "text" "t") . ,variant) (pcase variant @@ -730,7 +750,10 @@ property list." (("year" "y") ("bare" "b")) (("text" "t") ("caps" "c") ("full" "f") ("caps-full" "cf")) (("nil") ("bare" "b") ("caps" "c") ("bare-caps" "bc")) -(("nocite" "n" +(("nocite" "n")) +(("title" "ti") ("bare" "b")) +(("bibentry" "b") ("bare" "b")) +(("locators" "l") ("bare" "b" (provide 'oc-csl) ;;; oc-csl.el ends here -- 2.25.1
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
András Simonyi writes: > the attached patch adds support for three new citation styles which > recently got supported by citeproc-el: > > - cite/title or cite/ti to cite only the title of an item, > - cite/locators or cite/l to cite only the locators, and > - cite/bibentry or cite/b to cite the full bibliography entry. LGTM in general, but please add a proper commit message. See https://orgmode.org/worg/org-contribute.html#commit-messages Also, it would be useful to explain a bit what bibentry stands for. Maybe provide an example. > I put "RFC" in the subject because I'm not entirely sure about naming > the "bibentry" style, since "bibentry" is natbib terminology, I think, > and biblatex's corresponding command is \fullcite, but I find > "bibentry" slightly more adequate. Also, do we need the "ti" > abbreviation for the "title" style? I guess Bruce has answered all the questions. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
Re: [RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
On Tue, Aug 2, 2022 at 7:14 AM András Simonyi wrote: > the attached patch adds support for three new citation styles which > recently got supported by citeproc-el: > > - cite/title or cite/ti to cite only the title of an item, > - cite/locators or cite/l to cite only the locators, and > - cite/bibentry or cite/b to cite the full bibliography entry. > > I put "RFC" in the subject because I'm not entirely sure about naming > the "bibentry" style, since "bibentry" is natbib terminology, I think, > and biblatex's corresponding command is \fullcite, but I find > "bibentry" slightly more adequate. I agree; there's no ideal name that I can see, and it fits better in the existing style naming scheme. We (well someone :-)) should add the same to the natbib and biblatex processors, though I believe natbib has a wrinkle where you also have to add a preamble line or something. > Also, do we need the "ti" abbreviation for the "title" style? I think so. Bruce
[RFC PATCH] oc-csl: Add support for title, locators and bibentry styles
Dear All, the attached patch adds support for three new citation styles which recently got supported by citeproc-el: - cite/title or cite/ti to cite only the title of an item, - cite/locators or cite/l to cite only the locators, and - cite/bibentry or cite/b to cite the full bibliography entry. I put "RFC" in the subject because I'm not entirely sure about naming the "bibentry" style, since "bibentry" is natbib terminology, I think, and biblatex's corresponding command is \fullcite, but I find "bibentry" slightly more adequate. Also, do we need the "ti" abbreviation for the "title" style? thanks and best wishes, András From 09b3619693cf4979212d828a0452741e00fca8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= Date: Tue, 2 Aug 2022 11:32:17 +0200 Subject: [PATCH] oc-csl: Add support for title, locators and bibentry citation styles --- lisp/oc-csl.el | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 0b2fe5c41..d84c97e69 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -61,7 +61,10 @@ ;; - noauthor (na), including bare (b), caps (c) and bare-caps (bc) variants, ;; - nocite (n), ;; - year (y), including a bare (b) variant, -;; - text (t). including caps (c), full (f), and caps-full (cf) variants, +;; - text (t), including caps (c), full (f), and caps-full (cf) variants, +;; - title (ti), including a bare (b) variant, +;; - locators (l), including a bare (b) variant, +;; - bibentry (b), including a bare (b) variant, ;; - default style, including bare (b), caps (c) and bare-caps (bc) variants. ;; ;; Using "*" as a key in a nocite citation includes all available items in @@ -349,6 +352,21 @@ a property list." (pcase variant ((or "bare" "b") '(:mode year-only :suppress-affixes t)) (_ '(:mode year-only + ;; "bibentry" style + (`(,(or "bibentry" "b") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode bib-entry :suppress-affixes t)) + (_ '(:mode bib-entry + ;; "locators" style + (`(,(or "locators" "l") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode locator-only :suppress-affixes t)) + (_ '(:mode locator-only + ;; "title" style + (`(,(or "title" "ti") . ,variant) + (pcase variant + ((or "bare" "b") '(:mode title-only :suppress-affixes t)) + (_ '(:mode title-only ;; "text" style. (`(,(or "text" "t") . ,variant) (pcase variant @@ -730,7 +748,10 @@ property list." (("year" "y") ("bare" "b")) (("text" "t") ("caps" "c") ("full" "f") ("caps-full" "cf")) (("nil") ("bare" "b") ("caps" "c") ("bare-caps" "bc")) -(("nocite" "n" +(("nocite" "n")) +(("title" "ti") ("bare" "b")) +(("bibentry" "b") ("bare" "b")) +(("locators" "l") ("bare" "b" (provide 'oc-csl) ;;; oc-csl.el ends here -- 2.25.1