summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-caspervector
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-10-13 09:45:28 +0000
committerNorbert Preining <preining@logic.at>2012-10-13 09:45:28 +0000
commitff9712db1ca63bc7701b625784c67abee7e1f17c (patch)
tree8b90ac03752f8be9313781ea46732fbe8af0a7b4 /Master/texmf-dist/tex/latex/biblatex-caspervector
parentd2e50e76ef7e64efa460c918c4c751262c063476 (diff)
new biblatex package biblatex-caspervector (13Oct)
git-svn-id: svn://tug.org/texlive/trunk@27954 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-caspervector')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def69
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def69
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx284
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx65
4 files changed, 487 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def
new file mode 100644
index 00000000000..272aec1f037
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-gbk.def
@@ -0,0 +1,69 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Casper Ti. Vector's biblatex style
+%
+% Copyright (c) 2012 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
+% 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
+% biblatex-caspervector-gbk.def
+% biblatex-caspervector-utf8.def
+
+\ProvidesFile{biblatex-caspervector-gbk.def}%
+ [2012/10/11 v0.1.4 Chinese punctuations and captions in GBK]
+
+\providecommand\cnldquot{“}
+\providecommand\cnrdquot{”}
+\providecommand\cncomma{,}
+\providecommand\cnscolon{;}
+\providecommand\cncolon{:}
+\providecommand\cnperiod{。}
+
+\DefineBibliographyStrings{english}{
+ andmore = {\cegen{等}{\mkbibemph{et\addabbrvspace al\adddot}}},
+ andothers = {\cegen{等}{\mkbibemph{et\addabbrvspace al\adddot}}},
+ bibliography = {参考文献},
+ references = {参考文献}
+}
+
+\newbibmacro{cein:}{\printtext{\cegen{出自}{In}\cecolon}}
+\newbibmacro{cebyauthor}{%
+ \ifnameundef{author}{}{%
+ \cegen%
+ {\printnames{author}\printtext{著}}%
+ {\usebibmacro{byauthor}}%
+ }%
+}
+\newbibmacro{cebyeditor}{%
+ \ifnameundef{editor}{}{%
+ \cegen%
+ {\printnames{editor}\printtext{编}}%
+ {\usebibmacro{byeditor}}%
+ }%
+}
+\newbibmacro{cebytranslator}{%
+ \ifnameundef{translator}{}{%
+ \cegen%
+ {\printnames{translator}\printtext{译}}%
+ {\usebibmacro{bytranslator}}%
+ }%
+}
+\newbibmacro{urldate}{%
+ \iffieldundef{urlyear}{}{%
+ \printtext{\cegen{检索于 }{retrieved on\addspace}}%
+ \printurldate%
+ }%
+}
+
diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def
new file mode 100644
index 00000000000..12157bfcf2d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/biblatex-caspervector-utf8.def
@@ -0,0 +1,69 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Casper Ti. Vector's biblatex style
+%
+% Copyright (c) 2012 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
+% 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
+% biblatex-caspervector-gbk.def
+% biblatex-caspervector-utf8.def
+
+\ProvidesFile{biblatex-caspervector-utf8.def}%
+ [2012/10/11 v0.1.4 Chinese punctuations and captions in UTF-8]
+
+\providecommand\cnldquot{鈥渳
+\providecommand\cnrdquot{鈥潁
+\providecommand\cncomma{锛寎
+\providecommand\cnscolon{锛泒
+\providecommand\cncolon{锛殅
+\providecommand\cnperiod{銆倉
+
+\DefineBibliographyStrings{english}{
+ andmore = {\cegen{绛墋{\mkbibemph{et\addabbrvspace al\adddot}}},
+ andothers = {\cegen{绛墋{\mkbibemph{et\addabbrvspace al\adddot}}},
+ bibliography = {鍙傝冩枃鐚畗,
+ references = {鍙傝冩枃鐚畗
+}
+
+\newbibmacro{cein:}{\printtext{\cegen{鍑鸿嚜}{In}\cecolon}}
+\newbibmacro{cebyauthor}{%
+ \ifnameundef{author}{}{%
+ \cegen%
+ {\printnames{author}\printtext{钁梷}%
+ {\usebibmacro{byauthor}}%
+ }%
+}
+\newbibmacro{cebyeditor}{%
+ \ifnameundef{editor}{}{%
+ \cegen%
+ {\printnames{editor}\printtext{缂杴}%
+ {\usebibmacro{byeditor}}%
+ }%
+}
+\newbibmacro{cebytranslator}{%
+ \ifnameundef{translator}{}{%
+ \cegen%
+ {\printnames{translator}\printtext{璇憓}%
+ {\usebibmacro{bytranslator}}%
+ }%
+}
+\newbibmacro{urldate}{%
+ \iffieldundef{urlyear}{}{%
+ \printtext{\cegen{妫绱簬 }{retrieved on\addspace}}%
+ \printurldate%
+ }%
+}
+
diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx
new file mode 100644
index 00000000000..37299e57c1a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx
@@ -0,0 +1,284 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Casper Ti. Vector's biblatex style
+%
+% Copyright (c) 2012 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
+% 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
+% biblatex-caspervector-gbk.def
+% biblatex-caspervector-utf8.def
+
+\ProvidesFile{caspervector.bbx}%
+ [2012/10/11 v0.1.4 Casper Ti. Vector's biblatex bibliography style]
+
+\RequireBibliographyStyle{numeric}
+
+\newtoggle{bbx:gbk}
+\DeclareBibliographyOption{utf8}[true]{\togglefalse{bbx:gbk}}
+\DeclareBibliographyOption{gbk}[true]{\toggletrue{bbx:gbk}}
+\ExecuteBibliographyOptions{alldates = iso8601, gbk, sorting = ecnty}
+\AtEndOfPackage{%
+ \iftoggle{bbx:gbk}{
+ \input{biblatex-caspervector-gbk.def}
+ \ExecuteBibliographyOptions{texencoding = GBK}
+ }{
+ \input{biblatex-caspervector-utf8.def}
+ \ExecuteBibliographyOptions{texencoding = UTF-8}
+ }%
+}
+
+\providecommand{\cegen}[2]{%
+ \ifthenelse%
+ {\iffieldequalstr{userf}{zh} \or \iffieldequalstr{userf}{cn}}%
+ {#1}{#2}%
+}
+\providecommand{\mybibquote}[1]{\cegen{\cnldquot{#1}\cnrdquot}{\mkbibquote{#1}}}
+\providecommand{\cecomma}{\cegen{\cncomma}{\addcomma\addspace}}
+\providecommand{\cecolon}{\cegen{\cncolon}{\addcolon\addspace}}
+\providecommand{\cescolon}{\cegen{\cnscolon}{\addcolon\addspace}}
+\providecommand{\ceperiod}{\cegen{\cnperiod}{\addperiod\addspace}}
+\providecommand{\cespace}{\cegen{}{\addspace}}
+\renewcommand{\finentrypunct}{\cegen{\cnperiod}{.}}
+\renewcommand{\multinamedelim}{\cecomma}
+\renewcommand{\finalnamedelim}{\cegen{\cncomma}{\addspace\bibstring{and}\space}}
+\renewcommand{\andothersdelim}{\cespace}
+\renewcommand{\postnotedelim}{\cecomma}
+\renewcommand{\bibendnotewrapper}[1]{\bibsentence #1\cnperiod}
+\renewcommand{\bibfootnotewrapper}[1]{\bibsentence #1\cnperiod}
+
+\DeclareFieldFormat*{booktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat*{journaltitle}{\mkbibemph{#1}}
+\DeclareFieldFormat*{title}{\mkbibemph{#1}}
+\DeclareFieldFormat*{year}{\mkbibbold{#1}}
+\DeclareFieldFormat*{volume}{\mkbibemph{#1}}
+\DeclareFieldFormat*{pages}{#1}
+\DeclareFieldFormat*{url}{\url{#1}}
+\DeclareFieldFormat*{urldate}{#1}
+
+\DeclareFieldFormat[inbook, inproceedings, incollection, article]%
+ {title}{\mybibquote{\mkbibemph{#1}}}
+\DeclareFieldFormat*{type}{\mkbibbrackets{\textsc{#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}}}
+
+\DeclareNameFormat{default}{%
+ \usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
+ \usebibmacro{name:andothers}%
+}
+\DeclareNameAlias{sortname}{default}
+
+\newbibmacro{author+others}{%
+ \ifthenelse%
+ {\ifnameundef{author} \and \ifnameundef{editor} \and \ifnameundef{translator}}%
+ {}%
+ {%
+ \ifthenelse{\ifnameundef{editor} \and \ifnameundef{translator}}%
+ {\printnames{author}}%
+ {%
+ \usebibmacro{cebyauthor}\setunit{\cescolon}%
+ \usebibmacro{cebyeditor}\setunit{\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{\cecomma}%
+ \printfield{volume}%
+ \usebibmacro{number}%
+ }{\printdate}%
+}
+
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \newblock
+ \usebibmacro{author+others}\setunit*{\ceperiod}%
+ \newblock
+ \usebibmacro{title}\setunit*{\addspace}%
+ \usebibmacro{type}\setunit{\ceperiod}%
+ \newblock
+ \printlist{location}\setunit*{\cecolon}%
+ \printlist{publisher}\setunit{\cecomma}%
+ \usebibmacro{year/date}\setunit{\cecolon}%
+ \printfield{pages}\setunit{\ceperiod}%
+ \newblock
+ \printfield{url}\setunit*{\cecomma}%
+ \usebibmacro{urldate}\usebibmacro{finentry}%
+ \newblock
+ \printfield{addendum}%
+}
+
+\DeclareBibliographyDriver{incollection}{%
+ \usebibmacro{bibindex}%
+ \newblock
+ \usebibmacro{author+others}\setunit*{\ceperiod}%
+ \newblock
+ \usebibmacro{title}\setunit*{\cespace}%
+ \usebibmacro{type}\setunit{\ceperiod}%
+ \newblock
+ \usebibmacro{cein:}%
+ \newblock
+ \printnames{bookauthor}\setunit*{\ceperiod}%
+ \newblock
+ \printfield{booktitle}\setunit*{\ceperiod}%
+ \newblock
+ \printlist{location}\setunit*{\cecolon}%
+ \printlist{publisher}\setunit{\cecomma}%
+ \usebibmacro{year/date}\setunit{\cecolon}%
+ \printfield{pages}\setunit{\ceperiod}%
+ \newblock
+ \printfield{url}\setunit*{\cecomma}%
+ \usebibmacro{urldate}\usebibmacro{finentry}%
+ \newblock
+ \printfield{addendum}%
+}
+
+\DeclareBibliographyDriver{periodical}{%
+ \usebibmacro{bibindex}%
+ \newblock
+ \usebibmacro{author+others}\setunit*{\ceperiod}%
+ \newblock
+ \usebibmacro{journaltitle/title}\setunit*{\addspace}%
+ \usebibmacro{type}\setunit{\ceperiod}%
+ \newblock
+ \usebibmacro{(year+volume+number)/date}\setunit*{\ceperiod}%
+ \newblock
+ \printlist{location}\setunit*{\cecolon}%
+ \printlist{publisher}\setunit{\ceperiod}%
+ \newblock
+ \printfield{url}\setunit*{\cecomma}%
+ \usebibmacro{urldate}\usebibmacro{finentry}%
+ \newblock
+ \printfield{addendum}%
+}
+
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \newblock
+ \printnames{author}\setunit*{\ceperiod}%
+ \newblock
+ \usebibmacro{title}\setunit*{\cespace}%
+ \usebibmacro{type}\setunit{\ceperiod}%
+ \newblock
+ \printfield{journaltitle}\setunit*{\cecomma}%
+ \usebibmacro{(year+volume+number)/date}\setunit{\cecolon}%
+ \printfield{pages}\setunit{\ceperiod}%
+ \newblock
+ \printfield{url}\setunit*{\cecomma}%
+ \usebibmacro{urldate}\usebibmacro{finentry}%
+ \newblock
+ \printfield{addendum}%
+}
+
+\DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \newblock
+ \usebibmacro{author}\setunit*{\ceperiod}%
+ \newblock
+ \usebibmacro{title}\setunit*{\addspace}%
+ \usebibmacro{type}\setunit{\ceperiod}%
+ \newblock
+ \printlist{location}\setunit*{\cecolon}%
+ \usebibmacro{number}\setunit{\ceperiod}%
+ \newblock
+ \usebibmacro{year/date}\setunit*{\ceperiod}%
+ \newblock
+ \printfield{url}\setunit*{\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}
+ \literal{en}
+ }
+ \sort{
+ \name{sortname}
+ \name{author}
+ \name{editor}
+ \name{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}
+ \literal{en}
+ }
+ \sort{
+ \name{sortname}
+ \name{author}
+ \name{editor}
+ \name{translator}
+ \field{sorttitle}
+ \field{title}
+ }
+ \sort{
+ \field{sorttitle}
+ \field{title}
+ }
+ \sort{
+ \field{sortyear}
+ \field{year}
+ }
+}
+
diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx
new file mode 100644
index 00000000000..cc352a5b21b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx
@@ -0,0 +1,65 @@
+% vim:ft=tex:ts=2:sw=2
+%
+% Casper Ti. Vector's biblatex style
+%
+% Copyright (c) 2012 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
+% 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
+% biblatex-caspervector-gbk.def
+% biblatex-caspervector-utf8.def
+
+\ProvidesFile{caspervector.cbx}%
+ [2012/10/11 v0.1.4 Casper Ti. Vector's biblatex citation style]
+
+\RequireCitationStyle{numeric-comp}
+\ExecuteBibliographyOptions{
+ autocite = superscript,
+ autopunct = false
+}
+
+\providecommand{\mksuperbrackets}[1]{\mkbibsuperscript{\mkbibbrackets{#1}}}
+
+\DeclareCiteCommand{\cite}
+{%
+ \usebibmacro{cite:init}%
+ \usebibmacro{prenote}%
+}
+{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}%
+}
+{}
+{%
+ \usebibmacro{cite:dump}%
+ \usebibmacro{postnote}%
+}
+
+\DeclareCiteCommand{\supercite}[\mksuperbrackets]
+{%
+ \usebibmacro{cite:init}%
+ \let\multicitedelim=\supercitedelim
+ \usebibmacro{prenote}%
+}
+{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}%
+}%
+{}
+{%
+ \usebibmacro{cite:dump}%
+ \usebibmacro{postnote}%
+}
+