hushidong/biblatex-gb7714-2015

如何调整参考文献序号与内容之间间距,并去掉后文缩进?

spencerwooo opened this issue · 5 comments

请问,我希望:

  • 缩小目前默认格式下「参考文献序号」到「参考文献内容」之间的间距(即下图 L1)
  • 去掉后文的部分缩进(即下图 L2)

image

最终希望达到类似如下的效果:

image

应该如何进行设置呢?

这个问题主要是修改间距尺寸和文献表环境,对于顺序标签的不同对齐选项,有不同的实现,若是左中右对齐采用如下方式:


% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015ay样式,实现一种特殊的文献表格式
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\usepackage[paperwidth=15cm,paperheight=20cm,top=1cm,bottom=1cm,left=1cm,right=1cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015,gbalign=center]{biblatex}%sorting=nyt
%,gbalign=gb7714-2015

%顺序标签与文献内容的间距
\setlength{\biblabelsep}{2mm}
%修改对齐环境-使不缩进
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\addtolength{\bibitemindent}{\labelnumberwidth}%
    \addtolength{\bibitemindent}{\biblabelsep}%
    \addtolength{\bibhang}{-\labelnumberwidth} %
    \addtolength{\bibhang}{-\biblabelsep}%
    %
     \setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \setlength{\leftmargin}{\bibhang}%
      \addtolength{\leftmargin}{\labelnumberwidth}%
      \setlength{\itemindent}{\bibitemindent}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{Miroslav2003--,
  AUTHOR = {Miroslav, D. L. and Dejan, V. T.},
  TRANSLATOR = {朱义胜 and 董辉},
  LANGUAGE = {chinese},
  LOCATION = {北京},
  PUBLISHER = {电子工业出版社},
  DATE = {2003-01},
  TITLE = {信号处理滤波器设计方法},
}

@ARTICLE{于潇2011-15-23,
  AUTHOR = {于潇 and 刘义 and 柴跃廷 and others},
  DATE = {2011},
  JOURNALTITLE = {清华大学学报},
  NUMBER = {11},
  PAGES = {15--23},
  TITLE = {互联网药品可信交易环境中主体资质审核备案模式},
  VOLUME = {52},
}

@INBOOK{姚中秋2008--,
  AUTHOR = {姚, 中秋},
  BOOKAUTHOR = {罗, 卫东 and 姚, 中秋},
  LOCATION = {杭州},
  PUBLISHER = {浙江大学出版社},
  BOOKTITLE = {**转型的理论分析},
  DATE = {2008},
  PAGES = {44},
  TITLE = {一种制度变迁模式},
}

@Newspaper{张田勤2000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  year                     = {{2000-11-12}},
  Journaltitle             = {大众科技报},
  Note                     = {news},
  Number                   = {7}
}

@Www{萧钰2001--,
  Title                    = {出版业信息化迈入快车道},
  Author                   = {萧钰},
  Url                      = {http://www.creader.com/news/20011219/200112190019.html},
  Urldate                  = {2002-04-15},
  Date                     = {2001-12-19}
}
@Patent{刘加林1993--,
  Title                    = {多功能一次性压舌板},
  Author                   = {刘加林},
  year                     = {{1993-04-14}},
  Number                   = {92214985.2},
  Location                 = {**发明专利}
}

@PhdThesis{张若凌2004--,
  Title                    = {高超声速非平衡流动的计算和实验研究},
  Author                   = {张若凌},
  School                   = {**空气动力研究与发展中心},
  Year                     = {2004},
  Location                 = {绵阳}
}

@Www{萧钰12001--,
  Title                    = {出版业信息化迈入快车道},
  Author                   = {萧钰},
  Url                      = {http://www.creader.com/news/20011219/200112190019.html},
  Urldate                  = {2002-04-15},
  Date                     = {2001-12-19}
}
@Patent{刘加林11993--,
  Title                    = {多功能一次性压舌板},
  Author                   = {刘加林},
  year                     = {{1993-04-14}},
  Number                   = {92214985.2},
  Location                 = {**发明专利}
}

@PhdThesis{张若凌12004--,
  Title                    = {高超声速非平衡流动的计算和实验研究},
  Author                   = {张若凌},
  School                   = {**空气动力研究与发展中心},
  Year                     = {2004},
  Location                 = {绵阳}
}

@INBOOK{姚中秋12008--,
  AUTHOR = {姚, 中秋},
  BOOKAUTHOR = {罗, 卫东 and 姚, 中秋},
  LOCATION = {杭州},
  PUBLISHER = {浙江大学出版社},
  BOOKTITLE = {**转型的理论分析},
  DATE = {2008},
  PAGES = {44},
  TITLE = {一种制度变迁模式},
}

@Newspaper{张田勤12000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  year                     = {{2000-11-12}},
  Journaltitle             = {大众科技报},
  Note                     = {news},
  Number                   = {7}
}
\end{filecontents}
\addbibresource{\jobname.bib}



\begin{document}

\nocite{*}
\printbibliography[heading=subbibliography,title={示例}]

\end{document}

结果为:

图片

如果采用项对齐的形式,那么采用如下方式修改:


% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015ay样式,实现一种特殊的文献表格式
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\usepackage[paperwidth=15cm,paperheight=20cm,top=1cm,bottom=1cm,left=1cm,right=1cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\usepackage[backend=biber,style=gb7714-2015,gbalign=gb7714-2015]{biblatex}%sorting=nyt
%

%顺序标签与文献内容的间距
\setlength{\biblabelsep}{2mm}
%修改对齐环境-使不缩进
\renewcommand{\itemcmd}{%
\addvspace{\bibitemsep}%恢复\bibitemsep的作用
\mkgbnumlabel{\printfield{labelnumber}}%
\hspace{\biblabelsep}}




\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{Miroslav2003--,
  AUTHOR = {Miroslav, D. L. and Dejan, V. T.},
  TRANSLATOR = {朱义胜 and 董辉},
  LANGUAGE = {chinese},
  LOCATION = {北京},
  PUBLISHER = {电子工业出版社},
  DATE = {2003-01},
  TITLE = {信号处理滤波器设计方法},
}

@ARTICLE{于潇2011-15-23,
  AUTHOR = {于潇 and 刘义 and 柴跃廷 and others},
  DATE = {2011},
  JOURNALTITLE = {清华大学学报},
  NUMBER = {11},
  PAGES = {15--23},
  TITLE = {互联网药品可信交易环境中主体资质审核备案模式},
  VOLUME = {52},
}

@INBOOK{姚中秋2008--,
  AUTHOR = {姚, 中秋},
  BOOKAUTHOR = {罗, 卫东 and 姚, 中秋},
  LOCATION = {杭州},
  PUBLISHER = {浙江大学出版社},
  BOOKTITLE = {**转型的理论分析},
  DATE = {2008},
  PAGES = {44},
  TITLE = {一种制度变迁模式},
}

@Newspaper{张田勤2000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  year                     = {{2000-11-12}},
  Journaltitle             = {大众科技报},
  Note                     = {news},
  Number                   = {7}
}

@Www{萧钰2001--,
  Title                    = {出版业信息化迈入快车道},
  Author                   = {萧钰},
  Url                      = {http://www.creader.com/news/20011219/200112190019.html},
  Urldate                  = {2002-04-15},
  Date                     = {2001-12-19}
}
@Patent{刘加林1993--,
  Title                    = {多功能一次性压舌板},
  Author                   = {刘加林},
  year                     = {{1993-04-14}},
  Number                   = {92214985.2},
  Location                 = {**发明专利}
}

@PhdThesis{张若凌2004--,
  Title                    = {高超声速非平衡流动的计算和实验研究},
  Author                   = {张若凌},
  School                   = {**空气动力研究与发展中心},
  Year                     = {2004},
  Location                 = {绵阳}
}

@Www{萧钰12001--,
  Title                    = {出版业信息化迈入快车道},
  Author                   = {萧钰},
  Url                      = {http://www.creader.com/news/20011219/200112190019.html},
  Urldate                  = {2002-04-15},
  Date                     = {2001-12-19}
}
@Patent{刘加林11993--,
  Title                    = {多功能一次性压舌板},
  Author                   = {刘加林},
  year                     = {{1993-04-14}},
  Number                   = {92214985.2},
  Location                 = {**发明专利}
}

@PhdThesis{张若凌12004--,
  Title                    = {高超声速非平衡流动的计算和实验研究},
  Author                   = {张若凌},
  School                   = {**空气动力研究与发展中心},
  Year                     = {2004},
  Location                 = {绵阳}
}

@INBOOK{姚中秋12008--,
  AUTHOR = {姚, 中秋},
  BOOKAUTHOR = {罗, 卫东 and 姚, 中秋},
  LOCATION = {杭州},
  PUBLISHER = {浙江大学出版社},
  BOOKTITLE = {**转型的理论分析},
  DATE = {2008},
  PAGES = {44},
  TITLE = {一种制度变迁模式},
}

@Newspaper{张田勤12000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  year                     = {{2000-11-12}},
  Journaltitle             = {大众科技报},
  Note                     = {news},
  Number                   = {7}
}

\end{filecontents}
\addbibresource{\jobname.bib}



\begin{document}

\nocite{*}
\printbibliography[heading=subbibliography,title={示例}]

\end{document}

结果为:
图片

根据需要选择吧,不过第一种方式若使用gbalign=left或right时,会有其它效果,你可以试一下。

哇,感谢大佬如此详细的解释,我用第二种 gbalign=gb7714-2015 的对齐方式实现了:

image

另外,我比较好奇「左中右对齐」和「项对齐」这两种对齐方法它们分别具体指什么样子的对齐方式?无论如何,非常感谢~

使用list环境时,顺序标签是放在一个固定宽度的盒子里的,所以数字标签就会有,左中右对齐。
项对齐是我为一些用户要word样式特意增加的,就是各项对齐(各条文献自己对齐),顺序标签顶格,文献内容与标签固定间距。当时也没想到更好的,所以就这么命名了。