Abreviação para uma coleção de vários volumes em authoryear-comp

Abreviação para uma coleção de vários volumes em authoryear-comp

Estou tentando usar shorthandcom a @mvcollectionno authoryear-compestilo e era isso que eu esperava ao usar o \textcitecomando:

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 @mvcollectioncaso, é 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 shorthandpor em vez de editore yearjunto 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á shorthandprecedê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}

insira a descrição da imagem aqui

Responder2

Neste caso \textciteverifica se existe um labelnameassociado à referência, e utiliza a abreviatura se estiver vazia. Para esta entrada específica, o editorestá 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 \parencitetambém seja uma opção "pronta para uso" (dependendo do fluxo do seu texto, é claro).

insira a descrição da imagem aqui

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}

informação relacionada