From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qGp+CmRqzmOCzgAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 12:07:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GC2nCWRqzmMX9QAAG6o9tA (envelope-from ) for ; Mon, 23 Jan 2023 12:07:16 +0100 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 0994DF73F for ; Mon, 23 Jan 2023 12:07:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJueg-0003oA-IJ; Mon, 23 Jan 2023 06:06:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJueT-0003mn-UY for emacs-orgmode@gnu.org; Mon, 23 Jan 2023 06:06:13 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJueR-0007e2-B4 for emacs-orgmode@gnu.org; Mon, 23 Jan 2023 06:06:13 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F11532401B1 for ; Mon, 23 Jan 2023 12:06:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674471969; bh=WyP8tuyfBRmvv7pCsSEonnSRjYOB8yv4dIkJSr4ZNvE=; h=From:To:Cc:Subject:Date:From; b=TGICFjiQxDeSBmciPu5SowoiC37pF1clHwjOxIL8gioVC7RsmkUDVnABX8hBFELAk yrjpqXX4XWA8ZdHCGCYPpg0tBFZ5vIMsAiectTK+YO0xlXyHx09BAEm8y75eF3Zktg 9q+HanYn6Iko0WoDrNtyDVpT/sAiwGS3RPvwWD0sgu9s+CtWT4n7UDmmbjPrybpdl/ /XGW2QZIKa/UHE0jzSDPJ58pM+6mb1HRl3HFsa+uGopD+P+HTCQb1HgUT+mEl1R7Ed zOBT1hbghfMc9tdDlOZmGBIAjhkFtERIdcQIfW7tdb5Il+wgbgemMuuEnqZ3m6r/Qx bsR042UBzwqjg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P0nMz6jNsz6tpn; Mon, 23 Jan 2023 12:06:07 +0100 (CET) From: Ihor Radchenko To: Edgar Lux , Nicolas Goaziou Cc: emacs-orgmode@gnu.org Subject: Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite In-Reply-To: <865655434.1045612.1674415160995@fidget.co-bxl> References: <795525985.881228.1674077475456@ichabod.co-bxl> <87cz78qo5d.fsf@localhost> <101392154.966532.1674332749371@fidget.co-bxl> <873582om65.fsf@localhost> <865655434.1045612.1674415160995@fidget.co-bxl> Date: Mon, 23 Jan 2023 11:06:40 +0000 Message-ID: <87tu0h5x33.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674472035; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=op+ACBEu0ZJ71k7oNIAqO2JFx4a0yyrbceYM10qQ5Rg=; b=Y2CrCMtqENtg4dIKraKeTG8734HZ7AG+5TbdKFFoGrgawMgcFUVlLnkGlq9lTN7fZOkkZD 5tfplogoQtjojdnlHagQtTaUiG2Qi2OnSUS/STxPo6bwTgAiDoVouvHyJFpv/8qutjQsCl rZVf794p6gWwbGf+1PEib4v2KFN6rkWUm2MEgYBRf8mfdOhj6KuO4RO/B7YVCjffGDLMkj djnJFe5tc7teVE0AG5Q4QgyDMjO/skmGb7SBgf+rI8r90HxDPderYRMiD1GQtXlrbGl4/x FOnfceQTrYuCm54w8IxqIzrvl8vx7h90rfCdwR/TjEuDxmaEzrBViQEK3Ep6Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TGICFjiQ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674472035; a=rsa-sha256; cv=none; b=qw1weVSn9y16sUwAhls9M9tSIRzxl/KUt3xwJh+KaixFYJqPkLrl6xwomHquVPBWJRMW1O 7CNvq/A4l2itWi3MH+SvVpqTsllDVcd5aVKPVtrg+wtEaKfuN/nLM106yIatZWYaJu7OmQ NjqKxOnpLRvxEgVK6AVtEAQihj2ZPi25gWXvrGBdM8R0tpWwrQRlTUYwiFTAFa+h6QElo+ l5hWfz3fAbMXTaDGt50Lwnd6YH3MrG/As2tB+/gdzT6pQU1BXa3LHjCjSUqPWJ2aC7gEKr OrF0ny9gdHtl/2Dwu1rlLEtUE4MJqzMCYhXSjxo2uyJIiKA4TLT7UqHrtCxmYw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.05 X-Spam-Score: -6.05 X-Migadu-Queue-Id: 0994DF73F Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TGICFjiQ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-TUID: z8UX6iKraecl Edgar Lux writes: >> > #+cite_export: biblatex "bibstyle=numeric-comp,sorting=none, hyperref=true,backref=true,url=true,backend=biber,natbib=true" >> >> The general design is >> #+cite_export: NAME BIBLIOGRAPHY-STYLE CITATION-STYLE >> ... removed content ... >> I am not sure how your idea fits the above. > > The general design only allows two options (and their values) to be passed to =biblatex= (in the =#+cite_export:= line): =bibstyle= and =citestyle=. However, =biblatex= can take many more options. Currently (correct me if I am wrong), the two alternatives to pass more options is to use a =org-cite-biblatex-options= or a line like this > > #+begin_src org > ,#+LaTeX_HEADER: \usepackage[bibstyle=numeric-comp,sorting=none, hyperref=true,backref=true,url=true,backend=biber,natbib=true]{biblatex} > #+end_src So, what is the problem with LATEX_HEADER approach? 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. >> However, only certain options are considered. >> After applying your patch, things may be broken in this area. > > One of the attachments showed what I considered to be all possible cases: the new string (containing =style==; it could be either =bibstyle==, =citestyle==. It is similar to the case which allows for ="bibstyle/citestyle"=, as documented on line 34 of =oc-biblatex.el=). Currently (these could, hopefully, also be used for the documentation), if somebody uses > > 1. case > #+begin_src org > #+cite_export: biblatex "how/much" > #+end_src > > the result is > #+begin_src latex > \usepackage[bibstyle=how,citestyle=much]{biblatex} > #+end_src This is actually confusing. 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. > 3. case > #+begin_src org > #+cite_export: biblatex "how,opt=true" > #+end_src > > the result is > #+begin_src latex > \usepackage[style=how,opt=true]{biblatex} > #+end_src > 4. case > #+begin_src org > #+cite_export: biblatex "how/much,hack=true" > #+end_src > > the result is > #+begin_src latex > \usepackage[bibstyle=how,citestyle=much,hack=true]{biblatex} > #+end_src This is an implementation detail. We cannot promise such things working reliably. > 5. case > #+begin_src org > #+cite_export: biblatex "citestyle=corner/much" > #+end_src > > the result is > #+begin_src latex > \usepackage[bibstyle=citestyle=corner,citestyle=much]{biblatex} > #+end_src > > 6. case > #+begin_src org > #+cite_export: biblatex "citestyle=corner/much,opt=true" > #+end_src > ... This is plain abusing. We might remove the "/" matching completely and throw an error if there are commas inside style name. Users must not rely on such undocumented behavior. > whether some of these are broken is up for discussion. The suggested patch adds one conditional case, which searches for ="syle="=, takes away the brackets and turns the above cases into: [I do not see any patch attached] > Sure. I hope that the code above suffices :) . I compress, because I don't have unlimited space in my account. Why not storing email locally? Account limits are non-issue then ;) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at