On Tuesday 14 May 2002 10:25 am, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | Is there any reason why my insetcite patch, now tested by several people,
> | isn't included in your list?
>
> send it again.
Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.413
diff -u -p -r1.413 ChangeLog
--- src/insets/ChangeLog	7 May 2002 10:02:02 -0000	1.413
+++ src/insets/ChangeLog	9 May 2002 13:19:32 -0000
@@ -1,3 +1,8 @@
+2002-05-09  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* Insetcite.C (getNatbibLabel): don't disable natbib label support
+	when using options "Full author list" or "Upper case".
+
 2002-05-04  Herbert Voss  <[EMAIL PROTECTED]>
 
 	* InsetgraphicsParams.C (read): fix bug with WH
Index: src/insets/insetcite.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcite.C,v
retrieving revision 1.31
diff -u -p -r1.31 insetcite.C
--- src/insets/insetcite.C	24 Apr 2002 10:00:39 -0000	1.31
+++ src/insets/insetcite.C	9 May 2002 13:19:32 -0000
@@ -88,6 +88,14 @@ string const getNatbibLabel(Buffer const
 	// CITEYEAR:	year
 	// CITEYEARPAR:	(year)
 
+	// We don't currently use the full or forceUCase fields.
+	// bool const forceUCase = citeType[0] == 'C';
+	bool const full = citeType[citeType.size()-1] == '*';
+
+	string const cite_type = full ?
+		lowercase(citeType.substr(0,citeType.size()-1)) :
+		lowercase(citeType);
+	
 	string before_str;
 	if (!before.empty()) {
 		// In CITET and CITEALT mode, the "before" string is
@@ -95,11 +103,11 @@ string const getNatbibLabel(Buffer const
 		// In CITEP, CITEALP and CITEYEARPAR mode, it is attached
 		// to the front of the whole only.
 		// In other modes, it is not used at all.
-		if (citeType == "citet" ||
-		    citeType == "citealt" ||
-		    citeType == "citep" ||
-		    citeType == "citealp" || 
-		    citeType == "citeyearpar")
+		if (cite_type == "citet" ||
+		    cite_type == "citealt" ||
+		    cite_type == "citep" ||
+		    cite_type == "citealp" || 
+		    cite_type == "citeyearpar")
 			before_str = before + ' ';
 	}
 
@@ -133,14 +141,14 @@ string const getNatbibLabel(Buffer const
 
 		// (authors1 (<before> year);  ... ;
 		//  authors_last (<before> year, <after>)
-		if (citeType == "citet") {
+		if (cite_type == "citet") {
 			string const tmp = numerical ? '#' + *it : year;
 			label += author + op_str + before_str + tmp +
 				cp + sep_str;
 
 		// author, year; author, year; ...
-		} else if (citeType == "citep" ||
-			   citeType == "citealp") {
+		} else if (cite_type == "citep" ||
+			   cite_type == "citealp") {
 			if (numerical) {
 				label += *it + sep_str;
 			} else {
@@ -149,42 +157,42 @@ string const getNatbibLabel(Buffer const
 
 		// (authors1 <before> year;
 		//  authors_last <before> year, <after>)
-		} else if (citeType == "citealt") {
+		} else if (cite_type == "citealt") {
 			string const tmp = numerical ? '#' + *it : year;
 			label += author + ' ' + before_str + tmp + sep_str;
 
 		// author; author; ...
-		} else if (citeType == "citeauthor") {
+		} else if (cite_type == "citeauthor") {
 			label += author + sep_str;
 
 		// year; year; ...
-		} else if (citeType == "citeyear" ||
-			   citeType == "citeyearpar") {
+		} else if (cite_type == "citeyear" ||
+			   cite_type == "citeyearpar") {
 			label += year + sep_str;
 		}
 	}
 	label = strip(strip(label), sep);
 
 	if (!after_str.empty()) {
-		if (citeType == "citet") {
+		if (cite_type == "citet") {
 			// insert "after" before last ')'
 			label.insert(label.size()-1, after_str);
 		} else {
 			bool const add = !(numerical &&
-					   (citeType == "citeauthor" ||
-					    citeType == "citeyear"));
+					   (cite_type == "citeauthor" ||
+					    cite_type == "citeyear"));
 			if (add)
 				label += after_str;
 		}
 	}
 
-	if (!before_str.empty() && (citeType == "citep" ||
-				    citeType == "citealp" || 
-				    citeType == "citeyearpar")) {
+	if (!before_str.empty() && (cite_type == "citep" ||
+				    cite_type == "citealp" || 
+				    cite_type == "citeyearpar")) {
 		label = before_str + label;
 	}
 
-	if (citeType == "citep" || citeType == "citeyearpar")
+	if (cite_type == "citep" || cite_type == "citeyearpar")
 		label = string(1, op) + label + string(1, cp);
 
 	return label;


Reply via email to