diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-02 20:39:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-02 20:39:36 +0000 |
commit | 963531ca70238da0247961325e8275a3e837c26c (patch) | |
tree | feac51426db880cd8af961527159803aabecfd3b /Master/texmf-dist/tex/latex | |
parent | 8e85398efb2a6eaedf5816009a5aa5ad628e8c19 (diff) |
biblatex-caspervector (2jul18)
git-svn-id: svn://tug.org/texlive/trunk@48122 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def | 375 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def (renamed from Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def) | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def (renamed from Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def) | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx | 75 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx | 33 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx | 343 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx | 61 |
7 files changed, 546 insertions, 389 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def new file mode 100644 index 00000000000..279b7e5281f --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def @@ -0,0 +1,375 @@ +% Casper Ti. Vector's biblatex style +% +% Copyright (c) 2012-2018 Casper Ti. Vector +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.3 of this license or (at +% your option) any later version. +% The latest version of this license is in +% https://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX version +% 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The current maintainer of this work is Casper Ti. Vector. +% +% This work consists of the following files: +% caspervector.bbx +% caspervector.cbx +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def + +\ProvidesFile{blx-caspervector-base.def}% + [2018/06/29 v0.3.3 Casper Ti. Vector's biblatex library] + +\RequireBiber[3] +\newtoggle{bbx:gbk} +\newtoggle{bbx:ugly} +\newtoggle{bbx:bfdate}\toggletrue{bbx:bfdate} +\DeclareBibliographyOption{utf8}[true]{\togglefalse{bbx:gbk}} +\DeclareBibliographyOption{gbk}[true]{\toggletrue{bbx:gbk}} +\DeclareBibliographyOption{ugly}[true]{\settoggle{bbx:ugly}{#1}} +\ExecuteBibliographyOptions{% + gbk, ugly = false, autopunct = false, alldates = iso, + minnames = 3, minitems = 3, maxcitenames = 2, mincitenames = 1% +} +\AtEndOfPackage{% + \iftoggle{bbx:gbk}{ + \input{blx-caspervector-gbk.def} + \ExecuteBibliographyOptions{texencoding = GBK} + }{ + \input{blx-caspervector-utf8.def} + \ExecuteBibliographyOptions{texencoding = UTF-8} + }% + \iftoggle{bbx:ugly}{ + \newcommand*{\bbx@citecomma}{\addcomma\space} + \newcommand*{\bbx@citebcomma}{\addcomma\space} + \newcommand*{\bbx@citescolon}{\addsemicolon\space} + \newcommand*{\bbx@cepunct}[2]{#2} + \DefineBibliographyStrings{english}{ + andmore = {\bbx@cietext{\bbx@cnetal}{et\addabbrvspace al\adddot}}, + andothers = {\bbx@cietext{\bbx@cnetal}{et\addabbrvspace al\adddot}}, + } + \DeclareFieldFormat*{booktitle}{#1} + \DeclareFieldFormat*{journaltitle}{#1} + \DeclareFieldFormat*{title}{#1} + \DeclareFieldFormat*{volume}{#1} + \newbibmacro*{typespace}{\setunit*{\addspace}} + }{ + \newcommand*{\bbx@citecomma}{\bbx@cncomma} + \newcommand*{\bbx@citebcomma}{\bbx@cnbcomma} + \newcommand*{\bbx@citescolon}{\bbx@cncomma} + \newcommand*{\bbx@cepunct}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} + \DefineBibliographyStrings{english}{ + andmore = + {\bbx@cietext{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, + andothers = + {\bbx@cietext{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, + } + \DeclareFieldFormat*{booktitle}{\mkbibemph{#1}} + \DeclareFieldFormat*{journaltitle}{\mkbibemph{#1}} + \DeclareFieldFormat*{title}{\mkbibemph{#1}} + \DeclareFieldFormat*{volume}{\mkbibemph{#1}} + \DeclareFieldFormat[inbook, inproceedings, incollection, article]% + {title}{\bbx@bibquote{\mkbibemph{#1}}} + \newbibmacro*{typespace}{\ifboolexpr{test {\bbx@cepunct} and ( + test {\ifentrytype{inbook}} or test {\ifentrytype{inproceedings}} or + test {\ifentrytype{incollection}} or test {\ifentrytype{article}} + )}{}{\setunit*{\addspace}}} + }% + \ifboolexpr{not test {\iftoggle{bbx:bfdate}} or test {\iftoggle{bbx:ugly}}}% + {\DeclareFieldFormat*{date}{#1}}% + {\DeclareFieldFormat*{date}{% + \ifboolexpr{test {\iffieldundef{month}} and test {\iffieldundef{day}}}% + {\mkbibbold{#1}}{#1}% + }}% +} + +\newcommand*{\bbx@cetext}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} +\newcommand*{\bbx@cietext}[2]{\ifboolexpr{% + test {\ifcitation} or test {\iffieldequalstr{userf}{zh}} +}{#1}{#2}} +\newcommand*{\bbx@cecomma}{\bbx@cepunct{\bbx@cncomma}{\addcomma\addspace}} +\newcommand*{\bbx@cecolon}{\bbx@cepunct{\bbx@cncolon}{\addcolon\addspace}} +\newcommand*{\bbx@cescolon}{\bbx@cepunct{\bbx@cnscolon}{\addsemicolon\addspace}} +\newcommand*{\bbx@ceperiod}{\bbx@cepunct{\bbx@cnperiod}{\addperiod\addspace}} +\newcommand*{\bbx@bibquote}[1]% + {\bbx@cepunct{\bbx@cnldquot{#1}\bbx@cnrdquot}{\mkbibquote{#1}}} +\renewcommand*{\finallistdelim}% + {\bbx@cetext{\bbx@cecomma}{\addspace\bibstring{and}\space}} +\renewcommand*{\multilistdelim}{\bbx@cecomma} +\renewcommand*{\finalnamedelim}{\ifcitation{\bbx@citebcomma}{\finallistdelim}} +\renewcommand*{\multinamedelim}{\ifcitation{\bbx@citebcomma}{\multilistdelim}} +\renewcommand*{\postnotedelim}{\bbx@citecomma} +\renewcommand*{\finentrypunct}% + {\iffieldundef{addendum}{\bbx@cepunct{\bbx@cnperiod}{.}}{}} +\DefineBibliographyExtras{english}{% + \renewcommand*{\finalandcomma}{}% +} + +\DefineBibliographyStrings{english}% + {bibliography = {\bbx@cnbib}, references = {\bbx@cnbib}} +\DeclareFieldFormat*{pages}{#1} +\DeclareFieldFormat*{url}{\url{#1}} +\DeclareFieldFormat*{urldate}{#1} +\DeclareFieldFormat*{type}{\mkbibbrackets{#1}} +\DeclareFieldFormat*{number}{\mkbibparens{#1}} +\DeclareFieldFormat[patent]{number}{#1} +\DeclareFieldFormat*{edition}{% + \bbx@cetext% + {\ifinteger{#1}{{\bbx@cnnr} {#1} {\bbx@cnedition}}{#1}}% + {\ifinteger{#1}{\mkbibordedition{#1}~\bibstring{edition}}{#1\isdot}}% +} +\newcommand*{\bbx@print}[1]{\iffieldundef{#1}{}{\printfield{#1}}} +\newcommand*{\bbx@byspace}[1]% + {\ifnumgreater{\value{#1}}{\value{maxnames}}{}{\addspace}} +\newbibmacro*{cein:}% + {\printtext{\bbx@cetext{\bbx@cnin}{In}\bbx@cecolon}\printtext{}} + +\newbibmacro*{ceedtrans}[1]{% + \ifboolexpr{test {\iftoggle{blx@use#1}} and not test {\ifnameundef{#1}}}{% + \printnames{#1}% + \bbx@cetext% + {\printtext{\bbx@byspace{#1}\@nameuse{bbx@cn#1}}}% + {\setunit{\printdelim{#1typedelim}}\usebibmacro{#1strg}}% + \clearname{#1}% + }{}% +} +\renewbibmacro*{editor}{\usebibmacro{ceedtrans}{editor}} +\renewbibmacro*{translator}{\usebibmacro{ceedtrans}{translator}} +\newbibmacro*{bookauthor/editor}{% + \ifnameundef{bookauthor}% + {\usebibmacro{ceedtrans}{editor}}{\printnames{bookauthor}}% +} + +\newbibmacro*{cebyauthx}[1]{% + \ifboolexpr{ + test {\ifnameundef{#1}} or + (test {\ifstrequal{#1}{author}} and test {\ifuseauthor}) + }{}{% + \bbx@cetext{% + \printnames[by#1]{#1}% + \printtext{\bbx@byspace{#1}\@nameuse{bbx@cn#1}}% + }{% + \bibstring{by#1}\setunit{\addspace}% + \printnames[by#1]{#1}% + }% + }% +} +\renewbibmacro*{byauthor}{\usebibmacro{cebyauthx}{author}} +\renewbibmacro*{byeditor}{\usebibmacro{cebyauthx}{editor}} +\renewbibmacro*{bytranslator}{\usebibmacro{cebyauthx}{translator}} +\newbibmacro*{byauthor+byeditor+bytranslator}{% + \usebibmacro{byauthor}\setunit*{\bbx@cescolon}% + \usebibmacro{byeditor}\setunit*{\bbx@cescolon}% + \usebibmacro{bytranslator}% +} + +\providebibmacro*{bbx:ifnodate}[2]{#2} +\newbibmacro*{journaltitle/title}{% + \iffieldundef{journaltitle}% + {\bbx@print{title}}{\printfield[title]{journaltitle}}% +} +\newbibmacro*{location+publisher+date+note+pages}{% + \printlist{location}\setunit*{\bbx@cecolon}\printlist{publisher}% + \ifboolexpr{test {\iflistundef{location}} and test {\iflistundef{publisher}}}% + {}{\setunit{\bbx@cecomma}}% + \usebibmacro{date}\setunit*{\bbx@cecomma}\printfield{note}% + \ifboolexpr{% + (test {\usebibmacro{bbx:ifnodate}} or test {\ifdateunknown}) and + test {\iffieldundef{note}} + }{}{\setunit{\bbx@cecolon}}% + \printfield{pages}% +} +\newbibmacro*{date+volume+number+note+pages}{% + \usebibmacro{date}% + \iffieldundef{volume}{}{\setunit*{\bbx@cecomma}\printfield{volume}}% + \bbx@print{number}\setunit*{\bbx@cecomma}\printfield{note}% + \ifboolexpr{% + (test {\usebibmacro{bbx:ifnodate}} or test {\ifdateunknown}) and + test {\iffieldundef{volume}} and test {\iffieldundef{number}} and + test {\iffieldundef{note}} + }{}{\setunit{\bbx@cecolon}}% + \printfield{pages}% +} +\newbibmacro*{eid+url+urldate}{% + \printfield{eid}\setunit*{\bbx@cecomma}% + \printfield{url}\setunit*{\bbx@cecomma}% + \iffieldundef{urlyear}{}{% + \printtext{\bbx@cetext{\bbx@cnretr}{retrieved on}\addspace}% + \printurldate% + }% +} + +\DeclareBibliographyDriver{book}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \usebibmacro{author/editor/translator}% + \printunit*{\bbx@ceperiod}\newblock + \bbx@print{title}\usebibmacro{typespace}% + \bbx@print{type}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byauthor+byeditor+bytranslator}% + \printunit{\bbx@ceperiod}\newblock + \printfield{edition}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{location+publisher+date+note+pages}% + \printunit{\bbx@ceperiod}\newblock + \usebibmacro{eid+url+urldate}\printunit{\bbx@ceperiod}\newblock + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{incollection}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \usebibmacro{author/translator}\printunit*{\bbx@ceperiod}\newblock + \bbx@print{title}\usebibmacro{typespace}% + \bbx@print{type}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byauthor}\setunit*{\bbx@cescolon}% + \usebibmacro{bytranslator}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{cein:}\newblock + \usebibmacro{bookauthor/editor}\printunit*{\bbx@ceperiod}\newblock + \printfield{booktitle}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byeditor}\printunit{\bbx@ceperiod}\newblock + \printfield{edition}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{location+publisher+date+note+pages}% + \printunit{\bbx@ceperiod}\newblock + \usebibmacro{eid+url+urldate}\printunit{\bbx@ceperiod}\newblock + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{periodical}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \usebibmacro{author/editor/translator}% + \printunit*{\bbx@ceperiod}\newblock + \usebibmacro{journaltitle/title}\usebibmacro{typespace}% + \bbx@print{type}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byauthor+byeditor+bytranslator}% + \printunit{\bbx@ceperiod}\newblock + \usebibmacro{date+volume+number+note+pages}% + \printunit{\bbx@ceperiod}\newblock + \printlist{location}\setunit*{\bbx@cecolon}% + \printlist{publisher}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{eid+url+urldate}\printunit{\bbx@ceperiod}\newblock + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{article}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \usebibmacro{author/translator}\printunit*{\bbx@ceperiod}\newblock + \bbx@print{title}\usebibmacro{typespace}% + \bbx@print{type}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byauthor+byeditor+bytranslator}% + \printunit{\bbx@ceperiod}\newblock + \printfield{journaltitle}\setunit*{\bbx@cecomma}% + \usebibmacro{date+volume+number+note+pages}% + \printunit{\bbx@ceperiod}\newblock + \usebibmacro{eid+url+urldate}\printunit{\bbx@ceperiod}\newblock + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{patent}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \usebibmacro{author/editor/translator}% + \printunit*{\bbx@ceperiod}\newblock + \bbx@print{title}\usebibmacro{typespace}% + \bbx@print{type}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{byauthor+byeditor+bytranslator}% + \printunit{\bbx@ceperiod}\newblock + \printlist{location}\setunit*{\bbx@cecolon}% + \printfield{number}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{date}\setunit*{\bbx@cecomma}% + \printfield{note}\printunit{\bbx@ceperiod}\newblock + \usebibmacro{eid+url+urldate}\printunit{\bbx@ceperiod}\newblock + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{customf}{% + \usebibmacro{bibindex}\usebibmacro{begentry}% + \printfield{addendum}\usebibmacro{finentry}% +} + +\DeclareBibliographyAlias{booklet}{book} +\DeclareBibliographyAlias{collection}{book} +\DeclareBibliographyAlias{manual}{book} +\DeclareBibliographyAlias{misc}{book} +\DeclareBibliographyAlias{online}{book} +\DeclareBibliographyAlias{proceedings}{book} +\DeclareBibliographyAlias{report}{book} +\DeclareBibliographyAlias{thesis}{book} +\DeclareBibliographyAlias{unpublished}{book} +\DeclareBibliographyAlias{inbook}{incollection} +\DeclareBibliographyAlias{inproceedings}{incollection} +\DeclareBibliographyAlias{*}{book} + +\DeclareSortingTemplate{ecnyt}{ + \sort{\field{presort}} + \sort[final]{\field{sortkey}} + \sort{ + \field{userf} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + \field{sorttitle} + \field{title} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } +} + +\DeclareSortingTemplate{cenyt}{ + \sort{\field{presort}} + \sort[final]{\field{sortkey}} + \sort[direction = descending]{ + \field{userf} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + \field{sorttitle} + \field{title} + } + \sort{ + \field{sortyear} + \field{origyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } +} + +\DeclareStyleSourcemap{ + \maps{ + \map{ + \step[ + fieldsource = language, match = \regexp{^chinese$}, + fieldset = userf, fieldvalue = {zh} + ] + } + \map{ + \step[fieldset = userf, fieldvalue = {en}] + } + } +} + +% vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def index b2bf0cc5155..9d76570a3b8 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def @@ -1,12 +1,12 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2016 Casper Ti. Vector +% Copyright (c) 2012-2016,2018 Casper Ti. Vector % % This work may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3 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 +% https://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX version % 2005/12/01 or later. % @@ -16,22 +16,28 @@ % This work consists of the following files: % caspervector.bbx % caspervector.cbx -% biblatex-caspervector-gbk.def -% biblatex-caspervector-utf8.def +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def -\ProvidesFile{biblatex-caspervector-gbk.def}% - [2017/03/01 v0.2.7 Chinese punctuations and captions in GBK] +\ProvidesFile{blx-caspervector-gbk.def}% + [2018/06/29 v0.3.3 Chinese punctuations and captions in GBK] \newcommand*\bbx@cnldquot{“} \newcommand*\bbx@cnrdquot{”} \newcommand*\bbx@cncomma{,} +\newcommand*\bbx@cnbcomma{、} \newcommand*\bbx@cnscolon{;} \newcommand*\bbx@cncolon{:} \newcommand*\bbx@cnperiod{。} \newcommand*\bbx@cnetal{等} -\newcommand*\bbx@cnauth{著} -\newcommand*\bbx@cnedit{编} -\newcommand*\bbx@cntrans{译} +\newcommand*\bbx@cnauthor{著} +\newcommand*\bbx@cneditor{编} +\newcommand*\bbx@cntranslator{译} +\newcommand*\bbx@cnnr{第} +\newcommand*\bbx@cnedition{版} \newcommand*\bbx@cnin{出自} \newcommand*\bbx@cnretr{检索于} \newcommand*\bbx@cnbib{参考文献} diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def index a30f255fc49..8853f52ac4b 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def @@ -1,12 +1,12 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2016 Casper Ti. Vector +% Copyright (c) 2012-2016,2018 Casper Ti. Vector % % This work may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3 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 +% https://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX version % 2005/12/01 or later. % @@ -16,22 +16,28 @@ % This work consists of the following files: % caspervector.bbx % caspervector.cbx -% biblatex-caspervector-gbk.def -% biblatex-caspervector-utf8.def +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def -\ProvidesFile{biblatex-caspervector-utf8.def}% - [2017/03/01 v0.2.7 Chinese punctuations and captions in UTF-8] +\ProvidesFile{blx-caspervector-utf8.def}% + [2018/06/29 v0.3.3 Chinese punctuations and captions in UTF-8] \newcommand*\bbx@cnldquot{鈥渳 \newcommand*\bbx@cnrdquot{鈥潁 \newcommand*\bbx@cncomma{锛寎 +\newcommand*\bbx@cnbcomma{銆亇 \newcommand*\bbx@cnscolon{锛泒 \newcommand*\bbx@cncolon{锛殅 \newcommand*\bbx@cnperiod{銆倉 \newcommand*\bbx@cnetal{绛墋 -\newcommand*\bbx@cnauth{钁梷 -\newcommand*\bbx@cnedit{缂杴 -\newcommand*\bbx@cntrans{璇憓 +\newcommand*\bbx@cnauthor{钁梷 +\newcommand*\bbx@cneditor{缂杴 +\newcommand*\bbx@cntranslator{璇憓 +\newcommand*\bbx@cnnr{绗瑌 +\newcommand*\bbx@cnedition{鐗坿 \newcommand*\bbx@cnin{鍑鸿嚜} \newcommand*\bbx@cnretr{妫绱簬} \newcommand*\bbx@cnbib{鍙傝冩枃鐚畗 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx new file mode 100644 index 00000000000..9e21d3d066d --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx @@ -0,0 +1,75 @@ +% Casper Ti. Vector's biblatex style +% +% Copyright (c) 2012-2018 Casper Ti. Vector +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.3 of this license or (at +% your option) any later version. +% The latest version of this license is in +% https://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX version +% 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The current maintainer of this work is Casper Ti. Vector. +% +% This work consists of the following files: +% caspervector.bbx +% caspervector.cbx +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def + +\ProvidesFile{caspervector-ay.bbx}% + [2018/06/29 v0.3.3 Casper Ti. Vector's author-year biblatex bibstyle] + +\RequireBibliographyStyle{authoryear-comp} +\input{blx-caspervector-base.def} +\appto\bbx@opt@mergedate@maximum{\renewbibmacro*{bbx:ifnodate}[2]{% + \iflabeldateisdate{#1}{#2}% +}\togglefalse{bbx:bfdate}} +\appto\bbx@opt@mergedate@compact{\renewbibmacro*{bbx:ifnodate}[2]{% + \iflabeldateisdate{#1}{#2}% +}\togglefalse{bbx:bfdate}} +\appto\bbx@opt@mergedate@basic{\renewbibmacro*{bbx:ifnodate}[2]{% + \ifboolexpr{ + test {\iflabeldateisdate} and + not test {\ifdateshavedifferentprecision{label}{}} + }{#1}{#2}% +}\toggletrue{bbx:bfdate}} +\appto\bbx@opt@mergedate@minimum{\renewbibmacro*{bbx:ifnodate}[2]{% + \ifboolexpr{ + test {\iflabeldateisdate} and test {\iffieldundef{extradate}} and + not test {\ifdateshavedifferentprecision{label}{}} + }{#1}{#2}% +}\toggletrue{bbx:bfdate}} +\appto\bbx@opt@mergedate@false% + {\renewbibmacro*{bbx:ifnodate}[2]{#2}\toggletrue{bbx:bfdate}} +\renewbibmacro*{date}{\usebibmacro{bbx:ifnodate}{}{\printdate}} + +\ExecuteBibliographyOptions% + {labeldate = year, mergedate = basic, dashed = false, sorting = ecnyt} +\DeclareNameAlias{author}{default} +\DeclareNameAlias{editor}{default} +\DeclareNameAlias{translator}{default} + +\newbibmacro*{ayedtrans}[1]{% + \ifboolexpr{test {\iftoggle{blx@use#1}} and not test {\ifnameundef{#1}}}{% + \usebibmacro{bbx:dashcheck}{\bibnamedash}{% + \printnames{#1}% + \bbx@cetext% + {\printtext{\bbx@byspace{#1}}}{\setunit{\printdelim{#1typedelim}}}% + \usebibmacro{bbx:savehash}% + }\bbx@cetext{\printtext{\@nameuse{bbx@cn#1}}}{\usebibmacro{#1strg}}% + \setunit{\printdelim{nameyeardelim}}\clearname{#1}% + }{% + \global\undef\bbx@lasthash + \usebibmacro{labeltitle}\setunit*{\printdelim{nonameyeardelim}}% + }\usebibmacro{date+extradate}% +} +\renewbibmacro*{editor}{\usebibmacro{ayedtrans}{editor}} +\renewbibmacro*{translator}{\usebibmacro{ayedtrans}{translator}} + +% vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx new file mode 100644 index 00000000000..50a78e9d40b --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx @@ -0,0 +1,33 @@ +% Casper Ti. Vector's biblatex style +% +% Copyright (c) 2012-2014,2018 Casper Ti. Vector +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.3 of this license or (at +% your option) any later version. +% The latest version of this license is in +% https://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX version +% 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The current maintainer of this work is Casper Ti. Vector. +% +% This work consists of the following files: +% caspervector.bbx +% caspervector.cbx +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def + +\ProvidesFile{caspervector-ay.cbx}% + [2018/06/29 v0.3.3 Casper Ti. Vector's author-year biblatex citestyle] + +\RequireCitationStyle{authoryear-comp} +\renewcommand*{\compcitedelim}{\bbx@citebcomma} +\renewcommand*{\multicitedelim}{\bbx@citescolon} +\renewcommand*{\textcitedelim}{\bbx@citescolon} + +% vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx index 88c20f1ba5a..e7960444992 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx @@ -1,12 +1,12 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2017 Casper Ti. Vector +% Copyright (c) 2012-2018 Casper Ti. Vector % % This work may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3 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 +% https://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX version % 2005/12/01 or later. % @@ -16,338 +16,17 @@ % This work consists of the following files: % caspervector.bbx % caspervector.cbx -% biblatex-caspervector-gbk.def -% biblatex-caspervector-utf8.def +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def \ProvidesFile{caspervector.bbx}% - [2017/03/01 v0.2.7 Casper Ti. Vector's biblatex bibliography style] + [2018/06/29 v0.3.3 Casper Ti. Vector's numeric biblatex bibstyle] -\RequireBiber[3] -\RequireBibliographyStyle{numeric} - -\newtoggle{bbx:gbk} -\newtoggle{bbx:ugly} -\DeclareBibliographyOption{utf8}[true]{\togglefalse{bbx:gbk}} -\DeclareBibliographyOption{gbk}[true]{\toggletrue{bbx:gbk}} -\DeclareBibliographyOption{ugly}[true]{\settoggle{bbx:ugly}{#1}} -\ExecuteBibliographyOptions{ - gbk, ugly = false, alldates = iso8601, defernumbers = true, - sorting = none, minnames = 3, minitems = 3 -} -\AtEndOfPackage{% - \iftoggle{bbx:gbk}{ - \input{biblatex-caspervector-gbk.def} - \ExecuteBibliographyOptions{texencoding = GBK} - }{ - \input{biblatex-caspervector-utf8.def} - \ExecuteBibliographyOptions{texencoding = UTF-8} - } - \iftoggle{bbx:ugly}{ - \newcommand*{\bbx@cepunct}[2]{#2} - \DefineBibliographyStrings{english}{ - andmore = {\bbx@cetext{\bbx@cnetal}{et\addabbrvspace al\adddot}}, - andothers = {\bbx@cetext{\bbx@cnetal}{et\addabbrvspace al\adddot}}, - } - \DeclareFieldFormat*{booktitle}{#1} - \DeclareFieldFormat*{journaltitle}{#1} - \DeclareFieldFormat*{title}{#1} - \DeclareFieldFormat*{year}{#1} - \DeclareFieldFormat*{volume}{#1} - }{ - \newcommand*{\bbx@cepunct}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} - \DefineBibliographyStrings{english}{ - andmore = - {\bbx@cetext{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, - andothers = - {\bbx@cetext{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, - } - \DeclareFieldFormat*{booktitle}{\mkbibemph{#1}} - \DeclareFieldFormat*{journaltitle}{\mkbibemph{#1}} - \DeclareFieldFormat*{title}{\mkbibemph{#1}} - \DeclareFieldFormat*{year}{\mkbibbold{#1}} - \DeclareFieldFormat*{volume}{\mkbibemph{#1}} - \DeclareFieldFormat[inbook, inproceedings, incollection, article]% - {title}{\bbx@mybibquote{\mkbibemph{#1}}} - }% -} - -\newcommand*{\bbx@cetext}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} -\newcommand*{\bbx@cecomma}{\bbx@cepunct{\bbx@cncomma}{\addcomma\addspace}} -\newcommand*{\bbx@cecolon}{\bbx@cepunct{\bbx@cncolon}{\addcolon\addspace}} -\newcommand*{\bbx@cescolon}{\bbx@cepunct{\bbx@cnscolon}{\addsemicolon\addspace}} -\newcommand*{\bbx@ceperiod}{\bbx@cepunct{\bbx@cnperiod}{\addperiod\addspace}} -\newcommand*{\bbx@cespace}{\bbx@cepunct{}{\addspace}} -\newcommand*{\bbx@mybibquote}[1]% - {\bbx@cepunct{\bbx@cnldquot{#1}\bbx@cnrdquot}{\mkbibquote{#1}}} -\renewcommand*{\finallistdelim}% - {\bbx@cetext{\bbx@cecomma}{\addspace\bibstring{and}\space}} -\renewcommand*{\finalnamedelim}% - {\bbx@cetext{\bbx@cecomma}{\addspace\bibstring{and}\space}} -\renewcommand*{\multilistdelim}{\bbx@cecomma} -\renewcommand*{\multinamedelim}{\bbx@cecomma} -\renewcommand*{\postnotedelim}{\bbx@cecomma} -\renewcommand*{\finentrypunct}{\bbx@cepunct{\bbx@cnperiod}{.}} -\DefineBibliographyExtras{english}{% - \renewcommand*{\finalandcomma}{}% -} - -\DefineBibliographyStrings{english}{ - bibliography = {\bbx@cnbib}, references = {\bbx@cnbib} -} -\DeclareFieldFormat*{pages}{#1} -\DeclareFieldFormat*{url}{\url{#1}} -\DeclareFieldFormat*{urldate}{#1} -\DeclareFieldFormat*{type}{\mkbibbrackets{#1}} -\DeclareFieldFormat*{number}{\mkbibparens{#1}} -\DeclareFieldFormat[patent]{number}{#1} -\renewbibmacro*{title}{\iffieldundef{title}{}{\printfield{title}}} -\newbibmacro*{type}{\iffieldundef{type}{}{\printfield{type}}} -\newbibmacro*{number}{\iffieldundef{number}{}{\printfield{number}}} -\newbibmacro*{cein:}{\printtext{\bbx@cetext{\bbx@cnin}{In}\bbx@cecolon}} -\newcommand*{\bbx@byspace}[1]{% - \ifnumgreater{\value{#1}}{\value{maxnames}}{}{\addspace}% -} - -\newbibmacro*{cebyauthor}{% - \ifnameundef{author}{}{% - \bbx@cetext% - {\printnames{author}\printtext{\bbx@byspace{author}\bbx@cnauth}}% - % `\usebibmacro{byauthor}' does not print with `useauthor' enabled. - {\printnames[byauthor]{author}}% - }% -} -\newbibmacro*{cebyeditor}{% - \ifnameundef{editor}{}{% - \bbx@cetext% - {\printnames{editor}\printtext{\bbx@byspace{editor}\bbx@cnedit}}% - {\usebibmacro{byeditor}}% - }% -} -\newbibmacro*{cebytranslator}{% - \ifnameundef{translator}{}{% - \bbx@cetext% - {\printnames{translator}\printtext{\bbx@byspace{translator}\bbx@cntrans}}% - {\usebibmacro{bytranslator}}% - }% -} -\newbibmacro*{author+others}{% - \ifthenelse% - {\ifnameundef{author} \and \ifnameundef{editor} \and \ifnameundef{translator}}% - {}% - {% - \ifthenelse{\ifnameundef{editor} \and \ifnameundef{translator}}% - {\printnames{author}}% - {% - \usebibmacro{cebyauthor}\setunit*{\bbx@cescolon}% - \usebibmacro{cebyeditor}\setunit*{\bbx@cescolon}% - \usebibmacro{cebytranslator}% - }% - }% -} -\newbibmacro*{journaltitle/title}{% - \iffieldundef{journaltitle}{\usebibmacro{title}}{\printfield{journaltitle}}% -} -\newbibmacro*{year/date}{% - \ifthenelse{\iffieldundef{month} \and \iffieldundef{day}}% - {\printfield{year}}{\printdate}% -} -\newbibmacro*{(year+volume+number)/date}{% - \ifthenelse{\iffieldundef{month} \and \iffieldundef{day}}% - {% - \printfield{year}\setunit*{\bbx@cecomma}% - \printfield{volume}% - \usebibmacro{number}% - }{\printdate}% -} -\renewbibmacro*{urldate}{% - \iffieldundef{urlyear}{}{% - \printtext{\bbx@cetext{\bbx@cnretr}{retrieved on}\addspace}% - \printurldate% - }% -} - -\DeclareBibliographyDriver{book}{% - \usebibmacro{bibindex}% - \newblock - \usebibmacro{author+others}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{title}\setunit*{\addspace}% - \usebibmacro{type}\setunit{\bbx@ceperiod}% - \newblock - \printlist{location}\setunit*{\bbx@cecolon}% - \printlist{publisher}\setunit{\bbx@cecomma}% - \usebibmacro{year/date}\setunit*{\bbx@cecolon}% - \printfield{pages}\setunit{\bbx@ceperiod}% - \newblock - \printfield{url}\setunit*{\bbx@cecomma}% - \usebibmacro{urldate}\usebibmacro{finentry}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyDriver{incollection}{% - \usebibmacro{bibindex}% - \newblock - \usebibmacro{author+others}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{title}\setunit*{\bbx@cespace}% - \usebibmacro{type}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{cein:}% - \newblock - \printnames{bookauthor}\setunit*{\bbx@ceperiod}% - \newblock - \printfield{booktitle}\setunit{\bbx@ceperiod}% - \newblock - \printlist{location}\setunit*{\bbx@cecolon}% - \printlist{publisher}\setunit{\bbx@cecomma}% - \usebibmacro{year/date}\setunit*{\bbx@cecolon}% - \printfield{pages}\setunit{\bbx@ceperiod}% - \newblock - \printfield{url}\setunit*{\bbx@cecomma}% - \usebibmacro{urldate}\usebibmacro{finentry}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyDriver{periodical}{% - \usebibmacro{bibindex}% - \newblock - \usebibmacro{author+others}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{journaltitle/title}\setunit*{\addspace}% - \usebibmacro{type}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{(year+volume+number)/date}\setunit{\bbx@ceperiod}% - \newblock - \printlist{location}\setunit*{\bbx@cecolon}% - \printlist{publisher}\setunit{\bbx@ceperiod}% - \newblock - \printfield{url}\setunit*{\bbx@cecomma}% - \usebibmacro{urldate}\usebibmacro{finentry}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyDriver{article}{% - \usebibmacro{bibindex}% - \newblock - \printnames{author}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{title}\setunit*{\bbx@cespace}% - \usebibmacro{type}\setunit{\bbx@ceperiod}% - \newblock - \printfield{journaltitle}\setunit*{\bbx@cecomma}% - \usebibmacro{(year+volume+number)/date}\setunit{\bbx@cecolon}% - \printfield{pages}\setunit{\bbx@ceperiod}% - \newblock - \printfield{url}\setunit*{\bbx@cecomma}% - \usebibmacro{urldate}\usebibmacro{finentry}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyDriver{patent}{% - \usebibmacro{bibindex}% - \newblock - \usebibmacro{author}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{title}\setunit*{\addspace}% - \usebibmacro{type}\setunit{\bbx@ceperiod}% - \newblock - \printlist{location}\setunit*{\bbx@cecolon}% - \usebibmacro{number}\setunit{\bbx@ceperiod}% - \newblock - \usebibmacro{year/date}\setunit{\bbx@ceperiod}% - \newblock - \printfield{url}\setunit*{\bbx@cecomma}% - \usebibmacro{urldate}\usebibmacro{finentry}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyDriver{customf}{% - \usebibmacro{bibindex}% - \newblock - \printfield{addendum}% -} - -\DeclareBibliographyAlias{booklet}{book} -\DeclareBibliographyAlias{collection}{book} -\DeclareBibliographyAlias{manual}{book} -\DeclareBibliographyAlias{misc}{book} -\DeclareBibliographyAlias{online}{book} -\DeclareBibliographyAlias{proceedings}{book} -\DeclareBibliographyAlias{report}{book} -\DeclareBibliographyAlias{thesis}{book} -\DeclareBibliographyAlias{unpublished}{book} -\DeclareBibliographyAlias{inbook}{incollection} -\DeclareBibliographyAlias{inproceedings}{incollection} -\DeclareBibliographyAlias{*}{book} - -\DeclareSortingScheme{ecnty}{ - \sort{\field{presort}} - \sort[final]{\field{sortkey}} - \sort{ - \field{userf} - } - \sort{ - \field{sortname} - \field{author} - \field{editor} - \field{translator} - \field{sorttitle} - \field{title} - } - \sort{ - \field{sorttitle} - \field{title} - } - \sort{ - \field{sortyear} - \field{year} - } -} - -\DeclareSortingScheme{centy}{ - \sort{\field{presort}} - \sort[final]{\field{sortkey}} - \sort[direction = descending]{ - \field{userf} - } - \sort{ - \field{sortname} - \field{author} - \field{editor} - \field{translator} - \field{sorttitle} - \field{title} - } - \sort{ - \field{sorttitle} - \field{title} - } - \sort{ - \field{sortyear} - \field{year} - } -} - -\DeclareStyleSourcemap{ - \maps{ - \map[overwrite]{ - \step[ - fieldsource = language, match = \regexp{chinese}, - fieldset = userf, fieldvalue = {zh} - ] - } - \map[overwrite]{ - \step[fieldsource = userf, match = \regexp{^cn$}, replace = \regexp{zh}] - } - \map{ - \step[fieldset = userf, fieldvalue = {en}] - } - } -} +\RequireBibliographyStyle{numeric-comp} +\input{blx-caspervector-base.def} +\ExecuteBibliographyOptions{defernumbers = true, sorting = none} % vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx index f3911530253..236f4c48ecd 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx @@ -1,12 +1,12 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2014 Casper Ti. Vector +% Copyright (c) 2012-2014,2018 Casper Ti. Vector % % This work may be distributed and/or modified under the conditions of the % LaTeX Project Public License, either version 1.3 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 +% https://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX version % 2005/12/01 or later. % @@ -16,49 +16,32 @@ % This work consists of the following files: % caspervector.bbx % caspervector.cbx -% biblatex-caspervector-gbk.def -% biblatex-caspervector-utf8.def +% caspervector-ay.bbx +% caspervector-ay.cbx +% blx-caspervector-base.def +% blx-caspervector-gbk.def +% blx-caspervector-utf8.def \ProvidesFile{caspervector.cbx}% - [2017/03/01 v0.2.7 Casper Ti. Vector's biblatex citation style] + [2018/06/29 v0.3.3 Casper Ti. Vector's numeric biblatex citestyle] \RequireCitationStyle{numeric-comp} -\ExecuteBibliographyOptions{ - autocite = superscript, - autopunct = false -} - +\ExecuteBibliographyOptions{autocite = superscript} \newcommand*{\cbx@mksuperbrackets}[1]{\mkbibsuperscript{\mkbibbrackets{#1}}} -\DeclareCiteCommand{\cite} -{% - \usebibmacro{cite:init}% - \usebibmacro{prenote}% -} -{% - \usebibmacro{citeindex}% - \usebibmacro{cite:comp}% -} -{} -{% - \usebibmacro{cite:dump}% - \usebibmacro{postnote}% -} +\DeclareCiteCommand{\cite}% + {\usebibmacro{cite:init}\usebibmacro{prenote}}% + {\usebibmacro{citeindex}\usebibmacro{cite:comp}}{}% + {\usebibmacro{cite:dump}\usebibmacro{postnote}} -\DeclareCiteCommand{\supercite}[\cbx@mksuperbrackets] -{% - \usebibmacro{cite:init}% - \let\multicitedelim=\supercitedelim - \usebibmacro{prenote}% -} -{% - \usebibmacro{citeindex}% - \usebibmacro{cite:comp}% -}% -{} -{% - \usebibmacro{cite:dump}% - \usebibmacro{postnote}% -} +\DeclareCiteCommand{\supercite}[\cbx@mksuperbrackets]{% + \usebibmacro{cite:init}% + \let\multicitedelim=\supercitedelim + \iffieldundef{prenote}{}% + {\BibliographyWarning{Ignoring prenote argument}}% + \iffieldundef{postnote}{}% + {\BibliographyWarning{Ignoring postnote argument}}% + }{\usebibmacro{citeindex}\usebibmacro{cite:comp}}{}% + {\usebibmacro{cite:dump}\usebibmacro{postnote}} % vim:ft=tex:ts=2:sw=2 |