Skip to content

Commit

Permalink
update-20190103
Browse files Browse the repository at this point in the history
  • Loading branch information
hushidong committed Jan 3, 2019
1 parent 45bac6e commit f1ec19c
Show file tree
Hide file tree
Showing 16 changed files with 1,100 additions and 105 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ The biblatex-gb7714-2015 package provides an implementation of the bibliography

`\usepackage[backend=biber,style=gb7714-2015,gbtitlelink=true]{biblatex}`
- add options `gbcitelocal` `gbbiblocal` to control the local strings in citation and bibliography respectively, the `gblocal` set the both options (These options are also for author year style):

`gbcitelocal = gb7714-2015` to output local strings according to the reference's language, this is the default setting.
`gbcitelocal = chinese` to output local strings with chinese language word like "等".
`gbcitelocal = english` to output local strings with western language word like "et al.".

`\usepackage[backend=biber,style=gb7714-2015,gbcitelocal = chinese]{biblatex}`
- add an option `gbstrict` to control the output of some unnecessary fields for GB/T7714-2015 (This option is also for author year style).

`gbstrict=true`, not to print those fields such as language, eprint, this is the default setting.
Expand Down Expand Up @@ -630,7 +640,7 @@ biber -l zh__stroke jobname
> 宏包加载时使用:
```\usepackage[backend=biber,style=gb7714-2015ay,sortcite,sorting=ynt]{biblatex}```
```\usepackage[backend=biber,style=gb7714-2015ay,sortcites,sorting=ynt]{biblatex}```

> 正文中引用:
Expand All @@ -653,6 +663,12 @@ biber -l zh__stroke jobname
> 参考:[issue:citation的顺序和bibliography的顺序如何不关联](https://github.com/hushidong/biblatex-gb7714-2015/issues/30)


* <b>在使用作者年制时,我希望文献表同一位置引用同一作者的不同的文献实现作者姓名的压缩,该怎么操作?</b>

> 可以通过将gb7714-2015ay.cbx 中的引用的基础样式authoryear更换成authoryear-comp。

* <b>请问希望正文中作者年制的标注(引用)标签中作者数量超过国标规定的1个时,该怎么处理?</b>

Expand Down
Binary file modified biblatex-gb7714-2015.pdf
Binary file not shown.
37 changes: 34 additions & 3 deletions biblatex-gb7714-2015.tex
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,14 @@ \subsection{样式及选项加载方式}

\subsection{文献引用及其标注格式}\label{sec:cbx:usage}

要生成参考文献,第一步就是在正文中引用参考文献。引用参考文献在正文中所形成标注的格式称为参考文献标注样式也称引用样式或引用标签样式,分为两类: 顺序编码制和作者年制。引用文献的基本命令\verb|\cite|,但为了一篇文档中实现不同的标签格式,通常还需要使用其它命令。
要生成参考文献,第一步就是在正文中引用参考文献。引用参考文献在正文中所形成标注的格式称为参考文献标注样式也称引用样式或引用标签样式,分为两类: 顺序编码制和作者年制。引用文献的基本命令\verb|\cite|,但为了一篇文档中实现不同的标签格式,通常还需要使用其它命令,比如\verb|\parencite|, \verb|\parencite|, \verb|\pagescite|等。习惯natbib的用户也可以在加载natbib选项后,
使用\verb|\citet|, \verb|\citep|命令。

%顺序编码制的标注样式文件大体使用标准引用样式numeric-comp的内容
\paragraph{顺序编码制的标注样式}

\verb|\cite| 命令为上标模式,\verb|\parencite|保留非上标模式。为满足GB/T 7714-2015第10.1.3节的要求,增加了 \verb|\pagescite| 命令。为使用户免于输入文献作者来作为句子主语,完善了\verb|textcite|命令格式,并增加了\verb|\authornumcite|命令以同时输出作者和顺序编码。
\verb|\cite| 命令为上标模式,\verb|\parencite|保留非上标模式。为满足GB/T 7714-2015第10.1.3节的要求,增加了 \verb|\pagescite| 命令。为使用户免于输入文献作者来作为句子主语,完善了\verb|textcite|命令格式,
并增加了\verb|\authornumcite|命令以同时输出作者和顺序编码。
各命令使用方式如例\ref{eg:citefornumeric}所示。
各引用命令的效果如图\ref{fig:cite:num}所示。
测试文档见\href{run:example/testallformat.tex}{testallformat.tex}。
Expand Down Expand Up @@ -428,6 +430,21 @@ \subsection{文献表条目格式控制}\label{sec:entry:fmt}
\caption{文献表条目著录格式示例二}\label{fig:content:fmtb}
\end{figure}

\ref{fig:content:fmtc}给出了选项设置为 style=gb7714-2015ay, maxcitenames=2, mincitenames=1, gbbiblocal, gbcitelocal=chinese, sortcites, sorting=gbyntd 时的引用标注和文献表,可以看到引用标注和文献表中的不同本地化字符串输出效果。

\begin{figure}[!htb]
\centering
\begin{tcolorbox}[left skip=0pt,right skip=0pt,%
width=\linewidth,colframe=gblabelcolor,colback=white,arc=0pt,%
leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt]
\deflength{\textparwd}{\linewidth-1cm}
\parbox{\textparwd}{
\includegraphics{egcontentfmtc.pdf}
}
\end{tcolorbox}
\caption{文献表条目著录格式示例三}\label{fig:content:fmtc}
\end{figure}

\subsubsection{新增选项}\label{sec:added:opt}
样式包新增了一些选项,用于标签对齐方式、出版项缺省处理、责任者(作者)缺省处理等功能的控制,其使用方式与biblatex宏包选项完全相同:
\begin{description}
Expand Down Expand Up @@ -587,6 +604,20 @@ \subsubsection{新增选项}\label{sec:added:opt}

该选项的实现原理是把所有国标格式设置局部化到每一条文献打印时,处理时首先判断gbstyle 选项及文献的语言,当满足要求则使用这些局部化格式,否则使用默认的标准样式。这种实现为一篇文档内实现两种样式提供解决思路,尽管目前非中文语言文献的著录格式是标准样式,但只要对标准样式做进一步的修改就可以形成符合某种格式规范的样式,比如像ieee,nature等的样式。因此存在中文使用GB/T 7714-2015 著录格式,而英文文献使用ieee等著录格式的可能性。测试文档见:\href{run:./example/opt-gbstyle.tex}{opt-gbstyle.tex}。

\item[gblocal]=\textbf{gb7714-2015},chinese,english. \hfill default is gb7714-2015
\item[gbcitelocal]=\textbf{gb7714-2015},chinese,english. \hfill default is gb7714-2015
\item[gbbiblocal]=\textbf{gb7714-2015},chinese,english. \hfill default is gb7714-2015

为设置引用标注标签和文献表中的本地化字符串而增加的选项。其中gbcitelocal 用于控制标注中的本地化字符串,而gbbiblocal用于控制文献表中的本地化字符串,gblocal选项等价于同时设置gbcitelocal 和 gbbiblocal。
配合\lstinline[breaklines=true]!\DefineBibliographyStrings!命令对本地化字符串进行设置可以实现一些特殊的效果。图\ref{fig:content:fmtc}就是该选项的一个使用示例。
\begin{itemize}
\item gblocal=gb7714-2015,即默认区分中英文,不同语言采用不同的字符串比如中文使用“等”“和”,而英文使用“etal”“and”。
\item gblocal=chinese,强制设置所有的本地化字符串使用中文。
\item gblocal=english,强制设置所有的本地化字符串使用英文。
\end{itemize}
测试文件见:
\href{run:egfigure/egcontentfmtc.tex}{egcontentfmtc.tex}。

\end{description}


Expand Down Expand Up @@ -757,7 +788,7 @@ \subsection{多语言混合文献表}\label{sec:multilan:combine}
\end{enumerate}

本样式做了中日韩英俄法六种语言的测试,详细内容见:
\href{run:example/opt-eg-multilan.tex}{opt-eg-multilan.tex},
\href{run:example/opt-eg-multilan.tex}{opt-eg-multilan.tex},
\href{run:example/opt-autolang-multilan.tex}{opt-autolang-multilan.tex}。


Expand Down
41 changes: 38 additions & 3 deletions egfigure/egciteay.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=14cm,paperheight=9cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage[paperwidth=14cm,paperheight=13cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015ay]{biblatex}%sorting=nyt

Expand Down Expand Up @@ -66,6 +66,24 @@
Month = {1}
}

@Book{蔡敏2006a--,
Title = {UML基础和Rose建模教程-练习册一},
Address = {北京},
Author = {蔡敏},
Publisher = {人民邮电出版社},
Year = {2006},
Month = {1}
}

@Book{蔡敏2006b--,
Title = {UML基础和Rose建模教程-练习册二},
Address = {北京},
Author = {蔡敏},
Publisher = {人民邮电出版社},
Year = {2006},
Month = {1}
}

@Book{Miroslav2004--,
Title = {信号处理滤波器设计-基于matlab和mathematica的设计方法},
Address = {北京},
Expand All @@ -89,9 +107,12 @@
\end{filecontents}

\addbibresource{\jobname.bib}
\renewcommand{\thefootnote}{\textcircled{\tiny\arabic{footnote}}}

\begin{document}

%\small

不带页码的引用:
\cite{Peebles2001-100-100} \parencite{Miroslav2004--}\par
带页码的引用:
Expand All @@ -101,14 +122,28 @@
作者年制文中已有作者只需给出年份和页码的引用:
见赵学功\yearpagescite[][205]{赵学功2001--}和Miroslav\yearpagescite[][15]{Miroslav2004--}\par
作者年制文中已有作者只需给出年份的引用,三种方式:\par
见赵学功\yearcite{赵学功2001--}\par
见赵学功(\cite*{赵学功2001--})\par
见赵学功\yearcite{赵学功2001--};见赵学功(\cite*{赵学功2001--});
见赵学功(\citeyear{赵学功2001--})\par
作者年制文中无作者需要标注命令给出作者作为主语的引用:
\textcite{赵学功2001--}\par
在页脚中引用和打印文献表:
\footnote{在脚注中引用\footcite{赵学功2001--}} \footfullcite{赵学功2001--}

\noindent\fbox{
\parbox{\textwidth}{
国标示例:\par
引用文献文中无作者信息:文献\cite{Peebles2001-100-100},文献\cite{赵学功2001--}\par
引用文献文中有作者信息:文献Peebles\yearcite{Peebles2001-100-100}
,文献蔡敏\yearcite{赵学功2001--}\par
引用多作者文献:中文文献\cite{蔡敏2006--},英文文献\cite{Miroslav2004--}\par
引用同一作者同一年份文献:文献\cite{蔡敏2006a--},文献\cite{蔡敏2006b--}\par
同一处引用多篇文献:文献\cite{Peebles2001-100-100,Miroslav2004--},
文献\cite{蔡敏2006--,Miroslav2004--,赵学功2001--}\par
多次引用同一作者的同一文献:
文献\pagescite[100-108]{蔡敏2006--},
文献\pagescite[205-208]{蔡敏2006--}。
}}

%\printbibliography

\end{document}
133 changes: 133 additions & 0 deletions egfigure/egciteaytp.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=14cm,paperheight=6cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015ay,natbib]{biblatex}%sorting=nyt

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@Book{易仕和2013--,
Title = {超声速和高超声速喷管设计},
Address = {北京},
Author = {易仕和 and 赵玉新 and 何霖 and 张敏莉},
Publisher = {国防工业出版社},
Year = {2013}
}

@Book{Yi2013--,
Title = {Supersonic and hypersonic nozzle design},
Address = {Beijing},
Author = {Yi, Shi he and Zhao, Yu xin and He, Lin and Zhang, Min li},
Publisher = {National Defense Industry Press},
Year = {2013}
}

@Article{张敏莉2007-500-503,
Title = {超声速短化喷管的设计和试验研究},
Author = {张敏莉 and 易仕和 and 赵玉新},
Journal = {空气动力学报},
Number = {4},
Pages = {500-503},
Volume = {25},
Year = {2007}
}

@Article{Zhang2007-500-503,
Title = {The design and experimental investigations of supersonic length shorted nozzle},
Author = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
Journal = {ACTA AERODYNAMICA SINICA},
Number = {4},
Pages = {500-503},
Volume = {25},
Year = {2007}
}

@Book{Peebles2001-100-100,
Title = {Probability, random variable, and random signal Principles and \LaTeX{}},
Address = {New York},
Author = {von Peebles, Jr., P. Z.},
Edition = {4},
Pages = {100},
Publisher = {McGraw-Hill},
Year = {2001}
}

@Book{蔡敏2006--,
Title = {UML基础和Rose建模教程},
Address = {北京},
Author = {蔡敏 and 徐慧慧 and 黄柄强},
Publisher = {人民邮电出版社},
Year = {2006},
Month = {1}
}

@Book{蔡敏2006a--,
Title = {UML基础和Rose建模教程-练习册一},
Address = {北京},
Author = {蔡敏},
Publisher = {人民邮电出版社},
Year = {2006},
Month = {1}
}

@Book{蔡敏2006b--,
Title = {UML基础和Rose建模教程-练习册二},
Address = {北京},
Author = {蔡敏},
Publisher = {人民邮电出版社},
Year = {2006},
Month = {1}
}

@Book{Miroslav2004--,
Title = {信号处理滤波器设计-基于matlab和mathematica的设计方法},
Address = {北京},
Author = {Miroslav, D. L. and Dejan, V. T. and Brian, L. E.},
Publisher = {电子工业出版社},
Translator = {朱义胜 and 董辉},
Year = {2004},
Month = {1}
}

@Book{赵学功2001--,
Title = {当代美国外交},
Author = {赵学功},
Publisher = {社会科学文献出版社},
Url = {http://www.baidu.com},
Urldate = {2014-06-11},
Year = {2001}
}


\end{filecontents}

\addbibresource{\jobname.bib}
\renewcommand{\thefootnote}{\textcircled{\tiny\arabic{footnote}}}

\begin{document}


\noindent\fbox{
\parbox{\textwidth}{
国标示例:\par
引用文献文中无作者信息:文献\citep{Peebles2001-100-100},文献\citep{赵学功2001--}\par
引用文献文中有作者信息:文献\citet{Peebles2001-100-100}
,文献\citet{赵学功2001--}\par
引用多作者文献:中文文献\citep{蔡敏2006--},
英文文献\citep{Miroslav2004--}\par
引用同一作者同一年份文献:文献\cite{蔡敏2006a--},文献\cite{蔡敏2006b--}\par
同一处引用多篇文献:文献\cite{Peebles2001-100-100,Miroslav2004--},
文献\cite{蔡敏2006--,Miroslav2004--,赵学功2001--}\par
多次引用同一作者的同一文献:
文献\citep[100-108]{蔡敏2006--},
文献\citep[205-208]{蔡敏2006--}。
}}

%\printbibliography

\end{document}
15 changes: 14 additions & 1 deletion egfigure/egcitenum.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=13cm,paperheight=8cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage[paperwidth=13cm,paperheight=9cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}%sorting=nyt

Expand Down Expand Up @@ -89,6 +89,7 @@
\end{filecontents}

\addbibresource{\jobname.bib}
\renewcommand{\thefootnote}{\textcircled{\tiny\arabic{footnote}}}

\begin{document}

Expand All @@ -108,6 +109,18 @@
在页脚中引用和打印文献表:
\footnote{在脚注中引用\footcite{赵学功2001--}} \footfullcite{赵学功2001--}

\noindent\fbox{
\parbox{\textwidth}{
国标示例:\par
引用单篇文献:文献\cite{Peebles2001-100-100}\par
同一处引用多篇文献:文献\cite{Peebles2001-100-100,Miroslav2004--},
文献\cite{蔡敏2006--,Miroslav2004--,赵学功2001--}\par
多次引用同一作者的同一文献:
文献\pagescite[100-108]{蔡敏2006--},
文献\pagescite[205-208]{蔡敏2006--}。
}}


%\printbibliography

\end{document}
Loading

0 comments on commit f1ec19c

Please sign in to comment.