Acylation/obsidian-chem

Improvement of image size.

MGriot opened this issue · 1 comments

What would you like to be added?

It would be nice if you could choose the standard size of the bonds. Let me explain better, the plugin is fantastic but I find the image size option inconvenient. It doesn’t adapt well for all molecules, especially if they have different sizes. It would be more useful to be able to choose the standard size of bonds or atoms, in this way all molecules would be on the same scale. I imagine that as a request it is complicated but it would be nice to have this function.
Maybe you could directly insert the choice of the image size and whether to standardize the size of the bonds and atoms in the codeblock, in order to make it more adaptive.

Why is this needed?

This would allow for better integration into obsidian notes by avoiding having very small molecules that are impossible to read if they are too large

I did some experiment and found that this could be easily solved by changing default 'scale' option from zero to a value, rather than explicit assigning imgWidth.

image

However, as shown in the screenshot, there are some typography problems need to be solved. I'll try to use table element to format this.

Another problem is, the structures are now rendered in png format, this would lead to low resolutions. Changing to svg may be helpful.

image