From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sPNUDLF5I2FpuwAAgWs5BA (envelope-from ) for ; Mon, 23 Aug 2021 12:34:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IL38B7F5I2FZOgAAB5/wlQ (envelope-from ) for ; Mon, 23 Aug 2021 10:34:25 +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 47E4198D5 for ; Mon, 23 Aug 2021 12:34:24 +0200 (CEST) Received: from localhost ([::1]:35192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI7Hb-0005bE-8c for larch@yhetil.org; Mon, 23 Aug 2021 06:34:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI7H0-0005b2-QL for emacs-orgmode@gnu.org; Mon, 23 Aug 2021 06:33:46 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:46918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mI7Gz-0004Gz-39 for emacs-orgmode@gnu.org; Mon, 23 Aug 2021 06:33:46 -0400 Received: by mail-pj1-x102c.google.com with SMTP id u11-20020a17090adb4b00b00181668a56d6so5569074pjx.5 for ; Mon, 23 Aug 2021 03:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:user-agent:message-id:mime-version; bh=ncWVBr8lFqfc19De0UQTwxseSk4SFIBoPAOe/PqyR5I=; b=QYSQm9AVeh+bmwLgtmDdLVXlCYBVPc/p+6hyjewjuU+UiV6DmYSHANHbFNKw6L8WkU OngRjHPPv8U6htiKN/YwI3WQhnhBkG0LMnkkCvF7gxMDeFFYXIiUsqBSEOamBIGPSIXb cUSbTkb/3gMvku7LDD0X8CbVPWVI619zNjep+UJQz7QwaDla+cHnfNuYc2mL7iAgvbNt hExE1ayqRpcQDYafwFEs/HhotpQ/sdrm32H4yF/q9+iJ3q+OUyn38o/Pw2rozgY21lGY fYZtHRtR9C8Sst+baqeFxY5q26m8Te382V2hAPkgVgFBYt+Nq0wV26scCUDMwdILR+IY 6q4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:user-agent:message-id :mime-version; bh=ncWVBr8lFqfc19De0UQTwxseSk4SFIBoPAOe/PqyR5I=; b=WaiHMkL53UCqo0/QyUDJ4IIjcOkOAxDvy3/v99KbMRMNGwFUzuCCVyVQuHuatvpQlG OpvNz0HvSjZo51osdmCHjOzpRb7WwX26Zz+aAcXHsgLkuDcd2KrGSTEVQ+unmONvvtqn ulieOlgVE25tO+rNObO1zN86FYFVzYZh0hw8Fit316Qklp23SIX+U9gp/CTh35o5Joj8 DvoPGI7nTnBnQSIp3gsbkvhKRNpztiVJHcgoJRHDKNqjbe3HhuXPr3eE+Opu16dqFvij dG+AMAdUEw73X7qHHoor+dnpUY8Yqjq15dkTAwymwiV1EB70+xGOgDcU41kntHCCAS/7 wnIw== X-Gm-Message-State: AOAM532W5hLL4MomDE8LQoZctybJDBjA5wkqmA61hon7s7Y/HQHJZLS2 k6xwljRGs4gbVJ+h5HT3c8YWZNSQ1X4= X-Google-Smtp-Source: ABdhPJz0sXDfD4P5Um8WY5iMbFVU26jmpTLIpMyRlw39pT0/h1jysmplmZlT+H9UWzBdWbCw2EYS6w== X-Received: by 2002:a17:902:850a:b029:12c:8da9:8bd2 with SMTP id bj10-20020a170902850ab029012c8da98bd2mr28235708plb.58.1629714823230; Mon, 23 Aug 2021 03:33:43 -0700 (PDT) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id g13sm15576753pfo.53.2021.08.23.03.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 03:33:42 -0700 (PDT) From: Timothy To: emacs-orgmode@gnu.org Subject: [PATCH] org-cite: prevent ' from being an active char in LaTeX export Date: Mon, 23 Aug 2021 18:27:59 +0800 User-agent: mu4e 1.6.1; emacs 28.0.50 Message-ID: <87o89otpq4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x102c.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=1629714864; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ez1snvYHOUUgsCT6ODWowFzpu87C/pJjP29xPRqt9Qg=; b=a+kgGtszCkZYvkxTX2XzVNskOLBGW40Yz4EByEdVnqTmNoq5IKqtU04OmG1JKG1liDtIJs eCQLGg0HxLmXKpJ+MlSX+pRmzUEblxrm/xUoQKxYGv1LkXwvQRGdvb1Ig6v7O2Z7JJ/gQO MOvu4gxHbFLib/RL0dcPHDp8+LU/+uoisE3pj64/Ln6dXh7OHoCj0ytc3omy4uxSX1Ak3p WU0WTPMpfQ3xyLRsd6IFK73Qep968GV9WSgn/NJQrllA4pERajyPKsZhC+6551d8iuP4dr R2oXFg7HDJTD4mUn/rputWyLa9yinbSqR5sNLR8DDPrg5Z+KMyZXJcv8HsM66Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629714864; a=rsa-sha256; cv=none; b=Nq2AvrLLOw/uJ/fwoBXYqG0rX/GYWuIrFDHc0NbM6TUVVVS8XQuRfQ4YKt3SwKxiYYz4qK 9z2732d0RW58pa5LCjfUiP7/SG/Xe0Af1zB/l2Lbya0Z3J+g+bJzSM2K6OPawpDFsAcXjj 5qmIY3nqpkOhzl3a8Kf5Dm7+LKCwT1XdJ2Pn7RZDvpac9kPzTxP1aCUAsDKdxwLjEwa4rA FLYNHU3A7ro4DqW9ctBmWsURVpnuQkb8tN6CHDf/sLoKEoGCno3qClZM5q93MpO1qeZEwx ziZeN2HSaHwWGvbnMx+F1WfJt4Unmm9osna2hTpxUOD6dYFN6qjPOrzTyqoEBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=QYSQm9AV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 0.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=QYSQm9AV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 47E4198D5 X-Spam-Score: 0.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: yoGI4BukA+L+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi All, This is a band-aid over the issue raised in . I=E2=80=99ve come across an issue with the `hanging=E2=80=99 package = we=E2=80=99re currently using for LaTeX exports =E2=80=94 it also affects punctuation, and makes `,.=E2= =80=99=E2=80=9C`?!:;=E2=80=99 active characters throughout the entire document. That means a LaTeX snippet= like: f=E2=80=99(x) Will now fail to compile =E2=98=B9. See=E2=80=A6 By just adding the [notquote] option, =E2=80=99 is no longer an active char= , and so f=E2=80=99(x) no longer breaks documents. Long-term, I still think that get= ting rid of all this active char stuff would be a good idea, by switching out hanging f= or use of `\parshape' if possible. All the best, Timothy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-oc-csl-Prevent-from-being-a-LaTeX-active-char.patch >From ad63eb8f4d7d02c9864d5caded0b4f2ee9f54133 Mon Sep 17 00:00:00 2001 From: TEC Date: Mon, 23 Aug 2021 18:18:33 +0800 Subject: [PATCH] oc-csl: Prevent ' from being a LaTeX active char * lisp/oc-csl.el (org-cite-csl-finalizer): The hanging LaTeX package we're using also affects punctuation and makes `,.'"`?!:;' active characters throughout the entire document. That means a LaTeX snippet like \(f'(x)\) will now make the document fail to compile. See for more information. Adding the [notquote] option stops \(f'(x)\) from being an issue. In time it could be worth looking into replacing the hanging package with some use of \parshape. --- lisp/oc-csl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 617bddb7e..36a885641 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -595,7 +595,7 @@ (defun org-cite-csl-finalizer (output _keys _files _style _backend info) (goto-char (match-beginning 0)) (let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}"))) (unless (re-search-backward re nil t) - (insert "\\usepackage{hanging}\n")))) + (insert "\\usepackage[notquote]{hanging}\n")))) (buffer-string)))) -- 2.32.0 --=-=-=--