Re: [Patch] Align baseline of latex fragments and surrounding text

2024-01-19 Thread Timothy
Hi Matt,

> However, I noticed that there appears to be another (large) patch in the
> works that also does this (email subject line “Overhaul of the LaTeX
> preview system”). That’s a long thread and I haven’t followed it. Is
> there still scope for my change? Is it worth getting this in?

So, in the large patch (actually ~150 patches in a branch), we actually
have had baseline alignment implemented for the last ~year .

Currently it’s just being polished up so it’s good to merge, you can see a list
of todo tasks we’d like to get sorted first here:


All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [Patch] Align baseline of latex fragments and surrounding text

2024-01-18 Thread Matt Huszagh
Ihor Radchenko  writes:

> Matt Huszagh  writes:
>
>> 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.
>
> May I ask if you further considered changing the patch?

Hey Ihor,

I'm sorry for the late reply. I'm just now looking at several patches I
submitted a few years ago and left hanging...

The answer to this question is yes I did, and IIRC got most of the way
through implementing them but ran into a largely unrelated issue that I
didn't, at the time, find a solution for. It looks like I still have the
branch with those changes and I can take a look back at it and try to
resolve it.

However, I noticed that there appears to be another (large) patch in the
works that also does this (email subject line "Overhaul of the LaTeX
preview system"). That's a long thread and I haven't followed it. Is
there still scope for my change? Is it worth getting this in?

Matt



Re: [Patch] Align baseline of latex fragments and surrounding text

2022-07-30 Thread Ihor Radchenko
Matt Huszagh  writes:

> 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.

May I ask if you further considered changing the patch?

Best,
Ihor



Re: [Patch] Align baseline of latex fragments and surrounding text

2021-12-10 Thread Matt Huszagh
Sébastien Miquel  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