public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Lyndon Drake <isenguard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Moving footnotes to just after paragraph with the citation
Date: Tue, 21 Nov 2023 12:24:15 -0800 (PST)	[thread overview]
Message-ID: <868187f2-1fd4-4009-b48e-2a948749b518n@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1317 bytes --]

Hi,

I'm working with a long pandoc-flavoured Markdown file generated by 
Scrivener. All the footnotes appear at the end of the document. I'd like to 
be able to process the Markdown file to shift each footnote to immediately 
follow the paragraph which contains the footnote reference. I don't want to 
inline the footnotes, because some of the footnotes have multiple 
paragraphs.

So I would like to transform something like this:

```
This is the first paragraph.[^1]

This is the second paragraph.[^2]

[^1]: First footnote.

     The first footnote has two paragraphs.

[^2]: Second footnote.
````

To something like this:

```
This is the first paragraph.[^1]

[^1]: First footnote.

     The first footnote has two paragraphs.

This is the second paragraph.[^2]

[^2]: Second footnote.
````

Is there a straightforward way to do this? E.g. as a pandoc lua filter or 
custom writer?

Thanks,
Lyndon

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/868187f2-1fd4-4009-b48e-2a948749b518n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2037 bytes --]

             reply	other threads:[~2023-11-21 20:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 20:24 Lyndon Drake [this message]
     [not found] ` <868187f2-1fd4-4009-b48e-2a948749b518n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-21 21:23   ` Gwern Branwen
     [not found]     ` <CAMwO0gw1W6_CHiCr8RGfDkLjt-dTg4y9dPkbU2UouZt=1Lj3Cg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-22  1:11       ` EBkysko
     [not found]         ` <aa407627-870e-474e-856e-49559c74d46cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-22  2:55           ` Lyndon Drake
     [not found]             ` <3b95f72e-34ba-486b-9b5d-2b0d01a49088n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-22 12:23               ` EBkysko
     [not found]                 ` <ff6a6898-e1c0-413f-b6c2-d81ea2d949d4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-22 12:54                   ` 'William Lupton' via pandoc-discuss
     [not found]                     ` <CAEe_xxh74qC5fLmzhoMjS1gyWwyo=rSKVmbXTs--fH8me-EAeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-23 16:21                       ` Lyndon Drake

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

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

  git send-email \
    --in-reply-to=868187f2-1fd4-4009-b48e-2a948749b518n@googlegroups.com \
    --to=isenguard-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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.
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 NNTP newsgroup(s).