[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: citations: org-cite vs org-ref 3.0
From: |
Bruce D'Arcus |
Subject: |
Re: citations: org-cite vs org-ref 3.0 |
Date: |
Tue, 19 Apr 2022 18:37:56 -0400 |
On Mon, Mar 21, 2022 at 10:06 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
> Bruce and I looked into this UI approach in
> https://github.com/jkitchin/org-ref-cite/issues/9. Bruce and I discussed and
> worked on this for almost two weeks. There are 70 comments in this issue.
>
> There are opportunities now to annotate completion targets, which you can see
> in the link above. The annotations are not selectable though during
> completion, and this implementation was not too fast as I recall.
FWIW, an alternative I was playing with is something like this, which
makes use of the new oc-biblatex styles defcustom:
(defcustom style-select-latex-commands nil
"Whether to use latex commands for style selection."
:group 'style
:type '(boolean))
(defun style-latex-alist (&optional swap)
"Return org-cite-biblatex-styles as alist.
By default, each car is the latex command, and the cdr the
org-cite style with variant. With SWAP, they are reversed."
(let ((raw-styles org-cite-biblatex-styles))
(mapcar
(lambda (s)
(let* ((style (elt s 0))
(variant (elt s 1))
(command (elt s 2))
(cstyle (concat style (when variant "/") variant)))
(if swap
(cons cstyle command)
(cons command cstyle))))
raw-styles)))
(defun style-select ()
"Select oc style."
(let* ((latex-commands style-select-latex-commands)
(styles
(if latex-commands (style-latex-alist)
(style-latex-alist t)))
(choice
(completing-read
(if latex-commands "Biblatex command: "
"Style: ") styles)))
(cdr
(if style-select-latex-commands (assoc choice (style-latex-alist))
(rassoc choice (style-latex-alist))))))
> You probably should also augment the tooltips like this because you have to
> be able to tell what a citation format is in the future too, not just at
> insert time, e.g. suppose you are reading work of a collaborator. It was hard
> to write, and ambiguous in ways, e.g. what is the export backend you want?
> The annotations should differ for LaTeX (where you want to see the latex
> command) vs HTML (where you probably want to see the formatted CSL cite)...
I was thinking it'd be enough to have a tooltip preview of the
citation, and allow the actual preview to be configurable.
Bruce
> We did not surmount these challenges at the time. Maybe others will succeed
> in this another day.
>
> John
>
> -----------------------------------
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
>
> On Mon, Mar 21, 2022 at 8:42 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:
>>
>> On Mon, Mar 21, 2022 at 8:23 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>
>> >> A package could be created, say `org-cite-literal-biblatex' which is just
>> >> a copy
>> >> of `oc-biblatex.el' with a different default `org-cite-biblatex-styles'
>> >> and
>> >> `org-cite-biblatex-style-shortcuts' (or just sets those variables in
>> >> `org-cite-biblatex'). As far as I can tell this would provide exactly the
>> >> functionality you say org-cite can’t provide but org-ref does.
>> >
>> >
>> > I wrote this package you suggest in org-ref-cite. In discussions during
>> > that development, it was clear the preference was on the more abstracted,
>> > and uniform syntax across backends cite commands in org-cite, and not this
>> > kind of variant. Of course one can do this. It is not that org-cite can't
>> > provide it, it is that it doesn't at this time.
>>
>> Just for some broader context on this particular issue.
>>
>> The advantage of the org-cite style/variant design reflected in the
>> included export processors (natbib, biblatex, csl) is that the same
>> styles will mostly generate the same final output.
>>
>> But that portability will only work with those styles and variants.
>>
>> With the new org-cite-biblatex-styles defcustom, however, one can
>> augment or completely replace all those. But if you care about that
>> portability, you'd want to be aware of this, and think about it.
>>
>> So per Timothy's point, you actually don't even need a new processor
>> for biblatex if you want to include all the extensive list of biblatex
>> commands.
>>
>> Natbib AFAIK is already fully covered.
>>
>> There's another POV on this though:
>>
>> If one doesn't like to see the org-cite styles, because of familiarity
>> with LaTeX commands etc., I would argue that can be addressed in the
>> style part of an insert processor and/or in an activate processor.
>> E.g. I would argue this is a UI issue; not fundamentally about the
>> styles names.
>>
>> Bruce
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: citations: org-cite vs org-ref 3.0,
Bruce D'Arcus <=