emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "András Simonyi" <andras.simonyi@gmail.com>
Cc: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH][oc-csl] Improve reference parsing
Date: Thu, 03 Nov 2022 06:34:06 +0000	[thread overview]
Message-ID: <87zgd87di9.fsf@localhost> (raw)
In-Reply-To: <CAOWRwxD70eTFiFZ9nxn+s0ecksKwWJKdaKB_zQQAhRnWwAUeQw@mail.gmail.com>

András Simonyi <andras.simonyi@gmail.com> writes:

> On Wed, 2 Nov 2022 at 07:28, Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> I do not think that CSL limitations are really limiting us.
> ...
> I'm not really familiar with the internals of the Org exporter but,
> looking at the ox.el code, macros and babel calls are processed and
> resolved before processing citations, so they seemingly have no
> bearing on the org-cite-csl--parse-reference function my patch is
> concerned with.

> Other than macros and babel calls, e.g., timestamps, LaTeX  fragments
> etc. the problem is that citeproc-el expects and needs the affixes and
> locator to be passed in the very limited html-like markup supported by
> CSL (see https://www.zotero.org/support/kb/rich_text_bibliography for
> a rudimentary description), and, crucially, the assumption is that
> everything else is plain text, which, if necessary, will be escaped
> according to the target format, i.e., '$' signs are escaped by
> citeproc-el's own LaTeX formatter. The reason for this limitation is
> that the affixes and especially the locator have to be parsed into
> citeproc-el's internal rich-text representation for further processing
> according to the used CSL style. (Affixes are only concatenated to
> other elements but locators can be the subject of any type of
> formatting.)  As a consequence, I think the only real alternatives are
> using a custom backend as I do in the current patch or a backend
> derived from the plain text Org exporter -- I don't have a strong
> preference as to which solution we choose, just went with the
> seemingly more minimalist option. (The proper way of dealing with
> LaTeX fragments in this context, in particular with LaTeX math
> fragments, would be to support those in citeproc-el's internal
> representation and markup, which is planned but not implemented yet.)

Could you please explain in more details why CSL require special
export of the prefix/suffix? What will happen if we simply pass the Org
markup verbatim?

I am asking because org-cite-csl-render-citation uses
org-cite-parse-objects so, unless citeproc does something terrible with
the original Org syntax, we can re-parse the output string and export
appropriately according to the current export backend.

-- 
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:[~2022-11-03  6:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 15:40 [PATCH][oc-csl] Improve reference parsing András Simonyi
2022-10-27  4:10 ` Ihor Radchenko
2022-11-01 15:02   ` András Simonyi
2022-11-02  6:29     ` Ihor Radchenko
2022-11-02 17:58       ` András Simonyi
2022-11-03  6:34         ` Ihor Radchenko [this message]
2023-01-07 12:50           ` M. ‘quintus’ Gülker
2023-01-15  8:56             ` Ihor Radchenko
2023-01-18 23:08               ` András Simonyi
2023-01-19  8:21                 ` M. ‘quintus’ Gülker
2023-01-19  9:35                   ` András Simonyi
2023-01-19  9:59                     ` Ihor Radchenko
2023-01-19 10:11                     ` M. ‘quintus’ Gülker
2023-01-25 22:44                       ` András Simonyi
2023-01-19  9:56                 ` Ihor Radchenko
     [not found]                   ` <CAOWRwxD3pSfao7+G145naE=jaAz6=m2BjvUX0rj_c4r8qeu7rQ@mail.gmail.com>
2023-01-26  9:43                     ` Ihor Radchenko

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=87zgd87di9.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=andras.simonyi@gmail.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).