hushidong / biblatex-gb7714-2015

A biblatex implementation of the GB/T7714-2015 bibliography style || GB/T 7714-2015 参考文献著录和标注的biblatex样式包
763 stars 84 forks source link

英文译者 `Trans. by` 后没有空格 #192

Closed TomBener closed 6 months ago

TomBener commented 6 months ago

著者-出版年制中,英文译者 Trans. by 后没有空格。

MWE:

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

\begin{filecontents}[force,noheader]{\jobname.bib}
    @book{yilaienalun2014,
    author = {伊莱恩{$\cdot$} 阿伦},
    translator = {于娟娟},
    date = {2014-01},
    publisher = {华夏出版社},
    location = {北京},
    title = {天生敏感}
  }

  @book{yamamuro2006,
  title = {Manchuria {{Under Japanese Dominion}}},
  author = {Yamamuro, Shin'ichi},
  translator = {Fogel, Joshua A.},
  date = {2006-02-08},
  publisher = {University of Pennsylvania Press},
  location = {Philadelphia}
  }

  @book{bonnin2013,
  title = {The {{Lost Generation}}: {{The Rustication}} of {{China}}'s {{Educated Youth}} (1968--1980)},
  author = {Bonnin, Michel},
  translator = {Horko, Krystyna},
  date = {2013},
  publisher = {The Chinese University of Hong Kong Press},
  location = {Hong Kong},
  doi = {10.2307/j.ctt1p9wqts}
  }

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

\begin{document}

测试译者显示效果
\cite{yilaienalun2014,bonnin2013, yamamuro2006}

\printbibliography[heading=bibliography]

\end{document}

生成 PDF 效果图如下:

CleanShot 2024-03-27 at 18 14 28@2x

by 后面应该有一个空格,请问应该怎么修改呢?如果想要将 Trans. by 修改为 trans. 并放在译者的后面,应该怎么设置呢?谢谢!

hushidong commented 6 months ago

比如:

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

\DefineBibliographyStrings{english}{
    bytranslator= {\addcomma\addspace trans\adddot}, %将trans. by 改成 译
    }

\renewbibmacro*{bytranslator+others}{\bibauthorfont%
  \ifnameundef{translator}
    {}
    {%
     \printnames[bytranslator]{translator}%
     \clearname{translator}%
     \usebibmacro{bytranslator+othersstrg}%“译”的位置
     \newunit}%
  \usebibmacro{withothers}}

\begin{filecontents}[force,noheader]{\jobname.bib}
    @book{yilaienalun2014,
    author = {伊莱恩{$\cdot$} 阿伦},
    translator = {于娟娟},
    date = {2014-01},
    publisher = {华夏出版社},
    location = {北京},
    title = {天生敏感}
  }

  @book{yamamuro2006,
  title = {Manchuria {{Under Japanese Dominion}}},
  author = {Yamamuro, Shin'ichi},
  translator = {Fogel, Joshua A.},
  date = {2006-02-08},
  publisher = {University of Pennsylvania Press},
  location = {Philadelphia}
  }

  @book{bonnin2013,
  title = {The {{Lost Generation}}: {{The Rustication}} of {{China}}'s {{Educated Youth}} (1968--1980)},
  author = {Bonnin, Michel},
  translator = {Horko, Krystyna},
  date = {2013},
  publisher = {The Chinese University of Hong Kong Press},
  location = {Hong Kong},
  doi = {10.2307/j.ctt1p9wqts}
  }

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

\begin{document}

测试译者显示效果
\cite{yilaienalun2014,bonnin2013, yamamuro2006}

\printbibliography[heading=bibliography]

\end{document} 

结果为:

图片

TomBener commented 6 months ago

好的,非常感谢!