Typesetting Markdown – Part 5: Interpolation
![](https://secure.gravatar.com/avatar/7300d3eb9b50cf7e8728cb7991d01275.jpg?s=120&d=mm&r=g)
Hello again! This part of the series describes how to reference *interpolated* strings inside Markdown documents. https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/ There's a section at the end about eliminating the table of contents from a reusable document template. I would have preferred using setups, rather than redefining the \completecontent macro, but didn't see an obvious way to do so. Thoughts?
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sat, 6 Jul 2019, Thangalin wrote:
Hello again!
This part of the series describes how to reference *interpolated* strings inside Markdown documents. https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
There's a section at the end about eliminating the table of contents from a reusable document template. I would have preferred using setups, rather than redefining the \completecontent macro, but didn't see an obvious way to do so.
Why not simply omit \compltecontent from the pandoc template? Aditya
![](https://secure.gravatar.com/avatar/7300d3eb9b50cf7e8728cb7991d01275.jpg?s=120&d=mm&r=g)
Thank you Aditya.
The main.tex file is meant to be reusable for different document styles. By
removing \completecontent altogether from the main template, it would
preclude a different document from reusing the main.tex template with a
table of contents. I'd like the template to be "reusable"; making
modifications to "main.tex" --- or creating a copy --- would subvert that
goal.
On Sun, Jul 7, 2019 at 7:17 AM Aditya Mahajan
On Sat, 6 Jul 2019, Thangalin wrote:
Hello again!
This part of the series describes how to reference *interpolated* strings inside Markdown documents. https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
There's a section at the end about eliminating the table of contents from a reusable document template. I would have preferred using setups, rather than redefining the \completecontent macro, but didn't see an obvious way to do so.
Why not simply omit \compltecontent from the pandoc template?
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sun, 7 Jul 2019, Thangalin wrote:
Thank you Aditya.
The main.tex file is meant to be reusable for different document styles. By removing \completecontent altogether from the main template, it would preclude a different document from reusing the main.tex template with a table of contents. I'd like the template to be "reusable"; making modifications to "main.tex" --- or creating a copy --- would subvert that goal.
Pandoc allows that. For example, see line 140 of the default context template: https://github.com/jgm/pandoc-templates/blob/master/default.context I don't remember the exact command line parameters for pandoc that set the toc flag to true. An equivalent method will be to control this using a ConTeXt mode. Redefining \completecontent to \empty seems too drastic. Aditya
![](https://secure.gravatar.com/avatar/7300d3eb9b50cf7e8728cb7991d01275.jpg?s=120&d=mm&r=g)
Thanks again for the great ideas. The downside is that it comes with a lot
of extra ConTeXt setup code. My understanding is that the toc parameter to
pandoc only works when creating a standalone document. I think
\def\completecontent\empty is a bit more expressive of intent than
\def\completecontent{}. Modes are probably the way to go, though.
Thank you.
On Sun, Jul 7, 2019 at 12:18 PM Aditya Mahajan
On Sun, 7 Jul 2019, Thangalin wrote:
Thank you Aditya.
The main.tex file is meant to be reusable for different document styles. By removing \completecontent altogether from the main template, it would preclude a different document from reusing the main.tex template with a table of contents. I'd like the template to be "reusable"; making modifications to "main.tex" --- or creating a copy --- would subvert that goal.
Pandoc allows that. For example, see line 140 of the default context template:
https://github.com/jgm/pandoc-templates/blob/master/default.context
I don't remember the exact command line parameters for pandoc that set the toc flag to true.
An equivalent method will be to control this using a ConTeXt mode. Redefining \completecontent to \empty seems too drastic.
Aditya
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net
___________________________________________________________________________________
participants (2)
-
Aditya Mahajan
-
Thangalin