如何转义 .rst 文件中的“`”反引号字符?

How to escape the "`" backtick character in a .rst file?

我想写下面的句子:

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

但我不知道如何转义“`”反引号字符。有可能吗?

一对反引号定义解释文本:

Interpreted Text

Doctree element: depends on the explicit or implicit role and processing.

Start-string = end-string = "`".

Interpreted text is text that is meant to be related, indexed, linked, summarized, or otherwise processed, but the text itself is typically left alone. Interpreted text is enclosed by single backquote characters:

This is interpreted text.

题目中的具体作用:code:。需要注意的是,如何处理 Interpreted Text 取决于伴随它的特定角色(角色可以是一般的 reST 或 Sphinx 特定的)。

The "role" of the interpreted text determines how the text is interpreted. (...) A role marker is either a prefix or a suffix to the interpreted text

:role:`interpreted text`
`interpreted text`:role:

因为Interpreted Text有一个值得注意的属性其对应的Doctree元素依赖于角色:

Doctree element: depends on the explicit or implicit role and processing

reST 中转义的一般规则在 Escaping Mechanism which consists simply of using a \ backlash character. However this also has broader implications, see the remaining Inline Markup recognition rules 中给出。

reStructuredText.

Inline Markup and Escaping with Backslashes - Quick reStructuredText 秘籍-sheet 中给出了一个方便的总结

您无法在解释的文本中转义反引号,因为反引号本身定义了要解释的内容。

至少有两种选择。后者产生的结果与使用 :code: 转义反引号的代码相同。

无格式

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

带格式

.. |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

以上示例呈现