From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: TOC only
Date: Thu, 17 Nov 2022 18:11:53 +0100 [thread overview]
Message-ID: <CADAJKhA2MfhXh+4hiE7H1DtWyupDXVqx5KC-qCLiS2G+UoSx1g@mail.gmail.com> (raw)
In-Reply-To: <14f84699-724f-4483-8fe6-1845d1fe81b5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]
Create a template with only the ToC generating stuff:
``````html
<nav id="$idprefix$TOC" role="doc-toc">
$if(toc-title)$
<h2 id="$idprefix$toc-title">$toc-title$</h2>
$endif$
$table-of-contents$
</nav>
``````
or just the last line but one if you don't want the nav element and title.
Save that to something like `gen-toc.html` and invoke pandoc with
`--template=gen-toc.html` added. You might want to place the template in
the templates subdirectory of your pandoc user directory (both of which you
may have to create; see `pandoc --help` for where) so that you can use it
from anywhere.
Den tors 17 nov. 2022 17:49Craig Parker <craig.fossfolks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
> Is there a way to generate JUST a table of contents? I can probably hack
> up a file with bash after the fact, but didn't know if there was a way to
> redirect TOC content to another html file.
>
> --
> 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/14f84699-724f-4483-8fe6-1845d1fe81b5n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/14f84699-724f-4483-8fe6-1845d1fe81b5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CADAJKhA2MfhXh%2B4hiE7H1DtWyupDXVqx5KC-qCLiS2G%2BUoSx1g%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 3045 bytes --]
next prev parent reply other threads:[~2022-11-17 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 16:48 Craig Parker
[not found] ` <14f84699-724f-4483-8fe6-1845d1fe81b5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-17 17:11 ` BPJ [this message]
[not found] ` <CADAJKhA2MfhXh+4hiE7H1DtWyupDXVqx5KC-qCLiS2G+UoSx1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-17 19:20 ` Craig Parker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADAJKhA2MfhXh+4hiE7H1DtWyupDXVqx5KC-qCLiS2G+UoSx1g@mail.gmail.com \
--to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).