Skip to content

Commit

Permalink
update-20190303-修正前次更新导致的小bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hushidong committed Mar 3, 2019
1 parent a7ddc54 commit f673889
Show file tree
Hide file tree
Showing 33 changed files with 1,763 additions and 148 deletions.
14 changes: 8 additions & 6 deletions biblatex-gb7714-2015-preamble.tex
@@ -1,6 +1,6 @@
\usepackage{expl3,etoolbox,ifthen,xstring}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[zihao=5]{ctex}
\usepackage[zihao=-4]{ctex}
\ctexset{today=old}
\let\kaiti=\kaishu
\usepackage{xeCJKfntef}
Expand All @@ -21,12 +21,12 @@
\colorlet{gbemphcolor}{blue!60!black}

%定义版面,showframe,
\usepackage[paperwidth=210mm,paperheight=290mm,left=25mm,right=25mm,top=25mm, bottom=20mm,showcrop]{geometry}%,showframe
\usepackage[paperwidth=210mm,paperheight=290mm,left=35mm,right=20mm,top=25mm, bottom=20mm,showcrop]{geometry}%,showframe
\renewcommand{\baselinestretch}{1.35}
%页面布局的标尺
\usepackage[type=none]{fgruler}
%[unit=cm,type=lowerleft,showframe=true,hshift=3cm,vshift=2cm]
\rulerparams{}{}{gray!50}{}{0.4pt}
\rulerparams{}{}{gray!10}{}{0.2pt}
\fgrulerdefnum{}\fgrulercaptioncm{}%fgruler加数字后,导致基线对齐出现问题,所以这里去掉

\newlength{\skipheadrule}
Expand Down Expand Up @@ -254,8 +254,10 @@
%序号如果带章节的话可以改为比如:\thesection.\arabic{myprop}
\tcbmaketheorem{property}{方法}
{enhanced jigsaw,breakable,pad at break*=1mm,left=2em,boxsep=0pt,
colback=black!5,colframe=gborange,coltitle=gborange,
theorem style=plain,fonttitle=\bfseries,arc=0mm,
%colback=gray!5,colframe=gbforestgreen,
colback=gray!5,boxrule=0pt,frame hidden,coltitle=gborange,
borderline west={1.5mm}{-2mm}{gbforestgreen},
theorem style=plain,fonttitle=\bfseries\heiti,arc=0mm,
%separator sign={\ $\blacktriangleright$},breakable,
%theorem style=plain,fonttitle=\bfseries\upshape, fontupper=\slshape,boxrule=0mm,arc=0mm, %
%coltitle=black,colback=green!50!yellow!15!white,colframe=blue!50,%
Expand All @@ -269,7 +271,7 @@
colback=yellow!10!white,boxrule=0pt,frame hidden,
borderline west={1.5mm}{-2mm}{gbforestgreen},
separator sign={\ $\blacktriangleright$},terminator sign={\ },
theorem style=plain,fonttitle=\bfseries,coltitle=gbforestgreen
theorem style=plain,fonttitle=\bfseries\heiti,coltitle=gbforestgreen
%fontupper=\normalsize,boxrule=0mm,arc=0mm,breakable,
%coltitle=green!35!black,colbacktitle=green!15!white,
%colback=green!50!yellow!15!white,terminator sign={\ }
Expand Down
Binary file modified biblatex-gb7714-2015.pdf
Binary file not shown.
25 changes: 14 additions & 11 deletions biblatex-gb7714-2015.tex
@@ -1,15 +1,17 @@
\documentclass[twoside,11pt]{article} %用draft选项找到badbox的位置
\documentclass[11pt]{article} %用draft选项找到badbox的位置 twoside,
\input{biblatex-gb7714-2015-preamble} %宏包和一些格式设置
\begin{document}

%------------------------------------------------------------
% 标题和目录
%------------------------------------------------------------
\pagestyle{plain}
\pagenumbering{Roman}

\titleformanual{符合GB/T 7714-2015标准的biblatex参考文献样式
\footnote{This Manual was created with biblatex v\versionofbiblatex, last revised at \today;\\%
Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.}}
Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.}
\footnote{repository address: \url{https://github.com/hushidong/biblatex-gb7714-2015}}}

\authorformanual{胡振震\setcounter{footnote}{0}\footnote{Email: hzzmail@163.com}}

Expand All @@ -31,15 +33,16 @@
%\renewcommand{\numberline}[1]{#1~}
%\phantomsection
%\addcontentsline{toc}{section}{示例}

\listoffigures
\listoftables
\listofegcode
\newlength{\textparwd}
%------------------------------------------------------------

\thispagestyle{plain}
\newpage
\pagenumbering{arabic}
\pagestyle{fancy}
\section{概述}

《GB/T 7714-2015~~信息与文献~~参考文献著录规则》是国内科技文档参考文献著录的一般标准,国内大多数期刊、大学、出版社对于期刊论文、学位论文、出版物参考文献的要求通常都基于该标准。对于\LaTeX{}用户来说,参考文献生成是典型的自动化应用,通常有两种方法,一是基于bibtex的传统方法,二基于biblatex的新方法。生成符合GB/T 7714标准要求的参考文献,这两条路子都已经实践多年。
Expand Down Expand Up @@ -394,7 +397,7 @@ \subsection{文献引用及其标注格式}\label{sec:cbx:usage}
\begin{table}[!htb]
\centering
\caption{著者年份制常用命令示例}\label{tab:cite:authoryear}
\includegraphics[scale=0.8]{egciteaytab.pdf}
\includegraphics[scale=0.85]{egciteaytab.pdf}
\end{table}


Expand Down Expand Up @@ -655,11 +658,11 @@ \subsubsection{新增选项}\label{sec:added:opt}
\item gbfieldtype=true,输出type域,例如学位论文的phdthesis或博士学位论文。输出该域时做中英文区分。
\item gbfieldtype=false,不输出type域。

要设置博士或硕士学位论文的输出,可以设置本地化字符串:
\lstinline!\DefineBibliographyStrings{english}{mathesis={str you want ma thesis}}!,
\lstinline!\DefineBibliographyStrings{english}{mathesiscn={硕士学位论文}}!,
\lstinline!\DefineBibliographyStrings{english}{phdthesis={str you want for phd thesis}}!,
\lstinline!\DefineBibliographyStrings{english}{phdthesiscn={博士学位论文}}!,
要设置博士或硕士学位论文的输出,可以设置本地化字符串: \\
\lstinline!\DefineBibliographyStrings{english}{mathesis={str you want ma thesis}}!, \\
\lstinline!\DefineBibliographyStrings{english}{mathesiscn={硕士学位论文}}!, \\
\lstinline!\DefineBibliographyStrings{english}{phdthesis={str you want for phd thesis}}!, \\
\lstinline!\DefineBibliographyStrings{english}{phdthesiscn={博士学位论文}}!, \\
之所以用加cn的本地化字符串是为了某些样式需要区分中英文分别设置。

另一种设置方式是在bib文件直接设置type域为需要输出的字符,比如type={[博士学位论文]}。
Expand Down Expand Up @@ -1217,11 +1220,11 @@ \subsection{数据库bib文件和数据录入}\label{sec:bib:bibtex}
\hline
GB/T 7714-2015中的参考文献类型 & biblatex中的条目类型 & 类型标识代码\\ \hline
专著& book & M\\
标准& standard/book or inbook with field note=standard& S\\
标准& standard/book or inbook with note=standard& S\\
专著中的析出文献& inbook & M\\
连续出版物& periodical& J\\
连续出版物的析出文献& article& J\\
报纸析出的文献& newspaper/article with field note=news& N\\
报纸析出的文献& newspaper/article with note=news& N\\
专利& patent& P\\
电子资源或电子公告& online/www/electronic& EB\\
会议录或会议文集& proceedings& C\\
Expand Down
2 changes: 1 addition & 1 deletion egfigure/egdoublelan.tex
Expand Up @@ -94,7 +94,7 @@
\addbibresource{\jobname.bib}

\makeatletter
\@ifpackagelater{biblatex}{2016/12/01}{
\@ifpackagelater{biblatex}{2016/12/06}{
\defdoublelangentry{易仕和2013--}{Yi2013--}
\defdoublelangentry{张敏莉2007-500-503}{Zhang2007-500-503}
}{}
Expand Down
2 changes: 1 addition & 1 deletion egfigure/egdoublelanb.tex
Expand Up @@ -95,7 +95,7 @@
\addbibresource{\jobname.bib}

\makeatletter
\@ifpackagelater{biblatex}{2016/12/01}{
\@ifpackagelater{biblatex}{2016/12/06}{
\defdoublelangentry{易仕和2013--}{Yi2013--}
\defdoublelangentry{张敏莉2007-500-503}{Zhang2007-500-503}
}{}
Expand Down
2 changes: 1 addition & 1 deletion egfigure/makecompileGBT.bat
Expand Up @@ -14,7 +14,7 @@ copy ..\gb7714-2015-gbk.def . /y


setlocal enabledelayedexpansion
for %%a in ( eggb*.tex ) do (
for %%a in ( tgb*.tex ) do (
call makeclear
set jobfile=%%a
set jobname=!jobfile:~0,-4!
Expand Down
157 changes: 157 additions & 0 deletions egfigure/tgbbiblio.tex
@@ -0,0 +1,157 @@

% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式,实现GB/T 7714-2015 标准的附录的文献表示例
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[paperwidth=21cm,paperheight=29cm,top=3cm,bottom=2cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}%sorting=nyt

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

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


\begin{document}

\section*{GB/T 7714-2015 中的附录参考文献示例}

\begin{refsection}
%普通图书(book)
\nocite{张伯伟2002--}
\nocite{2009-155-155}
\nocite{胡承正2010-112-112}
\nocite{美国妇产科医师学会2010-38-39}
\nocite{1962-50-50}
\nocite{汪昂1881--}
\nocite{蒋有绪1998--}
\nocite{中国企业投资协会2013--}
\nocite{罗斯基2009--}
\nocite{库恩2012--}
\nocite{候文顺2010-119-119}
\nocite{CRAWFPRD1995--}
\nocite{IFLAI1977--}
\nocite{OBRIEN1994--}
\nocite{Kinchy2012-50-50}
\nocite{Praetzellis2011-13-13}

%论文集(collection)、会议录(proceedings)
\nocite{中国职工教育研究会1985--}
\nocite{中国社会科学院台湾史研究中心2012--}
\nocite{雷光春2012--}
\nocite{陈志勇2011--}
\nocite{Babu2014--}

%报告(report)
\nocite{中华人民共和国国务院新闻办公室2013-04-16--}
\nocite{汤万金2013-09-30--}
\nocite{Calkin2011-8-9}
\nocite{DTFHA1990--}
\nocite{WHO1970--}

%学位论文(thesis)
\nocite{马欢2011-27-27}
\nocite{吴云芳2003--}
\nocite{CALMS1965--}

%专利文献(patent)
\nocite{张凯军2012-04-05--}
\nocite{河北绿洲生态环境科技有限公司2001--}
\nocite{KOSEKI2002--}

%标准文献(book,inbook,note=standard)
\nocite{全国信息文献标准化技术委员会2010-3-3}
\nocite{全国广播电视标准化技术委员会2007-1-1}
\nocite{国家环境保护局科技标准司1996-2-3}
\nocite{standardinfoiso158}

%专著中析出的文献(inbook)
\nocite{1988-590-590}
\nocite{白书农1998-146-163}
\nocite{汪学军2002-22-25}
\nocite{国家标准局信息分类编码研究所1988-59-92}
\nocite{1977-49-49}
\nocite{楼梦麟2011-11-12}
\nocite{BUSECK1980-117-211}
\nocite{FOURNEY1971-17-38}

%期刊中析出的文献(article)
\nocite{杨洪升2013-56-75}
\nocite{李炳穆2008-6-12}
\nocite{于潇2012-1518-1523}
\nocite{陈建军2010-93-93}
\nocite{DESMARAIS1992-605-609}
\nocite{Saito2006-169-176}
\nocite{Walls2013-399-418}
\nocite{Franz2013-1053-1062}
\nocite{Park2010-696-715}

%报纸中析出的文献(article,note=news)
\nocite{丁文祥2000--}
\nocite{张田勤2000--}
\nocite{傅刚2000--}
\nocite{刘裕国2013-01-12--}

%电子资源(online)
\nocite{萧钰2001--}
\nocite{李强2012-05-03--}
\nocite{Commonwealth--}
\nocite{Dublin2012-06-14--}


\printbibliography[heading=subbibliography,type=book,notkeyword=standard,title=【A1- 普通图书-著录格式示例】]%subbibintoc

\defbibfilter{collections}{%
type=collection
or type=proceedings
or type=collection
}
\printbibliography[heading=subbibliography,filter=collections,title=【A2-论文集、会议录-著录格式示例】]

\defbibfilter{reports}{%
type=report
or ( keyword=report )
}

\printbibliography[heading=subbibliography,filter=reports,title=【A3-报告-著录格式示例】]

\printbibliography[heading=subbibliography,type=thesis,title=【A4-学位论文-著录格式示例】]

\printbibliography[heading=subbibliography,type=patent,title=【A5-专利-著录格式示例】]

\defbibfilter{standard}{%
type=book and keyword=standard
}
\printbibliography[heading=subbibliography,filter=standard,title=【A6-标准文献-著录格式示例】]

\hypertarget{entrystdwithoutauthor}{注意:这里最后一篇标准文献没有责任者,所以作者年制默认情况下无法给出文献标识符。}

\defbibfilter{inbooks}{%
type=inbook or type=incollection or type=inproceedings
}

\printbibliography[heading=subbibliography,filter=inbooks,title=【A7- 专著中析出的文献-著录格式示例】]


\printbibliography[heading=subbibliography,type=article,notkeyword=news,title=【A8- 期刊中析出的文献-著录格式示例】]

\printbibliography[heading=subbibliography,keyword=news,title=【A9-报纸析出的文献-著录格式示例】]%type=article,有时type是newspaper所以不指定type为article

\defbibfilter{onlines}{%
type=online and not keyword=report
}

\printbibliography[heading=subbibliography,filter=onlines,title=【A10-电子资源-著录格式示例】]


\end{refsection}

\end{document}

0 comments on commit f673889

Please sign in to comment.