We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I needed to scale my seqdiags in the Latex output of a Sphinx doc. I wrote this little patch:
--- /usr/local/lib/python2.7/dist-packages/sphinxcontrib_seqdiag-0.6.0-py2.7.egg/sphinxcontrib/seqdiag.py 2014-04-08 14:55:21.395591062 +0200 +++ /home/legoff/Downloads/seqdiag.py.patched 2014-04-08 14:39:27.276320171 +0200 @@ -243,7 +243,14 @@ raise nodes.SkipNode if fname is not None: - self.body.append('\\par\\includegraphics{%s}\\par' % fname) + # handle maxwidth option + image_size = image.pagesize() + if 'maxwidth' in options and options['maxwidth'] < image_size[0]: + ratio = float(options['maxwidth']) / image_size[0] + self.body.append('\\par\\includegraphics[scale=%f]{%s}\\par' % (ratio, fname)) + else: + self.body.append('\\par\\includegraphics{%s}\\par' % fname) + raise nodes.SkipNode
As you can see the patch is on version 0.6.0.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I needed to scale my seqdiags in the Latex output of a Sphinx doc. I wrote this little patch:
As you can see the patch is on version 0.6.0.
The text was updated successfully, but these errors were encountered: