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 ms11 with LMTPS id iOeTLuZr9V+XNQAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 07:51:02 +0000 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 ePNkKuZr9V8+WgAAB5/wlQ (envelope-from ) for ; Wed, 06 Jan 2021 07:51:02 +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 F1F449403AE for ; Wed, 6 Jan 2021 07:51:01 +0000 (UTC) Received: from localhost ([::1]:52158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kx3at-0001bY-4u for larch@yhetil.org; Wed, 06 Jan 2021 02:50:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx3aN-0001bP-Eb for emacs-orgmode@gnu.org; Wed, 06 Jan 2021 02:50:27 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:42532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kx3aL-0007bH-MD for emacs-orgmode@gnu.org; Wed, 06 Jan 2021 02:50:27 -0500 Received: by mail-ed1-x536.google.com with SMTP id g24so3527723edw.9 for ; Tue, 05 Jan 2021 23:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EGwCmPbDIsiYFqAJoWz3LOLnKBH3gJ6Xa7BX5OvOy4Q=; b=BfXBlwRi1BT55Uc8RWaCH7Uw+Mb3YLn0dK5e+QTc2dXCyLU2PX49mMYV+A1QirOCzf 4nGscXYm887ZOywpr/KwqoXrXV7WbE3w1WCTixk6NZ5tCwqEkLF6It6l3cP5wUvnsee8 mFVbcIBOE2DJFh1a2IbkkCHafPNTW/A1M3c+JwmKQuYltPgeJzIQuGuu1eQxK5bUx05d GKbHNYq/Y76WhSID/Qv28gOAgOJQ39IVmP1tgndqCZ06pizjpaxsj8nTUPCA1ecx4FR/ +rZmI3iJW18LnCOmN3BIdoLYY/z/IU+1chdXszO5m6e4zdD+/tmhJtXLNMP7vRui9Z0c 7yQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EGwCmPbDIsiYFqAJoWz3LOLnKBH3gJ6Xa7BX5OvOy4Q=; b=rPbIhKA6X5Cs7DTxuJv5iv61vZzVmtIHKWHuIWg7tPsYLxfRiZ5VmOc0PDvdMVUVR6 6ESSR0acOJXx/DelyLe82n1Z9EFOs/g+atV27dOnlb9ESiftgqgzpMgzkDpwBoNDt5/C VZN0we720G4+m/NWjMraaPGU8znC2jc0U/WsIdCQyCs7WBPgKkXS2tkwcxPdPqgu5j/S sK+slXzTUO3W6Ho8blTxf4i4MLnqxKRgoqazli4D6aLodYmFICQoHhj6yVafU+yKAOb4 DdKs1yDZJslSc4PTM9zrSsFxWpO+xdks/16HqUQDVcAvXK06owI5j3HV81I34tuOoWRM RjTg== X-Gm-Message-State: AOAM530oZnugUkOIAAn940sPEUqh5fhjl5MKj3UigjS6SRe0jM5Newjl CacDA4GMmjrUbBl0Onrt5bo= X-Google-Smtp-Source: ABdhPJx8ne4ObJ3bpFJrdIPlsmBUEHVLyASpbMKwfXQ4scYgXtt3j5bNgJnZRdZM4x1bZIvphpK5MQ== X-Received: by 2002:a50:8d89:: with SMTP id r9mr3039596edh.144.1609919424094; Tue, 05 Jan 2021 23:50:24 -0800 (PST) Received: from localhost (217-19-19-230.dsl.cambrium.nl. [217.19.19.230]) by smtp.gmail.com with ESMTPSA id c14sm1031046edy.56.2021.01.05.23.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 23:50:23 -0800 (PST) Date: Wed, 6 Jan 2021 08:50:16 +0100 From: Mart van de Wege To: Juan Manuel =?UTF-8?B?TWFjw61hcw==?= Subject: Re: Inserting LaTex expressions using a filter fails Message-ID: <20210106085016.20bea20a@gmail.com> In-Reply-To: <874kjvavw6.fsf@posteo.net> References: <875z4bcjyz.fsf@gaheris.vdwege.eu> <874kjvavw6.fsf@posteo.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=mvdwege@gmail.com; helo=mail-ed1-x536.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: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=BfXBlwRi; 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: F1F449403AE X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: UJdYpOmM9Anr On Tue, 05 Jan 2021 22:58:33 +0100 Juan Manuel Mac=C3=ADas wrote: > Hello, >=20 > Mart van de Wege writes: >=20 > > I'm trying to replace U+00BD in an org buffer with \sfrac{1}{2} > > during export to LaTex, and obviously I'm doing something wrong, or > > I don't understand the documentation. > > > > I use the following code to set up the filter: > > > > #+BIND: org-export-filter-item-functions (latex-replace-half) > > #+BEGIN_SRC emacs-lisp :exports results :results none > > > > (defun latex-replace-half (text backend info) > > (when (org-export-derived-backend-p backend 'latex) > > (replace-regexp-in-string "=C2=BD" "\\sfrac{1}{2}" text))) > > #+END_SRC =20 >=20 > You must add a double escape character to the backslash: >=20 > ... > (replace-regexp-in-string "=C2=BD" "\\\\sfrac{1}{2}" text))) > ... >=20 Thanks! But see my answer to Nick Dokos on the list, that does not do anything either. Regards, Mart