Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of Table of Contents (TOC) #165

Open
irmod opened this issue Oct 15, 2024 · 0 comments
Open

Allow customization of Table of Contents (TOC) #165

irmod opened this issue Oct 15, 2024 · 0 comments

Comments

@irmod
Copy link

irmod commented Oct 15, 2024

In my environment, many people use the Markdown editor from a smartphone to prepare articles.

The Table of Contents is a very important element of the article. Its design, in most cases, is determined by the APA standard. But publishers may have different requirements.

In some cases, a Table of Contents may be necessary when exporting to PDF, HTML, and others.

Could you:

  1. Make the Table of Contents design inherited from the topic of the note. This concerns the size and color of markers, Indent Level, the alignment of long headings when they are moved to the next line, as in bulleted lists... It is desirable that the Table of Contents look in the style of a note.

  2. In YAML frontmatter, add the parameter "toc: 'TOC Name'". This will allow you to set a name for the table of contents (Table of Contents, Contents, Index, Summary, Directory, Outline, In this article, Guide...). In general, the parameter will allow you to add a Table of Contents only to individual notes, if "Table of Contents (TOC)" is disabled in the Settings.

```
toc: "TOC Name"
```
  1. Allow the Table of Contents to be placed in the desired place, and not just at the top of the note. For example, the APA standard requires a Table of Contents "...the table of contents comes between your abstract and your introduction." In a note, the position of the text "[TOC]" can determine the line at which the table of contents begins.

  2. I suggest adding the "Customize TOC" menu in the "Editor and Viewer" Settings.

TOC_03.png

The menu may contain:

4.1 "Edit TOC Title" to set a common title for the Table of Contents in all notes of the current Repository.

4.2 "Edit TOC Title Size" to set the size of the TOC title text. This could be H1-H6 or "1.25em".

4.3 "Show border around the TOC" On/Off switch to add a border around the TOC block. The Table of Contents is a special element of the article that requires attention.

4.4 "Edit TOC CSS" to explicitly set the style of the Table of Contents. For example, disable the display of list markers. Provide a class in "Zettel Notes" for accessing Table of Contents elements. These styles can be used when exporting notes to PDF, HTML, docx...

TOC_Edit_04.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant