Search code examples
restructuredtext

How can one separate a literal block from a blockquote in restructuredtext?


For example if I have:

.. code:: python
   import os
   this_is_the_last_code_line = 5

   Now I want this text to be a blockquote.

The blockquote is assumed to be part of the literal code block. Is there some way to indicate that these are separate blocks?


Solution

  • Use the pull-quote directive.

    .. code:: python
    
        import os
        this_is_the_last_code_line = 5
    
    .. pull-quote::
    
        Now I want this text to be a blockquote.