public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Table of contents in PDF via Prince?
@ 2021-04-07 10:17 Martin Post
       [not found] ` <50edfbfe-3421-49f7-bad2-293c4af7c9e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Post @ 2021-04-07 10:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 781 bytes --]

I’m using Prince (Desktop) as the PDF Engine to convert Markdown to PDF:

pandoc -f markdown -t html --pdf-engine=prince -s in.md -o out.pdf

Is it possible to add a table of contents here directly, or would I have to 
do two passes (md > HTML > PDF)?

“--toc” has no effect, even when using an (HTML) template with a ToC 
placeholder.

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/50edfbfe-3421-49f7-bad2-293c4af7c9e6n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1176 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table of contents in PDF via Prince?
       [not found] ` <50edfbfe-3421-49f7-bad2-293c4af7c9e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-04-07 10:54   ` Håkon Wium Lie
       [not found]     ` <24685.36726.789668.244621-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Håkon Wium Lie @ 2021-04-07 10:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hello Martin,

 > I’m using Prince (Desktop) as the PDF Engine to convert Markdown to PDF:
 > 
 > pandoc -f markdown -t html --pdf-engine=prince -s in.md -o out.pdf
 > 
 > Is it possible to add a table of contents here directly, or would I have to 
 > do two passes (md > HTML > PDF)?
 > 
 > “--toc” has no effect, even when using an (HTML) template with a ToC 
 > 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åkon Wium Lie     haakon-EO96REbE7qRuMpJDpNschA@public.gmane.org    www.wiumlie.no     +47 90192217

-- 
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/24685.36726.789668.244621%40gargle.gargle.HOWL.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Table of contents in PDF via Prince?
       [not found]     ` <24685.36726.789668.244621-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
@ 2021-04-07 14:26       ` Martin Post
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Post @ 2021-04-07 14:26 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1570 bytes --]

Oh, the man himself! I’m star-struck. :D

Thank you, Håkon. I have to admit I didn’t think of a JavaScript-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 software, and 
using it with Pandoc allowed me to solve many problems where clunky 
desktop software wouldn’t do.

On Wednesday, April 7, 2021 at 12:55:01 PM UTC+2 Håkon Wium Lie wrote:

> Hello Martin,
>
> > I’m using Prince (Desktop) as the PDF Engine to convert Markdown to PDF:
> > 
> > pandoc -f markdown -t html --pdf-engine=prince -s in.md -o out.pdf
> > 
> > Is it possible to add a table of contents here directly, or would I have 
> to 
> > do two passes (md > HTML > PDF)?
> > 
> > “--toc” has no effect, even when using an (HTML) template with a ToC 
> > 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åkon Wium Lie haa...-EO96REbE7qRuMpJDpNschA@public.gmane.org www.wiumlie.no +47 90192217 
> <+47%20901%2092%20217>
>

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

[-- Attachment #1.2: Type: text/html, Size: 2798 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-07 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 10:17 Table of contents in PDF via Prince? Martin Post
     [not found] ` <50edfbfe-3421-49f7-bad2-293c4af7c9e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-07 10:54   ` Håkon Wium Lie
     [not found]     ` <24685.36726.789668.244621-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
2021-04-07 14:26       ` Martin Post

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).