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

Automatically determine output width #816

Open
Zannick opened this issue Dec 17, 2024 · 0 comments
Open

Automatically determine output width #816

Zannick opened this issue Dec 17, 2024 · 0 comments

Comments

@Zannick
Copy link

Zannick commented Dec 17, 2024

My flowchart is very wide, but when mmdc outputs to png, it expects me to supply my own value for width. If I don't, it defaults to something so small that the result is illegible (--help says width default is 800; the file actually produced is 784x52). However, when I output to svg, the svg document includes a calculated max-width of 19769.9px, so I know it's possible to calculate.

Proposed solution
Either mmdc on its own should default to max-width, or there should be a flag to force it, such as: mmdc -w auto or mmdc -w max or mmdc --maxwidth.

Alternatives tried
My workaround is to output to svg, take the max-width from that, and output again as png with -w <max-width>.
I've not found any other easy way to create the max-width png on the live editor.

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

No branches or pull requests

1 participant