diff --git a/thuthesis-author-year.bst b/thuthesis-author-year.bst index 93540a2e..c89756de 100644 --- a/thuthesis-author-year.bst +++ b/thuthesis-author-year.bst @@ -1499,7 +1499,7 @@ FUNCTION {format.periodical.year.volume.number} FUNCTION {check.url} { url empty$ not - { "\url{" url * "}" * 'entry.url := + { url 'entry.url := #1 'entry.is.electronic := } { howpublished empty$ not @@ -1530,7 +1530,11 @@ FUNCTION {output.url} { show.url is.pure.electronic or entry.url empty$ not and { new.block - entry.url output + entry.url #1 #4 substring$ "\url{" = + { entry.url } + { "\url{" entry.url * "}" * } + if$ + output } 'skip$ if$ @@ -1549,10 +1553,9 @@ FUNCTION {is.in.url} { #1 } { entry.url empty$ { #0 } - { s "l" change.case$ 's := - s text.length$ 'len := + { s text.length$ 'len := entry.url "l" change.case$ text.length$ 'charptr := - { entry.url "l" change.case$ charptr len substring$ s = not + { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not charptr #0 > and } diff --git a/thuthesis-bachelor.bst b/thuthesis-bachelor.bst index 7a3dd617..89621b54 100644 --- a/thuthesis-bachelor.bst +++ b/thuthesis-bachelor.bst @@ -1489,7 +1489,7 @@ FUNCTION {format.periodical.year.volume.number} FUNCTION {check.url} { url empty$ not - { "\url{" url * "}" * 'entry.url := + { url 'entry.url := #1 'entry.is.electronic := } { howpublished empty$ not @@ -1520,7 +1520,11 @@ FUNCTION {output.url} { show.url is.pure.electronic or entry.url empty$ not and { new.block - entry.url output + entry.url #1 #4 substring$ "\url{" = + { entry.url } + { "\url{" entry.url * "}" * } + if$ + output } 'skip$ if$ @@ -1539,10 +1543,9 @@ FUNCTION {is.in.url} { #1 } { entry.url empty$ { #0 } - { s "l" change.case$ 's := - s text.length$ 'len := + { s text.length$ 'len := entry.url "l" change.case$ text.length$ 'charptr := - { entry.url "l" change.case$ charptr len substring$ s = not + { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not charptr #0 > and } diff --git a/thuthesis-numeric.bst b/thuthesis-numeric.bst index 81f7a5f3..83329640a 100644 --- a/thuthesis-numeric.bst +++ b/thuthesis-numeric.bst @@ -1489,7 +1489,7 @@ FUNCTION {format.periodical.year.volume.number} FUNCTION {check.url} { url empty$ not - { "\url{" url * "}" * 'entry.url := + { url 'entry.url := #1 'entry.is.electronic := } { howpublished empty$ not @@ -1520,7 +1520,11 @@ FUNCTION {output.url} { show.url is.pure.electronic or entry.url empty$ not and { new.block - entry.url output + entry.url #1 #4 substring$ "\url{" = + { entry.url } + { "\url{" entry.url * "}" * } + if$ + output } 'skip$ if$ @@ -1539,10 +1543,9 @@ FUNCTION {is.in.url} { #1 } { entry.url empty$ { #0 } - { s "l" change.case$ 's := - s text.length$ 'len := + { s text.length$ 'len := entry.url "l" change.case$ text.length$ 'charptr := - { entry.url "l" change.case$ charptr len substring$ s = not + { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not charptr #0 > and }