Coder Social home page Coder Social logo

Comments (3)

hushidong avatar hushidong commented on June 12, 2024
\documentclass{ctexart}

\usepackage[backend=biber,style=gb7714-2015]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Ma2006Analyse, title={Analyse and Research of Makefile Base on Linux 2.6}, author={Ma, X}, journal={CONTROL AND AUTOMATION}, volume={166}, pages={232}, year={2006}, publisher={Weijisuanji Xinxi Zazhishe} }

@article{Ma2006Analyse2, title={Analyse and Research of Makefile Base on Linux 2.6}, author={Ma, X}, volume={166}, pages={232}, year={2006}, publisher={Weijisuanji Xinxi Zazhishe} }


@ARTICLE{常森2013--,
  author       = {常森},
  title        = {《五行》学说与《荀子》},
  Journaltitle = {北京大学学报(哲学社会科学版)},
  DATE         = {2013},
  VOLUME       = {50},
  number       = {1},
  pages        = {75},
}

@ARTICLE{常森2013a--,
  author       = {常森},
  title        = {《五行》学说与《荀子》},
  DATE         = {2013},
  VOLUME       = {50},
  number       = {1},
  pages        = {75},
}
\end{filecontents}

\addbibresource[location=local]{\jobname.bib}

\defbibcheck{cnreference}{\iffieldequalstr{userd}{english}{}}
\defbibcheck{enreference}{\iffieldequalstr{userd}{chinese}{}}

\begin{document}%正文区开始:

\nocite{*}
%打印参考文献表
\printbibliography[heading=bibliography,check=cnreference,title=参考文献]

\printbibliography[heading=bibliography,check=enreference,title=Reference]

\end{document} 

from biblatex-gb7714-2015.

TideDlrow avatar TideDlrow commented on June 12, 2024

非常感谢!!

还有个问题是中英文文献是同一篇,分开打印的时候编号要相同话又该怎么解决呢?

假设"常森2013a--" 和 "Ma2006Analyse"是同一篇论文,只是语言不同

显示后应该是

参考文献

[1] xxxx
...
[5] Ma2006Analyse
[6] xxxx
...

(英文是正常按顺序编号的)

附中文参考文献

[5] 常森2013a--

(这里只需显示对应的中文参考文献就行)

from biblatex-gb7714-2015.

hushidong avatar hushidong commented on June 12, 2024

可以这样手动处理:

(1)将下面这句加入:系统中gb7714-2015.bbx文件中

\DeclareDatamodelFields[type=field,datatype=integer]{refnumber}

(2) 在需要指定序号的文献中加入一个refnumber域
比如:

@ARTICLE{常森2013--,
  author       = {常森},
  title        = {《五行》学说与《荀子》},
  Journaltitle = {北京大学学报(哲学社会科学版)},
  DATE         = {2013},
  VOLUME       = {50},
  number       = {1},
  pages        = {75},
  refnumber={5}
}

(3) 在te文件按如下例子处理:

\documentclass{ctexart}

\usepackage[backend=biber,style=gb7714-2015]{biblatex}

%\DeclareDatamodelFields[type=field,datatype=integer]{refnumber}

\defbibenvironment{bibnumber}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{refnumber}}}
     {\addtolength{\labelnumberwidth}{\biblabelextend}%
      \setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \setlength{\bibhang}{\biblabelsep}%
      \addtolength{\bibhang}{\labelnumberwidth}%
      \setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{\bibitemindent}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Ma2006Analyse, title={Analyse and Research of Makefile Base on Linux 2.6}, author={Ma, X}, journal={CONTROL AND AUTOMATION}, volume={166}, pages={232}, year={2006}, publisher={Weijisuanji Xinxi Zazhishe} }

@article{Ma2006Analyse2, title={Analyse and Research of Makefile Base on Linux 2.6}, author={Ma, X}, volume={166}, pages={232}, year={2006}, publisher={Weijisuanji Xinxi Zazhishe} }


@ARTICLE{常森2013--,
  author       = {常森},
  title        = {《五行》学说与《荀子》},
  Journaltitle = {北京大学学报(哲学社会科学版)},
  DATE         = {2013},
  VOLUME       = {50},
  number       = {1},
  pages        = {75},
  refnumber={5}
}

@ARTICLE{常森2013a--,
  author       = {常森},
  title        = {《五行》学说与《荀子》},
  DATE         = {2013},
  VOLUME       = {50},
  number       = {1},
  pages        = {75},
  refnumber={7}
}
\end{filecontents}

\addbibresource[location=local]{\jobname.bib}

\defbibcheck{cnreference}{\iffieldequalstr{userd}{english}{}}
\defbibcheck{enreference}{\iffieldequalstr{userd}{chinese}{}}

\begin{document}%正文区开始:

\nocite{*}
%打印参考文献表
\printbibliography[env=bibnumber,heading=bibliography,check=cnreference,title=参考文献]

\printbibliography[heading=bibliography,check=enreference,title=Reference]

\end{document} 

from biblatex-gb7714-2015.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.