Estoy intentando usarlo shorthand
con un @mvcollection
estilo authoryear-comp
y esto es lo que esperaba al usar el \textcite
comando:
CAO (n° 1234)
Sin embargo lo que se genera es esto:
Guillermo y cols. (CAO, núm. 1234)
El comando simple \cite
, por otro lado, genera la cita como se esperaba:
CAO, no. 1234
En @mvcollection
este caso, se trata de una edición de cinco volúmenes de cartas y escrituras alemanas medievales ordenadas por número; Tengo cada volumen archivado por separado nuevamente. Sin embargo, aquí intentaba hacer referencia a una entrada de la colección en su conjunto, ya que la enumeración de los registros individuales no se reinicia con cada volumen. Lo que no entiendo es por qué year
se reemplaza con shorthand
en lugar de editor
y year
juntos cuando se usa \textcite
.
MWE:
\documentclass{article}
\usepackage[
style=authoryear-comp,
backend=biber,
safeinputenc,
]{biblatex}
\begin{filecontents*}{\jobname.bib}
@mvcollection{CAO,
editor = {Friedrich Wilhelm and Richard Newald and Helmut {de Boor} and Diether Haacke and Bettina Kirschstein},
gender = {pp},
title = {{Corpus der altdeutschen Originalurkunden bis zum Jahr 1300}},
shorthand = {CAO},
sortkey = {CAO0},
volumes = {5},
publisher = {Moritz Schauenburg and Erich Schmidt},
location = {Lahr and Berlin},
year = {1932--2004},
pagination = {number},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\textcite[1234]{CAO}
\end{document}
Respuesta1
\textcite
Es un poco complicado modificarlo. Lo siguiente da shorthand
prioridad sobre cualquier cosa y garantiza que la nota posterior siempre esté entre corchetes.
\documentclass{article}
\usepackage[
style=authoryear-comp,
backend=biber,
]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@mvcollection{CAO,
editor = {Friedrich Wilhelm and Richard Newald and Helmut de Boor and Diether Haacke and Bettina Kirschstein},
gender = {pp},
title = {Corpus der altdeutschen Originalurkunden bis zum Jahr 1300},
shorthand = {CAO},
sortkey = {CAO0},
volumes = {5},
publisher = {Moritz Schauenburg and Erich Schmidt},
location = {Lahr and Berlin},
date = {1932/2004},
pagination = {number},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\makeatletter
\newtoggle{cbx:postparens}
\renewbibmacro*{textcite}{%
\iffieldundef{shorthand}
{\iffieldequals{namehash}{\cbx@lasthash}
{\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
\(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
{\setunit{\addcomma}%
\usebibmacro{cite:extradate}}
{\setunit{\compcitedelim}%
\usebibmacro{cite:labeldate+extradate}%
\savefield{labelyear}{\cbx@lastyear}}}
{\ifnameundef{labelname}
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nonameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\usebibmacro{cite:labeldate+extradate}}
{\printnames{labelname}%
\setunit{%
\global\booltrue{cbx:parens}%
\printdelim{nameyeardelim}\bibopenparen}%
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
\iffieldundef{labelyear}
{\usebibmacro{cite:label}}
{\usebibmacro{cite:labeldate+extradate}}%
\savefield{labelyear}{\cbx@lastyear}}}%
\stepcounter{textcitecount}%
\savefield{namehash}{\cbx@lasthash}%
\togglefalse{cbx:postparens}}%
{\usebibmacro{cite:shorthand}%
\toggletrue{cbx:postparens}%
\global\undef\cbx@lasthash
\global\undef\cbx@lastyear}%
\setunit{%
\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}%
\textcitedelim}}
\renewbibmacro*{textcite:postnote}{%
\ifboolexpr{togl {cbx:postparens} and not test {\iffieldundef{postnote}}}
{\togglefalse{cbx:postparens}%
\printunit{\extpostnotedelim\bibopenparen\global\booltrue{cbx:parens}}}
{}%
\usebibmacro{postnote}%
\ifthenelse{\value{multicitecount}=\value{multicitetotal}}
{\setunit{}%
\printtext{%
\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}}}
{\setunit{%
\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}%
\textcitedelim}}}
\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
{\gdef\cbx@savedkeys{}%
\citetrackerfalse%
\pagetrackerfalse%
\DeferNextCitekeyHook%
\usebibmacro{cite:init}}
{\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
{\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
\global\clearfield{multipostnote}}
{}%
\xappto\cbx@savedkeys{\thefield{entrykey},}%
\iffieldequals{namehash}{\cbx@lasthash}
{\iffieldundef{shorthand}
{}
{\stepcounter{textcitetotal}%
\global\undef\cbx@lasthash}}
{\stepcounter{textcitetotal}%
\savefield{namehash}{\cbx@lasthash}}}
{}
{\protected@xappto\cbx@savedcites{%
[\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
\makeatother
\begin{document}
\textcite[1234]{CAO}
\end{document}
Respuesta2
En este caso \textcite
comprueba si hay un labelname
asociado con la referencia y utiliza la abreviatura si está vacía. Para esta entrada en particular, editor
se utiliza como archivo labelname
. Si no desea que se utilice en dicha función, puede utilizar la opción useeditor=false
, que también se puede configurar por entrada, con options = {useeditor=false},
. Tenga en cuenta que esto cambiará el formato de la entrada en la bibliografía, lo que en realidad tiene sentido, dado el formato de la cita. Creo que esto es semánticamente lo que estabas buscando, pero el resultado no es idéntico al que esperabas (parece simple \cite
). Pero quizás \parencite
también sea una posible opción "lista para usar" (dependiendo de su flujo de texto, por supuesto).
Un MWE completo:
\documentclass{article}
\usepackage[
style=authoryear-comp,
backend=biber,
safeinputenc,
]{biblatex}
\begin{filecontents*}{\jobname.bib}
@mvcollection{CAO,
editor = {Friedrich Wilhelm and Richard Newald and Helmut {de Boor} and Diether Haacke and Bettina Kirschstein},
gender = {pp},
title = {{Corpus der altdeutschen Originalurkunden bis zum Jahr 1300}},
shorthand = {CAO},
sortkey = {CAO0},
volumes = {5},
publisher = {Moritz Schauenburg and Erich Schmidt},
location = {Lahr and Berlin},
year = {1932--2004},
pagination = {number},
options = {useeditor=false},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\textcite[1234]{CAO}
\parencite[1234]{CAO}
\printbibliography
\end{document}