From: Craig Parker <craig.fossfolks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: TOC only
Date: Thu, 17 Nov 2022 11:20:55 -0800 (PST) [thread overview]
Message-ID: <f4eeaee3-78b4-4cae-b77f-5b858a8d9709n@googlegroups.com> (raw)
In-Reply-To: <CADAJKhA2MfhXh+4hiE7H1DtWyupDXVqx5KC-qCLiS2G+UoSx1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2460 bytes --]
Is there a way, during the calling of files (I'm using a catchall --
./md/*.md) to extract the document title? I can snag the TOC with a
template like you said, but it's got links to things in the current
document (<li><a href="#link-to-heading">Actual Heading Name</a></li>.) I'm
trying to pull in separate files, but leave them separate, so if my bash
for loop, I was going to echo $filename and $titlename (if I can get
$titlename somehow form pandoc)
On Thursday, November 17, 2022 at 12:12:04 PM UTC-5 BP wrote:
> 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.f...-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-discus...-/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/f4eeaee3-78b4-4cae-b77f-5b858a8d9709n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4228 bytes --]
prev parent reply other threads:[~2022-11-17 19:20 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
[not found] ` <CADAJKhA2MfhXh+4hiE7H1DtWyupDXVqx5KC-qCLiS2G+UoSx1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-11-17 19:20 ` Craig Parker [this message]
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=f4eeaee3-78b4-4cae-b77f-5b858a8d9709n@googlegroups.com \
--to=craig.fossfolks-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).