emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: footnotes export verbatim
Date: Tue, 26 Feb 2013 15:35:38 -0700	[thread overview]
Message-ID: <CAJcAo8sQ8axJcWLkXF_Y=dYidxZtiOcoYHA_ADWqwPTngXDJyQ@mail.gmail.com> (raw)
In-Reply-To: <87ppzoyfvf.fsf@gmail.com>

On 2/25/13, Nicolas Goaziou <n.goaziou@gmail.com> 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	other threads:[~2013-02-26 22:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 20:47 footnotes export verbatim Samuel Wales
2013-02-20 15:18 ` Nicolas Goaziou
2013-02-20 17:21   ` Samuel Wales
2013-02-20 17:32     ` Nicolas Goaziou
2013-02-20 20:13       ` Samuel Wales
2013-02-20 20:43         ` Nicolas Goaziou
2013-02-20 20:59           ` Samuel Wales
2013-02-21 14:27             ` Eric S Fraga
2013-02-23  3:08               ` Samuel Wales
2013-02-24 13:50             ` Nicolas Goaziou
2013-02-24 20:12               ` Samuel Wales
2013-02-25  8:09                 ` Nicolas Goaziou
2013-02-26 22:35                   ` Samuel Wales [this message]
2013-02-26 23:24                     ` Nicolas Goaziou
2013-02-26 23:28                       ` Nicolas Goaziou
2013-02-26 23:40                       ` Samuel Wales
2013-03-19  4:13                       ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJcAo8sQ8axJcWLkXF_Y=dYidxZtiOcoYHA_ADWqwPTngXDJyQ@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).