翻訳者情報を cite コマンドに追加しようとしています (参考文献自体のニーズに合わせて既に修正しています)。
出版物に著者や編集者がいない場合は、翻訳者が引用元に印刷されますが、これは正しいです。さらに、翻訳者であるという情報を追加したいと思います。(私はドイツ語を使用しているので、翻訳者情報はドイツ語で印刷されますÜbers.
)例:
対象textcite
:Lastname (Übers.) (2010: 1-2)
対象parencite
:(姓(Übers.)2010:1-2)
参考文献の例:
@incollection{Kern.2010-EarlyChineseLiterature,
translator = {Kern, Martin},
booktitle = {The Cambridge History of Chinese Literature},
date = {2010-04-01},
isbn = {978-1-139-09541-9},
pages = {1--115},
publisher = {Cambridge University Press},
title = {Early Chinese Literature, Beginnings Through Western Han},
}
(これは単なる例です)
MWE:
%----------------------------------------------------------------------------
% LAYOUT
%----------------------------------------------------------------------------
\documentclass[
12pt,
a4paper,
headings=standardclasses,
listof=totoc,
numbers=noenddot
]{scrartcl}
\usepackage[hmargin=2.5cm, top=2.5cm, bottom=2cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
%----------------------------------------------------------------------------
% BIB
%----------------------------------------------------------------------------
\usepackage[
backend=biber,
style=ext-authoryear,
sorting=nyvt,
datamodel=customstyles,
maxnames=25,
innamebeforetitle=true,
usetranslator=true,
alldates=terse,
labeldate=year,
dashed=false,
doi=false,
isbn=false,
url=false
]{biblatex}
\AtEveryBibitem{%
\clearlist{language}%
\clearfield{pagetotal}%
}
\addbibresource{library.bib}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}
\usepackage{microtype}% avoid bib formatting issues
% editor in parentheses
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}
%----------------------------------------------------------------------------
% MAIN
%----------------------------------------------------------------------------
\begin{document}
\textcite[][1--2]{Kern.2010-EarlyChineseLiterature}
\parencite[][1--2]{Kern.2010-EarlyChineseLiterature}
\autocite[][1--2]{Kern.2010-EarlyChineseLiterature}
\cite[][1--2]{Kern.2010-EarlyChineseLiterature}
\nocite{*}
\clearpage
\printbibliography
\end{document}
答え1
このアイデアは、BibLaTex - 引用と参考文献のマーク エディター (ラベル名)基本的に、名前のlabelnamesource
タイプ (//) をauthor
チェックし、そのジョブに適した bibmacro を使用します。次に、 と を再定義して、拡張された名前を印刷するだけです。editor
translator
cite
tetxcite
\documentclass[
12pt,
a4paper,
]{scrartcl}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[
backend=biber,
style=ext-authoryear,
sorting=nyvt,
datamodel=customstyles,
maxnames=25,
innamebeforetitle=true,
usetranslator=true,
alldates=terse,
labeldate=year,
dashed=false,
doi=false,
isbn=false,
url=false
]{biblatex}
\AtEveryBibitem{%
\clearlist{language}%
\clearfield{pagetotal}%
}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}
\usepackage{microtype}% avoid bib formatting issues
% editor in parentheses
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}
\newbibmacro{cite:labelname}{%
\printnames{labelname}%
\iffieldequalstr{labelnamesource}{author}
{\setunit{\printdelim{authortypedelim}}%
\usebibmacro{authorstrg}}
{\iffieldequalstr{labelnamesource}{editor}
{\setunit{\printdelim{editortypedelim}}%
\usebibmacro{editor+othersstrg}}
{\iffieldequalstr{labelnamesource}{translator}
{\setunit{\printdelim{editortypedelim}}%
\usebibmacro{translator+othersstrg}}
{}}}}
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\usebibmacro{cite:labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\usebibmacro{cite:labeldate+extradate}}
{\usebibmacro{cite:shorthand}}}
\makeatletter
\renewbibmacro*{textcite}{%
\ifnameundef{labelname}
{\iffieldundef{shorthand}
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nonameyeardelim}%
\csuse{extblx@citedelim@\blx@delimcontext @inner@open}}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\usebibmacro{cite:labeldate+extradate}}
{\usebibmacro{cite:shorthand}}}
{\usebibmacro{cite:labelname}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nameyeardelim}%
\csuse{extblx@citedelim@\blx@delimcontext @inner@open}}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\usebibmacro{citeyear}}}
\makeatother
\begin{filecontents}[overwrite]{\jobname.bib}
@incollection{Kern.2010-EarlyChineseLiterature,
translator = {Kern, Martin},
booktitle = {The Cambridge History of Chinese Literature},
date = {2010-04-01},
isbn = {978-1-139-09541-9},
pages = {1--115},
publisher = {Cambridge University Press},
title = {Early Chinese Literature, Beginnings Through Western Han},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\textcite[][1--2]{Kern.2010-EarlyChineseLiterature}
\parencite[][1--2]{Kern.2010-EarlyChineseLiterature}
\autocite[][1--2]{Kern.2010-EarlyChineseLiterature}
\cite[][1--2]{Kern.2010-EarlyChineseLiterature}
\nocite{*}
\clearpage
\printbibliography
\end{document}