0
®シンボルをSphinx/RestructuredTextに上書きするにはどうすればよいですか?Sphinx/RestructuredTextで登録商標を上付する方法は?
これは機能しません。上付きの| reg |代わりに。
bigNameBrand\ :sup:`|reg|`
®シンボルをSphinx/RestructuredTextに上書きするにはどうすればよいですか?Sphinx/RestructuredTextで登録商標を上付する方法は?
これは機能しません。上付きの| reg |代わりに。
bigNameBrand\ :sup:`|reg|`
カスタムロールを作成することで回避策が見つかりました。 Grr。私はこれをする必要はありません。 conf.pyで
:
def supsub_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
node = docutils.nodes.superscript()
node2 = docutils.nodes.substitution_reference(refname=text)
node += [node2]
return [node],[]
def setup(app):
app.add_role('supsub', supsub_role)
、その後:
.. |regsup| replace:: :supsub:`reg`
、あなたは上付き登録商標を取得するために|regsup|
を使用することができます。
「bigNameBrand \:sup: '®'」はオプションではありませんか? –
oog ...私は本当にASCIIソースファイルを使いたいと思います。 –