Skip to content

Commit

Permalink
docs/conf.py: Enable imgmath_embed for Sphinx >=5.3.0
Browse files Browse the repository at this point in the history
The imgmath extension had a regression reported at [1].

This regression is related to the new option: imgmath_embed added
in Sphinx 5.2.0. Enabling the option is an workaround to the issue.

The regression has been fixed since Sphinx 6.0.1, but it should be
reasonable to keep the option afterwards.

Link: [1] sphinx-doc/sphinx#10944
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
  • Loading branch information
akiyks committed Jan 8, 2023
1 parent 27a8d76 commit a4e52c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/conf.py
Expand Up @@ -143,6 +143,9 @@ def have_command(cmd):
if load_imgmath:
extensions.append("sphinx.ext.imgmath")
math_renderer = 'imgmath'
# workaround Sphinx issue #10944
if (major, minor) >= (5, 3):
imgmath_embed = True
else:
math_renderer = 'mathjax'

Expand Down

0 comments on commit a4e52c7

Please sign in to comment.