summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/thuthesis/thuthesis-author-year.bst')
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-author-year.bst335
1 files changed, 271 insertions, 64 deletions
diff --git a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
index 370aa0520f..071d19764f 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
+++ b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
@@ -1,5 +1,5 @@
%%
-%% This is file `versions/thu/thuthesis-author-year.bst',
+%% This is file `variants/thu/thuthesis-author-year.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714-2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2019/03/21 v1.1.1
+%% Version: 2020/06/08 v2.0.2
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016-2020 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.3c
@@ -26,15 +26,23 @@ INTEGERS {
period.between.author.year
sentence.case.title
link.title
+ title.in.journal
show.mark
+ space.before.mark
+ show.medium.type
slash.for.extraction
in.booktitle
- italic.jounal
+ abbreviate.journal
+ italic.journal
bold.journal.volume
show.missing.address.publisher
+ only.start.page
+ show.urldate
show.url
show.doi
+ show.preprint
show.note
+ show.english.translation
lang.zh.order
lang.ja.order
lang.en.order
@@ -49,15 +57,23 @@ FUNCTION {load.config}
#1 'period.between.author.year :=
#1 'sentence.case.title :=
#0 'link.title :=
+ #1 'title.in.journal :=
#1 'show.mark :=
+ #1 'space.before.mark :=
+ #1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'italic.jounal :=
+ #0 'abbreviate.journal :=
+ #0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#0 'show.doi :=
+ #0 'show.preprint :=
#0 'show.note :=
+ #0 'show.english.translation :=
#1 'lang.zh.order :=
#2 'lang.ja.order :=
#3 'lang.en.order :=
@@ -67,12 +83,14 @@ FUNCTION {load.config}
ENTRY
{ address
+ archivePrefix
author
booktitle
date
doi
edition
editor
+ eprint
howpublished
institution
journal
@@ -88,13 +106,14 @@ ENTRY
school
series
title
+ translation
translator
url
urldate
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
{ label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -270,6 +289,12 @@ FUNCTION {output.check}
FUNCTION {fin.entry}
{ add.period$
write$
+ show.english.translation entry.lang lang.zh = and
+ { ")"
+ write$
+ }
+ 'skip$
+ if$
newline$
}
@@ -474,15 +499,20 @@ FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
+ ""
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
nameptr max.num.authors >
- { bbl.et.al
+ { bbl.et.al *
#1 'namesleft :=
}
{ t "others" =
- { bbl.et.al }
+ { bbl.et.al * }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{~f{~}}" format.name$
@@ -494,14 +524,11 @@ FUNCTION {format.names}
}
{ t #1 "{ll}{ff}" format.name$ }
if$
+ *
}
if$
}
if$
- nameptr #1 >
- { ", " swap$ * * }
- 'skip$
- if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
@@ -861,12 +888,51 @@ FUNCTION {format.series.vol.num.booktitle}
if$
}
-FUNCTION {format.journal}
-{ journal
- italic.jounal entry.lang lang.en = and
- 'italicize
+FUNCTION {remove.period}
+{ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "." = not
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ s
+}
+
+FUNCTION {abbreviate}
+{ remove.period
+ 't :=
+ t "l" change.case$ 's :=
+ ""
+ s "physical review letters" =
+ { "Phys Rev Lett" }
'skip$
if$
+ 's :=
+ s empty$
+ { t }
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal empty$ not
+ { journal
+ abbreviate.journal
+ 'abbreviate
+ 'skip$
+ if$
+ italic.journal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+ }
+ { "" }
+ if$
}
FUNCTION {set.entry.mark}
@@ -885,15 +951,24 @@ FUNCTION {format.mark}
type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
medium empty$ not or entry.is.electronic or
and
- { medium empty$ not
- { entry.mark "/" * medium * 'entry.mark := }
- { entry.is.electronic
- { entry.mark "/OL" * 'entry.mark := }
- 'skip$
+ { entry.mark
+ show.medium.type
+ { medium empty$ not
+ { "/" * medium * }
+ { entry.is.electronic
+ { "/OL" * }
+ 'skip$
+ if$
+ }
if$
}
+ 'skip$
+ if$
+ 'entry.mark :=
+ space.before.mark
+ { " [" entry.mark * "]" * }
+ { "\allowbreak[" entry.mark * "]" * }
if$
- " [" entry.mark * "]" *
}
{ "" }
if$
@@ -1075,7 +1150,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1106,6 +1183,18 @@ FUNCTION {format.pages}
if$
}
+FUNCTION {format.extracted.pages}
+{ pages empty$
+ { "" }
+ { pages
+ only.start.page
+ 'extract.before.dash
+ 'hyphenate
+ if$
+ }
+ if$
+}
+
FUNCTION {format.journal.volume}
{ volume empty$ not
{ bold.journal.volume
@@ -1127,7 +1216,9 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ":\penalty0 " pages hyphenate * }
+ { ": "
+ format.extracted.pages *
+ }
if$
}
@@ -1199,9 +1290,15 @@ FUNCTION {check.url}
}
FUNCTION {format.url}
+{ entry.url
+}
+
+FUNCTION {output.url}
{ entry.url empty$ not
- { new.block entry.url }
- { "" }
+ { new.block
+ entry.url output
+ }
+ 'skip$
if$
}
@@ -1235,7 +1332,7 @@ FUNCTION {is.in.url}
FUNCTION {format.doi}
{ ""
- doi empty$ not show.doi and
+ doi empty$ not
{ "" 's :=
doi 't :=
#0 'numnames :=
@@ -1263,11 +1360,16 @@ FUNCTION {format.doi}
t #2 global.max$ substring$ 't :=
}
while$
- 's :=
- s empty$ not
- { new.block s }
- { "" }
- if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.doi}
+{ doi empty$ not show.doi and
+ show.english.translation entry.lang lang.zh = and not and
+ { new.block
+ format.doi output
}
'skip$
if$
@@ -1292,6 +1394,27 @@ FUNCTION {check.electronic}
if$
}
+FUNCTION {format.eprint}
+{ ""
+ archivePrefix empty$ not
+ { archivePrefix * ": " *
+ "\eprint{https://" *
+ archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+ eprint * "}" *
+ }
+ { eprint }
+ if$
+}
+
+FUNCTION {output.eprint}
+{ show.preprint eprint empty$ not and
+ { new.block
+ format.eprint output
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {format.note}
{ note empty$ not show.note and
{ note }
@@ -1299,6 +1422,30 @@ FUNCTION {format.note}
if$
}
+FUNCTION {output.translation}
+{ show.english.translation entry.lang lang.zh = and
+ { translation empty$ not
+ { translation }
+ { "[English translation missing!]" }
+ if$
+ " (in Chinese)" * output
+ write$
+ format.doi duplicate$ empty$ not
+ { newline$
+ write$
+ }
+ 'pop$
+ if$
+ " \\" write$
+ newline$
+ "(" write$
+ ""
+ before.all 'output.state :=
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {empty.misc.check}
{ author empty$ title empty$
year empty$
@@ -1311,6 +1458,7 @@ FUNCTION {empty.misc.check}
FUNCTION {monograph}
{ output.bibitem
+ output.translation
author empty$ not
{ format.authors }
{ editor empty$ not
@@ -1339,8 +1487,8 @@ FUNCTION {monograph}
format.address.publisher output
format.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1348,6 +1496,7 @@ FUNCTION {monograph}
FUNCTION {incollection}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1369,10 +1518,10 @@ FUNCTION {incollection}
format.edition output
new.block
format.address.publisher output
- format.pages bbl.colon output.after
+ format.extracted.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1380,6 +1529,7 @@ FUNCTION {incollection}
FUNCTION {periodical}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1396,8 +1546,8 @@ FUNCTION {periodical}
new.block
format.address.publisher output
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1405,6 +1555,7 @@ FUNCTION {periodical}
FUNCTION {article}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1413,17 +1564,21 @@ FUNCTION {article}
if$
format.year "year" output.check
new.block
- format.title "title" output.check
- "J" set.entry.mark
- format.mark "" output.after
- new.block
+ title.in.journal
+ { format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
format.journal "journal" output.check
format.journal.volume output
format.journal.number "" output.after
format.journal.pages "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1431,6 +1586,7 @@ FUNCTION {article}
FUNCTION {patent}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1445,8 +1601,8 @@ FUNCTION {patent}
new.block
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1455,7 +1611,9 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1472,8 +1630,49 @@ FUNCTION {electronic}
format.pages bbl.colon output.after
format.editdate "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {preprint}
+{ output.bibitem
+ output.translation
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ bbl.anonymous
+ }
+ if$
+ }
+ if$
+ output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ title.in.journal
+ { format.series.vol.num.title "title" output.check
+ "Z" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ output.eprint
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ output.url
new.block
format.note output
fin.entry
@@ -1486,10 +1685,14 @@ FUNCTION {misc}
'incollection
{ publisher empty$ not
'monograph
- { entry.is.electronic
- 'electronic
- { "Z" set.entry.mark
- monograph
+ { eprint empty$ not show.preprint and
+ 'preprint
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
}
if$
}
@@ -1589,10 +1792,7 @@ FUNCTION {techreport}
misc
}
-FUNCTION {unpublished}
-{ "Z" set.entry.mark
- misc
-}
+FUNCTION {unpublished} { misc }
FUNCTION {default.type} { misc }
@@ -1918,6 +2118,7 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
@@ -2007,19 +2208,25 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\url}[1]{#1}"
write$ newline$
- "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
write$ newline$
" \urlstyle{same}\fi"
write$ newline$
- show.doi
- { "\providecommand{\href}[2]{\url{#2}}"
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \DeclareUrlCommand\doi{\urlstyle{rm}}"
+ write$ newline$
+ " \def\eprint#1#2{#2}"
+ write$ newline$
+ "\else"
+ write$ newline$
+ " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
+ write$ newline$
+ " \let\eprint\href"
write$ newline$
- "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ "\fi"
write$ newline$
}
- 'skip$
- if$
-}
FUNCTION {end.bib}
{ newline$