0

I don't see how to include some raw:: latex substitution commands in the rst_prolog of Sphinx.

This question has an answer for one-line replace command but not for my case.

My tentative in the conf.py is :

rst_prolog = """
.. |BeginSmaller| raw:: latex

                  \begingroup\footnotesize

.. |EndSmaller| raw:: latex

                \endgroup
"""

which not surprisingly gives the bad results:

  • html compilation:
    • warning message <rst_prolog>:9: WARNING: Explicit markup ends without a blank line; unexpected unindent.
    • the produced html has some "ootnotesize" text at the begining of pages, probably because of bad escape sequence.
  • latex compilation:
    • Only egingroup appears

Does someone has an idea to solve this ?

mzjn
  • 48,958
  • 13
  • 128
  • 248
bp91
  • 31
  • 2

0 Answers0