Adding a Table of Contents

This is a plugin to Gnotes. When this plugin is installed, there is a Table of Contents entry in the actions menu. See Add-in Preferences to learn how to activate a plugin.

In a nutshell

  1. A heading is a full line of text, formatted with Bold+Huge or Bold+Large.

  2. Set headings with Ctrl+1 or Ctrl+2.

  3. Open the table of contents with Ctrl+Alt+1, and jump to any heading.

Screenshot

A structured note with its table of contents

Structuring your notes with headings

A heading is simply a complete line with specific text formatting:

  • Level 1 headings, for sections, are lines formatted with a Bold+Huge font.

  • Level 2 headings, for subsections, are lines formatted with a Bold+Large font.

To format a heading line, either:

  • Use the commands Heading 1 and Heading 2 in the Actions ▸ Table of Contents menu.

  • Use the keyboard shortcuts Ctrl+1 and Ctrl+2 for headings of level 1 and 2.

These commands apply the formatting to the complete line. You don't need to select it first. It is enough if the cursor is on the line.

Alternatively, with the cursor on a new line, activate the heading command and then enter the heading title.

You can even use the normal formatting commands from the Text menu: Bold, Large and Huge, and their respective keyboard shortcuts. If, for example, your line is already formatted as Huge, then you just need to make it also Bold to turn it into a heading 1. See Editing Notes to learn how to set text styles.

Showing the table of contents

You can access the table of contents either:

  • In the menu Actions ▸ Table of Contents.

  • In context menu ▸ Table of Contents (right-click on the note window).

  • In a popup menu, with the keyboard shortcut Ctrl+Alt+1.

    Then you can navigate up and down with the arrow keys and jump to the selected heading with enter. Or just click with your mouse on the heading to jump to.

Troubleshooting

One heading does not show in the table of contents

There might be some characters in the heading line, such as whitespace characters, which are not formatted as a heading. Make sure that the whole line is formatted as a heading. See Structuring your notes with headings.

There is an empty line in the table of contents

An empty line, possibly including whitespaces, is formatted as a heading. Jump to this line and delete the area.