emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-cite styles as flags (idea)
@ 2022-03-30 12:34 Max Nikulin
  2022-03-30 14:56 ` Bruce D'Arcus
  0 siblings, 1 reply; 2+ messages in thread
From: Max Nikulin @ 2022-03-30 12:34 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

In a recent thread it was discussed that currently style selection is 
not always obvious:

John Kitchin. citations: org-cite vs org-ref 3.0.
Sun, 27 Mar 2022 13:00:40 -0400. 
https://list.orgmode.org/m24k3jnq0k.fsf@andrew.cmu.edu

> [cite/na/b:@key] or [cite/noauthor/bare:@key] to mean \citeyear{key}?
> 
> Why wouldn't it be \citetitle? or \citeurl, or \citedate? or even,
> \citenum?
> 
> I get it, you can define [cite/noauthor/year:] or even [cite/year:] or
> [cite/y:] and even [cite/citeyear:] to get the command in there, and
> something for each of those other ones. Maybe even the documented
> convention will change to some other potentially mnemonic form. 

It seems, no backends uses hierarchy of substyles. Please, correct me, I 
may be wrong since I was BibTeX user and have not tried BibLaTeX.

I have an idea to consider each component started from slash as 
independent boolean flags (or constraints), so they can be reordered

    /author/bare/caps = /caps/bare/author

For citeproc.el it is a natural mapping since e.g. noauthor is 
implemented as a value of suppress-author parameter. For BibTeX commands 
it may be described as set of properties, so the code discards ones 
inconsistent with provided criteria. E.g. (:bare t :author nil :noauthor 
t :full nil) for \citeyear, :caps does not matter.

As at was suggested earlier, /year modifier existing in oc-csl should be 
implemented for oc-natbib.

[cite/author/noauthor:...] should generate a warning as an impossible 
combination and fallback to defaults.

The origin of the proposal is the following part of the discussion:

Bruce D'Arcus, Tue, 29 Mar 2022 12:14:03 -0400
https://list.orgmode.org/CAF-FPGOCm5m5jZSOu-37V77Me76EWwg_xcd4d7k30ffXS0HyQg@mail.gmail.com
> On Tue, Mar 29, 2022 at 11:23 AM Max Nikulin wrote:
> 
>> It seems modifiers are set of boolean flags (positive "year" or negative
>> "suppress-author") in citeproc.el, set of values in natbib, and a kind
>> of hierarchy in org-cite. From my point of view, set of constrains
>> (flags) is the most general variant in this list.
> 
> I think that's right, and is how it's represented in a GUI app like
> Zotero. But that's not so convenient in a plain text format.

I may easily miss something important making such idea broken. At least 
it looks like a backward-compatible change if old /caps-full is mapped 
to new /caps/full (or /full/caps).



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

end of thread, other threads:[~2022-03-30 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 12:34 org-cite styles as flags (idea) Max Nikulin
2022-03-30 14:56 ` Bruce D'Arcus

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).