-
|
I am using the rst_prolog setting to create an "arg" role, which I use for inline highlighting of function/method argument/parameter names. rst_prolog = """
.. raw:: html
<style type="text/css">
.arg {
font-family: monospace;
font-size: 90%;
font-weight: bold;
}
</style>
.. role:: arg
:class: arg
"""I would like to use this as the default role, so I that I can simply use single backticks (without the explicit role identifier) around argument names in my Python docstrings. default_role = 'arg'This doesn't work, though. I get the following warning. Is there any way to make this work? |
Beta Was this translation helpful? Give feedback.
Answered by
AA-Turner
Jan 14, 2025
Replies: 1 comment 1 reply
-
|
Conceptually, all rst_prolog = """
.. raw:: html
<style type="text/css">
.arg {
font-family: monospace;
font-size: 90%;
font-weight: bold;
}
</style>
.. role:: arg
:class: arg
.. default-role:: arg
""" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ipilcher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Conceptually, all
default_roledoes is apply the.. default-role::directive to each document. Would the following work?: