diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-15 21:35:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-15 21:35:23 +0000 |
commit | 67eab7b4233ce72f0d22d7893db835ef0039bae3 (patch) | |
tree | 8b7f91c23ad77f2b57e15832f74cfa095c36eca5 | |
parent | 2bbd822c0670ff895b6a315bc1f5678af49bf9d2 (diff) |
biblatex-caspervector (15nov19)
git-svn-id: svn://tug.org/texlive/trunk@52802 c570f23f-e606-0410-a88d-b1316a301751
15 files changed, 279 insertions, 148 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/ChangeLog.txt b/Master/texmf-dist/doc/latex/biblatex-caspervector/ChangeLog.txt index 15fb808f8aa..1fcb3b6c811 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/ChangeLog.txt +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/ChangeLog.txt @@ -1,7 +1,27 @@ -2018-06-29, v0.3.3 +2019-11-13, v0.3.4 + + * API changes: + - Add support for both Chinese and English `authortype'/`editortype'/... + - Add the `cparen' option to use Chinese parentheses in citations. * Changes to package code: + - Facilitate customisation of the character before `等', `译' etc. + - Use more common words ("检索"/"retrieve" -> "访问"/"access"). + + * Changes to documentation: + - Migrate to latexmk. + - caspervector-ay.bbx: use upstreamed `bbx:ifmergeddate'. + + * Misc: + - README: migrate to Gitea, "for obvious reasons". + - Minor fixes and cosmetics. + +2018-06-29, v0.3.3 + + * API changes: - Add support for the `edition' field. + + * Changes to package code: - Refine `maxcitenames'/`mincitenames'. - blx-caspervector-base.def: fix "et al" for citations. - blx-caspervector-base.def: improve spacing between `title' and `type'. @@ -45,9 +65,9 @@ 2018-05-28. v0.3.0 * API changes: - - Added the caspervector-ay style (`dashed' and `mergedate' supported). - - sorting: nty -> nyt. - - Reduced tolerance in `year'/`date'; `note' added for compensation. + - Add the caspervector-ay style (`dashed' and `mergedate' supported). + - Sorting: nty -> nyt. + - Reduced tolerance in `year'/`date'; `note' added in compensation. - Support `useauthor'-related functionalities. * Changes to package code: diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/Makefile b/Master/texmf-dist/doc/latex/biblatex-caspervector/Makefile deleted file mode 100644 index e37bda40e6c..00000000000 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2011-2013,2015-2016,2018 Casper Ti. Vector -# Public domain. - -JOB = caspervector - -doc: - latex $(JOB) - biber -l zh__pinyin --output-safechars $(JOB) - xelatex $(JOB) - xelatex $(JOB) - -clean: - rm -f $(JOB).aux $(JOB).bbl $(JOB).bcf $(JOB).blg $(JOB).dvi $(JOB).log \ - $(JOB).run.xml $(JOB).out missfont.log texput.log - -distclean: clean - rm -f $(JOB).pdf - -# vim:ts=4:sw=4 diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.pdf b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.pdf Binary files differindex ef68b0d0c11..a43513a2de1 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.pdf +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.tex b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.tex index 2b4fb867ec3..a98f37b11ef 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.tex +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector-ay.tex @@ -45,14 +45,17 @@ \begin{center} \begin{tabular}{ll}\hline 引用命令 & 排版结果 \\\hline -\verb|\cite{10-5, 10-6}| & \cite{10-5, 10-6} \\ +\verb|\cite{10-7, 10-8}| & \cite{10-7, 10-8} \\ \verb|\parencite[见][第 4 页]{perelman}| & \parencite[见][第 4 页]{perelman} \\ \verb|\parencite{6-1, blx-gb7714-2015}| & \parencite{6-1, blx-gb7714-2015} \\ \verb|\textcite{biblatex, a2-3}| & \textcite{biblatex, a2-3} \\\hline -\multicolumn{2}{l}{(更多用法请参考 \texttt{texdoc 50-style-authoryear}。)} \\ \end{tabular} \end{center} +更多用法请参考 \verb|texdoc 50-style-authoryear|。此外 v0.3.4 的 +\verb|caspervector| 样式中新加入了 \verb|cparen| 选项,可在调用样式时 +开启(\verb|cparen = true|)以将上述命令产生的括号改为中文(全角)括号。 + \printbibliography[category = cited, title = {本文参考文献}] \printbibliography[notcategory = cited, title = {% 其它参考文献示例 diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.bib b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.bib index ef920133ac0..72484e316ab 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.bib +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.bib @@ -52,6 +52,16 @@ language = {english}, } +@book{liuxie, + author = {刘勰}, + title = {文心雕龙译注}, + editor = {陆侃如 and 牟世金}, + editortype = {译注}, + publisher = {齐鲁书社}, + date = {1995}, + language = {chinese}, +} + @book{1-1, author = {余敏}, title = {出版集团研究}, @@ -183,7 +193,7 @@ } @incollection{2-2, - author = {陈晋镶 and 张惠民 and 朱士兴 and 其他作者}, + author = {陈晋镳 and 张惠民 and 朱士兴 and 其他作者}, title = {蓟县震旦亚界研究}, type = {M}, bookauthor = {中国地质科学院天津地质矿产研究所}, @@ -529,7 +539,29 @@ language = {chinese}, } -@article{10-5, +@book{10-5, + author = {Crane, D.}, + title = {Invisible college}, + type = {M}, + location = {Chicago}, + publisher = {Univ. of Chicago Press}, + year = {1972}, + language = {english}, +} + +@article{10-6, + author = {Stieg, M. F.}, + title = {The information needs of historians}, + type = {J}, + journal = {College and Research Libraries}, + year = {1981}, + volume = {42}, + number = {6}, + pages = {549-560}, + language = {english}, +} + +@article{10-7, author = {Kennedy, W. J. and Garrison, R. E.}, title = {Morphology and genesis of nodular chalks and hardgrounds in the Upper Cretaceous of southern England}, type = {J}, @@ -540,7 +572,7 @@ language = {english}, } -@article{10-6, +@article{10-8, author = {Kennedy, W. J. and Garrison, R. E.}, title = {Morphology and genesis of nodular phosphates in the Cenomanian of south-east England}, type = {J}, diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.pdf b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.pdf Binary files differindex caf3071af00..223d78746dc 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.pdf +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.tex b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.tex index a3e9e517457..5465f92b50b 100644 --- a/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.tex +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/caspervector.tex @@ -1,6 +1,6 @@ % Documentation for biblatex-caspervector % -% Copyright (c) 2012-2016,2018 Casper Ti. Vector +% Copyright (c) 2012-2016,2018-2019 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 @@ -23,29 +23,37 @@ backend = biber, style = caspervector, utf8, giveninits = true, sortgiveninits = true ]{biblatex} -\usepackage{fancyhdr, hyperref, enumitem, fancyvrb, hologo} +\usepackage{iftex, fancyhdr, hyperref, enumitem, fancyvrb, hologo} \hypersetup{colorlinks = true, allcolors = blue} \pagestyle{fancy}\fancyhf{}\cfoot{\thepage} -\renewcommand{\headrulewidth}{0pt} -\setlist{nolistsep} -\setlength{\hfuzz}{3pt} +\renewcommand*{\headrulewidth}{0pt} \ctexset{linestretch = {\maxdimen}} -\renewcommand{\bibfont}{\small} +\setlength{\hfuzz}{3pt} +\setlist{nolistsep} +\renewcommand*{\bibfont}{\small} + +\newcommand*{\cupercite}[1]{\supercite{#1}\mbox{}} \newcommand{\myemph}[1]{\emph{\textcolor{red}{#1}}} +\RecustomVerbatimEnvironment{Verbatim}{Verbatim}% + {frame = single, tabsize = 4, formatcom = {\ifXeTeX\xeCJKVerbAddon\fi}} +\RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}{ + fontsize = {\small}, baselinestretch = 1, + tabsize = 4, formatcom = {\ifXeTeX\xeCJKVerbAddon\fi} +} \DeclareBibliographyCategory{cited} \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}} \addbibresource{caspervector.bib} \begin{document} -\title{\textbf{biblatex 参考文献和引用样式:\texttt{caspervector} v0.3.3}} +\title{\textbf{biblatex 参考文献和引用样式:\texttt{caspervector} v0.3.4}} \author{% Casper Ti.\ Vector\thanks{\ % \href{mailto:CasperVector@gmail.com}{\texttt{CasperVector@gmail.com}}.% }% } -\date{2018/06/29} +\date{2019/11/13} \maketitle \section{引言} @@ -55,7 +63,7 @@ 使开发者难以入门和精通,更不便于一般用户进行自定义; 其次,其排序方式很单一, 无法直接实现中文 \hologo{TeX} 用户常常遇到的按汉语拼音排序等需求。 -与此相对应,biblatex\supercite{biblatex}/biber\supercite{biber} +与此相对应,biblatex\cupercite{biblatex}/biber\cupercite{biber} 是一套新兴的 \hologo{TeX} 参考文献排版引擎, 其样式文件(设定参考文献样式的 \verb|bbx| 文件和设定引用样式的 \verb|cbx| 文件) 使用 \hologo{LaTeX} 编写,便于学习; @@ -64,28 +72,27 @@ 为了个人需要,同时也是为了给社区提供一个有益的参考, 本文作者根据实际应用中遇到的常见需求编写了 \verb|caspervector| 这个中西文 biblatex 样式。 -其逻辑框架基于国家标准 GB/T 7714--2005\supercite{gbt7714-2005}, +其逻辑框架基于国家标准 GB/T 7714--2005\cupercite{gbt7714-2005}, 但在后者基础上根据个人审美趣味和 biblatex 所能实现的功能而 对参考文献和引用格式进行了较大幅度的修改。 用户如果需要更严格符合国家标准的样式,可以参考 -\verb|gb7714-2015|\supercite{blx-gb7714-2015}。 +\verb|gb7714-2015|\cupercite{blx-gb7714-2015}。 \section{许可协议} -版权所有 \copyright\ 2012--2018 Casper Ti.\ Vector。% +版权所有 \copyright\ 2012--2019 Casper Ti.\ Vector。% \verb|caspervector| 参考文献和引用样式以 \hologo{LaTeX} Project Public License\footnote{\ % \url{https://www.latex-project.org/lppl/}.% }发布。% \verb|caspervector| 样式目前由其作者维护。 -\section{系统要求和安装方式} -\subsection{系统要求} +\section{系统要求} \begin{itemize} \item biblatex 宏包(2.0 或以上版本):% \verb|caspervector| 样式基于 biblatex 宏包。 - \item biber 程序(和 biblatex 相应的版本): + \item biber 程序(和 biblatex 的相应版本): 用 biber 可以方便地实现文献按字母和拼音顺序排序。 \item 中文环境:% \verb|caspervector| 样式虽支持中文,但其本身不提供中文环境。 @@ -100,7 +107,7 @@ 用户应当通过以下命令调用 \verb|caspervector| 样式(如果须要使用 作者--年编码制,应将 \verb|caspervector| 换成 \verb|caspervector-ay|): -\begin{Verbatim}[frame = single] +\begin{Verbatim} % “utf8”可能须要改为“gbk”,根据用户使用的字符编码而定。 % “...” 代表其它选项。 \usepackage[ @@ -108,7 +115,7 @@ ]{biblatex} \end{Verbatim} 其中 \verb|sorting| 选项用于(全局)指定按哪些字段排序, -除 biblatex 提供的标准选项\supercite{biblatex}外,% +除 biblatex 提供的标准选项\cupercite{biblatex}外,% \verb|caspervector| 样式还提供 \verb|cenyt| 和 \verb|ecnyt| 两种排序方案 (\verb|caspervector| 默认设置为 \verb|none| 排序方案,即按引用顺序排序), 表示依次按文献语言 @@ -126,7 +133,7 @@ 通过 \verb|\addbibresource| 命令导入,% \myemph{注意不要省略扩展名 \texttt{.bib}}。 例如,本文的参考文献数据库就是通过下述命令导入的: -\begin{Verbatim}[frame = single] +\begin{Verbatim} \addbibresource{caspervector.bib} \end{Verbatim} 用户可以多次使用 \verb|\addbibresource| 命令, @@ -137,7 +144,7 @@ \verb|caspervector| 样式在顺序编码制下支持 biblatex 所提供的引用命令, 其中最常用的是 \verb|\supercite|、\verb|\parencite| 和 \verb|\cite|。 三个命令的用法类似: -\begin{Verbatim}[frame = single] +\begin{Verbatim} % 可选参数 prenote 和 postnote 分别用于设定引用记号前、后的注释。 \citecommand[prenote][postnote]{key} \end{Verbatim} @@ -154,14 +161,14 @@ 例如,在本文中,% \verb|\parencite{gbt7714-2005}| 的输出是“\parencite{gbt7714-2005}”, 而以下代码的输出是“\cite[文献][第 4 页]{gbt7714-2005}”: -\begin{Verbatim}[frame = single] +\begin{Verbatim} \cite[文献][第 4 页]{gbt7714-2005} \end{Verbatim} \subsection{文献列表} 使用 \verb|\printbibliography| 命令可以在相应位置排版文献列表。 -其可(在方括号内)带一些可选参数\supercite{biblatex}, +其可(在方括号内)带一些可选参数\cupercite{biblatex}, 常见的有: \begin{itemize} \item \verb|title = 标题|: @@ -174,14 +181,14 @@ \end{itemize} 例如,以下代码可以将文献列表的标题改为 “文献”,并使文献列表参与章节编号: -\begin{Verbatim}[frame = single] +\begin{Verbatim} \printbibliography[title = {文献}, heading = bibnumbered] \end{Verbatim} \subsection{编译方法} 一般情况下,依次执行以下代码即可实现正确的排版: -\begin{Verbatim}[frame = single] +\begin{Verbatim} # “texfile”是被 TeX 编译的文件名中除去“.tex”的部分。 # “pdflatex”可改为其它 TeX 程序,使用纯 latex 编译时可能还须要运行 dvipdfmx。 pdflatex texfile @@ -218,7 +225,7 @@ pdflatex texfile v0.3.2 和更早版本的 \texttt{caspervector} 样式不支持 \texttt{edition} 字段,但可手动在 \texttt{title} 字段中标注相应信息。% },若为整数则会自动排版为“第 2 版”或“2nd ed.”等形式。 - \item \verb|type|:文献类型和电子文献载体标志代码\supercite{gbt7714-2005}。 + \item \verb|type|:文献类型和电子文献载体标志代码\cupercite{gbt7714-2005}。 \item \verb|location|:出版地,或(在 \verb|@patent| 类条目中)专利申请地。 \item \verb|publisher|:出版者,或学位论文作者申请学位的单位。 \item \verb|journal|/\verb|journaltitle|:连续出版物题名,两个字段互相等价。 @@ -243,9 +250,11 @@ pdflatex texfile \item \verb|language|: 值为 \verb|chinese| 时,相应条目在文献列表中用中文排版; 否则(为其他值或未定义时)用西文排版。 + \item \verb|authortype|、\verb|editortype| 等:用于指定 + 作者、编者的具体角色,参考第 \ref{sec:editortype} 部分。 \item \verb|note|:用于排版一些特殊内容,参考第 \ref{sec:faq} 部分。 \item \verb|userf|:\verb|caspervector| 样式内部使用。 - \item 其它通用特殊字段,见 biblatex 手册\supercite{biblatex}。 + \item 其它通用特殊字段,见 biblatex 手册\cupercite{biblatex}。 \end{itemize} \section{条目类型}\label{sec:entries} @@ -341,14 +350,14 @@ pdflatex texfile 例如,如须对被引用的文献按照引用顺序排序, 而对未引用的文献按照西文文献在前、中文文献在后排序, 则可以在导言区中加入下列几行代码: -\begin{Verbatim}[frame = single] +\begin{Verbatim} % 新建条目分类(category)用于区分被引用和未引用的文献条目。 \DeclareBibliographyCategory{cited} % 每执行一次除 \nocite 之外的 \cite 类命令,将被引用的文献加到“cited”分类中。 \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}} \end{Verbatim} 在正文中准备排版文献列表的位置使用如下代码: -\begin{Verbatim}[frame = single] +\begin{Verbatim} % 按引用顺序排版“cited”分类,即被引用的文献条目。 \begin{refcontext}[sorting = none] \printbibliography[category = cited, ..., title = {References}] @@ -365,7 +374,7 @@ pdflatex texfile \texttt{\string\cite} 类命令的引用顺序。 }(例如,在本说明文档中,就是在 \verb|\end{document}| 之前一行) 加入以下代码: -\begin{Verbatim}[frame = single] +\begin{Verbatim} % 将 .bib 文件中所有的参考文献都加到引用列表中,但不将它们加到“cited”分类中, % 也不会排版引用标号,只是在最后的 \printbibliography 命令中排版相应的文献条目。 \nocite{*} @@ -373,7 +382,7 @@ pdflatex texfile 使用 biblatex 2.x 或更旧版本的用户须要 将在正文中准备排版文献列表的位置使用的代码改为: -\begin{Verbatim}[frame = single] +\begin{Verbatim} % 按引用顺序排版“cited”分类,即被引用的文献条目。 \printbibliography[category = cited, ..., sorting = none, title = {References}] % 按西文文献在前、中文文献在后排版“cited”分类之外,即未被引用的文献条目。 @@ -384,6 +393,44 @@ biblatex 3.0--3.3 中有一个 bug\footnote{\ % 可以参考 \url{https://tex.stackexchange.com/questions/250548/}。% } 导致分类排序失效,此问题基本无解。 +\section{指定作者、编者的角色}\label{sec:editortype} + +当 \verb|author|/\verb|editor| 字段对应的贡献者并不是标准的作者/编者时, +可以使用 \verb|authortype|/\verb|editortype| 来指定作者/编者的具体角色, +例如文献 \parencite{liuxie} 是通过 \verb|.bib| 文件中的以下代码排版的: +\begin{Verbatim} +@book{liuxie, + author = {刘勰}, + title = {文心雕龙译注}, + editor = {陆侃如 and 牟世金}, + editortype = {译注}, + ... +} +\end{Verbatim} +如果有多种角色的贡献者参与了文献的编写,还可以使用同被 biblatex 支持的 +\verb|editora|/\verb|editoratype|、\verb|editorb|/\verb|editorbtype|、% +\verb|editorc|/\verb|editorctype| 字段。 + +上述的 \verb|editortype| 类字段还可以设为 \verb|translatoran| +等特殊值(biblatex 中预定义的列表见其手册\supercite{biblatex}), +它们在通过类似于以下的代码定义之后会被展开为对应的内容: +\begin{Verbatim} +\NewBibliographyString{translatoran, bytranslatoran} +\DefineBibliographyStrings{english}{ + translatoran = {trans\adddot\ and annot\adddot}, + bytranslatoran = {trans\adddot\ and annot\adddot\ by}, +} +\end{Verbatim} +对于中文文献,\verb|editortype| 类字段中的特殊值在定义时须加上前缀 +\verb|cn|,例如可以使用以下代码为中文文献定义特殊值 \verb|translatoran|: +\begin{Verbatim} +\NewBibliographyString{cntranslatoran} +\DefineBibliographyStrings{english}{cntranslatoran = {译注}} +\end{Verbatim} +因为汉语语法的缘故,中文文献不需要定义 \verb|bytranslatoran| +之类的特殊值;此外考虑到这一用法所需的额外代码,一般而言对于 +中文文献直接将 \verb|editortype| 类字段设为“译注”等显然更加方便。 + \section{FAQ 和其它使用提示}\label{sec:faq} 用户可以通过省略可选字段的方式来避免排版相应的内容。 @@ -394,11 +441,11 @@ biblatex 的标准格式支持通过 \verb|eprint|、\verb|eprintclass|、\verb| 故使用了自由格式的 \verb|eid| 字段。用户可以使用 \verb|\printtext| 命令调用 biblatex 中内置的相应排版功能,例如文献 \parencite{perelman} 中的电子标识码便是通过以下设定得到的: -\begin{Verbatim}[frame = single] +\begin{Verbatim} eid = {\printtext[eprint:arxiv]{math/0211159}}, \end{Verbatim} 其中 \verb|arxiv| 可以替换为其它在标准格式中被 \verb|eprinttype| -字段支持的字符串,详见 biblatex 手册\supercite{biblatex}; +字段支持的字符串,详见 biblatex 手册\cupercite{biblatex}; 如果须要排版 DOI,应将方括号中的整个字符串替换为 \verb|doi|。% \myemph{% 须要特别注意的是,如果电子标识码中有特殊字符如 @@ -409,7 +456,7 @@ eid = {\printtext[eprint:arxiv]{math/0211159}}, 用户在很多时候可以通过手动调用格式化命令来临时覆盖预设的格式设定, 例如对于一个 \verb|@article| 类型的条目,以下代码将使年卷期号排版为类似于 “\textbf{2018},\textit{14}(\hologo{TeX} 特刊)”的形式: -\begin{Verbatim}[frame = single] +\begin{Verbatim} year = {2018}, volume = {14}, number = {\hologo{TeX} 特刊}, @@ -425,7 +472,7 @@ number = {\hologo{TeX} 特刊}, \texttt{year} 字段中设定特殊内容;在之后的版本中,为了支持作者--年编码制, \texttt{caspervector} 的内部实现进行了调整,导致其不再支持这样的用法。% }: -\begin{Verbatim}[frame = single] +\begin{Verbatim} origdate = {1845}, note = {\textbf{1845}(\emph{清同治四年})}, \end{Verbatim} @@ -442,7 +489,7 @@ biblatex 3.0--3.3 的功能调整导致分类排序失效。% \parencite{3-2} 中同时有出版起止年和起止期号的情况就无法自动排版, 只能通过用户手动实现。下面两种方式均可实现上述需求 (\verb|origdate| 字段的用法请参考第 \ref{sec:faq} 部分): -\begin{Verbatim}[frame = single] +\begin{Verbatim} @periodical{3-2, author = {中国图书馆学会}, title = {图书馆学通讯}, @@ -455,7 +502,7 @@ biblatex 3.0--3.3 的功能调整导致分类排序失效。% } \end{Verbatim} 或 -\begin{Verbatim}[frame = single] +\begin{Verbatim} @customf{3-2, author = {中国图书馆学会}, title = {图书馆学通讯}, @@ -480,7 +527,7 @@ biblatex 3.0--3.3 的功能调整导致分类排序失效。% \end{refcontext} \section{更新记录} -\VerbatimInput[tabsize = 4, fontsize = {\small}, baselinestretch = 1]{ChangeLog.txt} +\VerbatimInput{ChangeLog.txt} \nocite{*} \end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex-caspervector/latexmkrc b/Master/texmf-dist/doc/latex/biblatex-caspervector/latexmkrc new file mode 100644 index 00000000000..55643379cfc --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-caspervector/latexmkrc @@ -0,0 +1,9 @@ +# Copyright (c) 2019 Casper Ti. Vector +# Public domain. + +@default_files = ('caspervector', 'caspervector-ay'); +$pdf_mode = 5; +$bibtex_use = 1.5; +$biber = "biber -l zh__pinyin --output-safechars %O %S"; +$clean_ext = "run.xml"; + 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 index 279b7e5281f..bb46b2eb748 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-base.def @@ -1,6 +1,6 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2018 Casper Ti. Vector +% Copyright (c) 2012-2019 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 @@ -23,17 +23,19 @@ % blx-caspervector-utf8.def \ProvidesFile{blx-caspervector-base.def}% - [2018/06/29 v0.3.3 Casper Ti. Vector's biblatex library] + [2019/11/13 v0.3.4 Casper Ti. Vector's biblatex library] \RequireBiber[3] \newtoggle{bbx:gbk} \newtoggle{bbx:ugly} +\newtoggle{bbx:cparen} \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}} +\DeclareBibliographyOption{cparen}[true]{\settoggle{bbx:cparen}{#1}} \ExecuteBibliographyOptions{% - gbk, ugly = false, autopunct = false, alldates = iso, + gbk, ugly = false, cparen = false, autopunct = false, alldates = iso, minnames = 3, minitems = 3, maxcitenames = 2, mincitenames = 1% } \AtEndOfPackage{% @@ -88,10 +90,17 @@ }}% } +\NewBibliographyString{cnauthor, cneditor, cntranslator} \newcommand*{\bbx@cetext}[2]{\iffieldequalstr{userf}{zh}{#1}{#2}} -\newcommand*{\bbx@cietext}[2]{\ifboolexpr{% +\newcommand*{\bbx@cietext}[2]{\ifboolexpr{ test {\ifcitation} or test {\iffieldequalstr{userf}{zh}} }{#1}{#2}} +\newcommand*{\bbx@cieparen}[2]{\ifboolexpr{ + test {\ifcitation} and test {\iftoggle{bbx:cparen}} +}{#1}{#2}} +\newcommand*{\bbx@ifstrg}[3]{\ifboolexpr{% + test {\ifstrequal{#1}{author}} and test {\iffieldundef{authortype}} +}{#3}{#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}} @@ -109,9 +118,12 @@ \DefineBibliographyExtras{english}{% \renewcommand*{\finalandcomma}{}% } +\renewcommand*{\bibleftparen}{\bbx@cieparen{\bbx@cnlparen}{\blx@postpunct(}} +\renewcommand*{\bibrightparen}% + {\bbx@cieparen{\bbx@cnrparen}{\blx@postpunct)\midsentence}} +\DeclareDelimFormat[textcite]{nameyeardelim}{\bbx@cieparen{}{\addspace}} +\DeclareDelimFormat[textcite]{nonameyeardelim}{\bbx@cieparen{}{\addspace}} -\DefineBibliographyStrings{english}% - {bibliography = {\bbx@cnbib}, references = {\bbx@cnbib}} \DeclareFieldFormat*{pages}{#1} \DeclareFieldFormat*{url}{\url{#1}} \DeclareFieldFormat*{urldate}{#1} @@ -124,51 +136,79 @@ {\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*{cntypedelim}[1]{\ifandothers{#1}{}{\printtext{\andothersdelim}}} \newbibmacro*{cein:}% {\printtext{\bbx@cetext{\bbx@cnin}{In}\bbx@cecolon}\printtext{}} -\newbibmacro*{ceedtrans}[1]{% +\newbibmacro*{cnauedstrg}[2]{% + \printtext[#1type]{\iffieldundef{#1type}{\bibstring{cn#2}}{% + \ifbibxstring{cn\thefield{#1type}}% + {\bibstring{cn\thefield{#1type}}}{\thefield{#1type}}% + }}% +} +\newbibmacro*{cnauthorstrg}{\usebibmacro{cnauedstrg}{author}{author}} +\newbibmacro*{cneditorstrg}{\usebibmacro{cnauedstrg}{editor}{editor}} +\newbibmacro*{cntranslatorstrg}{\printtext{\bibstring{cntranslator}}} + +\newbibmacro*{ceauedtrans}[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}% + \printnames{#1}\bbx@ifstrg{#1}{% + \bbx@cetext% + {\usebibmacro{cntypedelim}{#1}\usebibmacro{cn#1strg}}% + {\setunit{\printdelim{#1typedelim}}\usebibmacro{#1strg}}% + }{}\ifstrequal{#1}{author}{}{\clearname{#1}}% }{}% } -\renewbibmacro*{editor}{\usebibmacro{ceedtrans}{editor}} -\renewbibmacro*{translator}{\usebibmacro{ceedtrans}{translator}} +\renewbibmacro*{author}{\usebibmacro{ceauedtrans}{author}} +\renewbibmacro*{editor}{\usebibmacro{ceauedtrans}{editor}} +\renewbibmacro*{translator}{\usebibmacro{ceauedtrans}{translator}} \newbibmacro*{bookauthor/editor}{% \ifnameundef{bookauthor}% - {\usebibmacro{ceedtrans}{editor}}{\printnames{bookauthor}}% + % Differs from `\usebibmacro{editor}' in caspervector-ay. + {\usebibmacro{ceauedtrans}{editor}}{\printnames{bookauthor}}% } -\newbibmacro*{cebyauthx}[1]{% - \ifboolexpr{ - test {\ifnameundef{#1}} or - (test {\ifstrequal{#1}{author}} and test {\ifuseauthor}) - }{}{% +\newbibmacro*{cebyauedbase}[2]{% + \bbx@cetext{% + \printnames[by#1]{#1}\usebibmacro{cntypedelim}{#1}% + \usebibmacro{cnauedstrg}{#1}{#2}% + }{% + \usebibmacro{bytypestrg}{#1}{#2}% + \setunit{\addspace}\printnames[by#1]{#1}% + }% +} +\renewbibmacro*{byauthor}{% + \ifboolexpr{test {\ifuseauthor} or test {\ifnameundef{author}}}% + {}{\usebibmacro{cebyauedbase}{author}{author}}% +} +\renewbibmacro*{byeditor}{% + \ifnameundef{editor}{}% + {\usebibmacro{cebyauedbase}{editor}{editor}\setunit*{\bbx@cescolon}}% + \ifnameundef{editora}{}% + {\usebibmacro{cebyauedbase}{editora}{editor}\setunit*{\bbx@cescolon}}% + \ifnameundef{editorb}{}% + {\usebibmacro{cebyauedbase}{editorb}{editor}\setunit*{\bbx@cescolon}}% + \ifnameundef{editorc}{}% + {\usebibmacro{cebyauedbase}{editorc}{editor}\setunit*{\bbx@cescolon}}% +} +\renewbibmacro*{bytranslator}{% + \ifnameundef{translator}{}{% \bbx@cetext{% - \printnames[by#1]{#1}% - \printtext{\bbx@byspace{#1}\@nameuse{bbx@cn#1}}% + \printnames[bytranslator]{translator}% + \usebibmacro{cntypedelim}{translator}\usebibmacro{cntranslatorstrg}% }{% - \bibstring{by#1}\setunit{\addspace}% - \printnames[by#1]{#1}% + \printtext{\bibstring{bytranslator}}% + \setunit{\addspace}\printnames[bytranslator]{translator}% }% }% } -\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} +\providebibmacro*{bbx:ifmergeddate}[2]{#2} \newbibmacro*{journaltitle/title}{% \iffieldundef{journaltitle}% {\bbx@print{title}}{\printfield[title]{journaltitle}}% @@ -178,8 +218,8 @@ \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 + \ifboolexpr{ + (test {\usebibmacro{bbx:ifmergeddate}} or test {\ifdateunknown}) and test {\iffieldundef{note}} }{}{\setunit{\bbx@cecolon}}% \printfield{pages}% @@ -188,8 +228,8 @@ \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 + \ifboolexpr{ + (test {\usebibmacro{bbx:ifmergeddate}} or test {\ifdateunknown}) and test {\iffieldundef{volume}} and test {\iffieldundef{number}} and test {\iffieldundef{note}} }{}{\setunit{\bbx@cecolon}}% @@ -199,7 +239,7 @@ \printfield{eid}\setunit*{\bbx@cecomma}% \printfield{url}\setunit*{\bbx@cecomma}% \iffieldundef{urlyear}{}{% - \printtext{\bbx@cetext{\bbx@cnretr}{retrieved on}\addspace}% + \printtext{\bbx@cetext{\bbx@cnretr}{accessed on}\addspace}% \printurldate% }% } diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def index 9d76570a3b8..7823cad2948 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-gbk.def @@ -1,6 +1,6 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2016,2018 Casper Ti. Vector +% Copyright (c) 2012-2016,2018-2019 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 @@ -23,7 +23,7 @@ % blx-caspervector-utf8.def \ProvidesFile{blx-caspervector-gbk.def}% - [2018/06/29 v0.3.3 Chinese punctuations and captions in GBK] + [2019/11/13 v0.3.4 Chinese punctuations and captions in GBK] \newcommand*\bbx@cnldquot{} \newcommand*\bbx@cnrdquot{} @@ -32,14 +32,20 @@ \newcommand*\bbx@cnscolon{} \newcommand*\bbx@cncolon{} \newcommand*\bbx@cnperiod{} +\newcommand*\bbx@cnlparen{} +\newcommand*\bbx@cnrparen{} \newcommand*\bbx@cnetal{} -\newcommand*\bbx@cnauthor{} -\newcommand*\bbx@cneditor{} -\newcommand*\bbx@cntranslator{} \newcommand*\bbx@cnnr{} \newcommand*\bbx@cnedition{} \newcommand*\bbx@cnin{} -\newcommand*\bbx@cnretr{} -\newcommand*\bbx@cnbib{ο} +\newcommand*\bbx@cnretr{} + +\DefineBibliographyStrings{english}{ + cnauthor = {}, + cneditor = {}, + cntranslator = {}, + bibliography = {ο}, + references = {ο}, +} % vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def index 8853f52ac4b..0bf9e4bace6 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/blx-caspervector-utf8.def @@ -1,6 +1,6 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2016,2018 Casper Ti. Vector +% Copyright (c) 2012-2016,2018-2019 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 @@ -23,7 +23,7 @@ % blx-caspervector-utf8.def \ProvidesFile{blx-caspervector-utf8.def}% - [2018/06/29 v0.3.3 Chinese punctuations and captions in UTF-8] + [2019/11/13 v0.3.4 Chinese punctuations and captions in UTF-8] \newcommand*\bbx@cnldquot{“} \newcommand*\bbx@cnrdquot{”} @@ -32,14 +32,20 @@ \newcommand*\bbx@cnscolon{;} \newcommand*\bbx@cncolon{:} \newcommand*\bbx@cnperiod{。} +\newcommand*\bbx@cnlparen{(} +\newcommand*\bbx@cnrparen{)} \newcommand*\bbx@cnetal{等} -\newcommand*\bbx@cnauthor{著} -\newcommand*\bbx@cneditor{编} -\newcommand*\bbx@cntranslator{译} \newcommand*\bbx@cnnr{第} \newcommand*\bbx@cnedition{版} \newcommand*\bbx@cnin{出自} -\newcommand*\bbx@cnretr{检索于} -\newcommand*\bbx@cnbib{参考文献} +\newcommand*\bbx@cnretr{访问于} + +\DefineBibliographyStrings{english}{ + cnauthor = {著}, + cneditor = {编}, + cntranslator = {译}, + bibliography = {参考文献}, + references = {参考文献}, +} % vim:ft=tex:ts=2:sw=2 diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx index 9e21d3d066d..e7d66d5c2f8 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.bbx @@ -1,6 +1,6 @@ % Casper Ti. Vector's biblatex style % -% Copyright (c) 2012-2018 Casper Ti. Vector +% Copyright (c) 2012-2019 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 @@ -23,31 +23,15 @@ % blx-caspervector-utf8.def \ProvidesFile{caspervector-ay.bbx}% - [2018/06/29 v0.3.3 Casper Ti. Vector's author-year biblatex bibstyle] + [2019/11/13 v0.3.4 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}} +\appto\bbx@opt@mergedate@maximum{\togglefalse{bbx:bfdate}} +\appto\bbx@opt@mergedate@compact{\togglefalse{bbx:bfdate}} +\appto\bbx@opt@mergedate@basic{\toggletrue{bbx:bfdate}} +\appto\bbx@opt@mergedate@minimum{\toggletrue{bbx:bfdate}} +\appto\bbx@opt@mergedate@false{\toggletrue{bbx:bfdate}} \ExecuteBibliographyOptions% {labeldate = year, mergedate = basic, dashed = false, sorting = ecnyt} @@ -55,21 +39,24 @@ \DeclareNameAlias{editor}{default} \DeclareNameAlias{translator}{default} -\newbibmacro*{ayedtrans}[1]{% +\newbibmacro*{ayauedtrans}[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}% + \usebibmacro{bbx:savehash}\printnames{#1}\bbx@ifstrg{#1}{% + \bbx@cetext% + {\usebibmacro{cntypedelim}{#1}}{\setunit{\printdelim{#1typedelim}}}% + }{\setunit{\printdelim{nameyeardelim}}}% + }\bbx@ifstrg{#1}{% + \bbx@cetext{\usebibmacro{cn#1strg}}{\usebibmacro{#1strg}}% + \setunit{\printdelim{nameyeardelim}}% + }{}\ifstrequal{#1}{author}{}{\clearname{#1}}% }{% \global\undef\bbx@lasthash \usebibmacro{labeltitle}\setunit*{\printdelim{nonameyeardelim}}% }\usebibmacro{date+extradate}% } -\renewbibmacro*{editor}{\usebibmacro{ayedtrans}{editor}} -\renewbibmacro*{translator}{\usebibmacro{ayedtrans}{translator}} +\renewbibmacro*{author}{\usebibmacro{ayauedtrans}{author}} +\renewbibmacro*{editor}{\usebibmacro{ayauedtrans}{editor}} +\renewbibmacro*{translator}{\usebibmacro{ayauedtrans}{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 index 50a78e9d40b..e712b44d844 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector-ay.cbx @@ -23,7 +23,7 @@ % blx-caspervector-utf8.def \ProvidesFile{caspervector-ay.cbx}% - [2018/06/29 v0.3.3 Casper Ti. Vector's author-year biblatex citestyle] + [2019/11/13 v0.3.4 Casper Ti. Vector's author-year biblatex citestyle] \RequireCitationStyle{authoryear-comp} \renewcommand*{\compcitedelim}{\bbx@citebcomma} diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx index e7960444992..72e893981c5 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.bbx @@ -23,7 +23,7 @@ % blx-caspervector-utf8.def \ProvidesFile{caspervector.bbx}% - [2018/06/29 v0.3.3 Casper Ti. Vector's numeric biblatex bibstyle] + [2019/11/13 v0.3.4 Casper Ti. Vector's numeric biblatex bibstyle] \RequireBibliographyStyle{numeric-comp} \input{blx-caspervector-base.def} diff --git a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx index 236f4c48ecd..0b6f918f8dd 100644 --- a/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-caspervector/caspervector.cbx @@ -23,7 +23,7 @@ % blx-caspervector-utf8.def \ProvidesFile{caspervector.cbx}% - [2018/06/29 v0.3.3 Casper Ti. Vector's numeric biblatex citestyle] + [2019/11/13 v0.3.4 Casper Ti. Vector's numeric biblatex citestyle] \RequireCitationStyle{numeric-comp} \ExecuteBibliographyOptions{autocite = superscript} |