From eef31f94042320ee491a4346995ab2eecb13f4ab Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 16 Nov 2003 20:03:03 +0000 Subject: [PATCH] Added call to \url{} Added citen.used and url.used --- mlastyle.bst | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/mlastyle.bst b/mlastyle.bst index f74f8fd..f705a32 100644 --- a/mlastyle.bst +++ b/mlastyle.bst @@ -40,7 +40,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 } +INTEGERS { output.state before.all mid.sentence after.sentence after.block after.title author.different author.last author.flast citen.used url.used } % Rearranged such that true values require capital letters FUNCTION {init.consts} @@ -54,6 +54,9 @@ FUNCTION {init.consts} #1 'author.last := #2 'author.flast := %#3 'author.firstlast := + + #0 'citen.used := + #0 'url.used := } STRINGS { s t u } % Added u @@ -616,7 +619,8 @@ FUNCTION {format.url} { "There's a url but no accessdate in " cite$ * warning$ "" } { accessdate " " * } if$ - "$<$" * url * "$>$" * + "$<$\url{" * url * "}$>$" * + url.used #1 + 'url.used := urlpath empty$ 'skip$ { do.period " Path: " * urlpath * } @@ -639,6 +643,7 @@ FUNCTION {format.article.crossref} %if$ pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * + citen.used #1 + 'citen.used := } FUNCTION {format.crossref.editor} @@ -683,9 +688,9 @@ FUNCTION {format.book.crossref} % } % { format.crossref.editor * } % if$ - %" \citeN{" * crossref * "}" * pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * + citen.used #1 + 'citen.used := } FUNCTION {format.incoll.inproc.crossref} @@ -706,9 +711,9 @@ FUNCTION {format.incoll.inproc.crossref} % } % { "In " format.crossref.editor * } % if$ -% " \citeN{" * crossref * "}" * pages empty$ { " \citeN" } { " \citeN[" format.chapter.pages * "]" * } if$ "{" * crossref * "}" * + citen.used #1 + 'citen.used := } FUNCTION {cite.title} @@ -1456,12 +1461,20 @@ REVERSE {reverse.author} %ITERATE {longest.label.pass} FUNCTION {begin.bib} -{ preamble$ empty$ +{ + citen.used + { "\ifx\undefined\citeN\let\citeN\cite\fi" write$ newline$ } + 'skip$ + if$ + url.used + { "\ifx\undefined\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} -- 2.30.2