From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31807 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: converting links to footnotes... including page number in footnote?? Date: Sun, 27 Nov 2022 17:01:31 +0000 Message-ID: References: <2aec84ad-a750-48f2-a0c2-ad7572dcca11n@googlegroups.com> <480d0274-2324-43d7-9f74-1bbfc08fcbd0n@googlegroups.com> <858c5a07-89a0-4daa-803f-e0d9d50ca9c6n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="H5YcjdeQUJz8Rm9f" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22307"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRB5FPR2OAMGQE5PQGZHA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 27 18:01:45 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f61.google.com ([209.85.167.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozL2H-0005i7-7o for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 27 Nov 2022 18:01:45 +0100 Original-Received: by mail-lf1-f61.google.com with SMTP id m25-20020a195219000000b004b40c1d5566sf3024853lfb.4 for ; Sun, 27 Nov 2022 09:01:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669568504; cv=pass; d=google.com; s=arc-20160816; b=xIjKc7k7pSmbgKE3XjxXAEF3gvyYfIoktsBuCq1z4hn7mSBsdgBmZ0BKfc9eMFfzOH 9HuCmvTHHXvW40/5OkaB0U3a99bfHzFKdm2HoFd8p9wxPdD6r2cV5PHb03NLiBUooonZ 03okioBf7GSywVWwkSxIoSkLSWiHEuGLMtPoEipK7kfaPusTSjR6CUPI2+bkvBRkKeYw YeoK6oWL+mDYkcwioNs1s9W57Cus86PPpwB2Tn9Oo7eKzmjZ81XkN4Iwj2LWdq4z2Yii 8nNVgC90SHRhOHZ+xEcwtmpC8v102LP7yOTUSb8qVLooLrQIZKSDnrsqu9A0KAXsTjfp yNyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=ccZAdm8F86+r91b/J7z36H33LmNjjBVhWAgMwGSn0VA=; b=QRp+Zm/K45YsYl3q/gygabZy0YY22UJUyAFnOdAe1NWJ1qa9RecNl2BoaX+3nF2EUE UC71OySp96QIpvHuKJNH7cB7mlaHJFITqZz9BMcTeeHATbL/t6n9kUigU5VKWZpk2hsB ylGYQ26klpRA94qOnikIOB62przrXmhaaDWI7JvmSStEP8pT9lHJes8YhwRpzQFla79D ZQBTvLgillpAyNLRDCeJ+NW4tKP/3bZVyOqmQdqwVjoSKX4SKoG2TWOW1UOn65p999fR D2d9mdIU34/i9bCdjWKpW4NzQThWsdPV4zR8lF1AIhEoPiO3Cwvmeudz5QYlZ+1yuW1L yFcQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=j2UJp5X2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=ccZAdm8F86+r91b/J7z36H33LmNjjBVhWAgMwGSn0VA=; b=cZRSVtxv1o8EJxICjPHL0Gt9tq0414XrwFW1ghcVD1mGVMvnqC1n3XjRFWN9JbQ8Co e0QdcaqfNecWlxcCNJLY+sJVtLircXgxGyvINjTSWBnz9HbqOLQ3t4QmGuYxBtEjS4zk VmmQPpKDWIxzvusdfQG8Ej3DdoCjeGolznkzaQ/ZFTMqO+5yIGAzBvfMTt8Sb75d2MyW TSERnQTRMdrbydlgWbESlTzAhvalrocb52qfaI04XQcAyajQ40qRhzQnM+LVO1MHo0uH uwqx8PNQc0J0VF0JDo7ibY4XOaFTth87QayTKI48mjzzd X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=ccZAdm8F86+r91b/J7z36H33LmNjjBVhWAgMwGSn0VA=; b=iReGln25qk3+dhFyTir0uKlgolIQi55pkLlj9pEnH2CmsDX+S+CXS1HvC5ww5lfq2q UXwlMb3deqCh5DEixOsYVNd1WhTPzGlm9R1FotWXo1BthZXheHTF37+vLnesAO8AkQgt mC41Tns2ivSW4080HtXQy27DCXJ8gzmplKqHyWYO0zJ6vQpKP18VfrMXoeCEL1S4fwsj xSl2oD11wk8wGA4AtJcdNsom+KPXGf7ixFRoGQL0T4EHBM37tebt6R9g5fzpYPFmRauP Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pm/W2XVsu4GrSf6UtXN0EMSXiNPG1cYi/ax0a39EV98f12Antph q826ysG6wkl9ddaGgAVWQt4= X-Google-Smtp-Source: AA0mqf7LjtNO15I6KGUEbf3pI6nbx0zkkjTvA1aR/56x5kC2Q4a29p9gqIjHlc5yLueqUbHf6uFVSA== X-Received: by 2002:a2e:a90a:0:b0:26d:ccb6:1d47 with SMTP id j10-20020a2ea90a000000b0026dccb61d47mr10462675ljq.199.1669568504541; Sun, 27 Nov 2022 09:01:44 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:651c:158e:b0:26c:56b2:1383 with SMTP id h14-20020a05651c158e00b0026c56b21383ls1321845ljq.4.-pod-prod-gmail; Sun, 27 Nov 2022 09:01:39 -0800 (PST) X-Received: by 2002:a2e:7208:0:b0:279:7a2a:b5f5 with SMTP id n8-20020a2e7208000000b002797a2ab5f5mr7066446ljc.58.1669568499504; Sun, 27 Nov 2022 09:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669568499; cv=none; d=google.com; s=arc-20160816; b=tDtKNaKoFmXzhUP8H1oHFN1SQe1xPZjbH4hY3tA+DAjQzK989WEh/Ti8Jvfd630EHX 30BU9JqWLmqYxgLdgN7BJ7uSRA9+lFc9/Y28Q3TORa5XVXsGC7tXWPLGviLXSY1HNPZT zei9slcthdTD4RJ6uACVDBcYIXeSeonlLbZTBpODokAzXOSXXlQ0q6VGkjiv7OZ4jwzj V4y3Xoiw4jP/6vvIk/jrxyoK076CPPBIIwwcY3pQmZXJpFBf14RJ0Uhhx7vRMLKNiy57 Ap0u5rzy4i42IUsLWAFRrRXzTymqz02tY9KWEmWchQB9sAApmeKSPP9rGK5EAGe+hNGv 1jOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=SHkiDjufRrys8Z+Rq6OXdV4Bqn1BAw+n0cHb9OYP+W8=; b=byk4SbyFidcDSYMI63vXitAihozeavWF5I3Ib2+Yds7bVS+t3+ZevcYu4aF2kUhCkW TDLVYFU3j1h08b37oZQayYU8N70fiT2PtKIIR3nt5D23g1futthPNPe0uFeyNyFHbnxE vs80ZPFYUOwrdHVox1AEVOj0CKvOh59Ze6Mq7t30qHWs+2ixC6NQYCI9gAOS1DBxezZd jXsXTM+c5q6tZttADma3D/i28KBV1TrUmheFIjhhnugGXniRl18dl8yZ86ddiLov+ovX CLgFlQOYWtQr7UJMZIPx4IjSe1yj+znJw8Ck7gYwm4rdHjj8i4oa1ej4OWzQsgLHn0KB x5Tw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=j2UJp5X2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id t10-20020a056512208a00b0049c8ac119casi422786lfr.5.2022.11.27.09.01.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 09:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CCE53240028 for ; Sun, 27 Nov 2022 18:01:38 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NKvyV2gR6z6tmN for ; Sun, 27 Nov 2022 18:01:38 +0100 (CET) Content-Disposition: inline In-Reply-To: <858c5a07-89a0-4daa-803f-e0d9d50ca9c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=j2UJp5X2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:31807 Archived-At: --H5YcjdeQUJz8Rm9f Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please see the updated filter attached! Le Sunday 27 November 2022 =C3=A0 08:24:43AM, user account a =C3=A9crit : > Ok, gotcha! Could you point me to an example of how that page number coul= d be > printed somewhere? >=20 > My goal is this, HTML: >

Here's text with anchor text.

>=20 > Becomes a paragraph in the pdf document: > Here's text with anchor text[1]. >=20 > And then in the footer, is a footnote: > 1) See one page #7. >=20 > ...where page 7 is the where the /some-blog-post is now located in this p= df. >=20 > Does that make sense? >=20 > On Sunday, November 27, 2022 at 10:50:14 AM UTC-5 Bastien Dumont wrote: >=20 > My filter only shows how one can inject raw code to get references by= page > number in LaTeX. Without any example, I don't really understand what = you > say about footnotes and so on, but the basic mechanism is here, now y= ou can > adapt the filter to your needs. >=20 > Le Sunday 27 November 2022 =C3=A0 06:13:53AM, user account a =C3=A9cr= it : > > oh a 'filters' subdir! Thanks. So now the pdf gets created w/o erro= r, but > there > > are not footnotes. > > > > neither of these: > > pandoc -L links-with-page-number.lua -o test.pdf test.html > > pandoc -V links-as-notes -L links-with-page-number.lua -o test.pdf > > test.html > > ...creates pdf w/ footnotes, so there's no footnote to contain the = page > number > > of the linked-to page. > > > > Something undesireable does happen though... I changed the paragrap= h with > the > > link to: > >

Here is a link to important words about t= he > target. > >

> > ...and the "important words about the target" get removed altogethe= r. > Those > > should not be removed, just the tags around them should be remo= ved. > > > > Thanks for the help so far. I'm excited to see a lua filter in acti= on for > my > > first time. Very curious about the api... I presume pandoc is looki= ng for > > functions with particular names like Link and Span? Would you mind > > confirming... this [1]https://pandoc.org/lua-filters.html#type-link= is > the proper > > spot in the docs for referencing Link in this context... right? > > > > I imagine this working example produce footnotes w/ page numbers fo= r you > in > > your environment...? Any idea what I could inspect to try to get it > working in > > mine? > > On Sunday, November 27, 2022 at 3:57:02 AM UTC-5 Bastien Dumont wro= te: > > > > Place the file under `~/.local/share/pandoc/filters`. You don't nee= d the > > executable flag. > > > > Le Saturday 26 November 2022 =C3=A0 02:30:58PM, user account a =C3= =A9crit : > > > Thanks I wish that worked. I don't know what I'm doing wrong, her= e's > what > > I've > > > got=E2=80=A6 > > > > > > `pandoc --version` says user data dir is `~/.local/share/pandoc` = so I > > placed > > > this file there as `~/.local/share/pandoc/links-with-page-number.= lua` > and > > did > > > (just in case) `chmod +x` on it. > > > > > > `pandoc -o test.pdf test.html` produces a 2page pdf as expected w= ith no > > > footnotes. > > > > > > `pandoc -L links-with-page-number.lua -o test.pdf test.html` fail= s to > > produce > > > pdf file with: > > > ``` > > > Error running filter links-with-page-number.lua: > > > links-with-page-number.lua: openBinaryFile: does not exist (No su= ch > file > > or > > > directory) > > > ``` > > > > > > There's no typo in my script name or command invocation. Using ~ > /.pandoc > > > instead of ~/.local/share/pandoc doesn't make any difference, sti= ll get > > that > > > same error. > > > > > > Any ideas? > > > > > > On Saturday, November 26, 2022 at 12:34:15 PM UTC-5 Bastien Dumon= t > wrote: > > > > > > Please find attached a basic implementation. As in the attached s= ample > > HMTL > > > file, I suppose that the targets are marked with ids on spans and= that > > you > > > link to it via empty elements. If you have a LaTeX installati= on, > > simply > > > do `pandoc -L links-with-page-number.lua -o test.pdf test.html` t= o see > > the > > > result. > > > > > > Le Saturday 26 November 2022 =C3=A0 05:21:25AM, user account a = =C3=A9crit : > > > > Thanks! Yeah injecting html in the intermediary document doesn'= t > sound > > > very > > > > promising either (again, because the pages have to be built fir= st > > before > > > > footnotes updated with page #s) so maybe I'll abandon weasyprin= t in > > this > > > case, > > > > if this would be easy to do with a *Tex pdf engine. In that cas= e... > how > > > would > > > > one go about this? Would a lua filter be more capable with a > different > > > pdf > > > > engine or would a different mechanism be used? > > > > > > > > On Saturday, November 26, 2022 at 5:28:31 AM UTC-5 Bastien Dumo= nt > > wrote: > > > > > > > > The problem is that Pandoc does not produce the PDF document: i= t > > produces > > > > the intermediary HTML document that is processed by weasyprint = to > > produce > > > > the PDF. So you cannot get page numbers in a Lua filter. > > > > > > > > However, you can inject raw HTML code in the intermediary file = (or in > > > your > > > > CSS) that will make weasyprint print the page numbers. The ques= tion > is > > > > whether such HTML code exists. It certainly would be possible t= o do > > this > > > if > > > > you converted to PDF via LaTeX, ConTeXt or groff, but I don't k= now if > > it > > > is > > > > possible via weasyprint. > > > > > > > > Le Friday 25 November 2022 =C3=A0 04:33:05PM, user account a = =C3=A9crit : > > > > > Using pandoc with weasyprint pdf engine to turn the markdown = files > > from > > > a > > > > blog > > > > > (static site generator does the html conversion) into a pdf f= or > > print. > > > > > > > > > > Would it be possible, perhaps with a custom lua filter or som= e > other > > > > mechanism, > > > > > to add the page number of the linked-to page? The page number= s > won't > > be > > > > known > > > > > until pandoc has already created the document, and I don't kn= ow > where > > > in > > > > 'the > > > > > pipeline' the lua filter intervenes compared to when the page= s > > > exist...? > > > > And > > > > > If the pages exist with their numbers earlier enough, is ther= e an > > > object > > > > or > > > > > something from which lua can get the page number? > > > > > > > > > > I haven't found anything about page numbers in [1][1][1]https= :// > > [2]pandoc.org > > > / > > > > > lua-filters.html#module-pandoc.utils ...am I looking in the w= rong > > > place? > > > > Can > > > > > anyone tell me anything about this? > > > > > > > > > > It's an intimidating rabbit hole for me, particularly because= I see > > no > > > > mention > > > > > of "page number" there in the docs, which makes it seem kinda > > hopeless > > > > > actually. But maybe one of you know the way and could point m= e in > > that > > > > > direction? > > > > > > > > > > -- > > > > > You received this message because you are subscribed to the G= oogle > > > Groups > > > > > "pandoc-discuss" group. > > > > > To unsubscribe from this group and stop receiving emails from= it, > > send > > > an > > > > email > > > > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > > To view this discussion on the web visit [2][2][2]https:// > > > [2][3]groups.google.com/ > > > > d/msgid/ > > > > > pandoc-discuss/a93afb43-c939-40c1-868f-1db8eded17d8n%[3] > > > > [3][3][4]40googlegroups.com. > > > > > > > > > > References: > > > > > > > > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > > > [2] [4][4][4][5]https://groups.google.com/d/msgid/pandoc-disc= uss/ > > > > a93afb43-c939-40c1-868f-1db8eded17d8n%[5][5][6]40googlegroups.c= om? > > utm_medium=3D > > > email& > > > > utm_source=3Dfooter > > > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Goo= gle > > Groups > > > > "pandoc-discuss" group. > > > > To unsubscribe from this group and stop receiving emails from i= t, > send > > an > > > email > > > > to [5]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To view this discussion on the web visit [6][6][6]https:// > > [7]groups.google.com/ > > > d/msgid/ > > > > pandoc-discuss/2aec84ad-a750-48f2-a0c2-ad7572dcca11n%[7] > > > [7][8]40googlegroups.com. > > > > > > > > References: > > > > > > > > [1] [8][8][9]https://pandoc.org/ > > > > [2] [9][9][10]https://groups.google.com/d/msgid/ > > > > [3] [10][10][11]http://40googlegroups.com/ > > > > [4] [11][11][12]https://groups.google.com/d/msgid/pandoc-discus= s/ > > > a93afb43-c939-40c1-868f-1db8eded17d8n%[12][13]40googlegroups.com? > utm_medium=3D > > email& > > > utm_source=3Dfooter > > > > [5] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > > [6] [12][13][14]https://groups.google.com/d/msgid/pandoc-discus= s/ > > > 2aec84ad-a750-48f2-a0c2-ad7572dcca11n%[14][15]40googlegroups.com? > utm_medium=3D > > email& > > > utm_source=3Dfooter > > > > > > > > > -- > > > You received this message because you are subscribed to the Googl= e > Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it,= send > an > > email > > > to [13]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [14][15]https:// > > [16]groups.google.com/d/msgid/ > > > pandoc-discuss/480d0274-2324-43d7-9f74-1bbfc08fcbd0n%[16] > > [17]40googlegroups.com. > > > > > > References: > > > > > > [1] [17][18]https://pandoc.org/ > > > [2] [18][19]https://groups.google.com/ > > > [3] [19][20]http://40googlegroups.com/ > > > [4] [20][21]https://groups.google.com/d/msgid/pandoc-discuss/ > > > [5] [21][22]http://40googlegroups.com/?utm_medium=3Demail& > > > [6] [22][23]https://groups.google.com/d/msgid/ > > > [7] [23][24]http://40googlegroups.com/ > > > [8] [24][25]https://pandoc.org/ > > > [9] [25][26]https://groups.google.com/d/msgid/ > > > [10] [26][27]http://40googlegroups.com/ > > > [11] [27][28]https://groups.google.com/d/msgid/pandoc-discuss/ > > a93afb43-c939-40c1-868f-1db8eded17d8n%[29]40googlegroups.com?utm_me= dium=3D > email& > > utm_source=3Dfooter > > > [12] [28][30]https://groups.google.com/d/msgid/pandoc-discuss/ > > 2aec84ad-a750-48f2-a0c2-ad7572dcca11n%[31]40googlegroups.com?utm_me= dium=3D > email& > > utm_source=3Dfooter > > > [13] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [14] [29][32]https://groups.google.com/d/msgid/pandoc-discuss/ > > 480d0274-2324-43d7-9f74-1bbfc08fcbd0n%[33]40googlegroups.com?utm_me= dium=3D > email& > > utm_source=3Dfooter > > > > > > -- > > 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, s= end an > email > > to [30]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [31][34]https:// > groups.google.com/d/msgid/ > > pandoc-discuss/e969f1ca-c6bf-4a5e-b53f-86aa0a444db2n%[35] > 40googlegroups.com. > > > > References: > > > > [1] [36]https://pandoc.org/ > > [2] [37]http://groups.google.com/ > > [3] [38]http://40googlegroups.com/ > > [4] [39]https://groups.google.com/d/msgid/pandoc-discuss/ > > [5] [40]http://40googlegroups.com/?utm_medium=3D > > [6] [41]https://groups.google.com/ > > [7] [42]http://40googlegroups.com/ > > [8] [43]https://pandoc.org/ > > [9] [44]https://groups.google.com/d/msgid/ > > [10] [45]http://40googlegroups.com/ > > [11] [46]https://groups.google.com/d/msgid/pandoc-discuss/ > > [12] [47]http://40googlegroups.com/?utm_medium=3Demail& > > [13] [48]https://groups.google.com/d/msgid/pandoc-discuss/ > > [14] [49]http://40googlegroups.com/?utm_medium=3Demail& > > [15] [50]https://groups.google.com/d/msgid/ > > [16] [51]http://40googlegroups.com/ > > [17] [52]https://pandoc.org/ > > [18] [53]https://groups.google.com/ > > [19] [54]http://40googlegroups.com/ > > [20] [55]https://groups.google.com/d/msgid/pandoc-discuss/ > > [21] [56]http://40googlegroups.com/?utm_medium=3Demail& > > [22] [57]https://groups.google.com/d/msgid/ > > [23] [58]http://40googlegroups.com/ > > [24] [59]https://pandoc.org/ > > [25] [60]https://groups.google.com/d/msgid/ > > [26] [61]http://40googlegroups.com/ > > [27] [62]https://groups.google.com/d/msgid/pandoc-discuss/ > a93afb43-c939-40c1-868f-1db8eded17d8n%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter > > [28] [63]https://groups.google.com/d/msgid/pandoc-discuss/ > 2aec84ad-a750-48f2-a0c2-ad7572dcca11n%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter > > [29] [64]https://groups.google.com/d/msgid/pandoc-discuss/ > 480d0274-2324-43d7-9f74-1bbfc08fcbd0n%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter > > [30] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [31] [65]https://groups.google.com/d/msgid/pandoc-discuss/ > e969f1ca-c6bf-4a5e-b53f-86aa0a444db2n%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter >=20 >=20 > -- > 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 [66]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [67]https://groups.google.com/d/= msgid/ > pandoc-discuss/858c5a07-89a0-4daa-803f-e0d9d50ca9c6n%40googlegroups.com. >=20 > References: >=20 > [1] https://pandoc.org/lua-filters.html#type-link > [2] http://pandoc.org/ > [3] http://groups.google.com/ > [4] http://40googlegroups.com/ > [5] https://groups.google.com/d/msgid/pandoc-discuss/ > [6] http://40googlegroups.com/ > [7] http://groups.google.com/ > [8] http://40googlegroups.com/ > [9] https://pandoc.org/ > [10] https://groups.google.com/d/msgid/ > [11] http://40googlegroups.com/ > [12] https://groups.google.com/d/msgid/pandoc-discuss/ > [13] http://40googlegroups.com/?utm_medium=3D > [14] https://groups.google.com/d/msgid/pandoc-discuss/ > [15] http://40googlegroups.com/?utm_medium=3D > [16] http://groups.google.com/d/msgid/ > [17] http://40googlegroups.com/ > [18] https://pandoc.org/ > [19] https://groups.google.com/ > [20] http://40googlegroups.com/ > [21] https://groups.google.com/d/msgid/pandoc-discuss/ > [22] http://40googlegroups.com/?utm_medium=3Demail& > [23] https://groups.google.com/d/msgid/ > [24] http://40googlegroups.com/ > [25] https://pandoc.org/ > [26] https://groups.google.com/d/msgid/ > [27] http://40googlegroups.com/ > [28] https://groups.google.com/d/msgid/pandoc-discuss/ > [29] http://40googlegroups.com/?utm_medium=3Demail& > [30] https://groups.google.com/d/msgid/pandoc-discuss/ > [31] http://40googlegroups.com/?utm_medium=3Demail& > [32] https://groups.google.com/d/msgid/pandoc-discuss/ > [33] http://40googlegroups.com/?utm_medium=3Demail& > [34] https://groups.google.com/d/msgid/ > [35] http://40googlegroups.com/ > [36] https://pandoc.org/ > [37] http://groups.google.com/ > [38] http://40googlegroups.com/ > [39] https://groups.google.com/d/msgid/pandoc-discuss/ > [40] http://40googlegroups.com/?utm_medium=3D > [41] https://groups.google.com/ > [42] http://40googlegroups.com/ > [43] https://pandoc.org/ > [44] https://groups.google.com/d/msgid/ > [45] http://40googlegroups.com/ > [46] https://groups.google.com/d/msgid/pandoc-discuss/ > [47] http://40googlegroups.com/?utm_medium=3Demail& > [48] https://groups.google.com/d/msgid/pandoc-discuss/ > [49] http://40googlegroups.com/?utm_medium=3Demail& > [50] https://groups.google.com/d/msgid/ > [51] http://40googlegroups.com/ > [52] https://pandoc.org/ > [53] https://groups.google.com/ > [54] http://40googlegroups.com/ > [55] https://groups.google.com/d/msgid/pandoc-discuss/ > [56] http://40googlegroups.com/?utm_medium=3Demail& > [57] https://groups.google.com/d/msgid/ > [58] http://40googlegroups.com/ > [59] https://pandoc.org/ > [60] https://groups.google.com/d/msgid/ > [61] http://40googlegroups.com/ > [62] https://groups.google.com/d/msgid/pandoc-discuss/a93afb43-c939-40c1-= 868f-1db8eded17d8n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [63] https://groups.google.com/d/msgid/pandoc-discuss/2aec84ad-a750-48f2-= a0c2-ad7572dcca11n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [64] https://groups.google.com/d/msgid/pandoc-discuss/480d0274-2324-43d7-= 9f74-1bbfc08fcbd0n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [65] https://groups.google.com/d/msgid/pandoc-discuss/e969f1ca-c6bf-4a5e-= b53f-86aa0a444db2n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [66] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [67] https://groups.google.com/d/msgid/pandoc-discuss/858c5a07-89a0-4daa-= 803f-e0d9d50ca9c6n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r --=20 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 e= mail 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/Y4OX64EZ264ZQOhq%40localhost. --H5YcjdeQUJz8Rm9f Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="links-with-page-number.lua" function Link(link) local target = link.target if string.sub(target, 1, 1) == '#' then local label = string.sub(target, 2) local ref_by_page = pandoc.RawInline('latex', 'page \\#\\pageref{' .. label .. '}') local note_content = pandoc.Para({pandoc.Str('See on '), ref_by_page, pandoc.Str('.')}) local footnote = pandoc.Note(note_content) link.content:insert(footnote) return link.content end end function Span(span) local id = span.identifier if span.identifier then return { pandoc.RawInline('latex', '\\label{' .. id .. '}'), span } end end --H5YcjdeQUJz8Rm9f--