reddit / emacs

LaTeX Preview in org-mode issue with size of whitespace around

QueenOfHatred · 2022-07-18 09:34
So.. I don't know why, but, everytime I try to preview LaTeX fragment in the org file, the generated preview will have a lot of whitespace around it, and I struggle to find the reason for that Sadly I wasn't able to find anyone with similar issue here X\_X [Before previewing ](https://preview.redd.it/u25remulqac91.png?width=227&format=png&auto=webp&s=72256bbcf044d511c84976f2405ef32c4e5953ec) ​ [After previewing ](https://preview.redd.it/32jlz8foqac91.png?width=975&format=png&auto=webp&s=99a83ced578af6ad0d897ab2bcd4858ec2883775)
L-Szos · 2022-07-18 10:40
Im guessing its because you use `\[\]`, which generates centered mathematics stuff (im.unsure of the right terminology). You could try using inline instead (`$$`). I could be wrong in the reason for this though.
Prometheus4real · 2022-07-18 14:42
Are you using a preamble? If you have something like fullpage in your preamble, it can come out like that (at least in my experience).
loveoflife219 · 2022-07-19 04:56
I had this problem before. For me, it’s because of the preamble causing a page number included (page 1), and so the image couldn’t be cropped properly.
sabikewl · 2022-07-19 08:23
If you have a preamble change it to HEADER_LATEX_EXTRA so it doesn't interfere with the fragments