1

Sphinx/rst を使用して部分マークの段落をセキュリティで保護するにはどうすればよいですか?

(U) This is a portion marked heading
------------------------------------

(U) This is a portion marked sentence that renders not what I'd expect.

(U) This too is portion marked, and renders unexpectedly.

(U) This too is portion marked, but it does render fine when another sentence is placed directly below.
Next sentence.

レンダリングすると (以下を参照)、見出しはきれいに見えますが、文章はリストのように見えます。(および)文字を使用した部分マーキング情報に関する厳格な要件のため、置換/置換ディレクティブを使用することは受け入れられるソリューションではありません。

レンダリングされた出力:

(U) This is a portion marked heading

  U. This is a portion marked sentence that renders not what I'd expect.

  U. This too is portion marked, and renders unexpectedly.

(U) This too is portion marked, but it does render fine when another sentence is placed directly below. Next sentence.
4

1 に答える 1

0

この一行、

(U) This is a portion marked sentence

は列挙リストの項目として解釈されます。ここで、(U)は括弧で囲まれた列挙子です。

http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-listsを参照してください。ここでは次のように述べています。

1 行の段落が列挙子 ("A."、"1."、"(b)"、"I)" など) と同じテキストで始まる場合、最初の文字をエスケープする必要があります。行を通常の段落として解析します。

したがって、 の前にバックスラッシュを付けると(U)、行が通常の段落として表示されます。

\(U) This is a portion marked sentence
于 2016-08-13T09:14:39.020 に答える