4

Specific Use Case: I have two files, index.org and blog.org. I would like to include the table of contents of blog.org in index.org.

The "obvious solution" to me is to use org-babel to inject html upon export (probably with JQuery+NodeJS). However, this seems kind-of hacky to me. Is there a better, more idiomatic solution?

0

How about using the #+INCLUDE derivative? In index.org add the following line:

#+INCLUDE: blog.org::*TOC

In blog.org put your TOC under a *TOC header.

Feel free to explore the #+INCLUDE documentation for similar approaches.

  • The problem with this solution is that the included table of contents enumerates the headers in index.org, not blog.org. – michaelkovarik Aug 9 '18 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.