From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28100 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Post Newsgroups: gmane.text.pandoc Subject: Re: Table of contents in PDF via Prince? Date: Wed, 7 Apr 2021 07:26:29 -0700 (PDT) Message-ID: <78a935db-14eb-4ecd-9100-e1771c4c513an@googlegroups.com> References: <50edfbfe-3421-49f7-bad2-293c4af7c9e6n@googlegroups.com> <24685.36726.789668.244621@gargle.gargle.HOWL> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1914_1689609726.1617805589698" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24287"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCHYFZ6CWYNBBFUCW6BQMGQE7NBNVAQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Apr 07 16:26:33 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lU98a-0006C8-T6 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 07 Apr 2021 16:26:32 +0200 Original-Received: by mail-oo1-f59.google.com with SMTP id m21sf11203427ooj.7 for ; Wed, 07 Apr 2021 07:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=6SphY1Iq1EPRhh6dXbFM55a04Vx9AXE5SEuGFT3ydI0=; b=tMuXQ/ABAF/yZjOYWA2RfRdXAvF5G5cRXm47dEbqqGB4+i96RQ1hne0dpwn3nPfyxL Wscr3U6N9NBvDli/hnfNmzAZcQBR3GrsBZgesm2VIXYV7SV9J/T5qdwgWXrzJ+fAKM51 Agg29GXF3LcDRtJBmh8bI6/dlxjVIFM2kiLZ5+PwDSo08EOkHjrr7SZ4k9J/1Iki8XWz BJO1X6S1Aua346dqAJq/T6fSMLNs3FvpINOhuJXV5q3WnWrNR/NIF4E5oFeKNiXnbAQs BXkjSiA76gv3s+XOrcEso6EAZQlRDIeDikdcaepkBcE2hHUCp71iHeTc3ZgAt4irZNrW Xn1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=6SphY1Iq1EPRhh6dXbFM55a04Vx9AXE5SEuGFT3ydI0=; b=BYp3QUay+tdlpSWVmWqF9NCloI+/qWTCBko67cXMrj2MlgqJ6ADBXHC2viG1b1Ui9E N1AQa7YC2XyPhOI3uU4NNAE7orBW5dv2FlP+2DeiQlZgsf+AhYssAXEMc3dRGjww0XpQ olxuhiJ5MT2HH84EqJOSWEQHWXeTPPPvyWTBtH9pTQowvPMA6A0U4rW99cFJaCTg1C0K qxWR+Z58obONT02uifLMFMdGdzttZdlE/PyjoQLNidUxhyFsvoLOgV7bpBJ/5cnmjuyb 3JFj96Uyswa7ocOLXGfyGP/iZH6RlGMh/smSHrVaB32anGjSAVSztgKKTrjwqYzjFUT/ Jwbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=6SphY1Iq1EPRhh6dXbFM55a04Vx9AXE5SEuGFT3ydI0=; b=HcLJYTr7a+sQiFOMO85woANgatweURw+WGjw8oHqW7nR773n6P/fTebaFySBa2CVYw uWBkQ5cDmU4y3Suz6minOCJsySf8+xN9FWPD+W3b8/YIi+edgpDvXz8cT6oHETZWXHMZ EN3mW/iA9EydVKIC9WUe2ewM8cm1+czeLkihW2cxKIO+sdg6XSEoImF93rPrHIC6vyS7 wEhx3n84QXjzoo82M/YXvxpggA8upFplMRE2oXDGMWiw9rpr/+FaN54qGC31ZBLfbTfC uLJkEy/c229lTjFBcWRLSuyloAjE3ZMSQQPeEtie/NNvpmjhrpMyO3wVDG5f6T1827CN OWyg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5321Y32JBxsZoMnC1JCPWaBNs5RkuBcGc7eIsIn/QuhfUKpVHafI H+kJaIJFyEwoJSUxwHKgiMc= X-Google-Smtp-Source: ABdhPJwwKljSGjN2BOLeUFdJ2516muHQ/an5rCzjzcTDwrWWh5EakSsEx+g3xPKC6owMglIowgftzA== X-Received: by 2002:a4a:4bc2:: with SMTP id q185mr3251851ooa.19.1617805591882; Wed, 07 Apr 2021 07:26:31 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:5551:: with SMTP id h17ls621297oti.1.gmail; Wed, 07 Apr 2021 07:26:30 -0700 (PDT) X-Received: by 2002:a9d:20c6:: with SMTP id x64mr3197865ota.262.1617805590355; Wed, 07 Apr 2021 07:26:30 -0700 (PDT) In-Reply-To: <24685.36726.789668.244621-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org> X-Original-Sender: MartinPostBerlin-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:28100 Archived-At: ------=_Part_1914_1689609726.1617805589698 Content-Type: multipart/alternative; boundary="----=_Part_1915_813089383.1617805589698" ------=_Part_1915_813089383.1617805589698 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oh, the man himself! I=E2=80=99m star-struck. :D Thank you, H=C3=A5kon. I have to admit I didn=E2=80=99t think of a JavaScri= pt-based=20 approach, but it makes sense. Will try this ASAP. And this also reminds me= =20 I need to upgrade to version 14. Prince XML is fantastic software, and=20 using it with Pandoc allowed me to solve many problems where clunky=20 desktop software wouldn=E2=80=99t do. On Wednesday, April 7, 2021 at 12:55:01 PM UTC+2 H=C3=A5kon Wium Lie wrote: > Hello Martin, > > > I=E2=80=99m using Prince (Desktop) as the PDF Engine to convert Markdow= n to PDF: > >=20 > > pandoc -f markdown -t html --pdf-engine=3Dprince -s in.md -o out.pdf > >=20 > > Is it possible to add a table of contents here directly, or would I hav= e=20 > to=20 > > do two passes (md > HTML > PDF)? > >=20 > > =E2=80=9C--toc=E2=80=9D has no effect, even when using an (HTML) templa= te with a ToC=20 > > placeholder. > > There are probably more than one way to do this; I've described a few > options in this quick quide: > > https://www.princexml.com/howcome/2021/guides/toc > > H=C3=A5kon Wium Lie haa...-EO96REbE7qRuMpJDpNschA@public.gmane.org www.wiumlie.no +47 90192217=20 > <+47%20901%2092%20217> > --=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/78a935db-14eb-4ecd-9100-e1771c4c513an%40googlegroups.com. ------=_Part_1915_813089383.1617805589698 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oh, the man himself! I=E2=80=99m star-struck. :D

Thank y= ou, H=C3=A5kon. I have to admit I didn=E2=80=99t think of a JavaS= cript-based approach, but it makes sense. Will try this ASAP. And this also= reminds me I need to upgrade to version 14. Prince XML is fantastic s= oftware, and using it with Pandoc allowed me to solve many problems where c= lunky desktop software wouldn=E2=80=99t do.

On Wednesday, April 7,= 2021 at 12:55:01 PM UTC+2 H=C3=A5kon Wium Lie wrote:
Hello Martin,

> I=E2=80=99m using Prince (Desktop) as the PDF Engine to convert M= arkdown to PDF:
>=20
> pandoc -f markdown -t html --pdf-engine=3Dprince -s in.md -o out.= pdf
>=20
> Is it possible to add a table of contents here directly, or would= I have to=20
> do two passes (md > HTML > PDF)?
>=20
> =E2=80=9C--toc=E2=80=9D has no effect, even when using an (HTML) = template with a ToC=20
> placeholder.

There are probably more than one way to do this; I've described a f= ew
options in this quick quide:

https://www.princexml.com/howcome/2021/guides/toc

H=C3=A5kon Wium Lie haa.= ..@wiumlie.no www.wiumlie.no +47 90192217

--
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/78a935db-14eb-4ecd-9100-e1771c4c513an%40googlegroups.= com.
------=_Part_1915_813089383.1617805589698-- ------=_Part_1914_1689609726.1617805589698--