Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用法:双语对照文献-计算机学报 #154

Open
1058433796 opened this issue Feb 14, 2023 · 12 comments
Open

用法:双语对照文献-计算机学报 #154

1058433796 opened this issue Feb 14, 2023 · 12 comments

Comments

@1058433796
Copy link

在中文文献和英文文献中添加note注释后,note的位置总是在所有文献的末尾
image
image
可以实现下图这种效果吗?这是计算机学报要求的格式
image

@sikouhjw
Copy link

  1. 可以试试 texdoc biblatex-gb7714, sec 2.6.1 的方法
  2. 你的中文文献的 bib author 项输入有问题

@1058433796
Copy link
Author

@sikouhjw 不好意思,我不是很理解您说的话,您说的是biblatex-gb7714说明文档的2.6.1节的内容吗?这部分对应的内容是“一个文献表采用多种著录样式”,我没找到有帮助的信息。

@hushidong
Copy link
Owner

@sikouhjw 感谢帮忙回复!

@1058433796 不好意思,这几天忙,没有看到,如果特别着急,可以单独发163那个邮箱,会看的频繁一些。

annote或annotation本来就是放到最后的,所以要加信息,应该修改中英文之间的间隔符。

可以这样处理,下面例子中给出了两种方式,都是可以的,具体格式根据你自己需要修改即可:


% 测试双语对照文献-两种方法

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


\begin{filecontents}[force]{\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}
}

@Article{张敏莉2007-500-503,
  Title                    = {超声速短化喷管的设计和试验研究},
  Author                   = {张敏莉 and 易仕和 and 赵玉新},
  Journal                  = {空气动力学报},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

\end{filecontents}

\addbibresource{\jobname.bib}


%%%%%%%%%%%%%%%%%
%define double lang entry here
%%%%%%%%%%%%%%%%%
\defbibentryset{张敏莉2007dblan}{张敏莉2007-500-503,Zhang2007-500-503}
\defdoublelangentry{易仕和2013--}{Yi2013--}

%%%%%%%%%%%%%%%%%
%modify delim here
%%%%%%%%%%%%%%%%%
%for defbibentryset
\renewcommand{\entrysetpunct}{\adddot(in chinese)\newline\nobreak}
%for defdoublelangentry (biblatex <2.11)
\renewcommand{\relateddelim}{\adddot(in chinese)\newline\nobreak}
%for defdoublelangentry (biblatex >=2.11)
\renewcommand{\begrelateddelim}{\adddot(in chinese)\newline\nobreak}


\begin{document}

    \cite{易仕和2013--}
    \cite{张敏莉2007dblan}

    \printbibliography

\end{document}


结果为:

图片

@hushidong
Copy link
Owner

也有其它花样的,我自己都忘了,翻一下看到了。


% 测试双语对照文献-两种方法

\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{toolbox}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage[top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}
\usepackage{xltxtra,mflogo,texnames}
\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}
}

@Article{张敏莉2007-500-503,
  Title                    = {超声速短化喷管的设计和试验研究},
  Author                   = {张敏莉 and 易仕和 and 赵玉新},
  Journal                  = {空气动力学报},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min li and Yi, Shi he and Zhao, Yu xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007},
  nameformat={pinyin},
  annote={in Chinese}
}

\end{filecontents}

\addbibresource{\jobname.bib}

\defbibentryset{易仕和2013}{易仕和2013--,Yi2013--}
\defbibentryset{张敏莉2007}{张敏莉2007-500-503,Zhang2007-500-503}

\DeclareBibliographyCategory{ColoredBiblistA}
\addtocategory{ColoredBiblistA}{Yi2013--,Zhang2007-500-503}

\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}{}}%

\def\gbpinyinlocalset{\renewrobustcmd*{\bibinitperiod}{}%
\renewcommand*{\revsdnamepunct}{}%
\renewrobustcmd*{\bibnamedelima}{}}
\renewcommand*{\finentrypunct}{}



\begin{document}

\cite{易仕和2013,张敏莉2007}

\printbibliography

\end{document}


结果为:
图片

或者:

% 测试双语对照文献-两种方法

\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}

结果为:

图片

@hushidong
Copy link
Owner

双语对照文献其实是当年考虑的时候的要解决的重点,但其实用的不多。我有点忘了,可能这么多年好像才有你这么一问。

@1058433796
Copy link
Author

@hushidong 谢谢你,很有用!我在网上找了很久,没看到有人提到我这种情况如何解决。

@hushidong
Copy link
Owner

这个问题,你可以这样解决:


% 测试双语对照文献-两种方法

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


\begin{filecontents}[force]{\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}
}

@Article{张敏莉2007-500-503,
  Title                    = {超声速短化喷管的设计和试验研究},
  Author                   = {张敏莉 and 易仕和 and 赵玉新},
  Journal                  = {空气动力学报},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

\end{filecontents}

\addbibresource{\jobname.bib}


%%%%%%%%%%%%%%%%%
%define double lang entry here
%%%%%%%%%%%%%%%%%
\defbibentryset{张敏莉2007dblan}{Zhang2007-500-503,张敏莉2007-500-503}
\defdoublelangentry{Yi2013--}{易仕和2013--}

%%%%%%%%%%%%%%%%%
%modify delim here
%%%%%%%%%%%%%%%%%
%for defbibentryset
\renewcommand{\entrysetpunct}{(in chinese)\newline\nobreak(}
%for defdoublelangentry (biblatex <2.11)
\renewcommand{\relateddelim}{(in chinese)\newline\nobreak(}
%for defdoublelangentry (biblatex >=2.11)
\renewcommand{\begrelateddelim}{(in chinese)\newline\nobreak(}

%note the difference between defbibentryset and defdoublelangentry
\DeclareBibliographyCategory{Endpuncparen}
\addtocategory{Endpuncparen}{张敏莉2007-500-503,Yi2013--}
\renewcommand{\finentrypunct}{\ifentrycategory{\thefield{keywords}}{Endpuncparen}{)}{\addperiod}}

\begin{document}

    \cite{Yi2013--}
    \cite{张敏莉2007dblan}

    \printbibliography

\end{document}


结果为:

图片

@1058433796
Copy link
Author

好的,这下完全符合格式要求了,再次感谢!我对latex不是很熟悉,总是遇到问题不会解决,感谢你的帮助。

@hushidong
Copy link
Owner

考虑英文名和中文拼音的形式,还可以这样修改一下:


% 测试双语对照文献-两种方法

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


\begin{filecontents}[force]{\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 ={quanpin}
}

@Article{张敏莉2007-500-503,
  Title                    = {超声速短化喷管的设计和试验研究},
  Author                   = {张敏莉 and 易仕和 and 赵玉新},
  Journal                  = {空气动力学报},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-Li and Yi, Shi-He and Zhao, Yu-Xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007},
  nameformat ={quanpin}
}

@Article{Chiani1998-2998-3008,
  Title                    = {Error probability for block codes over channels with block interference},
  Author                   = {Zhao, Mou Mou and Chiani, M.},
  Journal                  = {IEEE Trans. Inf. Theory},
  Number                   = {7},
  Pages                    = {2998-3008},
  Volume                   = {44},
  Year                     = {1998}
}
\end{filecontents}

\addbibresource{\jobname.bib}


%%%%%%%%%%%%%%%%%
%define double lang entry here
%%%%%%%%%%%%%%%%%
\defbibentryset{张敏莉2007dblan}{Zhang2007-500-503,张敏莉2007-500-503}
\defdoublelangentry{Yi2013--}{易仕和2013--}

%%%%%%%%%%%%%%%%%
%modify delim here
%%%%%%%%%%%%%%%%%
%for defbibentryset
\renewcommand{\entrysetpunct}{(in chinese)\newline\nobreak(}
%for defdoublelangentry (biblatex <2.11)
\renewcommand{\relateddelim}{(in chinese)\newline\nobreak(}
%for defdoublelangentry (biblatex >=2.11)
\renewcommand{\begrelateddelim}{(in chinese)\newline\nobreak(}

%note the difference between defbibentryset and defdoublelangentry
\DeclareBibliographyCategory{Endpuncparen}
\addtocategory{Endpuncparen}{张敏莉2007-500-503,Yi2013--}
\renewcommand{\finentrypunct}{\ifentrycategory{\thefield{keywords}}{Endpuncparen}{)}{\addperiod}}

\apptocmd{\gbquanpinlocalset}{\renewrobustcmd*{\bibnamedelima}{\mbox{-}}}{}{}

\begin{document}
    \cite{Chiani1998-2998-3008}
    \cite{Yi2013--}
    \cite{张敏莉2007dblan}

    \printbibliography

\end{document}


结果为:

图片

@hushidong
Copy link
Owner

若只有中文,且英文也按照拼音的形式来写的话,比如:

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


\begin{filecontents}[force]{\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{Yi2013En2}{Yi2013Eng}


%for defdoublelangentry (biblatex <2.11)
\renewcommand{\relateddelim}{(in chinese)\newline\nobreak(}
%for defdoublelangentry (biblatex >=2.11)
\renewcommand{\begrelateddelim}{(in chinese)\newline\nobreak(}

%note the difference between defbibentryset and defdoublelangentry
\DeclareBibliographyCategory{Endpuncparen}
\addtocategory{Endpuncparen}{Yi2013En2}
\renewcommand{\finentrypunct}{\ifentrycategory{\thefield{keywords}}{Endpuncparen}{)}{\addperiod}}

\apptocmd{\gbquanpinlocalset}{\renewrobustcmd*{\bibnamedelima}{\mbox{-}}}{}{}

\begin{document}

正文\cite{Yi2013En2}

\printbibliography[heading=bibliography]

\end{document} 

结果为:
图片

@1058433796
Copy link
Author

@hushidong 这样做其他英文文献的姓名之间也会有“-”。我最终使用\AtEveryBibitem判断每个文献是否属于Endpuncparen类别,然后对Endpuncparen的文献的姓名之间添加“-”,可算解决了。我是这样做的:
image

@hushidong
Copy link
Owner

嗯,这样局部化处理,挺好的。

@hushidong hushidong changed the title 双语参考文献中note注释的位置能否放到第一个文献结尾? 用法:双语对照文献-计算机学报 May 25, 2023
@hushidong hushidong reopened this May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants