[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] Align baseline of latex fragments and surrounding text
From: |
Matt Huszagh |
Subject: |
Re: [Patch] Align baseline of latex fragments and surrounding text |
Date: |
Fri, 10 Dec 2021 20:53:29 -0800 |
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
> My mistake. For some reason, I had thought that
> =\documentclass[preview]{standalone}= was used by default for LaTeX
> previews. Setting it as described in your patch, it now works
> properly, even with the default value of =dvisvgm=.
No worries; glad you got it working.
> To make this behavior easier to toggle, you could
> 1. Change the default value of =org-format-latex-header=. The
> =standalone= class makes sense, but I don't know if that might
> break things.
> 2. Specify the =:latex-header= of the default =dvisvgm= option. Same
> caveat applies.
> 3. Add a =dvisvgm-with-ascent= option to the default value of
> =org-preview-latex-process-alist=.
>
> Instead of the new variable =org-latex-fragment-overlay-ascent=,
> perhaps the function used to compute the ascent could be provided as
> another property, such as =:ascent=, added to the relevant options in
> =org-preview-latex-process-alist=. It seems to make more sense since
> it only applies to svg output, and it makes it easier to have this
> behavior as default. It would require =org--make-preview-overlay= to
> take the ascent as an additional argument.
These are nice ideas, and ones I hadn't considered. Thanks for the
suggestions! I'll think about it a bit and may modify the patch
accordingly.
> Please note that I am not a maintainer, these are just a few thoughts.
> I do hope your work can be applied and that LaTeX fragments can be
> properly aligned by default.
>
> You should add [PATCH] to the subject of your mail, so that it gets
> listed at https://updates.orgmode.org/ and not forgotten. A maintainer
> will reply eventually, but it might take up to a few months.
Also a good suggestion. Fortunately, "Patch" seems to have been caught
by that tool. But [PATCH] seems more typical and I've updated the
subject for that.
Matt