A question on TOC generated by DT's markdown editor

It is wonderful that a TOC can be generated from the headings of a markdown file in DT automatically but there’s something I don’t understand.

I have a file with multiple headings and a TOC is generated automatically by DT. When I click on a title in the TOC, the content of the document will move to the relevant section and the relevant section’s heading is highlighted in the source (when in source view) or in the source pane (when in side-by-side view). However, nothing happens when the file is in Preview mode (or in the preview pane of side-by-side view).

I test another file with some simple headings and the content-jumping and highlighting of heading work in both source and preview mode/pane.

Should the string format of the headings follow certain guidelines for the TOC’s mechanism to work? Thank you.

PS: Perhaps it is because the TOC’s mechanism is a find function that ignores the “#” symbol? Therefore, the heading can be found in source/source pane (exact match of the string) but not the name of the links in preview mode/pane?

The TOC is not generated nor controlled by DEVONthink. It is a MultiMarkdown mechanism and yes, it’s operating on headers (h1, h2, etc.).

Thanks. But I am not referring to {{TOC}} but the list displayed in the “table of contents” pane? They are the same thing?

With Markdown documents, the Table of Contents inspector should be displaying headers, just as MMD uses.

Got it. So, the TOC is generated from the plain text match of the headings, thus can’t work in Preview mode for heading that is in a link format in preview mode (coz the text displayed is different from the actual plain text)?

I can’t say at this point since I don’t have such a document in front of me right now. :slight_smile:

Thanks anyway.