From 800462d19ac70da2bba3efcc39db662187751891 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 1 Mar 2017 22:30:07 +0000 Subject: biblatex-caspervector (1mar17) git-svn-id: svn://tug.org/texlive/trunk@43371 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/biblatex-caspervector/caspervector.bbx | 92 +++++++++++----------- 1 file changed, 48 insertions(+), 44 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx') diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx index b7eb83d1760..88c20f1ba5a 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx @@ -1,6 +1,6 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2016 Casper Ti. Vector +% Copyright (c) 2012-2017 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 @@ -20,16 +20,18 @@ % biblatex-caspervector-utf8.def \ProvidesFile{caspervector.bbx}% - [2016/05/24 v0.2.6 Casper Ti. Vector's biblatex bibliography style] + [2017/03/01 v0.2.7 Casper Ti. Vector's biblatex bibliography style] \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{ - alldates = iso8601, gbk, defernumbers = true, + gbk, ugly = false, alldates = iso8601, defernumbers = true, sorting = none, minnames = 3, minitems = 3 } \AtEndOfPackage{% @@ -39,74 +41,76 @@ }{ \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@cegen}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} -\newcommand*{\bbx@cecomma}{\bbx@cegen{\bbx@cncomma}{\addcomma\addspace}} -\newcommand*{\bbx@cecolon}{\bbx@cegen{\bbx@cncolon}{\addcolon\addspace}} -\newcommand*{\bbx@cescolon}{\bbx@cegen{\bbx@cnscolon}{\addsemicolon\addspace}} -\newcommand*{\bbx@ceperiod}{\bbx@cegen{\bbx@cnperiod}{\addperiod\addspace}} -\newcommand*{\bbx@cespace}{\bbx@cegen{}{\addspace}} +\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@cegen{\bbx@cnldquot{#1}\bbx@cnrdquot}{\mkbibquote{#1}}} + {\bbx@cepunct{\bbx@cnldquot{#1}\bbx@cnrdquot}{\mkbibquote{#1}}} \renewcommand*{\finallistdelim}% - {\bbx@cegen{\bbx@cncomma}{\addspace\bibstring{and}\space}} + {\bbx@cetext{\bbx@cecomma}{\addspace\bibstring{and}\space}} \renewcommand*{\finalnamedelim}% - {\bbx@cegen{\bbx@cncomma}{\addspace\bibstring{and}\space}} + {\bbx@cetext{\bbx@cecomma}{\addspace\bibstring{and}\space}} \renewcommand*{\multilistdelim}{\bbx@cecomma} \renewcommand*{\multinamedelim}{\bbx@cecomma} -\renewcommand*{\andmoredelim}{\bbx@cespace} -\renewcommand*{\andothersdelim}{\bbx@cespace} \renewcommand*{\postnotedelim}{\bbx@cecomma} -\renewcommand*{\finentrypunct}{\bbx@cegen{\bbx@cnperiod}{.}} -\renewcommand{\bibendnotewrapper}[1]{\bibsentence #1\bbx@cnperiod} -\renewcommand{\bibfootnotewrapper}[1]{\bibsentence #1\bbx@cnperiod} +\renewcommand*{\finentrypunct}{\bbx@cepunct{\bbx@cnperiod}{.}} \DefineBibliographyExtras{english}{% - \renewcommand*{\finalandcomma}{\bbx@cegen{\addspace}{}}% + \renewcommand*{\finalandcomma}{}% } -% The alternative settings in comments can be used in case a really plain style -% (without quotes, italic and bold) is demanded; be prepared that the style -% might look really ugly. \DefineBibliographyStrings{english}{ - andmore = {\bbx@cegen{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, - andothers = {\bbx@cegen{\bbx@cnetal}{\mkbibemph{et\addabbrvspace al\adddot}}}, - %andmore = {\bbx@cegen{\bbx@cnetal}{et\addabbrvspace al\adddot}}, - %andothers = {\bbx@cegen{\bbx@cnetal}{et\addabbrvspace al\adddot}}, bibliography = {\bbx@cnbib}, references = {\bbx@cnbib} } -\DeclareFieldFormat*{booktitle}{\mkbibemph{#1}} -\DeclareFieldFormat*{journaltitle}{\mkbibemph{#1}} -\DeclareFieldFormat*{title}{\mkbibemph{#1}} -\DeclareFieldFormat*{year}{\mkbibbold{#1}} -\DeclareFieldFormat*{volume}{\mkbibemph{#1}} -%\DeclareFieldFormat*{booktitle}{#1} -%\DeclareFieldFormat*{journaltitle}{#1} -%\DeclareFieldFormat*{title}{#1} -%\DeclareFieldFormat*{year}{#1} -%\DeclareFieldFormat*{volume}{#1} \DeclareFieldFormat*{pages}{#1} \DeclareFieldFormat*{url}{\url{#1}} \DeclareFieldFormat*{urldate}{#1} -\DeclareFieldFormat[inbook, inproceedings, incollection, article]% - {title}{\bbx@mybibquote{\mkbibemph{#1}}} -%\DeclareFieldFormat[inbook, inproceedings, incollection, article]% -% {title}{#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@cegen{\bbx@cnin}{In}\bbx@cecolon}} +\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@cegen% + \bbx@cetext% {\printnames{author}\printtext{\bbx@byspace{author}\bbx@cnauth}}% % `\usebibmacro{byauthor}' does not print with `useauthor' enabled. {\printnames[byauthor]{author}}% @@ -114,14 +118,14 @@ } \newbibmacro*{cebyeditor}{% \ifnameundef{editor}{}{% - \bbx@cegen% + \bbx@cetext% {\printnames{editor}\printtext{\bbx@byspace{editor}\bbx@cnedit}}% {\usebibmacro{byeditor}}% }% } \newbibmacro*{cebytranslator}{% \ifnameundef{translator}{}{% - \bbx@cegen% + \bbx@cetext% {\printnames{translator}\printtext{\bbx@byspace{translator}\bbx@cntrans}}% {\usebibmacro{bytranslator}}% }% @@ -157,7 +161,7 @@ } \renewbibmacro*{urldate}{% \iffieldundef{urlyear}{}{% - \printtext{\bbx@cegen{\bbx@cnretr}{retrieved on}\addspace}% + \printtext{\bbx@cetext{\bbx@cnretr}{retrieved on}\addspace}% \printurldate% }% } -- cgit v1.2.3