emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Edgar Lux <edgarlux@mailfence.com>
Cc: emacs-orgmode@gnu.org
Subject: [BUG] #+cite_export: ... bibstyle citestyle cannot be universally used as global defaults (was: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite)
Date: Tue, 24 Jan 2023 10:54:02 +0000	[thread overview]
Message-ID: <87fsc05hkl.fsf@localhost> (raw)
In-Reply-To: <1897723911.54727.1674507511254@fidget.co-bxl>

Edgar Lux <edgarlux@mailfence.com> writes:

> I thought that it would be preferable to have a native Org syntax.
>
>> I do not like passing the options as-is in #+cite_export because not all
>> the possible biblatex \usepackage options are affecting the
>> bibliography. Options like sortcites, maxcitenames, autocite, etc are
>> only affecting the citation style, not the bibliography. And options
>> like bibencoding are totally irrelevant to both citation and
>> bibliography styles.
>
> That's fair, but it can just as well be used as a line to configure biblatex (since it is already being used anyway). Besides, there are many other options which do concern the style or are very needed (hyperref=true,backref=true,url=true,backend=biber,natbib=true). I'm not advocating for my suggestion, just showing my reasoning. As I said, I'm fine with the =#+latex_header:=.

I understand. My takeaway from here is that there is a need to provide
extended global defaults for both bibliography style and citation style.

>> This code is by Nicolas, but does not seem to be consistent with the
>> idea of "BIBLIOGRAPHY STYLE".
>>
>> I am CCing him in cause if there is something I am missing.
>
> The docstring says:
>
>     ;; "cite_export" keyword.  If you need to use different styles for bibliography
>     ;; and citations, you can separate them with "bibstyle/citestyle" syntax.  E.g.,
>     ;;
>     ;;   #+cite_export: biblatex authortitle/authortitle-ibid

Which is a questionable design choice. I was referring to higher-level
docstring for `org-cite-export-processors':

      (NAME BIBLIOGRAPHY-STYLE CITATION-STYLE)
    
    There, NAME is the name of a registered citation processor providing export
    functionality, as a symbol.  BIBLIOGRAPHY-STYLE (respectively CITATION-STYLE)
    is the desired default style to use when printing a bibliography (respectively
    exporting a citation), as a string or nil.  Both BIBLIOGRAPHY-STYLE and
    CITATION-STYLE are optional.  NAME is mandatory.

oc-biblatex simply deviates from the global paradigm, making oc-biblatex
special compared to other citation processors. Not ideal.

I think that we have a fundamental design flaw with org-cite:

    #+cite_export: processor bibliography-style citation-style

introduces:

 - default bibliography style set document-wide
 - default citation style set individually in every citation via
  low-level commands, BUT NOT GLOBAL DEFAULT CITATION STYLE.

Basically, CITATION_STYLE cannot currently affect document preamble by
design.

That's why awkward workarounds in oc-biblatex, where default citation
style can be set globally, and we have to attach citation style to
BIBLIOGRAPHY_STYLE keyword.

I suggest the following changes to the org-cite:

1. :export-finalizer should accept export processor triplet instead of
   bibliography style as 4th argument. The assumption that only
   bibliography style is required to finalize the export is clearly not
   accurate.

2. Allow passing extra arguments in #+cite_export:

    #+cite_export: processor[opt1=val1,opt2=val2,...] bibliography-style[...] citation-style[...]

  The options listed within the square brackets will pass extra default options
  to the processor/styles and used as needed by citation processor implementations.

WDYT?

-- 
Ihor Radchenko // yantar92,
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>


  reply	other threads:[~2023-01-24 10:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 21:31 Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite Edgar Lux
2023-01-20 10:59 ` Ihor Radchenko
2023-01-20 16:57   ` Edgar Lux
2023-01-21  8:37 ` Ihor Radchenko
2023-01-21 20:25   ` Edgar Lux
2023-01-22 11:15     ` Ihor Radchenko
2023-01-22 11:36       ` András Simonyi
2023-01-22 19:47         ` Edgar Lux
2023-01-23 10:43           ` Ihor Radchenko
2023-01-22 19:19       ` Edgar Lux
2023-01-23 11:06         ` Ihor Radchenko
2023-01-23 20:58           ` Edgar Lux
2023-01-24 10:54             ` Ihor Radchenko [this message]
2023-02-03  9:33               ` [BUG] #+cite_export: ... bibstyle citestyle cannot be universally used as global defaults (was: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite) Edgar Lux
2023-02-04 11:31                 ` Ihor Radchenko
2023-02-04 23:14                   ` Edgar Lux

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=87fsc05hkl.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=edgarlux@mailfence.com \
    --cc=emacs-orgmode@gnu.org \
    /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).