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 zv5JCCK0n2DpgQEAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 13:44:34 +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 4PpJAyK0n2AWdQAAbx9fmQ (envelope-from ) for ; Sat, 15 May 2021 11:44:34 +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 6CCAB2359D for ; Sat, 15 May 2021 13:44:33 +0200 (CEST) Received: from localhost ([::1]:42518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhsie-00010z-Ka for larch@yhetil.org; Sat, 15 May 2021 07:44:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhshv-0000wk-Bl for emacs-orgmode@gnu.org; Sat, 15 May 2021 07:43:47 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:62849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhshq-0001Aj-Rx for emacs-orgmode@gnu.org; Sat, 15 May 2021 07:43:46 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 56CC8240005; Sat, 15 May 2021 11:43:36 +0000 (UTC) From: Nicolas Goaziou To: Denis Maier via "General discussions about Org-mode." Subject: Re: [wip-cite-new] Adjust punctuation around citations References: <871raawc7j.fsf@nicolasgoaziou.fr> Mail-Followup-To: Denis Maier via "General discussions about Org-mode." , Denis Maier Date: Sat, 15 May 2021 13:43:36 +0200 In-Reply-To: (Denis Maier via's message of "Fri, 14 May 2021 15:39:25 +0200") Message-ID: <875yzkte6v.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.193; envelope-from=mail@nicolasgoaziou.fr; helo=relay1-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_H3=0.001, RCVD_IN_MSPIKE_WL=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: Denis Maier 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=1621079073; 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=VjFb20ocX8y1MxvKbtD4/XydSxOuqp2oBJp4ElCC1UA=; b=jXcRggdbEKLCeNScRMmjBq+io+mrtjXDrQHHdV75RVt/BTDiq/hsjdQ++RP/Ref7tAW1sl N3Q7sqUcFiUVTV+xDFlQLZv6+hXkJQxYjhPbZLWneOaPQ1BSwfEI+CxwD0WbOaLx3MnzHd nD0sTzj1cF5esyEeaqIKJQHYvimHf0UJx+sQNMBmNbRrQifupHrGWv2ysCPDdvgx0/mIU+ 4zeZaNuXU4s+J2TzxFhJrCynXqDMKgEnfInozF6ETziNp9//naDyLMnCqDV9FX9pOXie6E mK0QlvEb2BuRLnWW8JdrLegpq98zI+QmUkakFHlLHcg+5DzNFG2nh+Y9JL9Nhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621079073; a=rsa-sha256; cv=none; b=DPaPlmcSlxQs//Nl1voD4TwNu8i2V/pKMHsqWYfLZZLmOJp4B7y7NaW2Oxq2YdM/U+ghxE ferG5oFiS1xyZ+ZUaUoHg6OoTwjHBVDkoPATBDI4xu6S064GuDcYfzMlyjNqy9FmpjnwKo G2kzVpbcRexqNSnE26J6qh7Y+bXBfHOAHw2aPQRQyN0Xhtz4HWfASIbbwza4VngmREe0RV cH/UZxrjcnUd2PYJhMlkbzaKPiRyEvSrCEIM39KTDZBkvx+ExlJdTNyzTcnDpxd4/3GyHc r+TWxjKM+zYuqUd17ZoZvaBdyqC1lYblwwb+RqGTfqVkM0MJlAaOtCazJXfrrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: 6CCAB2359D X-Spam-Score: -2.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0J982W+6vtmI Hello, Denis Maier writes: > Regarding French typography. > With this example: > --------------------------------------------------- > > #+language: fr > #+cite_export: test > > "This is a complete sentence."[cite:@key] > > "This is an incomplete sentence" [cite:@key]. [...] > I'm getting: > > ---------------------------------------------------- > "This is a complete sentence[1]." > > "This is an incomplete sentence[2]" . [...] > 2 is a bit odd. > - there's the spurios space before the period. > - I think in that case the footnote mark should be just before the > period, i.e. after the quotation mark. Basically like example 3. [...] > I don't know if that is feasible with the current parameters. It is not. I added a `same' parameter for citation to achieve it. I also fixed the space error. You can try again with the following processor: --8<---------------cut here---------------start------------->8--- (defun org-test--language-to-rule (info) (pcase (plist-get info :language) ("en-us" '(inside outside after)) ((or "en" "de" "en-gb") '(static outside after)) ("fr" '(static same before)) (_ nil))) (defun org-test-export-citation (citation style _backend info) (pcase style ("author-year" (org-cite-adjust-punctuation citation '(outside outside before) info nil t) "(John Doe, 1999)") (_ (pcase (org-test--language-to-rule info) (`nil nil) (rule (org-cite-adjust-punctuation citation rule info))) (unless (org-cite-inside-footnote-p citation) (org-cite-wrap-citation citation info)) "..."))) (org-cite-register-processor 'test :export-citation #'org-test-export-citation) --8<---------------cut here---------------end--------------->8--- I'll comment further in another message. Regards, -- Nicolas Goaziou