X-Git-Url: http://git.tpope.net/?p=latex-mlastyle.git;a=blobdiff_plain;f=mlastyle.bst;h=aedb136b362637b1805de6b10f6536865158633c;hp=f705a3204b04410f7726e8697ddb54c1eab3b85f;hb=57a9b3a1169fcca83e2e33c902021272bc02b499;hpb=eef31f94042320ee491a4346995ab2eecb13f4ab diff --git a/mlastyle.bst b/mlastyle.bst index f705a32..aedb136 100644 --- a/mlastyle.bst +++ b/mlastyle.bst @@ -1,4 +1,5 @@ -% BibTeX standard bibliography style `plain' +% BibTeX bibliography style `mlastyle' +% Based on BibTeX standard bibliography style `plain' % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. % Copyright (C) 1985, all rights reserved. % Copying of this file is authorized only if either @@ -40,7 +41,7 @@ ENTRY { author.duplicate author.shared } { label } -INTEGERS { output.state before.all mid.sentence after.sentence after.block after.title author.different author.last author.flast citen.used url.used } +INTEGERS { output.state before.all mid.sentence after.sentence after.block after.title author.different author.last author.flast citealp.used url.used } % Rearranged such that true values require capital letters FUNCTION {init.consts} @@ -55,7 +56,7 @@ FUNCTION {init.consts} #2 'author.flast := %#3 'author.firstlast := - #0 'citen.used := + #0 'citealp.used := #0 'url.used := } @@ -216,7 +217,7 @@ FUNCTION {field.or.null} FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } - { "{\em " swap$ * "}" * } + { "\emph{" swap$ * "}" * } if$ } @@ -620,7 +621,6 @@ FUNCTION {format.url} { accessdate " " * } if$ "$<$\url{" * url * "}$>$" * - url.used #1 + 'url.used := urlpath empty$ 'skip$ { do.period " Path: " * urlpath * } @@ -641,9 +641,8 @@ FUNCTION {format.article.crossref} %} %{ "In " key * } %if$ - pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ + pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * - citen.used #1 + 'citen.used := } FUNCTION {format.crossref.editor} @@ -688,9 +687,8 @@ FUNCTION {format.book.crossref} % } % { format.crossref.editor * } % if$ - pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ + pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * - citen.used #1 + 'citen.used := } FUNCTION {format.incoll.inproc.crossref} @@ -711,9 +709,8 @@ FUNCTION {format.incoll.inproc.crossref} % } % { "In " format.crossref.editor * } % if$ - pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ + pages empty$ { " \citealp" } { " \citealp[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * - citen.used #1 + 'citen.used := } FUNCTION {cite.title} @@ -765,21 +762,24 @@ FUNCTION {cite.label} { author } if$ duplicate$ empty$ - { pop$ cite.title } + { cite.title * "( \ \ \ \ \unskip\unskip\unskip\unskip\unskip \unskip)" * } { author.shared author.different = - { "{vv~}{ll}" format.names.custom } + { "{vv~}{ll}" format.names.custom 's := } { author.shared author.last = - { "{f.~}{vv~}{ll}{, jj}" format.names.custom } + { "{f.~}{vv~}{ll}{, jj}" format.names.custom 's := } { author.shared author.flast = - { "{ff~}{vv~}{ll}{, jj}" format.names.custom } - { "{vv~}{ll}" format.names.custom ", " * cite.title * } + { "{ff~}{vv~}{ll}{, jj}" format.names.custom 's := } + { "{vv~}{ll}" format.names.custom ", " * cite.title * 's := "WTF" warning$ } if$ } if$ } if$ - author.duplicate { ", " * cite.title * }{} if$ + s + "( \ \ \ \ \unskip\unskip\unskip\unskip\unskip " * + author.duplicate { cite.title * }{ "\unskip" * } if$ + ")" * s * } if$ %} @@ -1369,6 +1369,8 @@ FUNCTION {init.vars} FUNCTION {forward.author.dup.check} { + url empty$ 'skip$ { url.used #1 + 'url.used := } if$ + crossref empty$ 'skip$ { citealp.used #1 + 'citealp.used := } if$ author empty$ { editor empty$ { organization field.or.null 'a := }{ editor 'a :=} if$} { author 'a := } @@ -1462,8 +1464,8 @@ REVERSE {reverse.author} FUNCTION {begin.bib} { - citen.used - { "\ifx\undefined\citeN\let\citeN\cite\fi" write$ newline$ } + citealp.used + { "\ifx\undefined\citealp\let\citealp\cite\fi" write$ newline$ } 'skip$ if$ url.used