Am 10.03.2008 um 14:12 schrieb Abdelrazak Younes:
[EMAIL PROTECTED] wrote:
Author: sts
Date: Mon Mar 10 13:50:10 2008
New Revision: 23619
URL: http://www.lyx.org/trac/changeset/23619
Log:
* \newcommandx support for the math parser
Modified: lyx-devel/trunk/src/mathed/MathParser.cpp
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/mathed/MathParser.cpp?rev=23619
=
=
=
=
=
=
=
=
=
=====================================================================
--- lyx-devel/trunk/src/mathed/MathParser.cpp (original)
+++ lyx-devel/trunk/src/mathed/MathParser.cpp Mon Mar 10 13:50:10
2008
@@ -892,14 +892,23 @@
+ while (nextToken().character() != ']'
&& good()) {
+ if (nextToken().character() >=
'1'
+ && nextToken().character()
<= '9') {
+ // optional value ->
get parameter number
+ int n = getChar() - '0';
+ if (n > nargs) {
+ error("Arity of \\newcommandx too low for given optional
parameter.");
+ return;
+ }
+
This level of indentation is a bit too much don't you think? :-)
The 24" screens are so cheap nowadays ;-)
It's on my list to indent that a bit nicer.
Stefan