From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id spgbHVY9oGAH6wAAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 23:29:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id NZfiF1Y9oGCZEQAAbx9fmQ (envelope-from ) for ; Sat, 15 May 2021 21:29:58 +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 D8C70B7CC for ; Sat, 15 May 2021 23:29:57 +0200 (CEST) Received: from localhost ([::1]:36986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1li1r9-0007lA-Dt for larch@yhetil.org; Sat, 15 May 2021 17:29:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li1qP-0007ki-P0 for emacs-orgmode@gnu.org; Sat, 15 May 2021 17:29:10 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li1qM-0005Xt-MY for emacs-orgmode@gnu.org; Sat, 15 May 2021 17:29:09 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 674EF20004; Sat, 15 May 2021 21:29:01 +0000 (UTC) From: Nicolas Goaziou To: "Bruce D'Arcus" Subject: Re: [wip-cite-new] New natbib processor References: <87eeel44gt.fsf@nicolasgoaziou.fr> <87wnsc2hag.fsf@nicolasgoaziou.fr> <87y2coz3l7.fsf@nicolasgoaziou.fr> <878s4nzmcd.fsf@nicolasgoaziou.fr> Mail-Followup-To: "Bruce D'Arcus" , Org Mode List Date: Sat, 15 May 2021 23:29:00 +0200 In-Reply-To: (Bruce D'Arcus's message of "Sun, 9 May 2021 18:01:44 -0400") Message-ID: <87r1i7r8ir.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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: , Cc: Org Mode List 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=1621114198; 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; bh=g44CIY+6l8PgZWAuIIezztu1j62f8iSFMFZK59hIHQU=; b=gPhvMa09/LSEM9GyGLnB36Vv67yNBNbe1YlryQyyMwDH/BOM8TqrwHipNNF2JQ6DdgcWGH SZjAE7jfqMtIQlyOgywQ7kCezMhRPAFlbCYPp209o40MeXqHXk+YFjPl+yGmCLfqiV2Ozf iRw+A6nYRmLtS/ZBDAb0iyo+yylmFcWtlS8aQppulhPxueyb22selo7uqSYWS/ZFBHpm5O UKCJwhNPbWZPMDXfNdPJ9vguy71r+uSehEN+SlU4YrBWfrGsHC+eWaE9QhPOHEtnZ51ZAX azumGhl90R8WWo7rvzxYPOURro8ImWaWt+lJjhsObkKnmKUkejROTidNZCRYXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621114198; a=rsa-sha256; cv=none; b=RL4KskZTafx7staNZxQe0Q8SyCSbhWBbwvmFA/WVBBO9lk+Q0N5v2+/o1sCc+9dM9VZYir gj1zeThzYkPjHh3IZ6yqui3H/I/i8QkicQ3JTA93sx5cbKTGMaEdvr9H4UxYnT8RZRbbVW 1Y4hSCdddI70bWf7jqFky1S75Abql715OztznjvMbQUSbukzlOY9ttAtVKlTTvE5l40KM2 q4EjKmgGE1xIVdp96L9PMuQB36jhDf7RjHs6nuz89Zd+nsyL+o0r8P2+hQySc10TCSEmm0 /8OR6+WhGx4Npch+GuGaY2B6bwnlog6fnLnPKq0NMuEY0JssdyGluhjA5wdQyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -2.45 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: D8C70B7CC X-Spam-Score: -2.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: +e61XHrNtu5c Hello, "Bruce D'Arcus" writes: > I guess the question is really about the logic in this function? No, not really. It was a more general question about handling style+variant between local specification and global one, independently on the processor. > 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? OK for "bare". > 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. Fair enough. I pushed in "wip-cite-new" an attempt to parse styles as a pair (name . variant). I also updated oc-natbib.el and oc-basic.el accordingly. Now, in oc-natbib.el, the LaTeX command is selected like this: --8<---------------cut here---------------start------------->8--- (pcase style ;; "text" style. (`(,(or "text" "t") . ,(or "bare" "b")) "\\citealt") (`(,(or "text" "t") . ,(or "caps" "c")) "\\Citet") (`(,(or "text" "t") . ,(or "full" "f")) "\\citet*") (`(,(or "text" "t") . ,(or "bare-caps" "bc")) "\\Citealt") (`(,(or "text" "t") . ,(or "bare-full" "bf")) "\\citealt*") (`(,(or "text" "t") . ,(or "caps-full" "cf")) "\\Citet*") (`(,(or "text" "t") . ,(or "bare-caps-full" "bcf")) "\\Citealt*") (`(,(or "text" "t") . ,_) "\\citet") ;; "author" style. (`(,(or "author" "a") . ,(or "caps" "c")) "\\Citeauthor") (`(,(or "author" "a") . ,(or "full" "f")) "\\citeauthor*") (`(,(or "author" "a") . ,_) "\\citeauthor") ;; "year" style. (`(,(or "year" "y") . ,(or "bare" "b")) "\\citeyear") (`(,(or "year" "y") . ,_) "\\citeyearpar") ;; Default ("nil") style. (`(,_ . ,(or "bare" "b")) "\\citealp") (`(,_ . ,(or "caps" "c")) "\\Citep") (`(,_ . ,(or "full" "f")) "\\citep*") (`(,_ . ,(or "bare-caps" "bc")) "\\Citealp") (`(,_ . ,(or "bare-full" "bf")) "\\citealp*") (`(,_ . ,(or "caps-full" "cf")) "\\Citep*") (`(,_ . ,(or "bare-caps-full" "bcf")) "\\Citealp*") (`(,_ . ,_) "\\citep") ;; This should not happen. (_ (error "Invalid style: %S" style))) --8<---------------cut here---------------end--------------->8--- So now, you can write a cryptic [cite/t/bcf:@key] and get \Citealt*{key}. Feedback welcome, as always. Regards, -- Nicolas Goaziou