Estoy intentando agregar la información del traductor al comando de citar (ya lo modifiqué para mis necesidades en la bibliografía misma).
SI la publicación no tiene autor ni editor, se imprime el traductor en la cita, que es correcta. Además quiero agregar la información, que es el traductor. (Estoy usando alemán, por lo que la información del traductor se imprimirá en alemán Übers.
) Por ejemplo
para textcite
: Apellido (Übers.) (2010: 1-2)
para parencite
: (Apellido (Übers.) 2010: 1-2)
Entrada de ejemplo de bibliografía:
@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},
}
(Esto es sólo un ejemplo)
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}
Respuesta1
Podemos adaptar la idea deBibLaTex - editor de marcas en citas y bibliografía (nombre de etiqueta). Básicamente, verificamos labelnamesource
el tipo de nombre ( author
/ editor
/ translator
) que tenemos y usamos el bibmacro adecuado para ese trabajo. Luego solo necesitamos redefinir cite
y tetxcite
para que impriman el nombre aumentado.
\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}