Replies: 4 comments 1 reply
-
At this time apart from your method and trying hard not to try to think of various hacks the only variant I see is to do:
and insert
after
Yes you can use raw directive to inject usage of
|
Beta Was this translation helpful? Give feedback.
-
In the future, we could have some directives behaving like |
Beta Was this translation helpful? Give feedback.
-
@picnixz users can already employ container directives. So user only need to define in the Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
I think we can close this discussion since jfbu suggested a good alternative. In the future, we might open a real issue if we want an improvement. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I am using the following to change background color in a particular
code-block
as below:The problem that I am encountering is that all subsequent
code-block
s too are getting affected by the above change. In myconf.py
I have added:and this takes effect in all the pages (as can be expected).
How to Reproduce
Using
.. raw::
directive to change background color of a code block locally to override setting inconf.py
.latex_elements = {
Environment Information
Sphinx extensions
Additional context
I have two problems to solve:
In order to stop the local settings from propagating, I have had to define another segment of
.. raw::
directive to change it back to those defined inconf.py
(as stated above).Is there a way to stop this behavior (i.e. when a local setting propagates to subsequent sections in the document), other than the hack I am currently employing?
Is there a way to carry out a local setting for borders? As in, how do I invoke the border frame (
verbatimwithframe
) and width (verbatimborder
) settings locally (which I am currently doing inconf.py
settings)?Beta Was this translation helpful? Give feedback.
All reactions