From d6fcc00bd48dee04fb416d9196301f0236dc194f Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 30 Dec 2024 11:38:34 +0530 Subject: [PATCH] Improve the explanation for toc-org-mode --- unravel-emacs.org | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/unravel-emacs.org b/unravel-emacs.org index eee31bc..2b976f4 100644 --- a/unravel-emacs.org +++ b/unravel-emacs.org @@ -6011,8 +6011,21 @@ files. It is my goto tool for reading any academic papers. :END: ~toc-org~ is a simple and nifty package for automatically creating a -table of contents in any org-mode file. It works by creating/updating -a table of contents under the first heading with the tag :TOC:. +table of contents in any ~org-mode~ file. It works by +creating/updating a table of contents under the first heading with the +tag =:TOC:=. + +By default, it creates a version of links which export according to +the format expected by Github (so that the links work correctly for +someone reading on Github). But these links don't work in standard +~org-mode~ (without ~toc-org~ enabled). + +Enabling ~toc-org-mode~ in the org file means that anytime I save the +buffer, the TOC will automatically be updated. Also, the links created +in the TOC will be navigable using standard ~org-mode~ shortcuts. + +To enable ~toc-org~, run =M-x toc-org-mode= in your ~org-mode~ file +and create a heading with the tag =:TOC:= added to it. #+begin_src emacs-lisp :tangle "unravel-modules/unravel-study.el" ;;; toc-org for automatic Table of Contents