svg overlays blank/supersmall (on macOS 13.0 Ventura)
The svg's in the overlays created by math-preview appear supersmall for me – so small that one can't see them and it took me quite some time to realize the size is the issue.
I followed the trouble-shooting steps suggest in #20 (closed) and when I run
123456789
(let ((o (make-overlay 1 10))
(data "<svg style=\"vertical-align: -0.025ex;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"2.282ex\" height=\"2.025ex\" role=\"img\" focusable=\"false\" viewBox=\"0 -883.9 1008.6 894.9\"><g stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" transform=\"scale(1,-1)\"><g data-mml-node=\"math\"><g data-mml-node=\"msup\"><g data-mml-node=\"mi\"><path data-c=\"1D465\" d=\"M52 289Q59 331 106 386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522 361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465 391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290 50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504 153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142 101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26 194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251 392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52 289Z\"></path></g><g data-mml-node=\"mo\" transform=\"translate(605,413) scale(0.707)\"><path data-c=\"32\" d=\"M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z\"></path></g></g></g></g></svg>")
(scale 1)
(margin '(5 . 5))
(relief 0)
(raise 0.4))
(overlay-put o 'display
(list (list 'raise raise)
(cons 'image
(list :type 'svg
:data data
:scale scale
:pointer 'hand
:margin margin
:relief relief)))))
the text is hidden by a (seemingly) empty overlay. Only after I change the width and height svg style arguments to around 30ex is the x^2
in the overlay of the same size as the text. Any idea what can be done to fix this? I tried setting math-preview-scale
, math-preview-mathjax-scale
, math-preview-mathjax-svg-scale
, math-preview-mathjax-ex
, math-preview-mathjax-svg-ex-factor
, and a few more but they don't seem to have any effect.
This started happening after upgrading to macOS 13.0 Ventura (M1 Mac). I use Emacs Plus installed using brew install emacs-plus@28
but the behavior is the same with emacs-plus@29, Emacs for Mac OS X, and the casks from Emacs Mac Port. Only with Emacs installed via brew install emacs-mac
(whose Emacs.app doesn't launch but the binary within works) the size is normal. This difference might be related to the use of WebKit vs librsvg for rendering svg files (see here and here).
Thanks for this very useful package which I have come to find essential for my workflow!