From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: how to convert/normalize plain footnotes into [fn:] ones Date: Wed, 21 Dec 2016 21:12:26 +0100 Message-ID: <871sx1xcr9.fsf@nicolasgoaziou.fr> References: <878tr9xp16.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJnFR-00014M-NT for emacs-orgmode@gnu.org; Wed, 21 Dec 2016 15:12:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJnFO-0000oe-Kg for emacs-orgmode@gnu.org; Wed, 21 Dec 2016 15:12:25 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53524) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cJnFO-0000ng-F2 for emacs-orgmode@gnu.org; Wed, 21 Dec 2016 15:12:22 -0500 In-Reply-To: (Gerald Wildgruber's message of "Wed, 21 Dec 2016 17:48:00 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Gerald Wildgruber Cc: org mode mailing list Hello, Gerald Wildgruber writes: > I had actually tried that already and came up with the following regex: > > \([^ ]\)\(\[\)\([0-9]\) --> \1\2fn:\3 > > i.e. three groupings: 1) no whitespace, 2) "[" and 3) a number, and then > introducing "fn:" between "[" and the number: but it is not perfect, as > it still gives false positives; do you have something better? I would use (and, in fact, used) \\[\\([0-9]+\\)\\] --> \\[fn:\\1\\] and eyeballing the results. > The problem unfortunately arises also by pandoc still using the now > obsolete syntax of plain footnotes when converting (e.g. latex) to org > mode! I'm certain Pandoc importer will ultimately catch-up. Regards, -- Nicolas Goaziou