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

pass max width to latex adjustbox #91

Merged
merged 1 commit into from
Mar 6, 2024
Merged

pass max width to latex adjustbox #91

merged 1 commit into from
Mar 6, 2024

Conversation

yuja
Copy link
Collaborator

@yuja yuja commented Mar 6, 2024

#90

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 yuja merged commit 7ef52e4 into master Mar 6, 2024
3 checks passed
@yuja yuja deleted the push-tmwopkylzykm branch March 6, 2024 10:51
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.

1 participant