Table of content (TOC)

The TOC plugin author has unfortunately deleted his account. So I decided to take it over.
It is now an official plugin!
The plugin v2.0.3 is out, which supports Inkdrop v3.20.2:

https://app.inkdrop.info/plugins/toc

I’m using inkdrop in two different MacBook Pros, in one of them toc is working perfectly fine, in the other it is not working. Any suggestions on what to check to get it running on the computer where it does not work?

Hi Julio,

Please try updating the plugin with:

ipm update

Hi Takuya! Thanks for the quick reply, ran ipm update, was already running on latest version :confused:

50

That’s weird. You have also the plugin installed on the another MBP, right?
If so, please tell me if any error happens. You can check it on the console from Developer -> Toggle Developer Tools.

Found out what the issue was. TOC only works if there is at least one Header1 item (#) and my document had only Header2 items (##). That’s why it wasn’t generating one. Not sure if that is the expected behavior but it’s clear now why it wasn’t working!

Thanks a lot for the attention though, loving Inkdrop on a daily basis!

Yes, that’s the expected behavior.
Here is how remark-toc works:

  • Looks for the first heading containing 'Table of Contents' , 'toc' , or 'table-of-contents' (case insensitive, supports alt/title attributes for links and images too)
  • Removes all following contents until an equal or higher heading is found
  • Inserts a list representation of the hierarchy of following headings
  • Adds links to following headings, using the same slugs as GitHub

Hope that helps!

1 Like

Thank you for the your response and all other commends
I’ve installed toc and updated all plugins as suggested by before then and still didn’t work

# Table of Contents

## H2

22222


### H3

333333

#### H4

44444

You should write a h2 heading for Table of Contents:

## Table of Contents

Thanks @craftzdog for your response. It didn’t work for me either

## Table of Contents

## H2

22222


### H3

333333


#### H4

44444

1 Like

Hi
As of TOC doesn’t working even with putting it in H2 heading. Is there any way to get a heading link to build the TOC manually?

Also, Is there a way to get a like for a notebook? I have notebook with sub notebooks

Thanks

@anon24873873

Please provide me a reproduction code.
If you have any issue, please create a separate issue as this topic has been already resolved.
Notebooks are always sorted in alphabetical order so you have to rename notebooks to sort.
I’m going to lock this topic.