-
Notifications
You must be signed in to change notification settings - Fork 13
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
"Document Size" for multiple images #125
Comments
Thanks for the feature suggestion, Sasha! 🙂 These semantics would correspond to those of output units in diagrams, right? |
Ah, yup we should just copy their structure here. It is a bit annoying that you need to know about this when drawing (lwO). However if they did it that way, there is probably not a better solution. |
On a closer look it seems that our from chalk import *
sq = square(1).line_width_local(1.5)
dia = hcat([sq.scale(s) for s in [0.5, 0.8, 1, 1.5, 2]], sep=0.2)
dia.render_svg("/tmp/out-1.svg", height=128)
dia.render_svg("/tmp/out-2.svg", height=512) Apart from line width, I guess we also want to control the arrowhead size and font size in a similar manner, right?
I think that this attribute can be specified at the end (just before rendering)? For example: dia = hcat([square(1).scale(s) for s in [0.5, 0.8, 1, 1.5, 2]], sep=0.2)
dia.line_width_local(1.5).render_svg("/tmp/out.svg", height=128) |
Since people are posting issues again, let me add one :)
I am having a lot of trouble keeping my images for my course at a standard size. The problem is that when I use SVG the images get rescaled in strange ways in different parts of the lecture.
For example the thickness of lines is set relative to the image size, but if I have 6 images all of different sizes the lines get resized differently. I can set a fixed height, put then sometimes the diagrams are really long and clip off the page.
I have some workarounds for this, but I feel like I am doing something incorrect, and I end up having to do hacks like "with_envelope" on each diagram to get it to look good.
The text was updated successfully, but these errors were encountered: