reza <r...@housseini.me> writes: > Hi list > > Is there a way to extract a toc from an org file e.g: > > #+INCLUDE: myfile.org :toc only > > I want to assemble the toc's from several files into one file and there > seems to be no easy way to do this.
I presume that you are attempting to export multiple org files at the same time. Such functionality is covered by Org publish. Org publish allows generating a sitemap, which is another word for TOC in a multifile export. See 14.1.7 Generating a sitemap section of Org manual. If you are exporting a single Org file that is using contents of multiple #+include'd files, you can use the normal TOC generation as described in 13.3 Table of Contents section of the Org manual. Hope it helps. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92