mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* use \long for \def macros (fixes http://bugzilla.lyx.org/show_bug.cgi?id=5371, patch due to Uwe)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
711474fefb
commit
5baf9d3f20
@ -4,6 +4,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author André Pönitz
|
||||
* \author Stefan Schimanski
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
@ -1136,6 +1137,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
|
||||
if (optionals_ > 0) {
|
||||
// macros with optionals use the xargs package, e.g.:
|
||||
// \newcommandx{\foo}[2][usedefault, addprefix=\global,1=default]{#1,#2}
|
||||
// \long is implicit by xargs
|
||||
if (redefinition_ && !overwriteRedefinition)
|
||||
os << "\\renewcommandx";
|
||||
else
|
||||
@ -1158,7 +1160,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
|
||||
} else {
|
||||
// macros without optionals use standard _global_ \def macros:
|
||||
// \global\def\foo#1#2{#1,#2}
|
||||
os << "\\global\\def\\" << name();
|
||||
os << "\\global\\long\\def\\" << name();
|
||||
docstring param = from_ascii("#0");
|
||||
for (int i = 1; i <= numargs_; ++i) {
|
||||
param[1] = '0' + i;
|
||||
|
Loading…
Reference in New Issue
Block a user