A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/alphapapa/org-make-toc below:

alphapapa/org-make-toc: Automatic tables of contents for Org-mode files

This package makes it easy to have one or more customizable tables of contents in Org files. They can be updated manually, or automatically when the file is saved. Links to headings are created compatible with GitHub’s Org renderer.

If you installed from MELPA, you’re done.

Install these required packages:

A document may have any number of tables of contents (TOCs), each of which may list entries in a highly configurable way.

To make a basic TOC, follow these steps:

  1. Choose a heading to contain a TOC and move the point to it.
  2. Run command org-make-toc-insert, which inserts a :CONTENTS: drawer and sets TOC properties. Set the include property to all.
  3. Run the command org-make-toc to update all TOCs in the document.

Use command org-make-toc-set to change TOC properties for the entry at point with completion.

Here’s a simple document containing a simple TOC:

* Heading
:PROPERTIES:
:TOC:      :include all
:END:

This text appears before the TOC.

:CONTENTS:
- [[#heading][Heading]]
  - [[#subheading][Subheading]]
:END:

This text appears after it.

** Subheading

The :TOC: property is a property list which may set these keys and values.

These keys accept one setting, like :include all:

These keys accept either one setting or a list of settings, like :force depth or :force (depth ignore):

See example.org for a comprehensive example of the features described above.

Automatically update on save

To automatically update a file’s TOC when the file is saved, use the command add-file-local-variable to add org-make-toc to the Org file’s before-save-hook.

Or, you may activate it in all Org buffers like this:

(add-hook 'org-mode-hook #'org-make-toc-mode)
Making links work in both Emacs/Org and on GitHub

Because of the way GitHub renders Org documents and links, it’s not possible to make links which work in both Org itself and the GitHub-rendered HTML unless headings have CUSTOM_ID properties. If the option org-make-toc-insert-custom-ids is enabled, this package will automatically add them as needed.

Compatibility

Additions

Fixes

This version is a major rewrite that requires reconfiguring existing TOCs. Please see the usage instructions anew. Users who don’t want to convert to 0.5-style TOCs may continue using version 0.4.

Changes

Additions

Changes

Fixes

Fixes

Additions

Changes

Additions

Initial release.

This package was inspired by Sergei Nosov’s toc-org package.

Bug reports, feature requests, suggestions — oh my!

GPLv3


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4