Skip to content Skip to sidebar Skip to footer

Substitution In Admonitions

How can I do a substitution in an admonition? For example: |p| account .. note:: **Been using |p| separately and now integrating?** In my sphinx conf.py I define a replaceme

Solution 1:

The substitution in the note works if you remove the strong emphasis (double asterisks). Nesting of inline markup is not supported.

References:


Here is a workaround if you need to keep the strong emphasis:

  1. In conf.py, use the following definition:

    rst_epilog = '.. |p| replace:: **Labnext**'
  2. In your .rst file, use this markup:

    .. note::
    
      **Been using** |p| **separately and now integrating?**
    

Post a Comment for "Substitution In Admonitions"