On Thu, Sep 1, 2022 at 3:27 AM Udicoudco <udifog...@gmail.com> wrote:
> Using \globaldefs (see page 275 in The TeX Book, or here) we might get a > global assignment with \newcommand. First we can define a new command fo the > matter (LyX may include this line in the preamble if it notices a math macro > defintion was done via the GUI): > > \newcommand{\lyxnewcommand}[3][0]{\bgroup\globaldefs=1\newcommand{#2}[#1]{#3}\egroup} > > and then, if for example i would like to define a new math macro named \foo > with 2 parameters via the GUI, LyX will write the following line: > > \lyxnewcommand[3]{\foo}{<definition of \foo>} My apologies, the code should be \lyxnewcommand[2]{\foo}{<definition of \foo>} Regards, Udi -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel