From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp2 ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms0.migadu.com with LMTPS
	id EAihKHljr2DFFgEAgWs5BA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 27 May 2021 11:16:41 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2 with LMTPS
	id WH1lJHljr2CYIQAAB5/wlQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 27 May 2021 09:16:41 +0000
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id BBE271CABF
	for <larch@yhetil.org>; Thu, 27 May 2021 11:16:40 +0200 (CEST)
Received: from localhost ([::1]:60250 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1lmC86-0005Kb-Kx
	for larch@yhetil.org; Thu, 27 May 2021 05:16:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44812)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <denismaier@mailbox.org>)
 id 1lmC7M-0005KR-0e
 for emacs-orgmode@gnu.org; Thu, 27 May 2021 05:15:52 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:59074)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <denismaier@mailbox.org>)
 id 1lmC7I-0000v8-So
 for emacs-orgmode@gnu.org; Thu, 27 May 2021 05:15:51 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4FrMcK1gm1zQk3B;
 Thu, 27 May 2021 11:15:45 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h=
 content-transfer-encoding:content-type:content-type:in-reply-to
 :mime-version:date:date:message-id:from:from:references:subject
 :subject:received; s=mail20150812; t=1622106938; bh=ERAPO3TSTHcI
 vUZDF80LA/2uiDBoqvIxVQvtBHYwQH4=; b=AxRjS81k07GvOGlckCiRDUBH4D/F
 5BvH85iFpm4ajjRChiMVc2WaTHbaDRudLFqP53c6U9ESfx++mfH5EZ3Hh7ZiwQik
 Dc/pfsWMuzuplwmakiurnkIR4WfPXAJ/WC0ndQGxYmAj9TtA2K1/xlfPOH1GISip
 wzUimcnHhMA46braQDaRAfWRoe/9u8UZSg9V9SckaKek/OnivxKlDa1Mt9Eg3lKj
 aWmAUl2aSReH5QJWoNHSWkV4PcrqwULXsqSymO6/TbnZ4xWDOflUM67iUSiFd5yg
 myTeA1iCymd1fKNRI4I98jWEhYB6viy1j6MQWtbZzcP6N5VSM0FeoCgxig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;
 s=mail20150812; t=1622106943;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=y7Fa7Vro4sgCfum/1jZwiyV5uerKUI0RDfAjYpNVj54=;
 b=HLQ9SBXco4l7YMww5HZn3cW4lMK+YFtxWmGNqpYDK/pQGrNGgJbFlGAD6rVNKDvRNYdPm/
 DbrORnZ4oCLdpkZCiizoX0IW3+P+KdbqLuNzynTt7zy3U5rQ537YHYeBt9IdF7ftbX6WXP
 JGIMnvkfHNkYDTqNxz5xCUHh3iIKFU6sTjy+5yyrxMGpfVhu5R77FBlwlyCZadEj+PxDqi
 ZJKAfyK8iqnyWi0a/dNKV4qI6x4LLkVZvUaLPX16yZNAqUXDDH9jnPXOe4FfQ+8bCsBGJN
 qczeQoswS9KorlU/k4802eYwrhR40/+ZGuirHRNKoMUfGezUCmEtu8yTTVYVfg==
X-Virus-Scanned: amavisd-new at heinlein-support.de
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de
 [80.241.56.123]) (amavisd-new, port 10030)
 with ESMTP id GKpYiItbUzZH; Thu, 27 May 2021 11:15:38 +0200 (CEST)
Subject: Re: [wip-cite-new] Initial implementation of `csl' citation processor
To: Org Mode List <emacs-orgmode@gnu.org>,
 =?UTF-8?Q?Andr=c3=a1s_Simonyi?= <andras.simonyi@gmail.com>,
 Nicolas Goaziou <mail@nicolasgoaziou.fr>
References: <87y2c1dym9.fsf@nicolasgoaziou.fr>
From: Denis Maier <denismaier@mailbox.org>
Message-ID: <e6810cf4-f59f-3e0d-e27c-0c477cf6a103@mailbox.org>
Date: Thu, 27 May 2021 11:15:41 +0200
MIME-Version: 1.0
In-Reply-To: <87y2c1dym9.fsf@nicolasgoaziou.fr>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: 
X-Rspamd-Score: -5.85 / 15.00 / 15.00
X-Rspamd-Queue-Id: 06FFB1819
X-Rspamd-UID: 84932b
Received-SPF: pass client-ip=80.241.56.171;
 envelope-from=denismaier@mailbox.org; helo=mout-p-201.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1622107001;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post:dkim-signature;
	bh=y7Fa7Vro4sgCfum/1jZwiyV5uerKUI0RDfAjYpNVj54=;
	b=au8d3KXE7yAduWIg8axiHv3Ugz/fLut8QTcpEssb/g9xVIhetBbURYJSrXQri213Fo+a8c
	Y77ZaSESv5rU4S6Aq1khWmGFrna7rKeLZEy/csFHqO3l5UESSEBjrCW2Vn5JjZX71Z3up/
	FEyN+tgUrmHrw/sN5iH4TlQi1m/LKVYSTmQiTEeOziBhOXtDQJOJ7jXfk4BOuU8lwkL2wK
	dEVPSAsqkUGQ3Jg0NJpM14FssjudvbxXxRUCgBiOOTlECxW1CXm7unwLX1ImCpuhKmJtXW
	fKxylO/84C2huZgceIPATx5Cj6sb00q+KWSKiz/NcdfETGbulgEbYHNd37u3iQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622107001; a=rsa-sha256; cv=none;
	b=e4bVh/KtstTP6Y8c8vtX2aBby3krU6FxdBeOFRCE5ukf32CWs8E+KFFhlTIxWdbNtCDQD6
	UofDOBfGjGTDAMTj3Nil0XkbdwzWY8p4Ll2rwAYMKckCLysQ3d1wl6uXkcC6rq03k78A1o
	QJ99Vuso1gltMZxxMNxKcEf3FTmn8FXwdAW28infQanrbRVdCsyi9nefXKdV5TVzbb+T8l
	t/Fu8bzxoCsUWFq172QxTIkT89tQ+ExBhqST5N2Pru6t5ME4H+94oVR0MJKbkTeBZGINGk
	GHQw57gt7l7tv8hJJa79f7j18GB3hkNskzDU57tTY7hmQPsgcopGG/2EszbnGA==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=AxRjS81k;
	dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=HLQ9SBXc;
	dmarc=pass (policy=reject) header.from=mailbox.org;
	spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org
X-Migadu-Spam-Score: -3.13
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=AxRjS81k;
	dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=HLQ9SBXc;
	dmarc=pass (policy=reject) header.from=mailbox.org;
	spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org
X-Migadu-Queue-Id: BBE271CABF
X-Spam-Score: -3.13
X-Migadu-Scanner: scn0.migadu.com
X-TUID: GoiaxjAhRI85

Hi,

Am 26.05.2021 um 22:33 schrieb Nicolas Goaziou:

thanks for this!

I've just tried to test this, but I can't get it to work.

I've done
git pull
make

And I'm getting:
In toplevel form:
oc-csl.el:93:1:Error: Cannot open load file: No such file or directory, 
citeproc

Do you have an idea what's going wrong here?

Best,
Denis

> Hello,
> 
> I just pushed a Citeproc-based citation processor. As such, Citeproc
> library must be available in the load path. For a better experience,
> your also need to download styles, and possibly locales definitions, as
> pointed in the commentary section pasted below.
> 
> I called it `csl' instead of `citeproc'. It is a bit ambiguous, but it
> is shorter, and "org-cite-csl" prefix sounds less redudant than
> "org-cite-citeproc...". Also, I don't expect a different CSL-based
> citation processor any time soon, so it should be fine. But I know this
> is a weak argument, so if you think "citeproc" is still more
> appropriate, I can revisit this.
> 
> As pointed out in the commentary section, this is, for a large part,
> a port of András Simonyi's Citeproc Org library. Thanks!
> 
> There are some differences between the two libraries, however. For
> example, Org Cite CSL does not support Org Ref links. It also provides
> less customization options. OTOH, it supports ".bib", ".bibtex" and
> ".json" bibliography files. It also handles author suppression and
> global affixes in citations.
> 
> This patch adds two files in a new "etc/csl/" directory. They are both
> licensed under CC BY-SA 3.0 terms. So I assume this is fine to
> distribute them with Org.
> 
> Here is the full commentary. Feedback welcome!
> 
> --8<---------------cut here---------------start------------->8---
> This library registers the `csl' citation processor, which provides
> the "export" capability for citations.  You may activate it globally with
> 
>     (setq org-cite-export-processor '(csl))
> 
> or at the document level, with
> 
>     #+cite_export: csl
> 
> The processor relies on the external Citeproc Emacs library, which must be
> available prior to loading this library.
> 
> By default, citations are rendered in Chicago author-date CSL style.  You can
> use another style file by specifying it in `org-cite-export-processor'
> 
>     (setq org-cite-export-processor '(csl "/path/to/style-file.csl")
> 
> or from within the document by adding the file name to "cite_export" keyword
> 
>     #+cite_export: csl /path/to/style-file.csl
>     #+cite_export: csl "/path/to/style-file.csl"
> 
> Styles can be downloaded, for instance, from the Zotero Style Repository
> (<https://www.zotero.org/styles>).  Dependent styles (which are not "unique"
> in the Zotero Style Repository terminology) are not supported.
> 
> The processor uses the "en-US" CSL locale file shipped with Org for rendering
> localized dates and terms in the references, independently of the language
> settings of the Org document.  Additional CSL locales can be made available
> by setting `org-cite-csl-locales-dir' to a directory containing the locale
> files in question (see <https://github.com/citation-style-language/locales>
> for such files).  The directory must contain at least the "en-US" CSL locale.
> 
> Bibliography is defined with the "bibliography" keyword.  It supports files
> with ".bib", ".bibtex", and ".json" extensions.  References are exported using
> the "print_bibliography" keyword.
> 
> The library supports the following citation styles:
> 
> - noauthor (na), including bare (b) variant,
> - default style, including bare (b) variant.
> 
> CSL styles recognize "locator" in citation references' suffix.  For example,
> in the citation
> 
>      [cite:see @Tarski-1965 chapter 1, for an example]
> 
> "chapter 1" is the locator.  The whole citation is rendered as
> 
>      (see Tarski 1965, chap. 1 for an example)
> 
> in the default CSL style.
> 
> The locator starts with a locator term, among "bk.", "bks.", "book", "chap.",
> "chaps.", "chapter", "col.", "cols.", "column", "figure", "fig.", "figs.",
> "folio", "fol.", "fols.", "number", "no.", "nos.", "line", "l.", "ll.",
> "note", "n.", "nn.", "opus", "op.", "opp.", "page", "p.", "pp.", "paragraph",
> "para.", "paras.", "¶", "¶¶", "§", "§§", "part", "pt.", "pts.", "section",
> "sec.", "secs.", "sub verbo", "s.v.", "s.vv.", "verse", "v.", "vv.",
> "volume", "vol.", and "vols.".  It ends with the last comma or digit in the
> suffix, whichever comes last, or runs till the end of the suffix.
> 
> The part of the suffix before the locator is appended to reference's prefix.
> If no locator term is used, but a number is present, then "page" is assumed.
> 
> This library was heavily inspired by and borrows from András Simonyi's
> Citeproc Org (<https://github.com/andras-simonyi/citeproc-org>) library.
> Many thanks to him!
> --8<---------------cut here---------------end--------------->8---
> 
> Regards,
>