Search code examples
restructuredtexttext-formatting

reStructured Text - Escape a headline?


I have a reStructuredText document. rST uses =====, etc. as a heading format.

However I need to include some lines that have this text in it, e.g.:

some of my text
=====
stuff
=====
some more of my text

And I don't want the ==== to be interpreted as a heading, i.e. I don't want stuff to be a heading. I would rather that those equal signs are just displayed as is.

Is this possible in rST?


Solution

  • The escape character in reStructuredText is \:

    some of my text
    \=====
    stuff
    =====
    some more of my text
    

    Will be rendered as:

    some of my text ===== stuff ===== some more of my text