Here is a patch fixing the un-escaped slashes in LyXAction.cpp:

Index: src/LyXAction.cpp
===================================================================
--- src/LyXAction.cpp   (revision 29689)
+++ src/LyXAction.cpp   (working copy)
@@ -1666,7 +1666,7 @@
  * \li Action: Changes arbitrarily the size used by math fonts inside
a context.
  * \li Notion: Provides an interface to the LaTeX math mode font size commands.
  * \li Syntax: math-size <STYLE>
- * \li Params: <STYLE>:
\displaystyle|\textstyle|\scriptstyle|\scriptscriptstyle
+ * \li Params: <STYLE>:
\\displaystyle|\\textstyle|\\scriptstyle|\\scriptscriptstyle
  * \li Origin: Alejandro, 15 Aug 1996; ps, 14 Jun 2008
  * \endvar
  */
@@ -1686,7 +1686,7 @@
  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_UNFOLD
  * \li Action: Unfold a Math Macro.
  * \li Notion: Unfold the Math Macro the cursor is in, i.e.
-               display it as \foo.
+               display it as \\foo.
  * \li Syntax: math-macro-unfold
  * \li Origin: sts, 06 January 2008
  * \endvar
@@ -1696,7 +1696,7 @@
  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_FOLD
  * \li Action: Fold a Math Macro.
  * \li Notion: Fold the Math Macro the cursor is in if it was
-               unfolded, i.e. displayed as \foo before.
+               unfolded, i.e. displayed as \\foo before.
  * \li Syntax: math-macro-fold
  * \li Origin: sts, 06 January 2008
  * \endvar



2009/5/16 Pavel Sanda <sa...@lyx.org>:
> Ewan Davies wrote:
>> There are still some things to be decided though. In LFUN_MATH_SIZE
>> the params must contain a \. This should be escaped as \\ in the
>> comment for doxygen to understand it. The documentation generated at
>> http://wiki.lyx.org/sourcedoc/svn/namespacelyx.html#5ae63e8160e98b54ad28f142ed40c202fbe9d5809b890010dd6659e548823d36
>> is lacking the info shown below in the comment copied from
>> LyXAction.cpp. Obviously because the \ are not escaped as \\, boxygen
>> can't read the field. I'll edit LyXAction.cpp to include \\ and make a
>> diff when my script is done.
>
> this change to '\\' is troublesome because i wanted those args to remain close
> to the real values. in this case i can accept that doxygen is not so correct,
> because the main sources for info should be LFUNs.lyx and LyXAction.cpp.
>
>> The other thing is LFUN_MATH_BIGDELIM which in the 'sample' field
>> contains single, non-escaped \ characters. My instinct would be to say
>> doxygen wouldn't like this (as with LFUN_MATH_SIZE) but it seems that
>> since the non-escaped \ characters are inside double quotes, doxygen
>> reads them fine. I propose to fix my script to find single \ chars
>> inside double quotes ("") and to treat them as an intended single \
>> char, not part of an escape sequence. I think it makes sense to keep
>> my script's interpretation compatible with doxygen's - in which case
>> changing these \ to \\ isn't a fix (see below in the sample field).
>
> my advice is not to care about doxygen much. those '\n' were good to keep
> at least some structure, but i stoped to care about doxygen fingerpainting
> later on (see below).
>
>> Coming to think of it, is there not a way via doxygen, which already
>> parses LyXAction.cpp, to generate the documentation? If we could use
>> the same code doxygen uses to parse the comments, just generating a
>> .lyx file instead of .html as doxygen does, it would mean consistency
>> between the doxygen output and the .lyx output as the parsers would be
>> the same. Maybe this is using a sledgehammer to crack a nut though, I
>
> this was my original idea and the whole documentation was set up this way,
> but when i started to play more with the small glitches of doxygen output
> it appeared to be rather hard to tweak. finally i rather came with a small
> shell script which do exactly what i want and the only problem was thats
> not a python thing.
>
> pavel
>

Reply via email to