Skip to content

Commit

Permalink
update-20210522-correct the bugs introduced by the previous updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hushidong committed May 22, 2021
1 parent d09afd1 commit c7188f3
Show file tree
Hide file tree
Showing 20 changed files with 207 additions and 220 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ biblatex-gb7714-2015 宏包是中文参考文献著录/标注标准 `GB/T 7714-2

## Need to do:

* 注意:ms.bbx样式引入内容时需要特别注意空格的引入
* 注意:mx.cbx样式的没有更新一些新的设置(比如2篇文件就压缩等),若有需要可以参考15.cbx和15ay.cbx修改。
* 应该说经过这些年的使用,很多corner case已经处理过了,但还是可能会存在一些,特别是ms和mx两个样式使用的少。
* special characters in all fields?
* entry without author: the delimiter between title and year?
* TEST FOR texlive 2015,2016,2017



## Applications
Expand Down Expand Up @@ -1278,6 +1282,9 @@ biblatex中处理顺序数字编码压缩的代码默认从3个连续编码开
- ![test-translator-in-other-lan.tex](example/test-translator-in-other-lan.tex) 测试译著的其它语言的译者格式
- ![test-space-after-citelabel-inCJKline.tex](example/test-space-after-citelabel-inCJKline.tex) 测试删除标注后因为xeCJK加入的空格
- ![test-special-chars-in-fields.tex](example/test-special-chars-in-fields.tex) 测试不同域中存在的特殊字符处理
- ![test-gbt-7714-1987.tex](example/test-gbt-7714-1987.tex) 测试GB/T7714-1987标准的样式
- ![test-gbt-7714-2005.tex](example/test-gbt-7714-2005.tex) 测试GB/T7714-2005标准的样式



---------------------------------------------------------
Expand Down
Binary file modified biblatex-gb7714-2015.pdf
Binary file not shown.
24 changes: 20 additions & 4 deletions egfigure/tgbcitationms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
%\usebibmacro{begentry}%
\begingroup
\usebibmacro{author/editor+others/translator+others}\par
%\usebibmacro{finentry}
\endgroup
%\usebibmacro{finentry}
}


Expand Down Expand Up @@ -58,14 +58,14 @@

\DeclareBibliographyDriver{titlexample}{%
\usebibmacro{begentry}%
\iffieldundef{title}{\usebibmacro{journal+issuetitle}}{\usebibmacro{title}}
\iffieldundef{title}{\usebibmacro{journal+issuetitle}}{\usebibmacro{title}}%
\usebibmacro{finentry}
}

\DeclareBibliographyDriver{editionexample}{%
%\usebibmacro{begentry}%
\begingroup
\printfield{edition}\par
\printfield{edition}\par%
%\usebibmacro{finentry}
\endgroup
}
Expand All @@ -84,7 +84,7 @@
\ifkeyword{news}{\usebibmacro{newsdate}}{\usebibmacro{institution+location+date}}}%\par
\usebibmacro{chapter+pages}%
\usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。
\usebibmacro{finentry}
\usebibmacro{finentry}%
}

\DeclareBibliographyDriver{dvnpexample}{%
Expand All @@ -110,8 +110,24 @@
\defbibheading{biblist}[\bibname]{%
\paragraph*{#1}}


\addbibresource{example.bib}

%
%注意要让printbiblist使用相关设置。这句命令不知道什么时候删掉了都不知道
%所以导致出现问题了,2021-05-22,今天找了半天才看到问题所在。
%而不是ms样式自然是不需要的,因为设置都是全局的,所以是正确的。
%我估计还是biblatex有所改动导致的问题。
%以前AtEveryLositem或者AtEveryBibitem这两个命令可能涵盖了相关功能。
\AtBeginBiblist{authorexample}{\localsetchinesecode}
\AtBeginBiblist{titlexamplea}{\localsetchinesecode}
\AtBeginBiblist{titlexample}{\localsetchinesecode}
\AtBeginBiblist{editionexample}{\localsetchinesecode}
\AtBeginBiblist{pubexample}{\localsetchinesecode}
\AtBeginBiblist{dateexample}{\localsetchinesecode}
\AtBeginBiblist{dvnpexample}{\localsetchinesecode}


\begin{document}


Expand Down
4 changes: 3 additions & 1 deletion egthesis/thesis-nwafu-ay.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
sortlocale=zh__pinyin,
gbtype=false,
maxbibnames=99,% 著录所有作者
minbibnames=1,
maxcitenames=2,% 引用标注中最多显示2个作者
mincitenames=1,% 3个及3个以上的作者截断为1个作者
%gbnamefmt=lowercase,% 姓名大小写由输出定
Expand All @@ -26,7 +27,8 @@
gbfieldtype=true,
gbpunctin=false,
uniquename=false,
uniquelist=false
uniquelist=false,
nohashothers=false,
]{biblatex}

\makeatletter
Expand Down
2 changes: 1 addition & 1 deletion example/opt-autolang-multilan.tex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
% !Mode:: "TeX:UTF-8"% 用于测试gb7714-2015样式,是否支持多语言混合的文献表% 测试biblatex提供的基于babel的本地化字符串自动切换% 测试biblatex的autolang选项\documentclass[twoside]{article} \usepackage{ctex} %使用babel的方式 %\usepackage[russian,french,english]{babel} %使用polyglossia的方式 \usepackage{polyglossia} \setdefaultlanguage{english} \setotherlanguages{russian,french} \usepackage{fontspec} \setmainfont{CMU Serif} \IfFileExists{SourceHanSerifSC-Regular.otf} {\setCJKmainfont{SourceHanSerifSC-Regular.otf}}{} %\IfFontExistsTF{⟨font name⟩}{⟨true branch⟩}{⟨false branch⟩} \usepackage{xcolor} \usepackage{hyperref} \usepackage{lipsum} \usepackage[top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}%\usepackage[backend=biber,style=gb7714-2015,gbalign=gb7714-2015,%gbnamefmt=none,gbfieldstd=false,gbtype=true,gbpunctin=true,gbpub=true]{biblatex}%,gbnamefmt=apa,gbtitlelink=true\usepackage[backend=biber,style=gb7714-2015ay,gbpub=false,language=auto,autolang=other]{biblatex}%\usepackage[backend=biber,style=authoryear,autolang=other]{biblatex}%\usepackage[backend=biber,style=numeric-comp,giveninits=false]{biblatex}%giveninits=false\usepackage{filecontents}\begin{filecontents}{\jobname.bib}@INPROCEEDINGS{frenchref, AUTHOR = {Beneton Philippe and Touchard Jean and Beton Philippe and Betin Philippe}, BOOKTITLE = {Revue française de science politique}, DATE = {1968}, PAGES = {19--46}, TITLE = {ôçLes interprétations de la crise de mai-juinŕł},}% langid={french}@ARTICLE{greenwood1988, AUTHOR = {Greenwood, Jeremy and Hercowitz, Zvi and Huffman, Gregory W and Williams, Joedge}, PUBLISHER = {JSTOR}, DATE = {1988}, JOURNALTITLE = {The American Economic Review}, KEYWORDS = {greenwood1988investment}, PAGES = {402--417}, TITLE = {Investment, capacity utilization, and the real business cycle}, langid={english}}%langid={english}@BOOK{russainref, AUTHOR = {Кузнецов, А. В. and Кузнецов, C. В. and Кузнецов, D. В. and Кузнецов, E. В.}, TITLE = {Русский язык и языковая личность}, LOCATION = {М.}, PUBLISHER = {Диалог МГУ}, DATE = {1998}, PAGES = {28},}%langid={russian}@ARTICLE{刘凤良2017, AUTHOR = {刘凤良 and 章潇萌 and 于泽 and 黄晓}, DATE = {2017}, JOURNALTITLE = {金融研究}, KEYWORDS = {刘凤良2017}, NUMBER = {2}, PAGES = {54--69}, TITLE = {高投资、结构失衡与价格指数二元分化},}% langid={english}@BOOK{青木昌彦1996--, AUTHOR = {青木昌彦 and 青木昌一 and 青木昌二 and 青木昌三}, PUBLISHER = {東洋経済新報社}, DATE = {1996}, PAGES = {288}, TITLE = {メインバンク ・ システムのモニタリング機能としての特徴},}@INPROCEEDINGS{kereanref, AUTHOR = {김주성 and 함승호 and 김기수 and 김기회}, BOOKTITLE = {2015 한국 CAD/CAM 학회 동계학술대회 논문집}, DATE = {2015}, address={울산}, PAGES = {19--46}, TITLE = {해저 저질과 환경 하중을 고려한 침몰 선체 인양 시뮬레이션},}%외\end{filecontents} \addbibresource{\jobname.bib} % %\renewcommand{\bibtitlefont}{\kaishu} \begin{document} \section{测试gb7714-2015样式多语言混合的文献表} created with biblatex v\versionofbiblatex, last revised at 2019-01-19;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle. \cite{frenchref} \cite{greenwood1988}\cite{russainref}\cite{刘凤良2017}\cite{青木昌彦1996--}\cite{kereanref} \printbibliography \end{document}
% !Mode:: "TeX:UTF-8"% 用于测试gb7714-2015样式,是否支持多语言混合的文献表% 测试biblatex提供的基于babel的本地化字符串自动切换% 测试biblatex的autolang选项\documentclass[twoside]{article} \usepackage{ctex} %使用babel的方式 %\usepackage[russian,french,english]{babel} %使用polyglossia的方式 \usepackage{polyglossia} \setdefaultlanguage{english} \setotherlanguages{russian,french} \usepackage{fontspec} \setmainfont{CMU Serif} \IfFileExists{SourceHanSerifSC-Regular.otf} {\setCJKmainfont{SourceHanSerifSC-Regular.otf}}{} %\IfFontExistsTF{⟨font name⟩}{⟨true branch⟩}{⟨false branch⟩} \usepackage{xcolor} \usepackage{hyperref} \usepackage{lipsum} \usepackage[top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}%\usepackage[backend=biber,style=gb7714-2015,gbalign=gb7714-2015,%gbnamefmt=none,gbfieldstd=false,gbtype=true,gbpunctin=true,gbpub=true]{biblatex}%,gbnamefmt=apa,gbtitlelink=true\usepackage[backend=biber,style=gb7714-2015ay,gbpub=false,language=auto,autolang=other]{biblatex}%\usepackage[backend=biber,style=authoryear,autolang=other]{biblatex}%\usepackage[backend=biber,style=numeric-comp,giveninits=false]{biblatex}%giveninits=false\usepackage{filecontents}\begin{filecontents}{\jobname.bib}@INPROCEEDINGS{frenchref, AUTHOR = {Beneton Philippe and Touchard Jean and Beton Philippe and Betin Philippe}, BOOKTITLE = {Revue française de science politique}, DATE = {1968}, PAGES = {19--46}, TITLE = {ôçLes interprétations de la crise de mai-juinŕł},}% langid={french}@ARTICLE{greenwood1988, AUTHOR = {Greenwood, Jeremy and Hercowitz, Zvi and Huffman, Gregory W and Williams, Joedge}, PUBLISHER = {JSTOR}, DATE = {1988}, JOURNALTITLE = {The American Economic Review}, KEYWORDS = {greenwood1988investment}, PAGES = {402--417}, TITLE = {Investment, capacity utilization, and the real business cycle}, langid={english}}%langid={english}@BOOK{russainref, AUTHOR = {Кузнецов, А. В. and Кузнецов, C. В. and Кузнецов, D. В. and Кузнецов, E. В.}, TITLE = {Русский язык и языковая личность}, LOCATION = {М.}, PUBLISHER = {Диалог МГУ}, DATE = {1998}, PAGES = {28},}%langid={russian}@ARTICLE{刘凤良2017, AUTHOR = {刘凤良 and 章潇萌 and 于泽 and 黄晓}, DATE = {2017}, JOURNALTITLE = {金融研究}, KEYWORDS = {刘凤良2017}, NUMBER = {2}, PAGES = {54--69}, TITLE = {高投资、结构失衡与价格指数二元分化},}% langid={english}@BOOK{青木昌彦1996--, AUTHOR = {青木昌彦 and 青木昌一 and 青木昌二 and 青木昌三}, PUBLISHER = {東洋経済新報社}, DATE = {1996}, PAGES = {288}, TITLE = {メインバンク ・ システムのモニタリング機能としての特徴},}@INPROCEEDINGS{kereanref, AUTHOR = {김주성 and 함승호 and 김기수 and 김기회}, BOOKTITLE = {2015 한국 CAD/CAM 학회 동계학술대회 논문집}, DATE = {2015}, address={울산}, PAGES = {19--46}, TITLE = {해저 저질과 환경 하중을 고려한 침몰 선체 인양 시뮬레이션},}%외\end{filecontents} \addbibresource{\jobname.bib} % %\renewcommand{\bibtitlefont}{\kaishu} \begin{document} \section{测试gb7714-2015样式多语言混合的文献表}% created with biblatex v\versionofbiblatex, last revised at 2019-01-19;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle. \cite{frenchref} \cite{greenwood1988}\cite{russainref}\cite{刘凤良2017}\cite{青木昌彦1996--}\cite{kereanref} \printbibliography \end{document}
Expand Down
2 changes: 1 addition & 1 deletion example/opt-eg-multilan.tex
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

\begin{document}
\section{测试gb7714-2015样式多语言混合文献表:不使用babel}
created with biblatex v\versionofbiblatex, last revised at 2019-01-19;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.
% created with biblatex v\versionofbiblatex, last revised at 2019-01-19;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.

\nocite{*}

Expand Down
4 changes: 2 additions & 2 deletions gb7714-2015.bbx
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
\ifstrequal{#1}{familyahead}{\setcounter{gbnamefmtcase}{3}}{}
\ifstrequal{#1}{pinyin}{\setcounter{gbnamefmtcase}{4}}{}%family-given
\ifstrequal{#1}{reverseorder}{\setcounter{gbnamefmtcase}{5}}{}%family-given/given-family
\ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%family-given
\ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%全拼
}
\ExecuteBibliographyOptions{gbnamefmt}

Expand Down Expand Up @@ -1045,7 +1045,7 @@
\step[fieldsource=nameformat,match=pinyin,final]
\step[fieldset=namefmtid,fieldvalue={4}]
}
\map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况
\map{%处理在bib文件中直接给出文献的姓名格式为全拼的情况
\step[fieldsource=nameformat,match=quanpin,final]
\step[fieldset=namefmtid,fieldvalue={6}]
}
Expand Down
Loading

0 comments on commit c7188f3

Please sign in to comment.