From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33357 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lyndon Drake Newsgroups: gmane.text.pandoc Subject: Moving footnotes to just after paragraph with the citation Date: Tue, 21 Nov 2023 12:24:15 -0800 (PST) Message-ID: <868187f2-1fd4-4009-b48e-2a948749b518n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5708_52032761.1700598255848" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19370"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCKOX6WY7EKBB4ND6SVAMGQEU4TTTOQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 21 21:24:22 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f63.google.com ([209.85.216.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r5XIE-0004q3-CL for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 21 Nov 2023 21:24:22 +0100 Original-Received: by mail-pj1-f63.google.com with SMTP id 98e67ed59e1d1-282d66095a4sf7456948a91.1 for ; Tue, 21 Nov 2023 12:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700598261; x=1701203061; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=daIgjDoFJUiBhyzUkGmJISZ0WFB3uUqX7ROpEOuxTaE=; b=F3gATmxkNXSPIWsYIYPMcvRLaIn4ZEdd7Up569Wjlor2q+njlY6tQhSS4my1aq4fup 1xASzIYtgliZHY5hvCC3e72W/dPhaIWpCvja5vbau0zmUWt2n18NOlBg78J3LyvehH/J fffajz6frd94SB3iNXgCEah+axbzweHOFMt1y11ZmuCsNMy6Fq6KkHdzc1c3rm4uL3MG 7inDE4kX6jqbaCmcuBFApq20oYp1KKO0ez08E2R9r/kWpoRuD06wv/DKcQ31YbIaEYuA OU/WyWbtdagsAw7gJI2AsHAXEaubZ34SjEQ+Iv8U+tiO1IekWoGRRePH0GJuIiB4aiu9 xgpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700598261; x=1701203061; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=daIgjDoFJUiBhyzUkGmJISZ0WFB3uUqX7ROpEOuxTaE=; b=IyETBNtJIndswGt8YlEatjPhxfjsOk1O615y4hzNdlu2pW0qOopuuxcrwovGKfn7tv J4XaJPcSXtLN0gg4sob2Dn8+Zjpx7b0HRgfWeE3tNse16CmPxFHb5y+rjz1DKHSIwnCB 9f3BNacjN0keGK2dtl/09wlZCpc1pSKUPiOB3h46UY8aLbqVy2t6pxiRtMm7tOj2ag+V fDv7m/WcEOZWqaZ/PBhBAiPQPYpGaIn9JJ2AsxMEjqKFKcOs48fXyQGDu9p9yEbkG9h0 kNwDicfTtfjhUPQJF+D98kIyCp1FwchLhZ3bt7hpeH+R+iT+0GlBudK3f88oysxSnapi ahDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700598261; x=1701203061; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=daIgjDoFJUiBhyzUkGmJISZ0WFB3uUqX7ROpEOuxTaE=; b=ja/01zi0p13LNgqfW4+pqWK14hEiK+ZjwlDpE3ldlhLIMfSaMKe60mvn7ES8iV7Obu 0EzJIgAJ7ExwCuueF2DD8rC7PxP4u4+sfxl7qdtpBC54ddHg+zHNAO3ZSl5QWTl+5TrX l31qYXUqR47/wzPcU6Jp62h/Lg29y61K4hejjeK2rP45ppnUCTI1iYCwPScBMPUlKkG6 BAj2Uc8bq4NIRWAkUx+nHN7YVZMkcxhtcPQvSUTZCBn69j3gP58VhjY5pa3waIHoNKVB InbGcv0zGLtqcsIQKjtvfsFJtR9lImePmfM9/D00V5Yo2MGAH4IUopPubZ2ocssA8r7L Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YwtvFvzU9spTn+JKd+DLxJjSsDJpA+mYcjopTCDAJ1OkaluZaCZ LC57lhS1sCNnKho3PWz+Tzk= X-Google-Smtp-Source: AGHT+IEmC7IPBQqLt+6yWniom80E2XGhgWxZGnysS3fWY53phOMgoNAcOq0wx/2GeRU5C4yzR0hQcw== X-Received: by 2002:a17:90a:d996:b0:280:c576:31bc with SMTP id d22-20020a17090ad99600b00280c57631bcmr386763pjv.32.1700598261001; Tue, 21 Nov 2023 12:24:21 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90b:394b:b0:268:f76:e134 with SMTP id oe11-20020a17090b394b00b002680f76e134ls111881pjb.0.-pod-prod-00-us; Tue, 21 Nov 2023 12:24:16 -0800 (PST) X-Received: by 2002:a17:90b:2690:b0:27d:2945:ad97 with SMTP id pl16-20020a17090b269000b0027d2945ad97mr1096726pjb.2.1700598256623; Tue, 21 Nov 2023 12:24:16 -0800 (PST) X-Original-Sender: isenguard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33357 Archived-At: ------=_Part_5708_52032761.1700598255848 Content-Type: multipart/alternative; boundary="----=_Part_5709_1981760149.1700598255848" ------=_Part_5709_1981760149.1700598255848 Content-Type: text/plain; charset="UTF-8" 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. ------=_Part_5709_1981760149.1700598255848 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,

I'm working with a long pandoc-flavoured Markdown = file generated by Scrivener. All the footnotes appear at the end of the doc= ument. I'd like to be able to process the Markdown file to shift each footn= ote to immediately follow the paragraph which contains the footnote referen= ce. I don't want to inline the footnotes, because some of the footnotes hav= e multiple paragraphs.

So I would like to transf= orm something like this:

```
This is t= he first paragraph.[^1]

This is the second parag= raph.[^2]

[^1]: First footnote.

=
=C2=A0 =C2=A0 =C2=A0The first footnote has two paragraphs.
=

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

To something like this:

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

[^1]: First footnot= e.

=C2=A0 =C2=A0 =C2=A0The first footnote has tw= o paragraphs.

This is the second paragraph.[^2]
<= br />
[^2]: Second footnote.
````

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

Thanks,
Lyndon

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_5709_1981760149.1700598255848-- ------=_Part_5708_52032761.1700598255848--