Estou tentando usar shorthand
com a @mvcollection
no authoryear-comp
estilo e era isso que eu esperava ao usar o \textcite
comando:
CAO (nº 1234)
Porém, o que é gerado é isto:
Guilherme et al. (CAO, nº 1234)
O comando plain \cite
, por outro lado, gera a citação conforme o esperado:
CAO, não. 1234
Neste @mvcollection
caso, é uma edição de 5 volumes de cartas e escrituras alemãs medievais ordenadas por número; Tenho cada volume arquivado separadamente novamente. Porém, eu estava tentando aqui me referir a uma entrada da coleção como um todo, já que a enumeração dos registros individuais não reinicia a cada volume. O que não entendo é por que year
é substituído shorthand
por em vez de editor
e year
junto ao usar \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}
Responder1
\textcite
é um pouco difícil de modificar. O seguinte dá shorthand
precedência sobre qualquer coisa e garante que a pós-nota esteja sempre entre colchetes.
\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}
Responder2
Neste caso \textcite
verifica se existe um labelname
associado à referência, e utiliza a abreviatura se estiver vazia. Para esta entrada específica, o editor
está sendo usado como um arquivo labelname
. Se você não quiser que ele seja usado nessa função, você pode usar a opção useeditor=false
, que também pode ser definida por entrada, com options = {useeditor=false},
. Observe que isso mudará a forma como a entrada é formatada na bibliografia, o que realmente faz sentido, dado o formato da citação. Acredito que semanticamente é isso que você procurava, mas o resultado não é idêntico ao que você esperava (parece o plain \cite
). Mas talvez \parencite
também seja uma opção "pronta para uso" (dependendo do fluxo do seu texto, é claro).
Um 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}