emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Bruce D'Arcus" <bdarcus@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: citations: org-cite vs org-ref 3.0
Date: Tue, 19 Apr 2022 18:37:56 -0400	[thread overview]
Message-ID: <CAF-FPGOyVFExJ2BR+ED+hd1NxK9oiFO-D6BYzi+KqHMz7FO-2g@mail.gmail.com> (raw)
In-Reply-To: <CAJ51ETpWCpzCi0BoB=P5vuUq-9xFGfP-wUQCR+zez+UpsLMZEw@mail.gmail.com>

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


  reply	other threads:[~2022-04-19 22:38 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 12:08 citations: org-cite vs org-ref 3.0 Vikas Rawal
2022-03-20 13:19 ` Nicolas Goaziou
2022-03-20 14:08   ` Vikas Rawal
2022-03-20 14:38     ` Bruce D'Arcus
2022-03-21  0:31   ` John Kitchin
2022-03-21  1:39     ` Timothy
2022-03-21  8:16       ` Dominik Schrempf
2022-03-21 11:51         ` Bruce D'Arcus
2022-03-21 12:34           ` Dominik Schrempf
2022-03-21 12:52             ` Bruce D'Arcus
2022-03-21 13:05               ` Dominik Schrempf
2022-03-21 13:24                 ` Bruce D'Arcus
2022-03-23 21:27                 ` Nicolas Goaziou
2022-03-23 21:53                   ` Bruce D'Arcus
2022-03-23 22:04                     ` Nicolas Goaziou
2022-03-23 22:47                       ` Bruce D'Arcus
2022-03-24 10:04                         ` Dominik Schrempf
2022-03-21 12:19       ` John Kitchin
2022-03-21 12:42         ` Bruce D'Arcus
2022-03-21 14:06           ` John Kitchin
2022-04-19 22:37             ` Bruce D'Arcus [this message]
2022-03-21  3:27     ` Vikas Rawal
2022-03-21 11:51       ` John Kitchin
2022-03-21 17:20         ` Vikas Rawal
2022-03-25 15:53         ` Max Nikulin
2022-03-27 15:33           ` John Kitchin
2022-03-27 15:44             ` Vikas Rawal
2022-03-25 17:10         ` Max Nikulin
2022-03-26 12:41           ` Bruce D'Arcus
2022-03-27 19:40           ` John Kitchin
2022-03-28 12:34             ` Max Nikulin
2022-03-28 13:16               ` Bruce D'Arcus
2022-03-29 15:22                 ` Max Nikulin
2022-03-29 16:14                   ` Bruce D'Arcus
2022-03-30 13:50                     ` Denis Maier
2022-03-31 15:10                     ` Max Nikulin
2022-03-31 17:27                       ` Bruce D'Arcus
2022-04-02 11:41                         ` org-cite, CSL styles and space before citation Max Nikulin
2022-03-30 21:43                   ` citations: org-cite vs org-ref 3.0 John Kitchin
2022-03-21 12:59     ` juh
2022-03-22 13:03       ` indieterminacy
2022-03-23 21:06     ` Nicolas Goaziou
2022-03-27 17:00       ` John Kitchin
2022-03-27 23:17         ` Bruce D'Arcus
2022-03-21 14:40   ` Max Nikulin
2022-03-21 15:19     ` Bruce D'Arcus
2022-03-21 17:00       ` John Kitchin
2022-03-25 15:21         ` Max Nikulin
2022-03-22 14:41       ` Max Nikulin
2022-03-22 17:20         ` Bruce D'Arcus
2022-03-23 12:44           ` Max Nikulin
2022-03-23 14:39             ` Bruce D'Arcus
2022-03-23 15:26               ` Eric S Fraga
2022-03-23 17:17               ` Max Nikulin
2022-03-23 22:50                 ` Bruce D'Arcus
2022-03-26 19:08               ` M. Pger
2022-03-22 23:52     ` Nicolas Goaziou
2022-03-23 16:30       ` Max Nikulin
2022-03-23 23:04         ` Nicolas Goaziou
2022-03-25 16:30           ` Max Nikulin
2022-03-27 15:38           ` John Kitchin
2022-03-27 23:18             ` Bruce D'Arcus
2022-03-20 13:32 ` Bruce D'Arcus
2022-03-20 13:42 ` Ihor Radchenko
2022-03-20 18:12   ` Thomas S. Dye
2022-03-20 20:13     ` Dominik Schrempf
2022-03-20 20:30       ` Vikas Rawal
2022-03-20 20:34       ` Bruce D'Arcus
2022-03-20 22:10         ` Dominik Schrempf
2022-03-20 19:44   ` Bruce D'Arcus
2022-03-20 21:14     ` chris
2022-03-21 14:21       ` John Kitchin
2022-03-21 14:10     ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF-FPGOyVFExJ2BR+ED+hd1NxK9oiFO-D6BYzi+KqHMz7FO-2g@mail.gmail.com \
    --to=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).