On 9/8/06, Andre Poenitz <[EMAIL PROTECTED]> wrote:
On Fri, Sep 08, 2006 at 03:24:56PM +0100, Ozgur Ugras BARAN wrote:
> and last of all, I developed this against the lyx 1.5.x. However, (if
> insetCommandParams mod. is correct) there is no reason not to add this
> functionality in lyx 1.4.x
> > with my kindest regards,

As usual: Things about which I don't complain are fine with me:

- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjnnes
- * \author André Pönitz
+ * \author Andr�P�itz
- * \author José Matos
+ * \author Jos�Matos
- * \author Jürgen Vigna
+ * \author Jrgen Vigna

Oh I am aware of that. There is something wrong with my locale settings, 
therefore all the those characters in the edited files are bugged. My 
apologies. But I have not committed them to svn, no ? :))

Not sure you'll get much support for this part...

  *
  * Full author contact details are available in file CREDITS.
  */
@@ -383,6 +383,12 @@
                packages << "\\usepackage[dot]{bibtopic}\n";
        }
void InsetCommandParams::scanCommand(string const & cmd)
 {
-       string tcmdname, toptions, tsecoptions, tcontents;
+       string tcmdname, toptions, tsecoptions, tcontents,tseccontents;

Space before tsec*

                        state = WS;
                }
-               if ((state == OPTION  && c == ']') ||
-                   (state == SECOPTION  && c == ']') ||
-                   (state == CONTENT && c == '}')) {
-                       if (nestdepth == 0) {
-                               state = WS;
-                       } else {
-                               --nestdepth;
-                       }
+               if((state == OPTION && c == ']')||

Space after if and before ||

-               if ((state == OPTION  && c == '[') ||
-                   (state == SECOPTION  && c == '[') ||
-                   (state == CONTENT && c == '{')) {
+               if((state == OPTION && c == '[')||
+                  (state == CONTENT && c == '{')) {

Same, more following.

-       void setSecOptions(std::string const & s) { sec_options = s; }
+       void setSecOptions(std::string const & s) { sec_options = s;        if
(lyxerr.debugging(Debug::PARSER))
+               lyxerr << "Sec options set as <" <<  s;
+}

'Non trivial' implementation please in the .C unless proven necessary by
the profiler.


I'll correct them immediately.

Wrt to the parsing, it doesn't look wrong but should be checked with
'traditonal' [][]{} insets followed by {} in ERT. If that's ok I see no
problem.

Andre'

Yes, Indeed it may create a problem. But is it possible?? because the parser is 
implemented for the insets and appeared in .lyx file in the form:

\begin_inset LatexCommand \command[]{}{}
\end_inset

Therefore the command and its parameters are isolated from anything else, including another {}. Am I wrong?? (probably I am :) )
[][]{} implementation limits new features which uses multiple options and 
commands. In my opinion it should be in the form [][]...{}{}{}... . Maybe we 
should add parameters numberOfOptions and numberOfCommands for insets, to 
prevent such inconsistencies. It seems plausible to me, since we know the 
number of necessary []s {}s for a given latex command most of the times.

I'll correct the files and send the (hopefully less distort) diffs within a day 
or two.

Reply via email to