From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eBP8CTyVzWOEfwAAbAwnHQ (envelope-from ) for ; Sun, 22 Jan 2023 20:57:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aGXTCTyVzWP7TgEAauVa8A (envelope-from ) for ; Sun, 22 Jan 2023 20:57:48 +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 B2ACA2B1AD for ; Sun, 22 Jan 2023 20:57:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJgT4-0002Pw-TX; Sun, 22 Jan 2023 14:57:30 -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 1pJgT3-0002P8-Hd for emacs-orgmode@gnu.org; Sun, 22 Jan 2023 14:57:29 -0500 Received: from wilbur.contactoffice.com ([212.3.242.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJgT1-0002Ju-CP for emacs-orgmode@gnu.org; Sun, 22 Jan 2023 14:57:29 -0500 Received: from hologram (hologram.co-bxl [10.2.0.17]) by wilbur.contactoffice.com (Postfix) with ESMTP id 8287E9FB; Sun, 22 Jan 2023 20:57:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1674417445; s=20210208-e7xh; d=mailfence.com; i=edgarlux@mailfence.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=6398; bh=wNQPBfkeFPBMIphKsup0wMZogyJjCEW3u6EAOZzME2M=; b=iMTKVJYlfR4dqGCwyjBWK2C4gXc36l6KAj+ZEDEivA9y4yIYy3GopZH7kyyAvsVA pi+2T8ca1HaYLLm5EYekLCMzndhJzxeQQTveRvEpprmbYyhPO7k42dfBJtZNOl1FA3u vGbQSSG/00e3ut8vc+NXtMf/PFKosLbw448xJtkjLdinAD5bSKsYoYpeUcaOWu4v6Q4 ScDvi2L4EdEfrRhdPzUJH7R8XDloQVnafHd2q54eqDAph2Phn6E4z7E2pp2SHToRC0N 74kYke6wSfAPqPiPbsqPVfwlHysqwoq2WTXwUnFx26pYsdS1lmEIFsWcrNgeS/Oi1Kg gsKnwM/A5w== Date: Sun, 22 Jan 2023 20:19:21 +0100 (CET) From: Edgar Lux To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Message-ID: <865655434.1045612.1674415160995@fidget.co-bxl> In-Reply-To: <873582om65.fsf@localhost> References: <795525985.881228.1674077475456@ichabod.co-bxl> <87cz78qo5d.fsf@localhost> <101392154.966532.1674332749371@fidget.co-bxl> <873582om65.fsf@localhost> Subject: Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:195124330 Received-SPF: pass client-ip=212.3.242.68; envelope-from=edgarlux@mailfence.com; helo=wilbur.contactoffice.com 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.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=1674417467; 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: 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=wNQPBfkeFPBMIphKsup0wMZogyJjCEW3u6EAOZzME2M=; b=ZtFNVylr8UyD0pam2EkusB2pl6rqtMP26dtelieC5t2xpiIvRyNOE+ToBOxNYva1h64fZO RV6J+19x3V10b0lfX7FvEQnwgw/rrCHA2EeA+VtBhe2QbWy2fpCelCCNWL6cp5O/qUYh2h xq7RGYYcBarvNcaYE6m/c2e5SUY3x85C11ictX9z560gwY0G+4yShKJuFmE/5B/oZ14GzS fUe42KtdPtkoHXTgOdDlcKEaZLAT2dIq6Jj4W7WiWbxtR6l5A9UHNVzSdLggjmldT0SeQd w6q/g2KfovvafDsTsvGgNMths2qLNx+rkA/lVc5qoxXRGcOVPYrDbuxDl2bGzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=iMTKVJYl; dmarc=pass (policy=quarantine) header.from=mailfence.com; 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=1674417467; a=rsa-sha256; cv=none; b=qXn1H5pQIC8cLcT4YdUmjV20kAnf8XAkA7yp382sw/Haohujheq8JMRlTxHGkLGTZ6D+Hf orivOcXt1FRlc79yHeMe7vQDSJEVh8aC/vbkpLMxe06c6ze2RHArYiQAobJD7qsCS8RJNa 8taVHUR4Citlja9KpQE/Dg/b9Lw5DnX5OFDO4JSClJBBciKLGuxAydOmWx8Yr6TyM1lwxb dfBmIf1zjcOi02ho5mcRItS6e6A+wLC1d6CAHzg15OnY/M600vUXDykJZZcs4sVsa4GnEg o+P+lTlCIC+1vXq8M0MD7K1S+jJwDCNrJrEwNDLnAAHlElqlNKOMl+OuikVa4g== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.68 X-Spam-Score: -2.68 X-Migadu-Queue-Id: B2ACA2B1AD Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=iMTKVJYl; dmarc=pass (policy=quarantine) header.from=mailfence.com; 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: BaM08QbCSh9V January 22, 2023 at 12:15:14 PM CET Ihor Radchenko wrote:Edgar Lux writes: > Note that we have https://orgmode.org/manual/Citation-export-processors.html > Of course, the "Citations" section of the manual is not yet complete. > More examples and details will be welcome. Yes, indeed > > #+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 > Also, note that `org-cite-biblatex--package-options' combines INITIAL > option list from the \usepackage declaration already present with > options dictated by STYLE. Precisely. > 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 2. case #+begin_src org #+cite_export: biblatex "how" "much" #+end_src the result is #+begin_src latex \usepackage[style=how]{biblatex} #+end_src 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 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 the result is #+begin_src latex \usepackage[bibstyle=citestyle=corner,citestyle=much,opt=true]{biblatex} #+end_src 7. case #+begin_src org #+cite_export: biblatex "bibstyle=corner" #+end_src the result is #+begin_src latex \usepackage[style=bibstyle=corner]{biblatex} #+end_src 8. case #+begin_src org #+cite_export: biblatex "bibstyle=corner/much" #+end_src the result is #+begin_src latex \usepackage[bibstyle=bibstyle=corner,citestyle=much]{biblatex} #+end_src 9. case #+begin_src org #+cite_export: biblatex "[bibstyle=corner/much]" #+end_src the result is #+begin_src latex \usepackage[bibstyle=[bibstyle=corner,citestyle=much]]{biblatex} #+end_src 10. case (note that this can be combined with all the above) #+begin_src emacs-lisp (setq org-cite-biblatex-options "nulloption=true") #+end_src #+begin_src org #+cite_export: biblatex "how/much" #+end_src the result is #+begin_src latex \usepackage[nulloption=true,bibstyle=how,citestyle=much]{biblatex} #+end_src 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: 1. case #+begin_src org #+cite_export: biblatex "how/much" #+end_src same result as above 2. case #+begin_src org #+cite_export: biblatex "how" "much" #+end_src same result as above 3. case #+begin_src org #+cite_export: biblatex "how,opt=true" #+end_src same result as above 4. case #+begin_src org #+cite_export: biblatex "how/much,hack=true" #+end_src same result as above 5. case #+begin_src org #+cite_export: biblatex "citestyle=corner/much" #+end_src the result is #+begin_src latex \usepackage[citestyle=corner,citestyle=much]{biblatex} #+end_src 6. case #+begin_src org #+cite_export: biblatex "citestyle=corner/much,opt=true" #+end_src the result is #+begin_src latex \usepackage[citestyle=corner,citestyle=much,opt=true]{biblatex} #+end_src 7. case #+begin_src org #+cite_export: biblatex "bibstyle=corner" #+end_src the result is #+begin_src latex \usepackage[bibstyle=corner]{biblatex} #+end_src 8. case #+begin_src org #+cite_export: biblatex "bibstyle=corner/much" #+end_src the result is #+begin_src latex \usepackage[bibstyle=corner,citestyle=much]{biblatex} #+end_src 9. case #+begin_src org #+cite_export: biblatex "[bibstyle=corner/much]" #+end_src the result is #+begin_src latex \usepackage[bibstyle=corner,citestyle=much]{biblatex} #+end_src 10. case (note that this can be combined with all the above) #+begin_src emacs-lisp (setq org-cite-biblatex-options "nulloption=true") #+end_src #+begin_src org #+cite_export: biblatex "how/much" #+end_src same result as above In this way, =org-cite-biblatex-options= is completely optional (an addendum to =#+cite_export: biblatex=), and more options (other than =bibstyle= and =citestyle=) can be added next to =#+cite_export: biblatex= (without hacks in between lines, as shown above). Anyway! the "for your consideration" already implies something, and I can live with an extra =#+latex_header:=. > > P.S. Could you please send patches as plain text? They are easier to > view then. Sure. I hope that the code above suffices :) . I compress, because I don't have unlimited space in my account. -- Sent with https://mailfence.com Secure and private email