public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Moving footnotes to just after paragraph with the citation
@ 2023-11-21 20:24 Lyndon Drake
       [not found] ` <868187f2-1fd4-4009-b48e-2a948749b518n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Lyndon Drake @ 2023-11-21 20:24 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-23 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 20:24 Moving footnotes to just after paragraph with the citation Lyndon Drake
     [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

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