From: Ihor Radchenko <yantar92@gmail.com>
To: reza <reza@housseini.me>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Extract toc from org file
Date: Tue, 27 Sep 2022 20:47:03 +0800 [thread overview]
Message-ID: <878rm5nfw8.fsf@localhost> (raw)
In-Reply-To: <010201837e0740fa-da95f799-9196-4463-854b-98be644b9b52-000000@eu-west-1.amazonses.com>
reza <reza@housseini.me> writes:
>> You may create a function similar to `org-publish-sitemap-default' but
>
>> using `org-list-to-subtree' instead of `org-list-to-org'
>
> Thanks for the pointers, but I can't figure out how to get from there to
> a toc? As I understand, `list' is a list of files from my project and
> `org-list-to-subtree' does add stars to this list. But how do I get all
> sections and subsections from my file to appear here?
Hmm. You are right. Currently, only links to files inside published
project are in the sitemap.
Adding TOC cross-links will not be trivial.
One way could be publishing TOC in individual files and later moving
those TOCs into sitemap. But, say, in html the TOC entries are internal
html links... So things are going to be tricky.
Or you may reuse the code for site index (org-publish-collect-index and
org-publish-index-generate-theindex) but to collect your TOC entries.
If you manage to get something useful about this problem, please let us
know. This kind of feature sounds like something we could add to
ox-publish.
--
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
prev parent reply other threads:[~2022-09-27 14:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <100cb12a-b3f1-739a-84f1-847f5e86a8bc@housseini.me>
2022-09-26 11:53 ` Extract toc from org file reza
2022-09-26 15:21 ` Max Nikulin
2022-09-26 16:02 ` Max Nikulin
[not found] ` <bb5ed7b1-e281-39b1-d7e7-659a5317ad98@housseini.me>
2022-09-27 6:57 ` reza
2022-09-26 15:39 ` Juan Manuel Macías
[not found] ` <a5365480-d7b7-5015-7eb1-34e9bc215abf@housseini.me>
2022-09-27 6:54 ` reza
2022-09-27 1:28 ` Ihor Radchenko
[not found] ` <fa280d29-36db-8f94-c360-92366ebbeb64@housseini.me>
2022-09-27 6:51 ` reza
2022-09-27 7:08 ` Ihor Radchenko
[not found] ` <0ce13d8e-aea6-64af-86e5-da4f88be5d9c@housseini.me>
2022-09-27 8:19 ` reza
2022-09-27 12:47 ` Ihor Radchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rm5nfw8.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=reza@housseini.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).