Switched to csname for macro redefinition detection
authorTim Pope <code@tpope.net>
Wed, 19 Nov 2003 08:07:49 +0000 (08:07 +0000)
committerTim Pope <code@tpope.net>
Wed, 19 Nov 2003 08:07:49 +0000 (08:07 +0000)
Full name after "year" in citation key
New blocks for editor and edition

mlastyle.bst

index aedb136b362637b1805de6b10f6536865158633c..e2b446ac786928c92f6416b22aec299feea2ed74 100644 (file)
@@ -641,7 +641,7 @@ FUNCTION {format.article.crossref}
     %}
     %{ "In " key * }
   %if$
-  pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$
+  pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
   "{" * crossref * "}" *
 }
 
@@ -687,7 +687,7 @@ FUNCTION {format.book.crossref}
 %    }
 %    { format.crossref.editor * }
 %  if$
-  pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$
+  pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
   "{" * crossref * "}" *
 }
 
@@ -709,7 +709,7 @@ FUNCTION {format.incoll.inproc.crossref}
 %    }
 %    { "In " format.crossref.editor * }
 %  if$
-  pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$
+  pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
   "{" * crossref * "}" *
 }
 
@@ -763,7 +763,7 @@ FUNCTION {cite.label}
   if$
   duplicate$ empty$
     { cite.title * "( \ \ \ \ \unskip\unskip\unskip\unskip\unskip \unskip)" * }
-    {
+    { duplicate$
       author.shared author.different =
        { "{vv~}{ll}" format.names.custom 's := }
        { author.shared author.last =
@@ -779,7 +779,7 @@ FUNCTION {cite.label}
       s
       "( \ \ \ \ \unskip\unskip\unskip\unskip\unskip " *
       author.duplicate { cite.title * }{ "\unskip" * } if$
-      ")" * s *
+      ")" * swap$ "{ff~}{vv~}{ll}{, jj}" format.names.custom *
     }
   if$
       %}
@@ -833,9 +833,9 @@ FUNCTION {book}
   if$
   new.block
   format.btitle "title" output.check
-  new.sentence
+  new.block
   crossref missing$
-    { author empty$ 'skip$ { format.editors.mid output new.sentence } if$
+    { author empty$ 'skip$ { format.editors.mid output new.block } if$
       format.edition output
       new.sentence
       format.bvolume.or.num.series output
@@ -879,7 +879,7 @@ FUNCTION {inbook}
   format.btitle "title" output.check
   new.block
   crossref missing$
-    { author empty$ 'skip$ { format.editors.mid output new.sentence } if$
+    { author empty$ 'skip$ { format.editors.mid output new.block } if$
       format.edition output
       new.sentence
       format.bvolume.or.num.series output
@@ -949,7 +949,7 @@ FUNCTION {inproceedings}
       booktitle "booktitle" output.check
       new.sentence
       format.editors.mid output
-      new.sentence
+      new.block
       format.edition output
       new.sentence
       format.bvolume.or.num.series output
@@ -1001,7 +1001,7 @@ FUNCTION {manual}
   if$
   new.block
   format.btitle "title" output.check
-  new.sentence
+  new.block
   format.edition output
   new.sentence
   author empty$
@@ -1465,11 +1465,13 @@ REVERSE {reverse.author}
 FUNCTION {begin.bib}
 {
   citealp.used
-    { "\ifx\undefined\citealp\let\citealp\cite\fi" write$ newline$ }
+    { "\expandafter\ifx\csname citealp\endcsname\relax\let\citealp\cite\fi"
+      write$ newline$ }
     'skip$
   if$
   url.used
-    { "\ifx\undefined\url\let\url\relax\fi" write$ newline$ }
+    { "\expandafter\ifx\csname citealp\endcsname\relax\url\let\url\relax\fi"
+      write$ newline$ }
     'skip$
   if$
   preamble$ empty$