Ändern des Formats von \citeauthor postnote

Ändern des Formats von \citeauthor postnote

Gibt es eine Möglichkeit, eine Variante von Biblatex \citeauthor[xx]{author}so neu zu definieren, dass die Postnote „, S./S. „ statt eines Doppelpunkts verwendet? „In Autor (S. xx) …“ (Auf diese Weise müssen wir das Jahr nicht mehrmals wiederholen, wenn es selbstverständlich ist.)

Ich habe es mit \DeclareDelimFormatund \DeclareFieldFormatinnerhalb eines versucht \DeclareCiteCommand{\citeauthorpage}, aber ich habe keine Ahnung, was ich tue.

Ich denke, der beste Weg wäre, ein weiteres Postnote-Makro zu definieren: \newbibmacro{\authorpostnote}{...}

Ich habe auch dies versucht, aber es funktioniert überhaupt nicht:

\DeclareDelimFormat[citeauthor]{postnotedelim}
{\mkpageprefix[pagination]{#1}}

MWE


\documentclass{article}

\usepackage[english]{babel}

\usepackage{xspace}

\usepackage[backend=biber,natbib=true,citestyle=ext-authoryear-comp,bibstyle=ext-authoryear,articlein=false,innamebeforetitle=true,dashed=false,useprefix=true,sortcites=false]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareFieldFormat{postnote}{\mknormrange{#1}} %remove p. in ref
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}} %remove pp. in ref
\DeclareDelimFormat{postnotedelim}{\addcolon\@\xspace\nobreak} %colon after year in ref

\begin{document}
Lorem \textcite[380]{sigfridsson}
ipsum \citeauthor[380]{sigfridsson}

\printbibliography
\end{document}

Bildbeschreibung hier eingeben

Antwort1

Es wäre leicht möglich, nur die Trennzeichen zu ändern citeauthor(dafür gibt es die kontextsensitive Trennzeichenschnittstelle), da Sie aber auch die Feldformate ändern müssen (die nicht von Natur aus kontextsensitiv sind), definieren wir sie am Ende \citeauthortrotzdem neu und verwenden eine weniger ausgefeilte Methode.

\documentclass{article}

\usepackage[english]{babel}

\usepackage[
  backend=biber,
  natbib=true,
  style=ext-authoryear-comp,
  articlein=false,
  innamebeforetitle=true,
  dashed=false,
  useprefix=true,
  sortcites=false,
]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\DeclareDelimFormat{postnotedelim}{\addcolon\@\space\nobreak}

\DeclareFieldFormat{postnote:citeauthor}{%
  \mkbibparens{%
    \mkpageprefix[pagination][\mknormrange]{#1}}}

\newbibmacro*{postnote:citeauthor}{%
  \iffieldundef{postnote}
    {}
    {\setunit{\addspace}%
     \printfield[postnote:citeauthor]{postnote}}}

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames{labelname}}
  {\multicitedelim}
  {\usebibmacro{postnote:citeauthor}}

\begin{document}
Lorem \textcite[380]{sigfridsson}
ipsum \citeauthor[380]{sigfridsson}

\printbibliography
\end{document}

Lorem Sigfridsson und Ryde (1998: 380) ipsum Sigfridsson und Ryde (S. 380)

Die Originaldefinitionen der beteiligten Makros finden Sie inbiblatex.def. \citeauthorist definiert inBll. 2172-2181. postnote:citeauthorist nach dem Vorbild von postnote(Bd. 2379-2383).

Antwort2

Frage gelöst

  • I. Programmierung einer Postnote zu\citeauthor

\newbibmacro{authorpostnote}{\addcomma\space\nobreak\mkpageprefix[pagination][\mknormrange]

\DeclareCiteCommand{\citeauthorpage}[\mkbibparens] % Parencite with just author name!
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames{labelname}}
  {\multicitedelim}
  {\usebibmacro{authorpostnote}}
  • II. Possessivvariante

Als Ergänzung möchte ich auf ein wunderbares Stück Code aufmerksam machen, das jeden Cite-Befehl in einen Possessivpronomen umwandelt und auch in diesem Fall perfekt funktioniert.

Credits gehen an @Psychonaut und @Audrey, siehe diese Seite:

https://tex.stackexchange.com/a/307461/262813.

\documentclass{article}

\usepackage[english]{babel}

\usepackage[
  backend=biber,
  natbib=true,
  style=ext-authoryear-comp,
  articlein=false,
  innamebeforetitle=true,
  dashed=false,
  useprefix=true,
  sortcites=false,
]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}
\DeclareDelimFormat{postnotedelim}{\addcolon\@\space\nobreak}


\DeclareNameWrapperFormat{labelname:poss}{#1's}

\DeclareFieldFormat{shorthand:poss}{%
    \ifnameundef{labelname}{#1's}{#1}}

\DeclareFieldFormat{citetitle:poss}{\mkbibemph{#1}'s}

\DeclareFieldFormat{label:poss}{#1's}

\newrobustcmd*{\posscitealias}{%
    \AtNextCite{%
        \DeclareNameWrapperAlias{labelname}{labelname:poss}%
        \DeclareFieldAlias{shorthand}{shorthand:poss}%
        \DeclareFieldAlias{citetitle}{citetitle:poss}%
        \DeclareFieldAlias{label}{label:poss}}}

\DeclareFieldFormat{postnote:citeauthor}{%
  \mkbibparens{%
    \mkpageprefix[pagination][\mknormrange]{#1}}}

\newbibmacro*{postnote:citeauthor}{%
  \iffieldundef{postnote}
    {}
    {\setunit{\addspace}%
     \printfield[postnote:citeauthor]{postnote}}}

\DeclareCiteCommand{\citeauthorpage}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames{labelname}}
  {\multicitedelim}
  {\usebibmacro{postnote:citeauthor}}

\newrobustcmd*{\citeauthorpagepos}{%
    \posscitealias%
    \citeauthorpage}

\begin{document}

Lorem \citeauthorpage[380]{sigfridsson}
ipsum \citeauthorpagepos[380]{sigfridsson}

\printbibliography
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen