Hi,
I am trying to use org-mode for creating math notes and am using the
org-latex-preview command in order to view the equations within them as
rendered images. However I am observing an issue with the vertical
alignment of the images displaying the equations. More specifically, the
"base lines" of the characters in the overlaid images does not seem to
match the base line of the surrounding text in the final output as
displayed on the screen.
This issue is primarily visible when the glyphs of the equation are
imbalanced in the amount of space occupied below and above the base
line. For example, consider the letter "y": it takes up space below the
base line, but not above.
For a demonstration, consider that the org document contains the
following two lines:
_ $x$ $y$ _ some text
_ $xyT$ _ some text
I am including a screenshot of what is displayed on my screen after
generating the latex previews using the org-latex-preview command.For
clarity, I have drawn colored lines to show the alignment. The equation
fragments containing solely x or y seem to be improperly aligned, while
the equation fragment 'xyT' seems to be properly aligned.
Environment Details:
I am using emacs 30.2 on a linux installation. I also have a texlive
installation (2026.1-1) and am using dvisvgm for generating the
previews.
I have customized org-format-latex-options to the following value (only
really set the scale to 1.8):
(:foreground default :background default :scale 1.8 :html-foreground
"Black" :html-background "Transparent" :html-scale 1.0
:matchers ("begin" "$1" "$" "$$" "\\(" "\\["))))
Additionally, I am using a variable width font: Cardo.
Emacs : GNU Emacs 30.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.52, cairo version 1.18.4)
Package: Org mode version 9.7.11 (release_9.7.11 @
/usr/share/emacs/30.2/lisp/org/)
Thanks,
Vatsal Singhal