Re: [PATCH] Always use \newcommandx instead of \def

2023-10-19 Thread Enrico Forestieri
On Wed, Oct 18, 2023 at 02:05:51AM +, Isaac Oscar Gariano wrote: So sorry about that, I should really have looked at the issue tracker. But yes, it will probably break lots of pre-existing documents. So I've uploaded a new version of my patch that is backwards compatible. I've added a chec

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-18 Thread Richard Kimberly Heck
On 10/17/23 14:50, Enrico Forestieri wrote: On Tue, Oct 17, 2023 at 08:29:12PM +0200, Enrico Forestieri wrote: On Tue, Oct 17, 2023 at 01:10:23PM -0400, Richard Kimberly Heck wrote: On 10/16/23 21:22, Isaac Oscar Gariano wrote: Currently \def is used for all math macros that have no option a

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-18 Thread Scott Kostyshak
On Wed, Oct 18, 2023 at 03:35:33PM +, Isaac Oscar Gariano wrote: > The new.lyx and renew.lyx files won't load if you haven't applied my patch to > the master branch and recompiled lyx. > > The def.lyx file should however not require my patch (at least on the version > of master I had checke

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-18 Thread Isaac Oscar Gariano
The new.lyx and renew.lyx files won't load if you haven't applied my patch to the master branch and recompiled lyx. The def.lyx file should however not require my patch (at least on the version of master I had checked out) And if you're happy to handle the tests, that would be great. I should

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-18 Thread Scott Kostyshak
On Wed, Oct 18, 2023 at 02:05:51AM +, Isaac Oscar Gariano wrote: > I've attached three example lyx files that try and redefine the \section​ > command; the only difference between def.lyx​ and new.lyx​ is whether the > checkbox is checked or not; renew.lyx​ shows how to suecesfully do the >

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-17 Thread Isaac Oscar Gariano
7;re redefining math commands defined by unicode-math. — Isaac Oscar Gariano​ From: lyx-devel on behalf of Enrico Forestieri Sent: Wednesday, 18 October 2023 7:50 AM To: lyx-devel@lists.lyx.org Subject: Re: [PATCH] Always use \newcommandx instead of \def

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-17 Thread Enrico Forestieri
On Tue, Oct 17, 2023 at 08:29:12PM +0200, Enrico Forestieri wrote: On Tue, Oct 17, 2023 at 01:10:23PM -0400, Richard Kimberly Heck wrote: On 10/16/23 21:22, Isaac Oscar Gariano wrote: Currently \def is used for all math macros that have no option arguments. This has caused me hard to debug er

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-17 Thread Enrico Forestieri
On Tue, Oct 17, 2023 at 01:10:23PM -0400, Richard Kimberly Heck wrote: On 10/16/23 21:22, Isaac Oscar Gariano wrote: Currently \def is used for all math macros that have no option arguments. This has caused me hard to debug errors because it silently clobbers pre-existing LaTeX commands. On th

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-17 Thread Richard Kimberly Heck
On 10/16/23 21:22, Isaac Oscar Gariano wrote: Currently \def is used for all math macros that have no option arguments. This has caused me hard to debug errors because it silently clobbers pre-existing LaTeX commands. On the other hand, \newcommandx is used if there are optional arguments, and

Re: [PATCH] Always use \newcommandx instead of \def

2023-10-17 Thread Scott Kostyshak
On Tue, Oct 17, 2023 at 01:22:26AM +, Isaac Oscar Gariano wrote: > Currently \def is used for all math macros that have no option arguments. > This has caused me hard to debug errors because it silently clobbers > pre-existing LaTeX commands. On the other hand, \newcommandx is used if there

[PATCH] Always use \newcommandx instead of \def

2023-10-16 Thread Isaac Oscar Gariano
Currently \def is used for all math macros that have no option arguments. This has caused me hard to debug errors because it silently clobbers pre-existing LaTeX commands. On the other hand, \newcommandx is used if there are optional arguments, and this gives a helpful error message if the comma