Skip to content
New issue

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

Support max-width option in tikz output #90

Conversation

HeinischValentin
Copy link

Problem

When creating large diagrams using plantuml, they can quickly get too wide for a pdf page.
For images in the png, pdf and svg format, this problem is handled by the sphinx-provided "sphinxincludegraphics" latex command, which resizes the included graphic if needed.
As tikz images are embedded using the "\input" command, this resize logic is not applicable for them.

Solution

I would suggest to use the "max-width" option (which is already somehow implemented but not documented) to allow the user to specify a maximum width.
The "adjustbox" macro, which is already being used for giving an absolute size for an image, also supports this type of maximum size.
This way, the image is not resized if it fits, but only if it would exceed the given size.

@yuja
Copy link
Collaborator

yuja commented Mar 6, 2024

Merged as 7ef52e4, thanks!

@yuja yuja closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants