Commits

Leandro Lucarella committed 8665fc4

Fix sphinx.sty \includegraphics command redefinition

  • Participants
  • Parent commits b333c1a

Comments (0)

Files changed (2)

File sphinx/ext/graphviz.py

         raise nodes.SkipNode
 
     if fname is not None:
-        self.body.append('\\includegraphics[]{%s}' % fname)
+        self.body.append('\\includegraphics{%s}' % fname)
     raise nodes.SkipNode
 
 

File sphinx/texinputs/sphinx.sty

     \image@width\wd\image@box%
     \ifdim \image@width>\linewidth%
       \setbox\image@box=\hbox{\py@Oldincludegraphics[width=\linewidth]{#2}}%
+      \box\image@box%
+    \else%
+      \py@Oldincludegraphics{#2}%
     \fi%
-    \box\image@box%
   \else%
     \py@Oldincludegraphics[#1]{#2}%
   \fi%