Skip to content

Commit

Permalink
pass max width to adjustbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Heinisch committed Mar 4, 2024
1 parent 913c6ef commit f304188
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sphinxcontrib/plantuml.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,13 @@ def _latex_adjustbox_options(self, node):
if 'scale' in node:
if not adjustbox_options:
adjustbox_options.append('scale=%s' % (float(node['scale']) / 100.0))
if 'max-width' in node:
if 'scale' in node:
w = self.latex_image_length(node['max-width'], node['scale'])
else:
w = self.latex_image_length(node['max-width'])
if w:
adjustbox_options.append('max width=%s' % w)
return adjustbox_options


Expand Down

0 comments on commit f304188

Please sign in to comment.