emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] footnotes export verbatim


From: Samuel Wales
Subject: Re: [O] footnotes export verbatim
Date: Tue, 26 Feb 2013 15:35:38 -0700

On 2/25/13, Nicolas Goaziou <address@hidden> wrote:
> I think we're not talking about the same thing. The fix allows empty
> lines in regular footnote definitions, not inline ones.

This thread's subject is inline footnotes, in which
paragraphs worked well for me in the old exporter and do not
work for me now.  So your reply made it seem like you had
fixed them.


> That hook function can be added in `org-export-before-parsing-hook'.

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"))

I am past my limit.  It produces incorrect output:

      this should work without any problems.  this should work

       without any problems.[1] this should work without any
      problems.
       this should work without any problems.



      Footnotes
      _________

      [1] this should work.

      ******* test case
      this should work without any problems.  this should work
      without any problems.[2] this should work without any problems.
      this should work without any problems.

Samuel

-- 
The Kafka Pandemic: [http://thekafkapandemic.blogspot.com]

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Footnotes
_________

[1] DEFINITION NOT FOUND.

[2] this should work.

  this should work.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]