diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx | 343 |
1 files changed, 11 insertions, 332 deletions
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 |