Skip to content

Commit

Permalink
Ignore case when check DOI in URL (discussion#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed May 13, 2024
1 parent fb1ae35 commit 5f0c592
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 42 deletions.
30 changes: 16 additions & 14 deletions thuthesis-author-year.bst
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,17 @@ FUNCTION {format.name}
{ bbl.et.al }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{ f{~}}" format.name$
{ t #1 "{vv~}{ll}" format.name$
uppercase.name
{ "u" change.case$ }
{ t #1 #1 substring$ "{" =
t #1 "{ff}" format.name$ empty$ not and
{ "\MakeUppercase{" swap$ * "}" * }
{ "u" change.case$ }
if$
}
'skip$
if$
t #1 "{, jj}" format.name$ *
t #1 "{ f{~}}{, jj}" format.name$ *
}
{ t #1 "{ll}{ff}" format.name$ }
if$
Expand Down Expand Up @@ -1314,7 +1319,7 @@ FUNCTION {extract.after.slash}

FUNCTION {format.year}
{ year empty$ not
{ year extract.before.slash extra.label * }
{ year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
Expand Down Expand Up @@ -1544,9 +1549,10 @@ FUNCTION {is.in.url}
{ #1 }
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
entry.url text.length$ 'charptr :=
{ entry.url charptr len substring$ s = not
{ s "l" change.case$ 's :=
s text.length$ 'len :=
entry.url "l" change.case$ text.length$ 'charptr :=
{ entry.url "l" change.case$ charptr len substring$ s = not
charptr #0 >
and
}
Expand Down Expand Up @@ -2073,7 +2079,7 @@ FUNCTION {map}

FUNCTION {manual} { monograph }

FUNCTION {thesis}
FUNCTION {mastersthesis}
{ "D" set.entry.mark
monograph
}
Expand All @@ -2088,9 +2094,7 @@ FUNCTION {online}
electronic
}

FUNCTION {mastersthesis} { thesis }

FUNCTION {phdthesis} { thesis }
FUNCTION {phdthesis} { mastersthesis }

FUNCTION {proceedings}
{ "C" set.entry.mark
Expand All @@ -2107,13 +2111,11 @@ FUNCTION {standard}
misc
}

FUNCTION {report}
FUNCTION {techreport}
{ "R" set.entry.mark
misc
}

FUNCTION {techreport} { report }

FUNCTION {unpublished} { misc }

FUNCTION {default.type} { misc }
Expand Down
30 changes: 16 additions & 14 deletions thuthesis-bachelor.bst
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,17 @@ FUNCTION {format.name}
{ bbl.et.al }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{ f{~}}" format.name$
{ t #1 "{vv~}{ll}" format.name$
uppercase.name
{ "u" change.case$ }
{ t #1 #1 substring$ "{" =
t #1 "{ff}" format.name$ empty$ not and
{ "\MakeUppercase{" swap$ * "}" * }
{ "u" change.case$ }
if$
}
'skip$
if$
t #1 "{, jj}" format.name$ *
t #1 "{ f{~}}{, jj}" format.name$ *
}
{ t #1 "{ll}{ff}" format.name$ }
if$
Expand Down Expand Up @@ -1304,7 +1309,7 @@ FUNCTION {extract.after.slash}

FUNCTION {format.year}
{ year empty$ not
{ year extract.before.slash extra.label * }
{ year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
Expand Down Expand Up @@ -1534,9 +1539,10 @@ FUNCTION {is.in.url}
{ #1 }
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
entry.url text.length$ 'charptr :=
{ entry.url charptr len substring$ s = not
{ s "l" change.case$ 's :=
s text.length$ 'len :=
entry.url "l" change.case$ text.length$ 'charptr :=
{ entry.url "l" change.case$ charptr len substring$ s = not
charptr #0 >
and
}
Expand Down Expand Up @@ -2063,7 +2069,7 @@ FUNCTION {map}

FUNCTION {manual} { monograph }

FUNCTION {thesis}
FUNCTION {mastersthesis}
{ "D" set.entry.mark
monograph
}
Expand All @@ -2078,9 +2084,7 @@ FUNCTION {online}
electronic
}

FUNCTION {mastersthesis} { thesis }

FUNCTION {phdthesis} { thesis }
FUNCTION {phdthesis} { mastersthesis }

FUNCTION {proceedings}
{ "C" set.entry.mark
Expand All @@ -2097,13 +2101,11 @@ FUNCTION {standard}
misc
}

FUNCTION {report}
FUNCTION {techreport}
{ "R" set.entry.mark
misc
}

FUNCTION {techreport} { report }

FUNCTION {unpublished} { misc }

FUNCTION {default.type} { misc }
Expand Down
30 changes: 16 additions & 14 deletions thuthesis-numeric.bst
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,17 @@ FUNCTION {format.name}
{ bbl.et.al }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{ f{~}}" format.name$
{ t #1 "{vv~}{ll}" format.name$
uppercase.name
{ "u" change.case$ }
{ t #1 #1 substring$ "{" =
t #1 "{ff}" format.name$ empty$ not and
{ "\MakeUppercase{" swap$ * "}" * }
{ "u" change.case$ }
if$
}
'skip$
if$
t #1 "{, jj}" format.name$ *
t #1 "{ f{~}}{, jj}" format.name$ *
}
{ t #1 "{ll}{ff}" format.name$ }
if$
Expand Down Expand Up @@ -1304,7 +1309,7 @@ FUNCTION {extract.after.slash}

FUNCTION {format.year}
{ year empty$ not
{ year extract.before.slash extra.label * }
{ year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
Expand Down Expand Up @@ -1534,9 +1539,10 @@ FUNCTION {is.in.url}
{ #1 }
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
entry.url text.length$ 'charptr :=
{ entry.url charptr len substring$ s = not
{ s "l" change.case$ 's :=
s text.length$ 'len :=
entry.url "l" change.case$ text.length$ 'charptr :=
{ entry.url "l" change.case$ charptr len substring$ s = not
charptr #0 >
and
}
Expand Down Expand Up @@ -2063,7 +2069,7 @@ FUNCTION {map}

FUNCTION {manual} { monograph }

FUNCTION {thesis}
FUNCTION {mastersthesis}
{ "D" set.entry.mark
monograph
}
Expand All @@ -2078,9 +2084,7 @@ FUNCTION {online}
electronic
}

FUNCTION {mastersthesis} { thesis }

FUNCTION {phdthesis} { thesis }
FUNCTION {phdthesis} { mastersthesis }

FUNCTION {proceedings}
{ "C" set.entry.mark
Expand All @@ -2097,13 +2101,11 @@ FUNCTION {standard}
misc
}

FUNCTION {report}
FUNCTION {techreport}
{ "R" set.entry.mark
misc
}

FUNCTION {techreport} { report }

FUNCTION {unpublished} { misc }

FUNCTION {default.type} { misc }
Expand Down

0 comments on commit 5f0c592

Please sign in to comment.