public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How can I create a TOC based on input files?
@ 2019-07-14 11:17 Rudi C
       [not found] ` <9509e078-b391-49c6-8a60-8066e49f95dc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Rudi C @ 2019-07-14 11:17 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

I use mercury-parser to save web pages as clean HTML. I like to merge some of these pages into a single epub. I currently use this command:
pandoc --toc -s *.html -o fruit2.epub
But this creates an empty toc, as the files themselves don’t have whatever formatting hints pandoc uses to detect sections; I’d like to have a toc based on the input file themselves (each input file = a section). How do I go about achieving that?

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9509e078-b391-49c6-8a60-8066e49f95dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* Re: How can I create a TOC based on input files?
       [not found] ` <9509e078-b391-49c6-8a60-8066e49f95dc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-07-14 15:55   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2019-07-14 15:55 UTC (permalink / raw)
  To: Rudi C, pandoc-discuss


Sections are constructed based on heading elements. (h1, h2, etc.
in HTML.)

So, assuming your documents have h2s and not h1s, you'd need to
insert an h1 with the title of the chapter in front of each html
file.


Rudi C <rudiwillalwaysloveyou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I use mercury-parser to save web pages as clean HTML. I like to merge some of these pages into a single epub. I currently use this command:
> pandoc --toc -s *.html -o fruit2.epub
> But this creates an empty toc, as the files themselves don’t have whatever formatting hints pandoc uses to detect sections; I’d like to have a toc based on the input file themselves (each input file = a section). How do I go about achieving that?
>
> -- 
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9509e078-b391-49c6-8a60-8066e49f95dc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2y310a9wl.fsf%40johnmacfarlane.net.
For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2019-07-14 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-14 11:17 How can I create a TOC based on input files? Rudi C
     [not found] ` <9509e078-b391-49c6-8a60-8066e49f95dc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-14 15:55   ` John MacFarlane

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