From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31973 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Javier Pastor Newsgroups: gmane.text.pandoc Subject: Duplicate - non working footnotes after converting MD to PDF Date: Tue, 10 Jan 2023 11:53:29 -0800 (PST) Message-ID: <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_1714_1939424426.1673380409913" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14749"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCL4PUHI5ICBBO4E66OQMGQE5DJTX7I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jan 10 20:53:35 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f64.google.com ([209.85.161.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFKgg-0003cG-QC for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 10 Jan 2023 20:53:34 +0100 Original-Received: by mail-oo1-f64.google.com with SMTP id y19-20020a4a9c13000000b004e3c9193e5esf4631484ooj.11 for ; Tue, 10 Jan 2023 11:53:34 -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:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=Ci3GmOf1iI4bWDmFHECtuPHYXhVScyaVhjxuO9p2Nao=; b=gc0tbMRqRiZ/K+kyZSTL5T0ZtTV0576mxekGTaUE/RjMTrvgA1BDG/3jDJ6X/yPZsa d+SCv902qP+LkGLsqU3ki4ORTp+m1BB4g321tbch45pyAQbtDV6vHmWX3L6QqHUFE8ZU RikJhoEWzcsAedJW2cQ9vCWMUndkCeaDRiuDWtpLakYkRDHXC3SI12L594/7onn07+H7 VZqZBHi55m0CQsh/2A7NhQ1QqNVZDjnaXi/lejdyBu2xdncnP2JfsMYUCYdBFBhR3jwj FjGFzpjzSlEqOb/IccGk37xW/YIIYzP7dEilmSl6oTC1UeL9NN6ZufwUDUAnTgCd6wkg EdXQ== 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:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=Ci3GmOf1iI4bWDmFHECtuPHYXhVScyaVhjxuO9p2Nao=; b=Sa3bnucQOQ3LXGn6m+4LrFH7NpmAwPDegN2S9TEE/wA5OJ+kaUw/3VrHkR2crWh6F0 Rcf3SblZrtHRBlMR6yfTLUb6Mg7Dql5r7OihzEXDPJQ22NxOiPpc2NjQrtAxL/V+7zGN M4NB7pXhJq7kJmtwarBlMpNNlJfoea/7wpz79Mn9qxAdRxqzwMOA4UXO1//BEpfLgviM GloB/cIAOJMiKEcCQW9lt6kQc9C9/wIvCig2qoGtiMa6s8obiponwAYSEzx/PKgMQGTQ TQgZchM0X+8FcEqG/GocE1G8S8klS6q8OJKhCZMv+wEmHZYh2pziWX6Jh+W8TcQx1ZYQ 4VdA== 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:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=Ci3GmOf1iI4bWDmFHECtuPHYXhVScyaVhjxuO9p2Nao=; b=aVjYDq4sOX7Z7N9wlcVea875v8GT0ikrWJc5OZXic3NjLfqmy3wHjI8Q2Y16htLu3y SCnIUnX4m9/JN+uDIMBm9whdidvCMqVXc2mxpjcVWiyHy/QMx1kCz4rDg5AkEBKXOWp0 tmNttHRJ2M+kEfsbJ8OVwfFnQ6FFXJminig/u9vUau+nIpRw1mjO++65tChmMJOLiFwJ UGjGjspLWC0Xia5LIZobauPSWExrLwdh7QNiDiryI2k/iqZjIqA/IpPlJPy8nswn8Ov3 RqS2bj+2bwfsxYJmeGZEmnU8/TFW3dJwiaCI7AtCEMoSb+NQ2B3/uFtbgsGz62Ru+hb3 2a6w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqPSA2f4bDeQ2NglCMLv9wovlFStZgI5UHXlZ9sbVWfRsayrON0 XIcVkNGD1MFiTcH9lfizBHM= X-Google-Smtp-Source: AMrXdXvYLLw5CzG2vm+P82Aoi8alFmetgAUvyffAZoIKQgU1NcMlcZ8JQynW3FloGASr8iIGUZKF+A== X-Received: by 2002:aca:ba82:0:b0:35a:640c:ceb3 with SMTP id k124-20020acaba82000000b0035a640cceb3mr3837201oif.58.1673380413521; Tue, 10 Jan 2023 11:53:33 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:955c:b0:154:df53:5a8 with SMTP id v28-20020a056870955c00b00154df5305a8ls4319335oal.8.-pod-prod-gmail; Tue, 10 Jan 2023 11:53:31 -0800 (PST) X-Received: by 2002:a05:6870:494a:b0:14b:d65d:dc59 with SMTP id fl10-20020a056870494a00b0014bd65ddc59mr4527666oab.123.1673380410819; Tue, 10 Jan 2023 11:53:30 -0800 (PST) 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:31973 Archived-At: ------=_Part_1714_1939424426.1673380409913 Content-Type: multipart/alternative; boundary="----=_Part_1715_1757601059.1673380409913" ------=_Part_1715_1757601059.1673380409913 Content-Type: text/plain; charset="UTF-8" I'm trying to create several chapters for an esay I'm writing, but i'd like to *restart footnotes numbering for each chapter* and I don't know how to do it. After searching for information, I saw this on SuperUser (StackExchange) and I tried to replicate the solution. 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*. The file structure is like this: *chapters/* * 01-chapter.md* * 02-chapter.md* * 03-chapter.md* *format.sh* *parse.sh* *parse.sh* *pandoc -t pdf -o ~/Documents/test.pdf --file-scope chapters/*.md* *format.sh* *for f in chapters/*.md; * * do * * pandoc "$f" -o "$f" -t \ * * markdown+smart+footnotes-escaped_line_breaks+example_lists \* * --columns=80; * * done* In this example I have the same problem as OP had: "The problem is 01-chapter.md and 02-chapter.md have both a footnote [^1]. Basically I would like Pandoc to handle the footnotes for each file separately and not allow cross-referencing across my markdown files but I can't see any way to do this". The solution, apparently, is to use the *--file-scope* flag. I apply it, but on the resulting PDF there are two problems: 1. Footnote numbering *doesn't restart*: I had [1] and [2] in Chapter 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 used. I'm just beginning to know pandoc and I don't understand exactly how that works, but I guess there must be some option in pandoc that can solve this. Any ideas? Thank you -- 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/1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n%40googlegroups.com. ------=_Part_1715_1757601059.1673380409913 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm trying to create several chapters for an esay I'm writing, but i'd= like to restart footnotes numbering for each chapter and I don't kn= ow how to do it. After searching for information, I saw this on SuperUser (StackExchange) and I tried to replicate&n= bsp; the solution.

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

The file structure is like this:

chapters/=
  01-chapter.md<= /div>
  02-chapter.md
  03-chapter.md
format.sh
parse.sh

=20
<= div>
=20
=20
parse.sh

pandoc -t pdf -o ~/Docum= ents/test.pdf --file-scope chapters/*.md

format.sh

for f in chapters/*.md;
    do
<= /span>
&nb= sp;        pandoc "$f= " -o "$f" -t \
   =       markdown+smart+footnotes-escaped_line_breaks= +example_lists \
         --columns= =3D80;
    done

In this example I have the same problem as OP had:

"The problem is= 01-chapter.md and 02-chapter.md have both a foot= note [^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 see any way to do this".

The solution, apparently, is to use t= he --file-scope flag. I apply it, but on the resulting PDF there are= two problems:

  1. Footnote numbering doesn't restart: I= had [1] and [2] in Chapter 1, and [1] and [2] in Chapter 2, but here I hav= e [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 used.

I'm just beginning to know pandoc and I don't understand exactly = how that works, but I guess there must be some option in pandoc that can so= lve this. Any ideas? Thank you

--
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/1e5c9c3d-21a4-4f5f-a3d7-14845a1eb300n%40googlegroups.= com.
------=_Part_1715_1757601059.1673380409913-- ------=_Part_1714_1939424426.1673380409913--