From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31988 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Javier Pastor Newsgroups: gmane.text.pandoc Subject: Re: Duplicate - non working footnotes after converting MD to PDF Date: Fri, 13 Jan 2023 02:27:03 -0800 (PST) Message-ID: <0fae6c3a-cadf-4308-898e-adb84f3fc4f7n@googlegroups.com> References: <1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8522_1416283425.1673605623865" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37266"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCL4PUHI5ICBB6PDQSPAMGQEHO3M5JI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 13 11:27:08 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pGHHA-0009ZE-BF for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 13 Jan 2023 11:27:08 +0100 Original-Received: by mail-ot1-f61.google.com with SMTP id e20-20020a9d5614000000b0068401872536sf10318135oti.3 for ; Fri, 13 Jan 2023 02:27:08 -0800 (PST) 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-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=6H8oiwkmPtCt5vPP0yGc7YLNc0Qkl0bqDY9m4FNq17k=; b=NF3i5II2QISrxtWOOQBs8szGvfubyovFHMy7UmZ92lUz0JPibchq8ZP7wJMn+HJJKq ebwAasyAIwXvp0VqeXjR8QKk/ndORvPv9VmcaVc3BSC4gRj4I8sWQRH0bcRUpYDoJH+A HeCsEU1TOiEhBQUH/q/AL9xaqGeL2MtI2zuQ92lmmPGxyn0wgf68TQDYYQgZ+Q9PDFMs UHvOLLW/iBAxl1xzy9DVmeGG52pRLHS5lRtC0ZvhPJKYbFyz63eHab6qHerFVNFyvIyM lyq26tRn1cFJcFS0wxdyfKAu8D0axt+EcRVId/L6JGj9tt3ZGq7ZJKCwXHcgATIWNfRB Lqww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=6H8oiwkmPtCt5vPP0yGc7YLNc0Qkl0bqDY9m4FNq17k=; b=ZUqNdasYYMduYzlZEgwRdlor0Rr/fRcCIfQn7NTVw1BTjVovSgDcFlg1AbltUnB7VB IpKWi5ewBs2vOHLKgTSrpcp6jXdMlQ5HHdhlfCOv7casrJjt8Dpl0TLe32vx0Juirxqk yZSVMQuCq2Ll+ATQrf/MWZI+xylj0D9YIMYAnSHN66l6zz/t3LyiJTEcCjKKqtZmjxyQ 6wJw9JFfHMS98gREKia+GZXJi8I13Zxg7tr2tXDf2ARn1wLZX88U87lASY8PEgTbuVOd mgo6ebCA/ZRByR0NV5bygyRr0IUL2GJzQ48xECk6n/m5aVwXjcyhdDyb+lo1cV92p1vU 7LUQ== 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=6H8oiwkmPtCt5vPP0yGc7YLNc0Qkl0bqDY9m4FNq17k=; b=p+GBh/3W9IcawBJ5W2vIFj4pC9QODh4jeUJjm4QvQdCQajq9ajljWeM3o2HEMce3FE QFkFzqpA7eKmz7JwRS8Ksht6TfZp333DaySZjkrESKGN+Gm5MdMI+rawJ2XCsZWSGv9m JTuu0w5pAFOlo+ZoxFW87qzbv86tL0tGNXZlWODqrvtdaRkdkp+mw2mTLOig2Gt/ML/b CKNDkFebcTruFQFfqfvKu3f9e1SxeNejK2fPPN+r0TBt4guUt0WetsTTdx7OjUjsv2eJ pH47ZL4rbjmAtzoYuyc/1jDNPUhxL0Ws5Ew0rezzPmKGErx73WRI4WfRV3eHb6ELV5n6 jBzw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqrtymc4Bl4xGKkyhQi//ux0PJc7OboO7i3CMZHQznldc5oIl6v brfFHeq9s/gnICqwHzoMf3o= X-Google-Smtp-Source: AMrXdXuGJb2767vu3P75gJpWmD2oYB3OXGWpkaQvzci1GezveoIDH5/dh03izmjQ3cPtMovXMCmScQ== X-Received: by 2002:a9d:450a:0:b0:66c:2ffc:392c with SMTP id w10-20020a9d450a000000b0066c2ffc392cmr5480759ote.326.1673605627185; Fri, 13 Jan 2023 02:27:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:717:b0:150:4546:6415 with SMTP id ea23-20020a056870071700b0015045466415ls2103251oab.11.-pod-prod-gmail; Fri, 13 Jan 2023 02:27:04 -0800 (PST) X-Received: by 2002:a05:6870:f610:b0:15b:8862:3208 with SMTP id ek16-20020a056870f61000b0015b88623208mr1362540oab.28.1673605624615; Fri, 13 Jan 2023 02:27:04 -0800 (PST) In-Reply-To: X-Original-Sender: javipas-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:31988 Archived-At: ------=_Part_8522_1416283425.1673605623865 Content-Type: multipart/alternative; boundary="----=_Part_8523_1551663264.1673605623865" ------=_Part_8523_1551663264.1673605623865 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Solved thanks to=20 https://tex.stackexchange.com/questions/671439/pandoc-from-markdown-to-pdf-= how-to-restart-footnote-numbering-on-each-chapter?noredirect=3D1#comment166= 8842_671439 On Tuesday, January 10, 2023 at 10:52:54 PM UTC+1 Bastien Dumont wrote: > Pandoc, by itself, does not set the footnote numbers: in only puts=20 > \footnote{} markup in the TeX file from which the PDF is generated. So yo= u=20 > have to search for how to do what you want in LaTeX (e.g. here:=20 > https://tex.stackexchange.com/questions/32401/footnote-backreference-with= -hyperref)=20 > and to include the required commands in a custom LaTeX template or via th= e=20 > header-includes metadata variable. > > Le Tuesday 10 January 2023 =C3=A0 11:53:29AM, Javier Pastor a =C3=A9crit = : > > I'm trying to create several chapters for an esay I'm writing, but i'd= =20 > like to > > restart footnotes numbering for each chapter and I don't know how to do= =20 > it. > > After searching for information, [1]I saw this on SuperUser=20 > (StackExchange) and > > I tried to replicate the solution. > >=20 > > In that example, the user tried to convert several .md files into an=20 > html5 one, > > but I'm trying to get a single PDF file. I generate the file, but it=20 > doesn't > > work as I wanted. > >=20 > > The file structure is like this: > >=20 > > chapters/ > > 01-chapter.md > > 02-chapter.md > > 03-chapter.md > > format.sh > > parse.sh > >=20 > > [2]=20 > > parse.sh > >=20 > > pandoc -t pdf -o ~/Documents/test.pdf --file-scope chapters/*.md > >=20 > >=20 > > format.sh > >=20 > > for f in chapters/*.md; > > do > > pandoc "$f" -o "$f" -t \ > > markdown+smart+footnotes-escaped_line_breaks+example_lists \ > > --columns=3D80; > > done > >=20 > > In this example I have the same problem as OP had: > >=20 > > "The problem is 01-chapter.md and 02-chapter.md have both a footnote=20 > [^1]. > > Basically I would like Pandoc to handle the footnotes for each file=20 > separately > > and not allow cross-referencing across my markdown files but I can't se= e=20 > any > > way to do this". > >=20 > > The solution, apparently, is to use the --file-scope flag. I apply it,= =20 > but on > > the resulting PDF there are two problems: > >=20 > > 1. Footnote numbering doesn't restart: I had [1] and [2] in Chapter 1,= =20 > and [1] > > and [2] in Chapter 2, but here I have [1] and [2] in Chapter 1 and [3]= =20 > and > > [4] in Chapter 2. > > 2. No links back from the footnotes to the text where they were used. > >=20 > > I'm just beginning to know pandoc and I don't understand exactly how th= at > > works, but I guess there must be some option in pandoc that can solve= =20 > this. Any > > ideas? Thank you > >=20 > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email > > to [3]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [4] > https://groups.google.com/d/msgid/ > > pandoc-discuss/1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n%40googlegroups.com= . > >=20 > > References: > >=20 > > [1]=20 > https://superuser.com/questions/1454255/pandoc-duplicate-footnotes-multip= le-files-same-name/ > > [2] https://superuser.com/posts/1454255/timeline > > [3] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [4]=20 > https://groups.google.com/d/msgid/pandoc-discuss/1e5c9c3d-21a4-4f5f-a3d7-= 14845a1eb300n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > > --=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/0fae6c3a-cadf-4308-898e-adb84f3fc4f7n%40googlegroups.com. ------=_Part_8523_1551663264.1673605623865 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Solved thanks to

https://tex.stackexchange.com/questions/671439= /pandoc-from-markdown-to-pdf-how-to-restart-footnote-numbering-on-each-chap= ter?noredirect=3D1#comment1668842_671439

On Tuesday, January 10, 2023 at = 10:52:54 PM UTC+1 Bastien Dumont wrote:
Pandoc, by itself, does not set the footnote num= bers: in only puts \footnote{} markup in the TeX file from which the PDF is= generated. So you have to search for how to do what you want in LaTeX (e.g= .=C2=A0here: https://tex.stackexchange.com/questions/32401/footnote-backreference-wi= th-hyperref) and to include the required commands in a custom LaTeX tem= plate or via the header-includes metadata variable.

Le Tuesday 10 January 2023 =C3=A0 11:53:29AM, Javier Pastor a =C3=A9cri= t :
> I'm trying to create several chapters for an esay I'm writ= ing, but i'd like to
> restart footnotes numbering for each chapter and I don't know = how to do it.
> After searching for information, [1]I saw this on SuperUser (Stack= Exchange) and
> I tried to replicate the solution.
>=20
> In that example, the user tried to convert several .md files into = an html5 one,
> but I'm trying to get a single PDF file. I generate the file, = but it doesn't
> work as I wanted.
>=20
> The file structure is like this:
>=20
> chapters/
> 01-chapter.md
> 02-chapter.md
> 03-chapter.md
> format.sh
> parse.sh
>=20
> [2]=20
> parse.sh
>=20
> pandoc -t pdf -o ~/Documents/test.pdf --file-scope chapters/*.md
>=20
>=20
> format.sh
>=20
> for f in chapters/*.md;
> do
> pandoc "$f" -o "$f" -t \
> markdown+smart+footnotes-escaped_line_breaks+example_list= s \
> --columns=3D80;
> done
>=20
> In this example I have the same problem as OP had:
>=20
> "The problem is 01-chapter.md and 02-chapter.md have both a f= ootnote [^1].
> Basically I would like Pandoc to handle the footnotes for each fil= e separately
> and not allow cross-referencing across my markdown files but I can= 't see any
> way to do this".
>=20
> The solution, apparently, is to use the --file-scope flag. I apply= it, but on
> the resulting PDF there are two problems:
>=20
> 1. Footnote numbering doesn't restart: I had [1] and [2] in C= hapter 1, and [1]
> and [2] in Chapter 2, but here I have [1] and [2] in Chapter 1= and [3] and
> [4] in Chapter 2.
> 2. No links back from the footnotes to the text where they were u= sed.
>=20
> I'm just beginning to know pandoc and I don't understand e= xactly how that
> works, but I guess there must be some option in pandoc that can so= lve this. Any
> ideas? Thank you
>=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 [3]pandoc-discus...@= googlegroups.com.
> To view this discussion on the web visit [4]https://groups.google.com/d/msgid/
> pandoc-discuss/1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n%40googlegroups.com.
>=20
> References:
>=20
> [1] https://superuser.com/questions/1454255/pandoc-dupl= icate-footnotes-multiple-files-same-name/
> [2] https://superuser.com/posts/1454255/timeline
> [3] mailto:pandoc-discu= s...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [4] https://groups= .google.com/d/msgid/pandoc-discuss/1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n%40= googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter

--
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/0fae6c3a-cadf-4308-898e-adb84f3fc4f7n%40googlegroups.= com.
------=_Part_8523_1551663264.1673605623865-- ------=_Part_8522_1416283425.1673605623865--