From 95661f73533bf863c45eaf64f9d3eb66373b3a85 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 19 Nov 2003 08:07:49 +0000 Subject: [PATCH] Switched to csname for macro redefinition detection Full name after "year" in citation key New blocks for editor and edition --- mlastyle.bst | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/mlastyle.bst b/mlastyle.bst index aedb136..e2b446a 100644 --- a/mlastyle.bst +++ b/mlastyle.bst @@ -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$ -- 2.30.2