Skip to content

Commit

Permalink
update-20190203-脚注方式实现
Browse files Browse the repository at this point in the history
  • Loading branch information
hushidong committed Feb 3, 2019
1 parent 4d47743 commit 72943a9
Show file tree
Hide file tree
Showing 13 changed files with 452 additions and 18 deletions.
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ A biblatex implementation of the `GB/T 7714-2015` bibliography style for Chinese

The biblatex-gb7714-2015 package provides an implementation of the bibliography style of the `GB/T 7714-2015` bibliography style. This implementation follows `GB/T 7714-2015` standard, and can be used simply by loading biblatex with the appropriate option


---------------------------------------------------------

## Need to do:

1. beamer类中的国标要求的顺序编码的脚注方式
2. 脚注样式的超链接问题


* different style for references of different languages,like:gb7714-2015 for chinese refs and trad-unsrt for english refs。
* special characters in all fields?
* entry without author: the delimiter between title and year?
* TEST FOR texlive 2015,2016
* [1],(1),1.,box{1},superscript,compress,noncompress


## Usage
* for numerical sequence style: gb7714-2015

Expand Down Expand Up @@ -120,6 +136,14 @@ The biblatex-gb7714-2015 package provides an implementation of the bibliography

`\usepackage[backend=biber,style=gb7714-2015,gbtitlelink=true]{biblatex}`
- add an option `gbfootbib` to control the bibliography in footnote (This option is also for author year style):

`gbfootbib = true` make patches to match the standard, this is the default setting.
`gbfootbib = false` not to patch.

`\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.
Expand Down Expand Up @@ -818,14 +842,7 @@ biber -l zh__stroke jobname

![示例c](example/fig-nameformat.png)

---------------------------------------------------------

## Need to do:
* different style for references of different languages,like:gb7714-2015 for chinese refs and trad-unsrt for english refs。
* special characters in all fields?
* entry without author: the delimiter between title and year?
* TEST FOR texlive 2015,2016
* [1],(1),1.,box{1},superscript,compress,noncompress

---------------------------------------------------------

Expand Down
Binary file modified biblatex-gb7714-2015.pdf
Binary file not shown.
42 changes: 39 additions & 3 deletions biblatex-gb7714-2015.tex
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,20 @@ \subsubsection{新增选项}\label{sec:added:opt}
测试文件见:
\href{run:egfigure/egcontentfmtc.tex}{egcontentfmtc.tex}。


\item[gbfootbib]=\textbf{true},false. \hfill default is true

为实现国标样式的脚注文献表格式而增加的选项。
\begin{itemize}
\item gbstyle=true,即默认做处理使脚注文献表满足国标要求。
\item gbstyle=false,不做任何附加处理。
\end{itemize}

该选项的实现主要是两个方面:一是实现国标要求的脚注标签和段落格式,利用对
\verb|\@makefnmark|重定义实现正文脚注标签带圈上标,
利用对\verb|\@makefntext|做patch局部化重设\verb|\@makefnmark|使得脚注中的标签不上标,利用footmisc宏包实现对脚注的悬挂对齐;二是实现国标要求的相同的文献不输出,而是简化输出,比如同\textcircled{4}等,主要利用citetracker选项实现对文献引用的追踪,然后利用ifciteseen判断和对footfullcite命令做修改实现。
测试文档见:\href{run:./example/opt-gbfootbib.tex}{opt-gbfootbib.tex}。

\end{description}


Expand Down Expand Up @@ -1197,7 +1211,7 @@ \subsection{数据库bib文件和数据录入}\label{sec:bib:bibtex}
\item[mark/usera] 不用输入,自动处理。也可以输入文献类型标识符比如M, J, DB, CP等。
\item[medium] 不用输入,自动处理。也可以输入文献载体标识符比如MT, DK, CD, OL 等。
\item[language] 不用输入,自动处理。也可以输入语言类型比如english, russian, french, japnese, korean, chinese等。主要用来标识文献的语言类型,用法详见\ref{sec:multilan:combine}节。
\item[langid] 不用输入,自动处理。也可以输入语言名比如english, russian, french等,中日韩语一般用english。主要用于配合babel等宏包进行文献的本地化字符串处理,用法详见\ref{sec:multilan:combine}节。
\item[langid] 不用输入,自动处理。也可以输入语言名比如english, russian, french 等,中日韩语一般用english。主要用于配合babel等宏包进行文献的本地化字符串处理,用法详见\ref{sec:multilan:combine}节。
\item[nameformat] 不用输入。当需要调整当前条目的作者姓名的格式时,可以输入格式名:uppercase, lowercase, givenahead, familyahead, pinyin等。详见\ref{sec:added:opt}节。
\item[namefmtid] 不用输入。
\end{description}
Expand Down Expand Up @@ -1292,7 +1306,27 @@ \subsubsection{文献标注法}

多次引用同一著者的同一文献时,可在序号的方括号外著录该文献引文页码,这一要求与引用(标注)样式无关,需要作者在写文档时使用相应的引用命令并在需要时输入页码信息。针对这一要求,在cite等常用命令基础上,新定义了一个引用命令pagescite,其使用方式详见第\ref{sec:cbx:usage}节。标注样式更详细要求参考GB/T 7714-2015 第10.1节。

如果顺序编码制采用脚注方式,则序号由计算机自动生成圈码。多次引用同一著者的同一文献时,若采用脚注方式应重复著录参考文献(这里可以理解为,采用该方式,同一文献的不同页码的引文就相当于一篇新的引文),只是在参考文献列表中可以简化(当然不进行简化,简单复制后录入对于latex的参考文献处理其实更方便)。事实上对于顺序编码用脚注方式,GB/T 7714-2015并没有详细说明脚注方式到底是什么?从举例看只是序号用类似于脚注的标签,那么对于参考文献样式来说,与非脚注方式的差别仅在于引用和参考文献条目的序号标签的差别,如此是容易通过修改样式文件得到的,但实际使用中除非有特殊要求,否则使用意义不大,因此本样式没有实现该功能。
如果顺序编码制采用脚注方式,则序号由计算机自动生成圈码。多次引用同一著者的同一文献时,若采用脚注方式应重复著录参考文献,但在参考文献列表中的著录项目可以简化文献序号和页码。

脚注方式的顺序编码制与一般的顺序编码制的主要差别在于:
一、正文每个文献需要引用均生成脚注文献,因此一个引用命令只能带一个文献引用关键字。且正文中引用的标注标签格式不同,是带圈的上标数字而不是[]包围的数字。
二、脚注中的文献表即便是遇到相同文献也需要重复输出,但可以简化为序号和页码。

事实上如果不进行简化而只是简单重复输出,对于biblatex来说处理其实更方便,但为了与GB/T 7714-2015 标准给出的示例一致,biblatex-gb7714-2015也做了实现,注意:需要在脚注中输出文献表的引用命令为\verb|\footfullcite|。GB/T 7714-2015 标准中示例实现如图\ref{fig:numeric:footnote}所示:

\begin{figure}[!htb]
\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]
\centering
\deflength{\textparwd}{\linewidth-1cm}
\parbox{\textparwd}{
\includegraphics{eggbfootstyle.pdf}
}
\end{tcolorbox}
\caption{顺序编码制的脚注方式}\label{fig:numeric:footnote}
\end{figure}


\subsection{作者年制}

Expand Down Expand Up @@ -1689,7 +1723,9 @@ \subsection{存在的问题}
\subsection{下一步工作}

\begin{enumerate}
\item 到目前,无论是基本功能还是附加功能,biblatex-gb7714-2015样式包已经基本够用,剩下的问题可能是一些特殊情况时带来的适应性问题,这需要经过大量的测试来发现问题。如果在使用过程中发现什么问题,请邮件联系作者,非常感谢!
\item 到1.0p版本,已经完全实现GB/T 7714-2015样式要求格式,并增加了更多的功能,剩下的问题主要是用户一些特殊需求实现以及可能存在的兼容性问题,需要广大用户发现和建议,非常感谢!

%到目前,无论是基本功能还是附加功能,biblatex-gb7714-2015样式包已经基本够用,剩下的问题可能是一些特殊情况时带来的适应性问题,这需要经过大量的测试来发现问题。如果在使用过程中发现什么问题,请邮件联系作者,非常感谢!

% 到1.0i版为止,进一步完善了: GB7714风格的文献表标签项对齐设计,编组内信息的中英文判断,特殊或老的bibtex 条目类型支持,改善空格设计以满足断行要求,支持了宏包选项(url等)应用,增加了宏包选项用于GB7714风格实现控制(gbpub 等),重新设计了版本兼容方式,以后的版本中将更容易兼容biblatex的升级。

Expand Down
10 changes: 8 additions & 2 deletions egfigure/eggbcitation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@
\paragraph*{#1}}

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


\begin{document}

Expand Down Expand Up @@ -500,12 +498,14 @@ \subsection*{9.2 文献表}
\subsection*{10.1.1 一处引用一篇文献}

\begin{refsection}
示例1:

所谓移情,就是“说话人将自己认同于......他用句子所描述的时间或状态中的一个参与者”\cite{Sunstein1996-903-903}。《汉语大词典》和张相
\cite{Morri2010--}都认为“可”是“痊愈”,
候精一认为是“减轻”\cite{罗杰斯2011-15-16}。......另外,根据候精一,表示病痛程度减轻的形容词“可”和表示逆转否定的副词“可”
是兼类词\cite{陈登原2000-29-29},这也说明二者应该存在着源流关系。

示例2:

所谓移情,就是“说话人将自己认同于......他用句子所描述的时间或状态中的一个参与者”\footfullcite{Sunstein1996-903-903}。《汉语大词典》和张相
\footfullcite{Morri2010--}都认为“可”是“痊愈”,
Expand All @@ -526,8 +526,12 @@ \subsection*{10.1.2 一处引用多篇文献}

\end{refsection}


\newpage
\subsection*{10.1.3 多次引用同一著者的同一文献}
\begin{refsection}
示例1:多次引用同一著者的同一文献的序号

……改变社会规范也可能存在类似的“二阶囚徒困境”问题:尽管改变旧的规范对所有人都好,但个人理性选择使得没有人愿意率先违反旧的规范\cite{Sunstein1996-903-903}。
……事实上,古希腊对轴心时代思想真正的贡献不是来自对民主的赞扬,而是来自对民主制度的批评,苏格拉底、柏拉图和亚里士多德3位贤圣
都是民主制度的坚决反对者\pagescite[20]{Morri2010--}。
Expand All @@ -540,6 +544,8 @@ \subsection*{10.1.3 多次引用同一著者的同一文献}
\end{refsection}

\begin{refsection}
示例2:多次引用同一著者的同一文献的脚注序号

……改变社会规范也可能存在类似的“二阶囚徒困境”问题:尽管改变旧的规范对所有人都好,但个人理性选择使得没有人愿意率先违反旧的规范
\footfullcite{Sunstein1996-903-903}。
……事实上,古希腊对轴心时代思想真正的贡献不是来自对民主的赞扬,而是来自对民主制度的批评,苏格拉底、柏拉图和亚里士多德3位贤圣
Expand Down
30 changes: 30 additions & 0 deletions egfigure/eggbfootstyle.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式,能否对实现国标要求的脚注文献表
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=15cm,paperheight=6.5cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}

\addbibresource{example.bib}

\begin{document}

\begin{refsection}
示例2:多次引用同一著者的同一文献的脚注序号

……但个人理性选择使得没有人愿意率先违反旧的规范
\footfullcite{Sunstein1996-903-903}。
……事实上,都是民主制度的坚决反对者\footfullcite[20]{Morri2010--}。
……一切后世的思想都是一系列为柏拉图思想所作的脚注\footfullcite{罗杰斯2011-15-16}。
……佛教受到极大的打击\footfullcite[326-329]{Morri2010--}。
……以上谓等威之辨,尊卑之序,由于饮食荣辱。\footfullcite{陈登原2000-29-29}
\end{refsection}


\end{document}
168 changes: 168 additions & 0 deletions example/opt-gbfootbib.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@

% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式,能否对实现国标要求的脚注文献表
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=15cm,paperheight=11.5cm,top=10pt,bottom=10pt,left=0.5cm,right=0.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}

\renewcommand{\bibfont}{\small}
\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{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}
}

@patent{IEEEexample:frenchpatreq,
author = "F. Kowalik and M. Isard",
title = "Estimateur d'un D{\'e}faut de Fonctionnement
d'un Modulateur en Quadrature et {\'E}tage de Modulation
l'Utilisant",
language = "french",
type = "French Patent Request",
number = "9500261",
year = "1995-01-11"
}

@ARTICLE{吕捷2015cpi,
AUTHOR = {吕捷 and 王高望},
DATE = {2015},
JOURNALTITLE = {经济研究},
KEYWORDS = {吕捷2015cpi},
PAGES = {011},
TITLE = {CPI 与 PPI “背离” 的结构性解释},
VOLUME = {4},
}

@patent{IEEEexample:uspat,
author = "Ronald E. Sorace and Victor S. Reinhardt and
Steven A. Vaughn",
holder = "Hughes Aircraft Company",
location = "Los Angeles, CA",
title = "High-Speed Digital-to-{RF} Converter",
type = "patentus",
number = "5668842",
yearfiled = "1995-02-28",
year = "1997-09-16",
}

@ARTICLE{杨光2015经济波动,
AUTHOR = {杨光 and 孙浦阳 and 龚刚},
DATE = {2015},
JOURNALTITLE = {经济研究},
KEYWORDS = {杨光2015经济波动},
NUMBER = {2},
PAGES = {47--60},
TITLE = {经济波动, 成本约束与资源配置},
VOLUME = {50},
}


\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\section{测试利用footfullcite实现国标格式的脚注文献表}
\begin{refsection}

古希腊对轴心时代思想真正的贡献不是来自对民主的赞扬\footfullcite[12-16]{蔡敏2006--},
改变社会规范也可能存在类似的“二阶囚徒困境”问题\footfullcite{Miroslav2004--},
但个人理性选择使得没有人愿意率先违反旧的规范\footfullcite[250]{蔡敏2006--}。


\printbibliography[heading=subbibliography]
\end{refsection}

\newpage

\begin{refsection}
……事实上,古希腊对轴心时代思想真正的贡献不是来自对民主的赞扬,
\fullcite{吕捷2015cpi}》。
而是来自对民主制度的批评,苏格拉底、柏拉图和亚里士多德3位贤圣
都是民主制度的坚决反对者\footfullcite[20]{Zhang2007-500-503}。
……改变社会规范也可能存在类似的“二阶囚徒困境”问题:尽管改变旧的规范对所有人都好,但个人理性选择使得没有人愿意率先违反旧的规范
\footfullcite{吕捷2015cpi}。
……据《唐会要》记载,当时拆毁的寺院有4 600余所,招提、兰若等佛教建筑4万余所,没收寺产,并强迫僧尼还俗达260 500人。
佛教受到极大的打击\footfullcite[326-329]{Zhang2007-500-503}。
\end{refsection}


\end{document}
5 changes: 5 additions & 0 deletions example/updatehistory.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

%更新历史仅给出更新针对的问题,相应的处理代码和解释不在此给出,详见提示对应的说明文档内容


%============================
\updateinfo[2019-01-19]{date of update: 2019-01-19 to version v1.0p}\label{up:190119}
\begin{enumerate}

\item 完善了国标样式的脚注文献表。

improve the bibliography in footnote to match the standard GB/T 7714-2015.

\item 完善了样式和文档的细节,使更精确符合GBT7714-2015。

improve the style files and document to match the Standard GB/T 7714-2015.
Expand Down
1 change: 1 addition & 0 deletions gb7714-2015-gbk.def
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
\def\str@volumecn{��}
\def\str@numbercn{��}
\def\str@serialcn{��}
\def\str@sameentry{ͬ}
Loading

0 comments on commit 72943a9

Please sign in to comment.