emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE?
@ 2021-07-20 13:25 Bruce D'Arcus
  2021-07-29 19:28 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce D'Arcus @ 2021-07-20 13:25 UTC (permalink / raw)
  To: org-mode-email

I'm working on a select-style function for org-cite, where I am adding
previews to the style list.

Current screenshot, with the natbib mapping:

https://user-images.githubusercontent.com/1134/126326341-15ec2046-bf34-411a-a7d8-f2cbe85769c3.png

But to do that best and most consistently (next step is CSL, for
example), I need the citation accessible from there, so I can run the
export processors to generate the previews.

Could we possibly tweak SELECT-STYLE to take one argument: citation?

Or am I missing something?

Bruce


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE?
  2021-07-20 13:25 [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE? Bruce D'Arcus
@ 2021-07-29 19:28 ` Nicolas Goaziou
  2021-07-30  0:57   ` Bruce D'Arcus
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2021-07-29 19:28 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

Hello,

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> But to do that best and most consistently (next step is CSL, for
> example), I need the citation accessible from there, so I can run the
> export processors to generate the previews.
>
> Could we possibly tweak SELECT-STYLE to take one argument: citation?

When you are inserting a whole new citation, what would be the value?
nil? What would you display then?

Regards,
-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE?
  2021-07-29 19:28 ` Nicolas Goaziou
@ 2021-07-30  0:57   ` Bruce D'Arcus
  2021-07-30  1:19     ` John Kitchin
  2021-08-11 10:13     ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Bruce D'Arcus @ 2021-07-30  0:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode-email

Hi Nicolas,

On Thu, Jul 29, 2021 at 3:28 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > But to do that best and most consistently (next step is CSL, for
> > example), I need the citation accessible from there, so I can run the
> > export processors to generate the previews.
> >
> > Could we possibly tweak SELECT-STYLE to take one argument: citation?
>
> When you are inserting a whole new citation, what would be the value?
> nil? What would you display then?

The first iteration of the idea behind the request is this style selection UI:

https://user-images.githubusercontent.com/1134/126531061-40cf47ab-0c7f-42ac-8ddb-341e7ab70d4b.png

So the idea is to present a preview of the style/variant output when
selecting the style.

Like:

/          (Doe, 2019)

... or maybe even multiple columns:

/          (Doe, 2019)       \citep

I'm thinking the best way to build this UI is to iterate through
org-cite-support-styles, and run at least the default export processes
to create that preview annotation,

As my thinking has evolved (and there's been a lot of discussion on
this the past week), I see two options:

1. Generate the previews from the citations at point. This was the
idea that promoted the suggestion here, since I can't get access to
that citation data if I use org-cite-make-insert-processor.

2. Instead, have a standardized example record just for the preview.
With this approach, the citation context isn't relevant.

As to your question, do any style UIs currently allow you to select a
style on a new citation before selecting the keys?

Bruce


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE?
  2021-07-30  0:57   ` Bruce D'Arcus
@ 2021-07-30  1:19     ` John Kitchin
  2021-08-11 10:13     ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: John Kitchin @ 2021-07-30  1:19 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email, Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 2217 bytes --]

my solution to this (which I think worked well) is to select the keys, and
insert a default style, and then you run a command that updates the style.
that way you can get the keys that are in the citation easily from
org-element-context, and then I can make a preview for each style that is
consistent with the best guess for what the exporter is. (based on the
cite_export keyword, or a default choice).


On Thu, Jul 29, 2021 at 8:58 PM Bruce D'Arcus <bdarcus@gmail.com> wrote:

> Hi Nicolas,
>
> On Thu, Jul 29, 2021 at 3:28 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
> >
> > Hello,
> >
> > "Bruce D'Arcus" <bdarcus@gmail.com> writes:
> >
> > > But to do that best and most consistently (next step is CSL, for
> > > example), I need the citation accessible from there, so I can run the
> > > export processors to generate the previews.
> > >
> > > Could we possibly tweak SELECT-STYLE to take one argument: citation?
> >
> > When you are inserting a whole new citation, what would be the value?
> > nil? What would you display then?
>
> The first iteration of the idea behind the request is this style selection
> UI:
>
>
> https://user-images.githubusercontent.com/1134/126531061-40cf47ab-0c7f-42ac-8ddb-341e7ab70d4b.png
>
> So the idea is to present a preview of the style/variant output when
> selecting the style.
>
> Like:
>
> /          (Doe, 2019)
>
> ... or maybe even multiple columns:
>
> /          (Doe, 2019)       \citep
>
> I'm thinking the best way to build this UI is to iterate through
> org-cite-support-styles, and run at least the default export processes
> to create that preview annotation,
>
> As my thinking has evolved (and there's been a lot of discussion on
> this the past week), I see two options:
>
> 1. Generate the previews from the citations at point. This was the
> idea that promoted the suggestion here, since I can't get access to
> that citation data if I use org-cite-make-insert-processor.
>
> 2. Instead, have a standardized example record just for the preview.
> With this approach, the citation context isn't relevant.
>
> As to your question, do any style UIs currently allow you to select a
> style on a new citation before selecting the keys?
>
> Bruce
>
>

[-- Attachment #2: Type: text/html, Size: 3184 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE?
  2021-07-30  0:57   ` Bruce D'Arcus
  2021-07-30  1:19     ` John Kitchin
@ 2021-08-11 10:13     ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2021-08-11 10:13 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

Hello,

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> So the idea is to present a preview of the style/variant output when
> selecting the style.
>
> Like:
>
> /          (Doe, 2019)
>
> ... or maybe even multiple columns:
>
> /          (Doe, 2019)       \citep
>
> I'm thinking the best way to build this UI is to iterate through
> org-cite-support-styles, and run at least the default export processes
> to create that preview annotation,
>
> As my thinking has evolved (and there's been a lot of discussion on
> this the past week), I see two options:
>
> 1. Generate the previews from the citations at point. This was the
> idea that promoted the suggestion here, since I can't get access to
> that citation data if I use org-cite-make-insert-processor.
>
> 2. Instead, have a standardized example record just for the preview.
> With this approach, the citation context isn't relevant.
>
> As to your question, do any style UIs currently allow you to select a
> style on a new citation before selecting the keys?

I added a citation argument to select-style. Let me know if it works for you.

Regards,
-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-11 10:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 13:25 [org-mode] make citation object available to org-cite-make-insert-processor SELECT-STYLE? Bruce D'Arcus
2021-07-29 19:28 ` Nicolas Goaziou
2021-07-30  0:57   ` Bruce D'Arcus
2021-07-30  1:19     ` John Kitchin
2021-08-11 10:13     ` Nicolas Goaziou

Code repositories for project(s) associated with this 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).