-% 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
type
volume
year
+ % New fields
+ url
+ accessdate
+ urlpath
+ version
}
{ author.duplicate author.shared }
{ label }
-INTEGERS { output.state before.all mid.sentence after.sentence after.block after.title author.different author.last author.flast }
+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}
#1 'author.last :=
#2 'author.flast :=
%#3 'author.firstlast :=
+
+ #0 'citealp.used :=
+ #0 'url.used :=
}
STRINGS { s t u } % Added u
FUNCTION {emphasize}
{ duplicate$ empty$
{ pop$ "" }
- { "{\em " swap$ * "}" * }
+ { "\emph{" swap$ * "}" * }
if$
}
}
{ month empty$
'year
- { month " " * year * }
+ { month "~" * year * }
if$
}
if$
% Changed edition to MLA abbreviation
FUNCTION {format.edition}
{ edition empty$
- { "" }
+ { version empty$
+ { "" }
+ { "Vers.~" version *}
+ if$
+ }
{ edition "l" change.case$ 's := edition 't :=
- "" "9th" "ninth" "8th" "eighth" "7th" "seventh" "6th" "sixth" "5th" "fifth" "4th" "fourth" "3rd" "third" "2nd" "second" "1st" "first"
+ ""
+ "10th" "tenth" "9th" "ninth" "8th" "eighth" "7th" "seventh" "6th" "sixth"
+ "5th" "fifth" "4th" "fourth" "3rd" "third" "2nd" "second" "1st" "first"
{duplicate$ empty$ { pop$ #0 }{ #1 } if$ }{ s = { 't := }{ pop$ } if$ }
while$
-% output.state mid.sentence =
-% { edition "l" change.case$ " ed." * }
-% { edition "t" change.case$ " ed." * }
-% if$
- t " ed." *
+ t " ed." *
+ "edition and version" version either.or.check
}
if$
}
if$
}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { accessdate empty$
+ { "There's a url but no accessdate in " cite$ * warning$ "" }
+ { accessdate " " * }
+ if$
+ "$<$\url{" * url * "}$>$" *
+ urlpath empty$
+ 'skip$
+ { do.period " Path: " * urlpath * }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.article.crossref}
{ %key empty$
%{ journal empty$
%}
%{ "In " key * }
%if$
- pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$
+ pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
"{" * crossref * "}" *
}
% }
% { format.crossref.editor * }
% if$
- %" \citeN{" * crossref * "}" *
- pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$
+ pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
"{" * crossref * "}" *
}
% }
% { "In " format.crossref.editor * }
% if$
-% " \citeN{" * crossref * "}" *
- pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$
+ pages empty$ { "\citealp" } { "\citealp[" format.chapter.pages * "]" * } if$
"{" * crossref * "}" *
}
{ author }
if$
duplicate$ empty$
- { pop$ cite.title }
- {
+ { cite.title * "( \ \ \ \ \unskip\unskip\unskip\unskip\unskip \unskip)" * }
+ { duplicate$
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$
+ ")" * swap$ "{ff~}{vv~}{ll}{, jj}" format.names.custom *
}
if$
%}
}
if$
new.block
+ format.url output
+ new.block
note output
fin.entry
}
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
}
if$
new.block
+ format.url output
+ new.block
note output
fin.entry
}
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
format.book.crossref output.nonnull
}
if$
+ new.block
+ format.url output
note output
fin.entry
}
}
if$
new.block
+ format.url output
+ new.block
note output
fin.entry
}
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
}
if$
new.block
+ format.url output
+ new.block
note output
fin.entry
}
if$
new.block
format.btitle "title" output.check
- new.sentence
+ new.block
format.edition output
new.sentence
author empty$
if$
format.date output
new.block
+ format.url output
+ new.block
note output
fin.entry
}
address output
format.date "year" output.check
new.block
+ format.url output
+ new.block
note output
fin.entry
}
{ output.bibitem
format.authors output
title howpublished new.block.checkb
- format.title output after.sentence 'output.state :=
- howpublished new.block.checka
+ format.title output
+ new.block
+ %howpublished new.block.checka
howpublished output
format.date output
new.block
+ format.url output
+ new.block
note output
fin.entry
empty.misc.check
address output
format.date "year" output.check
new.block
+ format.url output
+ new.block
note output
fin.entry
}
}
if$
new.block
+ format.url output
+ new.block
note output
fin.entry
}
new.block
format.title "title" output.check
new.block
+ format.url output
+ new.block
note "note" output.check
format.date output
fin.entry
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 := }
%ITERATE {longest.label.pass}
FUNCTION {begin.bib}
-{ preamble$ empty$
+{
+ citealp.used
+ { "\expandafter\ifx\csname citealp\endcsname\relax\let\citealp\cite\fi"
+ write$ newline$ }
+ 'skip$
+ if$
+ url.used
+ { "\expandafter\ifx\csname citealp\endcsname\relax\url\let\url\relax\fi"
+ write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
"\begin{thebibliography}{\rule{.5in}{0pt}}" write$ newline$
- "\ifx\undefined\citeN\let\citeN\cite\fi" write$ newline$
}
EXECUTE {begin.bib}