artisticat1 / obsidian-tikzjax

Render LaTeX and TikZ diagrams in your notes
MIT License
356 stars 18 forks source link

top and bottom of images get cut off #29

Open Thirantos opened 1 year ago

Thirantos commented 1 year ago

top and bottom of images get cut off

it should be

Screenshot 2023-01-24 at 11 02 00

but i get

Screenshot 2023-01-24 at 11 02 07

This isn't exclusive to chemfig, but it is most apparent there. This happens on mac and ios, i haven't tried on windows yet.

Water-Script commented 2 months ago

Can confirm that this happens on Windows as well and is still occurring, at least with chemfig. It does not appear to happen when chemfig or any other package is not used. Could possibly be an issue with packages or chemfig?

hisel-sabermetrics commented 1 month ago

A fix for this would be \standaloneconfig{border=1pt}

This should be a tikz problem. Some tikz elements such as \charge and \chemname went over the boundary. Normally this just meant that it would cross into other stuff. If this is at the edge of the page then it goes into the margin then gets cut of when beyond that. \documentclass{standalone} adjust the width and height to match the usage and has a margin of 0, so anything that does not expand the box would get cutoff unless you increase the margin to account for it manually.