Jump to content

TOC 1.0: Create, update and remove a markdown TOC (table of contents)


Recommended Posts

Overview

TOC Workflow creates, updates and removes a markdown table of contents that can be useful when writing a more complex document. It should work fine when exported to a html document.

Note that, due a bug/limitation of current OSX PDF print function, TOC will not work in a PDF saved/converted by most of writing applications.

How to Use

Create a TOC

  • open your markdown editor and type your text
  • when you finish it show Alfred and type the keyword toc
  • press Return key
  • the workflow will select the text, copy it, add the TOC and anchor, then paste the text back
You can also set a hotkey to create a TOC.

Update a TOC

If you have edited the text after inserting the TOC then just run the keyword toc again and the workflow will create an updated TOC.

Remove a TOC

The workflow can also remove the TOC and anchors for good. It can be handy if you e.g. want to work with a cleaner text, without TOC and anchors.

To remove show Alfred, type the keyword toc, hold Command key then press Return key.

You can also set a hotkey to remove it.

Screenshots

Type your markdown text as always and don't you worry about TOC:

toc.png

Show Alfred, type the keyword toc then press return key (or use the hotkey) to create a TOC and the anchors:

toc_2.png

Preview the document to see the TOC:

toc_3.png

Download

Before using the workflow for good make some tests and backup your texts first.

Link to comment
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...