latex参考文献生成双语对照文献表

您所在的位置:网站首页 免费查重的网站paperyy latex参考文献生成双语对照文献表

latex参考文献生成双语对照文献表

#latex参考文献生成双语对照文献表| 来源: 网络整理| 查看: 265

latex参考文献生成双语对照文献表 1. 引言

在中文环境下,参考文献表常有双语对照的需求,特别是在一些期刊中。 传统的双语对照文献表的生成方式是,将英文文献著录条目的内容放到中文条目的某个域中并输出,假设中文在前英文在后。 但这种方式人工操作过多,使得自动化的目的大大减弱。所以我们最好找一种更自然的使用方式。这种方式是存在的, 使用biblatex有两种比较方便的实现方式(可以参考:biblatex-gb7714-2015、biblatex-solution-to-latex-bibliography.pdf)。

2. 使用关联(related)来生成对照

假设有两篇文献:

@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}, }

是中英文对照的文献条目信息,如果将其关联起来就可以实现直接的对照输出。 关联使用一个命令:

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

示例为:

% 测试双语对照文献-两种方法 \documentclass[twoside]{ctexart} \usepackage{xcolor} \usepackage[colorlinks]{hyperref} \usepackage[backend=biber,style=gb7714-2015]{biblatex}%sorting=nyt \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}, } \end{filecontents} \addbibresource{\jobname.bib} \defdoublelangentry{易仕和2013--}{Yi2013--} \begin{document} \cite{易仕和2013--} \printbibliography \end{document}

结果为:

在这里插入图片描述

3. 使用集合(set)来生成对照

若将两篇文献设置为一个集合也可以实现对照,命令为:

\defbibentryset{易仕和2013}{易仕和2013--,Yi2013--}

示例为:

% 测试双语对照文献-两种方法 \documentclass[twoside]{ctexart} \usepackage{xcolor} \usepackage[colorlinks]{hyperref} \usepackage[backend=biber,style=gb7714-2015]{biblatex}%sorting=nyt \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}, } \end{filecontents} \addbibresource{\jobname.bib} \defbibentryset{易仕和2013}{易仕和2013--,Yi2013--} \begin{document} \cite{易仕和2013} \printbibliography \end{document}

结果是相同的。

4. 增加in Chinese 说明和调整人名格式

如果对对照文献还需要说明一下,那么可以在bib文件中增加信息来实现:

@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}, nameformat={pinyin}, annote={in Chinese} }

其中nameformat={pinyin}用来设置该文献的姓名格式,annote={in Chinese}用来标记说明,并在biblatex选项中增加gbannote=true。

示例:

% 测试双语对照文献-两种方法 \documentclass[twoside]{ctexart} \usepackage{xcolor} \usepackage[colorlinks]{hyperref} \usepackage[backend=biber,style=gb7714-2015,gbannote=true]{biblatex}%sorting=nyt \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}, nameformat={pinyin}, annote={in Chinese} } \end{filecontents} \addbibresource{\jobname.bib} %\defdoublelangentry{易仕和2013--}{Yi2013--} \defbibentryset{易仕和2013}{易仕和2013--,Yi2013--} \begin{document} \cite{易仕和2013} \printbibliography \end{document}

结果为:

在这里插入图片描述

5. 如果还要进一步调整人名格式并增加颜色显示等格式设置

比如去掉说明后的标点,那么可以进一步做设置,示例为:

% 测试双语对照文献-两种方法 \documentclass[twoside]{ctexart} \usepackage{xcolor} \usepackage[colorlinks]{hyperref} \usepackage[backend=biber,style=gb7714-2015,gbannote=true]{biblatex}%sorting=nyt \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}, nameformat={pinyin}, annote={in Chinese} } \end{filecontents} \addbibresource{\jobname.bib} \defdoublelangentry{易仕和2013--}{Yi2013--} \DeclareBibliographyCategory{ColoredBiblistA} \addtocategory{ColoredBiblistA}{Yi2013--} \renewcommand{\bibauthorfont}{\ifentrycategory{\thefield{keywords}}{ColoredBiblistA}{\color{red}\bfseries}{}}%\color{#1} \renewcommand{\bibtitlefont}{\ifentrycategory{\thefield{keywords}}{ColoredBiblistA}{\color{black}\normalfont}{}}%\color{black} \renewcommand{\bibpubfont}{\ifentrycategory{\thefield{keywords}}{ColoredBiblistA}{\color{black}\normalfont}{}}% \apptocmd{\gbpinyinlocalset}{\renewrobustcmd*{\bibnamedelima}{}}{}{} \renewcommand*{\finentrypunct}{} \begin{document} \cite{易仕和2013--} \printbibliography \end{document}

结果为:

在这里插入图片描述

6. 小结

本文简单介绍了latex参考文献中双语文献对照表的方便生成方式,提供了基本示例,若有更多的需求,可以在其基础上做修改。

参考 https://github.com/hushidong/biblatex-gb7714-2015/issues/111


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3