question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to generate TOC in generated PDF using markdown-toc?

See original GitHub issue

Hi.

I will be grateful for any hint how to use markdown-toc with markdown-pdf for dynamic table of content insertion using toc.insert() method.

The problem is that as far as I understand the logic, preProcessMd works with streams, but toc.insert needs to process full Markdown file first (to generate TOC and insert it in Markdown file on position defined by <!-- toc --> tag).

After few unsuccessful attempts I have even doubts if this is doable.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

1reaction
ankocommented, Oct 12, 2017
0reactions
PradyumnaRcommented, Oct 12, 2017

@anko thanks for getting back. Can I use markdown-toc for generating toc while my markdown is getting converted to pdf?

markdown({remarkable: {plugins: [require('markdown-toc')]}}).from().to()
Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown TOC exported to PDF? - DEVONthink
MultiMarkdown generates a table of content by {{TOC}} . It's not a separate file and it will only work if you export to...
Read more >
3.3 PDF document | R Markdown: The Definitive Guide
To create a PDF document from R Markdown, you specify the pdf_document output ... You can add a table of contents using the...
Read more >
GitHub Wiki TOC generator
This page uses markdown-toc library to generate your MarkDown TOC online. ... Paste Your Document In Here ## And a table of contents...
Read more >
Custom table of contents in Pandoc-created PDF - Super User
with -V toc-title:"Custom text". Having a look at the template at /usr/share/pandoc/data/templates/default.latex , there's this part:
Read more >
Create and manage a Table of Contents in RoboHelp
Quickly insert a section in the TOC by dragging the folder from the Contents panel and dropping it in the Table of Contents....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found