Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
fix for sphinx 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Feb 14, 2019
1 parent 7437b4c commit 7d5165c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pyquickhelper/sphinxext/sphinx_latex_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@ def latex_image_length(self, width_str, scale=100):
self.builder.logger.warning(
__('[EnhancedLaTeXTranslator] dimension unit %s is invalid. Ignored.'), width_str)
return None
except TypeError:
# Sphinx <= 1.7
try:
return rstdim_to_latexdim(width_str)
except ValueError:
if width_str == 'auto':
pass
else:
self.builder.logger.warning(
__('[EnhancedLaTeXTranslator] dimension unit %s is invalid. Ignored.'), width_str)
return None

def visit_inheritance_diagram(self, node):
pass
Expand Down

0 comments on commit 7d5165c

Please sign in to comment.