hushidong / biblatex-solution-to-latex-bibliography

latex中文参考文献解决方案--基于biblatex、thebibliography和bibtex的方法||biblatex 简明使用手册
98 stars 18 forks source link

双语文献引用时,如果citekey都用英文,则参考文献英文部分错误地印刷了两遍 #4

Open AvoidAcid opened 1 year ago

AvoidAcid commented 1 year ago

文档中,对于biblatex3.7以上版本,使用以下动态方法:

\defdoublelangentry{易仕和2013--}{Yi2013--}

可以正常输出双语参考文献。

但是,如果bib文件中,中文文献的citekey是用英文写的,那么在文末输出参考文献时,会先输出一遍中文,再输出两遍英文,多余了一遍英文,如图。附文件代码、biblatex版本。

图片

文件代码:

\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage[backend=biber,style=gb7714-2015ay,gbpub=true]{biblatex}%sorting=nyt

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

@Book{Yi2013Eng,
  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}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\defdoublelangentry{Yi2013}{Yi2013Eng}

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

\begin{document}

双语文献引用\cite{Yi2013}

\printbibliography[heading=bibliography, title=参考文献]

\end{document} 

biblatex版本:

revision:    61868
sizes:       doc: 19729k, run: 2489k
relocatable: No
cat-version: 3.17
hushidong commented 1 year ago

我看看,最近outlook邮箱不能用手机登录,邮件收不到可能回复不那么快,抱歉。

hushidong commented 1 year ago

你多加了一句话

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

这里面可能有定义有相关的文献,所以多输出了。

hushidong commented 1 year ago

\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}%sorting=nyt

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

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

@Book{Yi2013En2,
  Title                    = {Supersonic and hypersonicb},
  Address                  = {Beijing},
  Author                   = {Yi, Shi he and He, Lin and Zhang, Min li},
  Publisher                = {National Defense Industry Press},
  Year                     = {2013}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\defdoublelangentry{Yi2013Eng}{Yi2013En2}

\begin{document}

\cite{Yi2013Eng}

\printbibliography[heading=bibliography]

\end{document} 

结果为:

图片