On Sat, Jun 10, 2023 at 11:31:24PM +0200, Enrico Forestieri wrote:
> On Sat, Jun 10, 2023 at 11:12:23PM +0200, Enrico Forestieri wrote:
> > 
> > On Sat, Jun 10, 2023 at 02:18:09PM -0400, Richard Kimberly Heck wrote:
> > > 
> > > On 6/10/23 04:30, Scott Kostyshak wrote:

> > > > If I were to implement this "don't define in LaTeX" in LyX, would it be 
> > > > reasonable to put it in the context menu of the math macro as a toggle?
> > > 
> > > Yes, that's how I'd do it. It's probably pretty simple, really.
> > 
> > I think it would not even be necessary a context menu entry. It would
> > suffice leaving empty the TeX part of the macro and only filling in the
> > LyX part. In this case the macro simly would not be written in the
> > output.
> 
> It really is a two-liner patch. See attached.

Thanks, Enrico, I like it! I see two options, one nice and one not nice:

1. Do lyx2lyx. I think we would just need to copy the LyX box to the LaTeX box 
when the LaTeX box is empty.

2. Commit the patch as is and claim it was a bug that LyX included the 
definition even when the LaTeX box was empty. I did not check if the current 
behavior is documented.

I suppose (1) is the best? I wonder if some users rely on the current behavior 
for the case where they want the LyX and LaTeX boxes to be the same, because 
this way when they change the macro, they just need to change it in one place 
(the LyX display), instead of needing to make sure their LaTeX def and LyX def 
are in sync.

If there is agreement, I can work on the lyx2lyx. I can also document the new 
behavior in the User Guide. I'm traveling though and not sure when I would 
complete it.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to