From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: footnotes export verbatim Date: Wed, 27 Feb 2013 00:24:42 +0100 Message-ID: <87621emzet.fsf@gmail.com> References: <87bobf3ten.fsf@gmail.com> <87txp63n7l.fsf@gmail.com> <87hal63eei.fsf@gmail.com> <87ehg5zuqe.fsf@gmail.com> <87ppzoyfvf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UATtK-0002Wy-AV for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 18:24:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UATtI-0003cb-Ds for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 18:24:58 -0500 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:60052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UATtI-0003cO-6Y for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 18:24:56 -0500 Received: by mail-we0-f177.google.com with SMTP id d7so3943973wer.36 for ; Tue, 26 Feb 2013 15:24:55 -0800 (PST) In-Reply-To: (Samuel Wales's message of "Tue, 26 Feb 2013 15:35:38 -0700") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org Hello, Samuel Wales writes: > That doesn't seem to work for me. After a great deal of > effort I came up with this: > > (add-hook 'org-export-before-parsing-hook > 'alpha-org-export-fix-inline-footnotes) > (defun alpha-org-export-fix-inline-footnotes (_back-end) > "Try to get paragraphs to work in inline footnotes > again." > ;; this is both slow and buggy > ;; > ;; replace every set of blank lines in the buffer with > ;; \par. what i really want is to do so only in > ;; footnotes and to not squeeze multiple blank lines. > ;; > ;; this merely does on whole buffer: > ;; (while (re-search-forward from nil t) > ;; (replace-match to t)) > (alpha-replace-re-in-buffer "\\(\n[[:blank:]]*\\)*\n" "\n\\\\par\n") > (org-footnote-normalize) > (alpha-replace-re-in-buffer "\\\\par" "\n")) Try the following: #+begin_src emacs-lisp (defun my-par-in-inline-fn (backend) (unless (org-export-derived-backend-p backend 'latex) (let ((org-footnote-section "My section")) (org-footnote-normalize) (while (re-search-forward "\\par\\s-*" nil t) (replace-match "\n\n"))))) (add-hook 'org-export-before-parsing-hook 'my-par-in-inline-fn) #+end_src Regards, -- Nicolas Goaziou