summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-19 00:05:45 +0000
committerKarl Berry <karl@freefriends.org>2017-12-19 00:05:45 +0000
commitd2ce88d73b5923b144961ab22dbb9198bcc761ce (patch)
tree5792553e857b12a7147f733961935b700c7619fe /Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
parent6c0eec58b554bd6c0964707a3b464f45468edc69 (diff)
thuthesis (18dec17)
git-svn-id: svn://tug.org/texlive/trunk@46093 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst331
1 files changed, 185 insertions, 146 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
index 9f1c7eaa6c9..8d9428f3ec0 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
@@ -1,23 +1,32 @@
-%% Copyright (C) 2016-2017 by Zeping Lee <zepinglee AT gmail.com>
%%
+%% This is file `gbt-7714-2015-author-year.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gbt-7714-2015.dtx (with options: `authoryear')
+%%
+%% Copyright (C) 2016-2017 by Zeping Lee <zepinglee AT gmail.com>
+%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.2 of this license or (at your option) any later
%% version. The latest version of this license is in:
-%%
+%%
%% http://www.latex-project.org/lppl.txt
-%%
+%%
%% and version 1.2 or later is part of all distributions of
%% LaTeX version 1999/12/01 or later.
-%%
+%%
%% This BibTeX style file is derived from `plainnat.bst' by Patrick W Daly,
%% which was designed for use with the `natbib.sty' package.
-%%
+%%
ENTRY
{ address
author
booktitle
chapter
+ date
doi
eid
edition
@@ -48,12 +57,12 @@ ENTRY
volume
year
}
- { lang }
- { mark_ label extra.label sort.label short.list }
+ { entry.lang }
+ { label extra.label sort.label short.list entry.mark }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
-INTEGERS { lang.zh lang.ja lang.en lang.ru lang.default }
+INTEGERS { lang.zh lang.ja lang.en lang.ru }
INTEGERS { charptr stringlength }
@@ -63,11 +72,10 @@ FUNCTION {init.state.consts}
#2 'after.sentence :=
#3 'after.block :=
#4 'after.slash :=
- #4 'lang.zh :=
- #5 'lang.ja :=
- #1 'lang.en :=
- #3 'lang.ru :=
- #0 'lang.default :=
+ #2 'lang.zh :=
+ #3 'lang.ja :=
+ #0 'lang.en :=
+ #1 'lang.ru :=
}
STRINGS { s t }
@@ -279,8 +287,59 @@ FUNCTION {emphasize}
if$
}
+INTEGERS { ascii }
+
+FUNCTION {get.char.lang}
+{ chr.to.int$ 'ascii :=
+ ascii #227 > ascii #234 < and
+ { lang.zh }
+ { ascii #227 =
+ { lang.ja }
+ { ascii #207 > ascii #212 < and
+ { lang.ru }
+ { lang.en }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { char.lang lang }
+
+STRINGS { tmp.str }
+
+FUNCTION {get.str.lang}
+{ 'tmp.str :=
+ lang.en 'lang :=
+ tmp.str empty$
+ { "Empty string!" warning$ }
+ { #1 'charptr :=
+ tmp.str text.length$ #1 + 'stringlength :=
+ { charptr stringlength < }
+ { tmp.str charptr #1 substring$ get.char.lang 'char.lang :=
+ char.lang lang >
+ { char.lang 'lang := }
+ 'skip$
+ if$
+
+ char.lang lang.zh = char.lang lang.ja = or
+ { charptr #3 + 'charptr := }
+ { char.lang lang.ru =
+ { charptr #2 + 'charptr := }
+ { charptr #1 + 'charptr := }
+ if$
+ }
+ if$
+ }
+ while$
+ }
+ if$
+ lang
+}
+
FUNCTION {is.in.chinese}
-{ lang lang.zh =
+{ entry.lang lang.zh =
}
FUNCTION {format.et.al}
@@ -297,7 +356,7 @@ FUNCTION {format.anonymous}
if$
}
-INTEGERS { nameptr namesleft numnames }
+INTEGERS { nameptr namesleft numnames name.lang}
FUNCTION {format.names}
{ 's :=
@@ -305,9 +364,12 @@ FUNCTION {format.names}
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > nameptr #4 < and }
- { s nameptr "{vv~}{ll}{ f{ }}" format.name$
- s nameptr "{, jj}" format.name$ *
- 't :=
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{ f{~}}{, jj}" format.name$ 't := }
+ { t #1 "{ll}{ff}" format.name$ 't := }
+ if$
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
@@ -374,8 +436,31 @@ FUNCTION {format.url}
if$
}
+FUNCTION {is.doi.in.url}
+{ url empty$
+ { #0 }
+ { doi text.length$ 'stringlength :=
+ url text.length$ 'charptr :=
+ { url charptr stringlength substring$ doi = not
+ charptr #0 >
+ and
+ }
+ { charptr #1 - 'charptr := }
+ while$
+ charptr
+ }
+ if$
+}
+
FUNCTION {format.doi}
-{ ""
+{ doi empty$
+ { "" }
+ { is.doi.in.url
+ { "" }
+ { new.block "\doi{" doi * "}" * }
+ if$
+ }
+ if$
}
FUNCTION {format.title}
@@ -386,16 +471,16 @@ FUNCTION {format.title}
}
FUNCTION {set.mark}
-{ mark_ empty$ not
+{ entry.mark empty$ not
'pop$
{ mark empty$ not
- { pop$ mark 'mark_ := }
- { 'mark_ := }
+ { pop$ mark 'entry.mark := }
+ { 'entry.mark := }
if$
media empty$ not
- { mark_ "/" * media * 'mark_ := }
+ { entry.mark "/" * media * 'entry.mark := }
{ url empty$ not
- { mark_ "/OL" * 'mark_ := }
+ { entry.mark "/OL" * 'entry.mark := }
'skip$
if$
}
@@ -405,7 +490,7 @@ FUNCTION {set.mark}
}
FUNCTION {format.mark}
-{ "\allowbreak[" mark_ * "]" * }
+{ "\allowbreak[" entry.mark * "]" * }
FUNCTION {format.full.names}
{'s :=
@@ -413,8 +498,12 @@ FUNCTION {format.full.names}
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
- { s nameptr
- "{vv~}{ll}" format.name$ 't :=
+ { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$ 't := }
+ { t #1 "{ll}{ff}" format.name$ 't := }
+ if$
nameptr #1 >
{
namesleft #1 >
@@ -519,15 +608,6 @@ FUNCTION {n.dashify}
while$
}
-FUNCTION {format.date}
-{ year duplicate$ empty$
- { "empty year in " cite$ * warning$
- pop$ "" }
- 'skip$
- if$
- extra.label *
-}
-
FUNCTION {extract.before.dash}
{ duplicate$ empty$
{ pop$ "" }
@@ -585,28 +665,40 @@ FUNCTION {contains.dash}
FUNCTION {format.year}
{ year empty$ not
- { year }
- { urldate empty$ not
- { "[" urldate extract.before.dash * "]" * }
- { "empty year in " cite$ * warning$ "" }
+ { year extract.before.dash }
+ { date empty$ not
+ { date extract.before.dash }
+ { "empty year in " cite$ * warning$
+ ""
+ }
if$
}
if$
- extract.before.dash
extra.label *
}
+FUNCTION {format.date}
+{ type$ "patent" = type$ "newspaper" = or
+ date empty$ not and
+ { date }
+ { year }
+ if$
+}
+
FUNCTION {format.editdate}
-{ year contains.dash
- { "\allowbreak(" year * ")" * }
+{ date empty$ not
+ type$ "newspaper" = not and
+ url empty$ not doi empty$ not or
+ and
+ { "\allowbreak(" date * ")" * }
{ "" }
if$
}
FUNCTION {format.urldate}
-{ urldate empty$
- { "" }
+{ urldate empty$ not
{ "\allowbreak[" urldate * "]" * }
+ { "" }
if$
}
@@ -681,7 +773,7 @@ FUNCTION {format.number}
{ "" }
{ number is.number
{ is.in.chinese
- { "第" volume * "册" * }
+ { "第" number * "册" * }
{ "number" number tie.or.space.connect }
if$
}
@@ -699,49 +791,36 @@ FUNCTION {format.volume.number}
}
FUNCTION {format.series.vol.num.title}
-{ type$ "report" = type$ "standard" = or
- { format.title
- number empty$ not
- { ": " * number }
+{ format.volume.number 's :=
+ series empty$ not
+ { series ": " *
+ s empty$ not
+ { s * "\quad " * }
'skip$
if$
+ title *
}
- { format.volume.number 's :=
- series empty$ not
- { series ": " *
- s empty$ not
- { s * "\quad " * }
- 'skip$
- if$
- title field.or.null *
- }
- { title field.or.null
- s empty$ not
- { ": " * s * }
- 'skip$
- if$
- }
+ { title
+ s empty$ not
+ { ": " * s * }
+ 'skip$
if$
- "t" change.case$
}
if$
+ "t" change.case$
}
FUNCTION {format.series.vol.num.booktitle}
-{ type$ "report" = type$ "standard" = or
- { format.volume.number }
- { format.volume }
- if$
- 's :=
+{ format.volume.number 's :=
series empty$ not
{ series ": " *
s empty$ not
{ s * "\quad " * }
'skip$
if$
- booktitle field.or.null *
+ booktitle *
}
- { booktitle field.or.null
+ { booktitle
s empty$ not
{ ": " * s * }
'skip$
@@ -776,12 +855,16 @@ FUNCTION {format.edition}
{ edition num.to.ordinal " ed." * }
if$
}
- { edition "t" change.case$ 's :=
- s "Revised" = s "Revised edition" = or
- { "Rev. ed." }
- { s " ed." * }
+ { entry.lang lang.en =
+ { edition "t" change.case$ 's :=
+ s "Revised" = s "Revised edition" = or
+ { "Rev. ed." }
+ { s " ed." *}
+ if$
+ }
+ { edition }
if$
- }
+ }
if$
}
if$
@@ -1091,6 +1174,7 @@ FUNCTION {article.in.journal}
volume output
format.journal.number "" output.after
format.pages punct.colon output.after
+ format.editdate "" output.after
format.urldate "" output.after
format.url output
format.doi output
@@ -1306,61 +1390,18 @@ READ
EXECUTE {init.state.consts}
-INTEGERS { ascii }
-
-FUNCTION {char.lang}
-{ chr.to.int$ 'ascii :=
- ascii #31 > ascii #128 < and
- { lang.en }
- { ascii #227 > ascii #234 < and
- { lang.zh }
- { ascii #227 =
- { lang.ja }
- { ascii #207 > ascii #212 < and
- { lang.ru }
- { lang.default }
- if$
- }
- if$
- }
- if$
- }
- if$
-}
-
-FUNCTION {set.language}
+FUNCTION {set.entry.lang}
{ language empty$
- { lang.default 'lang :=
- author field.or.null title field.or.null * 's :=
- s empty$
- 'skip$
- { #1 'charptr :=
- s text.length$ #1 + 'stringlength :=
- { charptr stringlength < }
- { s charptr #1 substring$ char.lang
- duplicate$ #3 >
- { charptr #2 + 'charptr := }
- 'skip$
- if$
- duplicate$ lang >
- { 'lang := }
- 'pop$
- if$
- charptr #1 + 'charptr :=
- }
- while$
- }
- if$
- }
- { language "en" =
+ { author field.or.null title field.or.null * get.str.lang }
+ { language "english" =
{ lang.en }
- { language "zh" =
+ { language "chinese" =
{ lang.zh }
- { language "ja" =
+ { language "japanese" =
{ lang.ja }
- { language "ru" =
+ { language "russian" =
{ lang.ru }
- { lang.default }
+ { lang.en }
if$
}
if$
@@ -1368,9 +1409,9 @@ FUNCTION {set.language}
if$
}
if$
- 'lang :=
}
if$
+ 'entry.lang :=
}
FUNCTION {sortify}
@@ -1391,7 +1432,12 @@ FUNCTION {chop.word}
FUNCTION {format.lab.names}
{ 's :=
- s #1 "{vv~}{ll}" format.name$
+ s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}" format.name$}
+ { t #1 "{ll}{ff}" format.name$}
+ if$
s num.names$ #1 >
{ "\ " * format.et.al * }
'skip$
@@ -1479,15 +1525,10 @@ FUNCTION {calc.label}
short.list
"("
*
- year duplicate$ empty$
+ format.year extract.before.dash duplicate$ empty$
short.list key field.or.null = or
- { pop$
- urldate empty$ not
- { "[" urldate extract.before.dash * "]" * }
- { "" }
- if$
- }
- 'extract.before.dash
+ { pop$ "" }
+ 'skip$
if$
*
'label :=
@@ -1621,7 +1662,7 @@ FUNCTION {editor.organization.sort}
}
FUNCTION {presort}
-{ set.language
+{ set.entry.lang
calc.label
label sortify
" "
@@ -1721,19 +1762,17 @@ FUNCTION {begin.bib}
if$
"\begin{thebibliography}{" number.label int.to.str$ * "}" *
write$ newline$
- "\bibpunct{(}{)}{;}{a}{,}{,}"
- write$ newline$
"\providecommand{\natexlab}[1]{#1}"
write$ newline$
- "\providecommand{\url}[1]{\texttt{#1}}"
+ "\providecommand{\url}[1]{#1}"
write$ newline$
- "\expandafter\ifx\csname thumasterbib\endcsname\relax"
+ "\providecommand{\href}[2]{\url{#2}}"
write$ newline$
- " \providecommand\thumasterbib{D}\fi"
+ "\providecommand{\doi}[1]{DOI: \href{http://dx.doi.org/#1}{#1}}"
write$ newline$
- "\expandafter\ifx\csname thuphdbib\endcsname\relax"
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
write$ newline$
- " \providecommand\thuphdbib{D}\fi"
+ " \urlstyle{same}\fi"
write$ newline$
}