From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31771 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Craig Parker Newsgroups: gmane.text.pandoc Subject: Re: TOC only Date: Thu, 17 Nov 2022 11:20:55 -0800 (PST) Message-ID: References: <14f84699-724f-4483-8fe6-1845d1fe81b5n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2334_1234299082.1668712855732" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26921"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDPL77HMC4IJRE62TMDBUBG7WZL24-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 17 20:21:01 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f57.google.com ([209.85.161.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ovkRY-0006n3-3S for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 17 Nov 2022 20:21:00 +0100 Original-Received: by mail-oo1-f57.google.com with SMTP id v15-20020a4a244f000000b0049f177710absf1327250oov.16 for ; Thu, 17 Nov 2022 11:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=ep4aBvmH0E8oij8M25eVa3N7NHFEoiDCxWjuqRNcfmY=; b=oNN7XI5gGB9AxDsAnyHkzlm3K0iGbjv/5oz7deLjlQtCGq4Rv5H7hdJZSXp7jY4UUw 2LSMxun1uKSZd+53ifSZFjPVy1Ap5HTQRSzWUUKW+d6kWPoHwb7MdRG03KfsdFftbZTy TpCSJcc9x29MBpaP2QkxOvLqpuihiLIbh1Tr1XMNLqee3tr9OmdJ+pDuGavedd3jNNiW 6kKDA8xEREpS6dqbZ7GVbfl5rJ3LmHAB+uyX3dEAFnmhROtnrKux+ym/9/fqLJQO5udc 6X73e7BrrIiNn8HMLRppzPsy58ihPKGj4f+dHXqHGOP/orU6qYzCOsLI4GSr/z+uHiq2 ba8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ep4aBvmH0E8oij8M25eVa3N7NHFEoiDCxWjuqRNcfmY=; b=LJsD2vLUtdZkDpk/3iNqjml67OkHMU+z6RaN9x3/ONB758yvThNNgm9a1LZa64LgwQ cxMAt6m4G1NKZdyzXdY39XhjpYOIYsmVeJPT3ZnVUg7oE+pRIgMGKWPQs8ZvbVmEE1NH VeeM26kjK3EfJ/F29BnIBaXUR1vSFbpRJWYLGM44ACrXGf1RVu6uByvnF+V/6YpBtlag asY2G01mYlQCRX+L2VIe1rllgdzrTO6QzhZQyuHP11RJwJOTD62mS6ERDIEgCzx/ZM/8 0eOwWORjFs0q7Uo0db8m3QuNtcieRPL58hPghfOFeqKZ26hqUccKqzFfMheXB9KUPLhC K10Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=ep4aBvmH0E8oij8M25eVa3N7NHFEoiDCxWjuqRNcfmY=; b=voGS0Mdo08fCph6r5gXSMpYm+vA+FdxUH4+PG7ALHihipJZRd36UNtDTE3Zdn3JE70 eGAQ21ZPgnUrfFDvF27izMr64NLxrYYfG4+iEFsT+CWkVeNdt4HgBhEnEvBNzu1bSxKv 6UTXb3hawiUUS/0/PRGL9LPnSA/jjdKN+l03g2CZ5azcIPMN9KmAVN1qCqTB0FB8bZ3s 8cu6OhhJF9V0X8zyCyMQ+fKkaBwdSYEgQ7ea5AKEtdf1VQu5k5Cpklqc+3Hu2r0bmjUk gBwkV85DtkA9uzaclKgO/nskzDPZrlGwyKcRSVQAhg1ugm20YoWBs6w4txDSUeSQ4lXY qO5A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkQ+xWk4IAjvhYxHk9bMIHpnfRApZAJoJt8RJB5hfE17w7mb5pC BHbqdefoiRPDnUZCfAHqiIs= X-Google-Smtp-Source: AA0mqf60wA4s4AnLgloQYGWrXExVV+tjnA0PWeB9+y2cGMWYaV65t0bU/Kd1qpHsUy7QCYeansMEBw== X-Received: by 2002:a05:6830:6112:b0:661:b9c5:b4ae with SMTP id ca18-20020a056830611200b00661b9c5b4aemr2227389otb.171.1668712858876; Thu, 17 Nov 2022 11:20:58 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:b786:b0:132:8229:a3d7 with SMTP id ed6-20020a056870b78600b001328229a3d7ls996795oab.6.-pod-prod-gmail; Thu, 17 Nov 2022 11:20:56 -0800 (PST) X-Received: by 2002:a05:6871:458c:b0:13b:a02f:659e with SMTP id nl12-20020a056871458c00b0013ba02f659emr5107679oab.43.1668712856384; Thu, 17 Nov 2022 11:20:56 -0800 (PST) In-Reply-To: X-Original-Sender: craig.fossfolks-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:31771 Archived-At: ------=_Part_2334_1234299082.1668712855732 Content-Type: multipart/alternative; boundary="----=_Part_2335_1596201369.1668712855732" ------=_Part_2335_1596201369.1668712855732 Content-Type: text/plain; charset="UTF-8" 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 (
  • Actual Heading Name
  • .) 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 > > `````` > > 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 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 >> >> . >> > -- 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. ------=_Part_2335_1596201369.1668712855732 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D"#link-to-heading"&= gt;Actual Heading Name</a></li>.) I'm trying to pull in separat= e files, but leave them separate, so if my bash for loop, I was going to ec= ho $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:
    <= /div>
    = Create a template with only the ToC generating stuff:

    =
    ``````html
    <nav id=3D"$idprefix$TOC" role=3D"doc-toc">
    $if(toc-title)$
    <h2 id=3D"= ;$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 invok= e pandoc with `--template=3Dgen-toc.html` added. You might want to place th= e template in the templates subdirectory of your pandoc user directory (bot= h of which you may have to create; see `pandoc --help` for where) so that y= ou 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 gene= rate JUST a table of contents? I can probably hack up a file with bash afte= r 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 &= quot;pandoc-discuss" group.
    To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus= ...@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1= 4f84699-724f-4483-8fe6-1845d1fe81b5n%40googlegroups.com.

    --
    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/f4eeaee3-78b4-4cae-b77f-5b858a8d9709n%40googlegroups.= com.
    ------=_Part_2335_1596201369.1668712855732-- ------=_Part_2334_1234299082.1668712855732--