From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJmPHGdcmGB9sAAAgWs5BA (envelope-from ) for ; Mon, 10 May 2021 00:04:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aCgbGGdcmGDIRwAAB5/wlQ (envelope-from ) for ; Sun, 09 May 2021 22:04:23 +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 AB6BA27CFA for ; Mon, 10 May 2021 00:04:22 +0200 (CEST) Received: from localhost ([::1]:54452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfrXB-00011D-SJ for larch@yhetil.org; Sun, 09 May 2021 18:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfrUp-0007t2-QY for emacs-orgmode@gnu.org; Sun, 09 May 2021 18:01:55 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfrUo-0006uW-58 for emacs-orgmode@gnu.org; Sun, 09 May 2021 18:01:55 -0400 Received: by mail-wr1-x42a.google.com with SMTP id n2so14629710wrm.0 for ; Sun, 09 May 2021 15:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=uRNXBEWZo0gd0o+Ek07ZxOFGfGPQIOr6W1kRAZf4+Ps=; b=TYcmToETyhTKH8YsgnAUFR4uf5VPIVWZeN8h5lf1n333viNtK7pVpfv5ZQe501dB01 6VghtYDlArOUUojkJaXUXNRQ3vEnP37uDCDdbhs4NJaGcWQwbxjqbC6QtPg5Ko1opXsx BjiJY3Bvy2srxmK0cugPM8GlIKE+/HnIKZZsPiS8rJCyWvmcwnc3ztJJHwTZfG6e6Ag7 EXvFFGLNKe26g328oMjrHxdCmL9OOmpyLylb3RBuv4YwJTNonqo73a2o/rd1Eun/E6vo BhkBhy+PUZLxiqHXM5uJFmT0UAt/71xmjw7/zLrO3ArFXcaUxkwYdzGA4tWXPaklojwH ngGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=uRNXBEWZo0gd0o+Ek07ZxOFGfGPQIOr6W1kRAZf4+Ps=; b=Y/Kfg+GPpvNAPcynoFHx7m9fwaK2Al3pZ86beuD9LHPSIyAptvEQGeBEjC3HSd2rEU SnMbkwcM4REANBueyPwUPXiJd+twXnsyYeGhF9LQX47Qj2lgQbhblBymgCL44ABnZTBm ukaEwD4cfjIG5jW2jUiCyO0X0FHcpDel5sC2YPXjKBxMXhoE1p39Z/E2/bnTMqky+Fdi 9/l5W4bZ3mrSWHZyIwlpeWqpj6RYv8nsgo1rCsdfSZf4Ya8Qe4VPTcgRN4Op6j7kRdOY rLeNznGBkfbprbx4N1x7LbWSIZ39nCrgWVZRJSZGg1uW8GYhkZZ4sYkZM7vC2e8j7BIM C11A== X-Gm-Message-State: AOAM532OFp5ozVrab7Vzcm9UA6D2RheVEDArXS+X2bSbLF5OBUQQfhWp yeM+lnE/BYvKTWhJQQXzwAatrx9Il3pqdBOTuTg= X-Google-Smtp-Source: ABdhPJypFEZdh5YIe/gYB21KxqOJFzNBaMPtkV1h2sEnUTByN8ZItYL3o3UppgroiUHXyA4nkvAwuL8eS3tHnnHcNkY= X-Received: by 2002:a5d:4291:: with SMTP id k17mr25961088wrq.423.1620597710332; Sun, 09 May 2021 15:01:50 -0700 (PDT) MIME-Version: 1.0 References: <87eeel44gt.fsf@nicolasgoaziou.fr> <87wnsc2hag.fsf@nicolasgoaziou.fr> <87y2coz3l7.fsf@nicolasgoaziou.fr> <878s4nzmcd.fsf@nicolasgoaziou.fr> In-Reply-To: <878s4nzmcd.fsf@nicolasgoaziou.fr> From: "Bruce D'Arcus" Date: Sun, 9 May 2021 18:01:44 -0400 Message-ID: Subject: Re: [wip-cite-new] New natbib processor To: "Bruce D'Arcus" , Org Mode List Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=bdarcus@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620597862; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uRNXBEWZo0gd0o+Ek07ZxOFGfGPQIOr6W1kRAZf4+Ps=; b=G3ApZabgufm2UFwHDq8KKd8sSG4KtLcFE8IZr/weCrOvXiBUVhME1EXDntez99ae6pdMBb tlq+AUyHnJ9Ses0npF8P2NCK9Ifv9oVLPbZJpHTyKzEz2/MxulaEM59aB9HIUlXnQEqV46 qjX+OFJn1yD6lYewMccvwBQkNHf9hsYB1JIhEUAvnoRRfknmUkBKCDu0viBZkHylmNFWgn JYxOu/HE7kIKmd2ZSUHU83k8RBkfOJVC+OCnMlwgE0MncKyD/AyuEZvmScIf0YsSVUZvEl Nfl17klunGs/+g1F0ItcHIc7w/1Wm2vN+S4uE35JmYqRftp3FwGu1V0P1bu7eA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620597862; a=rsa-sha256; cv=none; b=BZoTmrj8M5NG/zslbI9P27MKi9mXJnmzjJHSUtIBliSHgr2C0yP19HhNeo/rjuLeDr242w d3ia+ja+mbu580QXbdlFBIRWoDuwt26DwVR711RKz6hlGXfVSdlayaPEVwlWVWKGWWDojC +YBQL9AV09Ii0abBltDbV6jB8bHa1uN+8dA+yVQZbnLiwDtxnZTn36oOum3dFnQvlZEBVx RE+vsxaEaVTlt7kIQ8wvpN4kzNjO9kj5B/ASGUD1Hx4rqjUFggz67AiIr6fXhkdt85pF3h oL7EPvOs+9xDsYMRRGHyTcJq/23Ss5gc/mslenv/yRiiuMPKOEXydL6so/6y4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TYcmToET; dmarc=pass (policy=none) header.from=gmail.com; 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.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TYcmToET; dmarc=pass (policy=none) header.from=gmail.com; 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: AB6BA27CFA X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: oTPP52v0EDpQ On Sun, May 9, 2021 at 4:25 PM Nicolas Goaziou wrote: > > Hello, > > "Bruce D'Arcus" writes: > > > To bottom line it, seems the decision comes down to something like > > these three choices: > > > > 1. no change; keep sub-styles as they are ATM > > 2. change sub-styles to a simple string. So [cite/text/caps+full:...], > > where sub-style is the string "caps+full"; short cut would be > > something like [cite:/t/c+f:...] > > 3. remove sub-styles entirely; just have things like > > [cite/text+caps-full:...], where the style is "text+caps-full"; or > > with shortcuts [cite/t+c-f:...] > > > > Any of them seem reasonable to me. > > > > Maybe 2 is the best balance of flexibility and simplicity? > > But there are two 2 ;) The nice thing about a wiki is one can always edit one's mistakes! But I did correct the quoted text above, so I meant the first "2". See below however ... ... > Sub-styles buy us nicer switching between processors, indeed. But they > come at a price, too. In particular, we need to re-define inheritance > between styles defined in `org-cite-export-processor', "cite_export" > keyword and the citation object. As I wrote earlier in this thread, > there are multiple ways to deal with it, so a clear design is in order. > > Plain styles already exist. Sub-styles requires more work. Does the > benefit outweigh it? If so, what do you suggest for the inheritance > problem? I guess the question is really about the logic in this function? (defun org-cite-natbib--style-to-command (style) "Return command name to use according to STYLE string." (let ((base (if (org-cite-natbib--has-substyle-p style "caps") "Cite" "cite")) (alt (and (org-cite-natbib--has-substyle-p style "alt") "al")) (main (pcase (org-cite-natbib--main-style style) ((or "text" "t") "t") ((or "author" "a") "author") ((or "year" "y") "year") (_ "p"))) (star (and (org-cite-natbib--has-substyle-p style "full") "*"))) (concat "\\" base alt main star))) My read of the natbib docs is this should work correctly, except for the 'year' style, for which 'full' and 'caps' do not apply because there are no authors output in those styles. Indeed, if you do something like \Citeyear you will get an error from LaTeX. So I think you need a conditional that ignores those for that style. But otherwise, I think this should be fine. The example you raised in the first post in this thread was the following: > Also it introduces ambiguities in style inheritance. > For example, if I add > > #+cite_export: natbib plainnat text So the default style is "text." > would > > [cite//alt/caps:...] > > mean > > [cite/text/alt/caps:...] (i.e., \Citealt{...}) > > or really > > [cite//alt/caps:] (i.e., \Citealp{...}) > > ? First, I am thinking "bare" would be more clear than "alt", at least if we're shooting for names that are clear outside the content of a particular output format. WDYT? On the more important output question, do not those two natbib commands generate the same final output in the end? As in, this ambiguity is in natbib itself? That aside, I think just logically the first makes more sense, because nowhere does the style or sub-styles specify the "citep" style. Indeed, that style doesn't exist in the current list. This is what the code currently produces. Am I missing something there? Bruce