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?

1 Answer 1

1

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.

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.