41

When I use the heading tags (# ##, etc) using markdown, they are always converted to numbered sections during pdf-latex conversion.

How to indicate unnumbered headings in markdown in Jupyter Notebook (IPython)?

I realize this can be done by adding a '*' right next to each section directly in the latex document, but is there any other way to do this?

Thomas K
  • 39,200
  • 7
  • 84
  • 86
Ébe Isaac
  • 11,563
  • 17
  • 64
  • 97

3 Answers3

29

You can write an unnumbered heading by appending {-} or {.unnumbered} to the Markdown cell, e.g.:

Heading {-}

The output is a heading without a number, like so:

Heading

This is documented in Pandoc's Markdown which is an extended and slightly revised version of the original Markdown syntax.

Samuel
  • 2,895
  • 4
  • 30
  • 45
  • Thanks for this @jsb. BTW, any background for us? I couldn't seem to find any mention of this in the docs. – esmail Feb 17 '19 at 00:12
  • 1
    I have updated my answer with some background and links to documentation. – Samuel Feb 26 '19 at 11:05
  • 8
    It works, but it is annoying to see the "{-}" symbol in the notebook, since it does not understand it as a special instruction. – pgmank Sep 28 '19 at 18:12
7

You can clic the Table Of Contents icon.

A panel should open in the left side. Clic on the "configuration" icon 1

De-select Automatically number headings [2]

See the screenshot

See the screeshot

monti
  • 130
  • 2
  • 7
  • 1
    For this you need have the toc-plugin – Sip Dec 05 '18 at 15:23
  • 4
    This does not work for me. It only removes numbering from the notebook, not the PDF. – pgmank Sep 28 '19 at 17:22
  • 2
    Same here - doesn't work for PDF export, only in the notebook. – Adam Spiers Jun 23 '20 at 17:37
  • If you want them off by default, uncheck this setting in the toc extension's configuration found in the Nbextensions tab of the Jupyter Home Page screen (you may need to uncheck "disable configuration for nbextensions without explicit compatibility" to access its configuration). – taranaki Jan 15 '22 at 02:47
1

If you have the nb extensions active, you can see the contents on the left hand side. Just before the contents (but after the title "Contents"), there is a small letter "n". If you press the n, it removes the numbering from the headers.

curious
  • 65
  • 5