From 1668f007c299871a0699b58e6b3475cdf4c243a3 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 15 Aug 2018 22:29:29 +0900 Subject: [PATCH] Fix #5298: imgmath: math_number_all causes equations to have two numbers in html --- CHANGES | 1 + sphinx/ext/imgmath.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 2cdb52a6cb7..66493877d80 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,7 @@ Bugs fixed font with XeLaTeX/LuaLateX (refs: #5251) * #5280: autodoc: Fix wrong type annotations for complex typing * autodoc: Optional types are wrongly rendered +* #5298: imgmath: math_number_all causes equations to have two numbers in html Testing -------- diff --git a/sphinx/ext/imgmath.py b/sphinx/ext/imgmath.py index 5f9d7a1e2ba..cfec4db28d6 100644 --- a/sphinx/ext/imgmath.py +++ b/sphinx/ext/imgmath.py @@ -319,8 +319,7 @@ def html_visit_displaymath(self, node): if node['nowrap']: latex = node['latex'] else: - latex = wrap_displaymath(node['latex'], None, - self.builder.config.math_number_all) + latex = wrap_displaymath(node['latex'], None, False) try: fname, depth = render_math(self, latex) except MathExtError as exc: