Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toc: $toc$ not being replaced with Table of Contents #26

Open
robertdodd opened this issue Aug 26, 2014 · 3 comments
Open

toc: $toc$ not being replaced with Table of Contents #26

robertdodd opened this issue Aug 26, 2014 · 3 comments

Comments

@robertdodd
Copy link

I cannot get a Table of Contents to be included when converting from HTML to PDF.

I added the $toc$ variable to my html file and set the template property with curl, but the $toc$ variable doesn't get replaced with anything.

My full code is is a gist here https://gist.github.com/robertdodd/52e1c29a5357f13f6a80 but here's my shell command:

curl --form from=html \
     --form to=pdf \
     --form test_mode=true \
     --form input_files[][email protected] \
     --form template=input.html \
     --form table_of_contents=true \
     $DOCVERTER_API_URL > html_to_pdf.pdf

echo html_to_pdf.pdf
@peterkeen
Copy link
Collaborator

$toc$ is a pandoc directive and HTML -> PDF doesn't go through pandoc.

On Tue, Aug 26, 2014 at 7:59 PM, Robert Dodd [email protected]
wrote:

I cannot get a Table of Contents to be included when converting from HTML
to PDF.

I added the $toc$ variable to my html file and set the template property
with curl, but the $toc$ variable doesn't get replaced with anything.

My full code is is a gist here
https://gist.github.com/robertdodd/52e1c29a5357f13f6a80 but here's my
shell command:

curl --form from=html
--form to=pdf
--form test_mode=true
--form input_files[][email protected]
--form template=input.html
--form table_of_contents=true
$DOCVERTER_API_URL > html_to_pdf.pdf

echo html_to_pdf.pdf


Reply to this email directly or view it on GitHub
#26.

@robertdodd
Copy link
Author

Thanks Peter!

Whats my next best option?

  • Use internal links: <a href="#introduction">Introduction</a>?
  • Could I convert from html -> pandoc-format, then pandoc-format -> PDF/DOCX?

Which conversions go through pandoc?

@peterkeen
Copy link
Collaborator

Everything but html -> pdf and epub -> mobi goes through Docverter. I expect the internal links option is probably the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants