[please Cc: me, I'm not subscribed]

Hi guys!

I'm a long time LaTeX user, but a few days ago I decided to try out LyX.
Quite to my surprise, I find it quite nice to use.  LyX gives one a much
better overview over ones documents, especially when it comes to large
mathematical formulas.

OTOH, it takes a bit getting used to, and some LaTeX features I
frequently use, are still missing.  One of those is the \eqref command
for references to formulas.  I noticed that even in the user guide,
references to equations are done using a (\ref{foo}) structure, which is
quite an ugly thing to do, IMO.  

Therefore, I wrote this little patch (against yesterday's CVS) to add
support for \eqref.  I tested it in the 1.2.2 code, and it works like a
charm.  Please consider adding to to LyX.


Index: src/buffer.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v
retrieving revision 1.399
diff -a -u -r1.399 buffer.C
--- src/buffer.C        2003/01/23 16:23:36     1.399
+++ src/buffer.C        2003/01/31 16:34:45
@@ -1071,6 +1071,7 @@
                           || cmdName == "htmlurl") {
                        inset = new InsetUrl(inscmd);
                } else if (cmdName == "ref"
+                          || cmdName == "eqref"
                           || cmdName == "pageref"
                           || cmdName == "vref"
                           || cmdName == "vpageref"
Index: src/insets/insetref.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/insets/insetref.C,v
retrieving revision 1.55
diff -a -u -r1.55 insetref.C
--- src/insets/insetref.C       2002/11/27 10:30:25     1.55
+++ src/insets/insetref.C       2003/01/31 16:34:48
@@ -116,6 +116,7 @@
 
 InsetRef::type_info InsetRef::types[] = {
        { "ref",        N_("Standard"),                 N_("Ref: ")},
+       { "eqref",      N_("Equation"),                 N_("EqRef: ")},
        { "pageref",    N_("Page Number"),              N_("Page: ")},
        { "vpageref",   N_("Textual Page Number"),      N_("TextPage: ")},
        { "vref",       N_("Standard+Textual Page"),    N_("Ref+Text: ")},
Index: src/mathed/ref_inset.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/mathed/ref_inset.C,v
retrieving revision 1.10
diff -a -u -r1.10 ref_inset.C
--- src/mathed/ref_inset.C      2002/11/27 10:30:28     1.10
+++ src/mathed/ref_inset.C      2003/01/31 16:34:50
@@ -125,6 +125,7 @@
 
 RefInset::type_info RefInset::types[] = {
        { "ref",        N_("Standard"),                 N_("Ref: ")},
+       { "eqref",      N_("Equation"),         N_("EqRef: ")},
        { "pageref",    N_("Page Number"),              N_("Page: ")},
        { "vpageref",   N_("Textual Page Number"),      N_("TextPage: ")},
        { "vref",       N_("Standard+Textual Page"),    N_("Ref+Text: ")},


-- 
Kind regards,
+---------------------------------------------------------------+
| Bas Zoetekouw                  | Si l'on sait exactement ce   |
|--------------------------------| que l'on va faire, a quoi    |
| [EMAIL PROTECTED], [EMAIL PROTECTED]     | bon le faire?                |
| GPG key: 0644fab7              |               Pablo Picasso  |
+---------------------------------------------------------------+ 

Reply via email to