6

I want to write the following sentence:

Don't forget to escape the :code:`\`` character, it will be interpreted as code mark

But I don't know how to escape the "`" backtick character. Is it even possible?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Pierrick Rambaud
  • 1,726
  • 1
  • 20
  • 47
  • This seems to be impossible, which does not surprise me based on my generally terrible experience with RST. I would recommend Asciidoc or Djot instead. I've used Asciidoc and it is *much* saner than RST. I haven't used Djot but it looks nice too. – Timmmm Dec 12 '22 at 11:39

1 Answers1

5

You cannot escape backticks within interpreted text, as backticks themselves define what gets interpreted.

There are at least two options. The latter yields the same result as if you code use :code: with escaping the backtick.

No formatting

Don't forget to escape the \` character, it will be interpreted as code mark

With formatting

.. |bt| raw:: html

    <code class="code docutils literal notranslate">`</code>

Don't forget to escape the |bt| character, it will be interpreted as code mark

Above examples rendered

rendered examples

Steve Piercy
  • 13,693
  • 1
  • 44
  • 57