Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#862 closed enhancement (fixed)

support for eqref

Reported by: bas@… Owned by: levon
Priority: high Milestone:
Component: frontend-qt2 Version: 1.3.0cvs
Severity: minor Keywords: patch VERIFIED
Cc: leeming@…, poenitz@…

Description

This patch add support for \eqref to lyx. It would be nice if eqref would be te
defualt when crossreferencing to equations, but I haven't figured out how to do
that.

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: ")},

Change History (10)

comment:1 by levon, 21 years ago

Keywords: patch added
Owner: changed from Lars Gullik Bjønnes to bas@…

comment:2 by levon, 21 years ago

Cc: leeming@… poenitz@… added

Well, this one slipped through the cracks :(

Angus, or Andre, can you please look at this patch ?

comment:4 by bas@…, 21 years ago

Component: generalfrontend-qt2
Resolution: fixed
Status: closedreopened

The qt frontend doesn't seem to have eqref support yet. I'll attach a patch
that fixes it.

comment:5 by bas@…, 21 years ago

For some reason I'm not able to create a new attachment, so I'll just put the
patch inline:

--- lyx/src/frontends/qt2/ui/QRefDialogBase.ui.orig Wed Jun 18 15:24:39 2003
+++ lyx/src/frontends/qt2/ui/QRefDialogBase.ui Wed Jun 18 15:26:56 2003
@@ -128,6 +128,12 @@

<item>

<property>

<name>text</name>

+ <string>(&lt;reference&gt;)</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>

<string>&lt;page&gt;</string>

</property>

</item>

comment:6 by levon, 21 years ago

why does qt need a change when xforms didn't ?

comment:7 by bas@…, 21 years ago

The xforms interface gets its information on what types of refs are available,
from insetref.h. From /src/frontends/xforms/FormRef.C:

46 for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i)
47 fl_addto_choice(dialog_->choice_format,
48 _(InsetRef::types[i].gui_name.c_str()));

The QT interface OTOH has static format types defined in the QRefDialogBase ui file.

comment:8 by levon, 21 years ago

Owner: changed from bas@… to levon
Status: reopenednew

gah, I dropped the ball again. Can you please send the patch to
levon@… ? Thanks.

comment:9 by levon, 21 years ago

Resolution: fixed
Status: newclosed

Applied finally. Thanks.

comment:10 by michael.gerz@…, 21 years ago

Keywords: VERIFIED added

Verified.

Note: See TracTickets for help on using tickets.