0

I'm looking for a specific citation style. My whole dissertation is written with biblatex using biber. I'm using the commands \footcite[][]{} and \cite[]{}.

Is there a quick solution to receive the following style:

in-line cite:

Lastname (Year), page --> Becker, Schuette (1996), S. 22 ff.

  • 1
    A few more details about what you have so far would be appreciated. Do you already use style=authoryear or one of its derivatives? If so, which derivative exactly? The exact code needed depends a lot on the exact features of your citation (compressed or not, 'ibid' or not etc.) Best would be an MWE. – moewe Mar 3 '17 at 13:00
1

You could use \textcite. This would, however, also change the position of post and pre-notes, the output will also differ from normal \cite with shorthand and 'ibid.'


The following shows how to modify \cite to give exactly the same output, just with the year in brackets. Care has been taken to give pleasant results with compressing styles.

For authoryear go with

\makeatletter
\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
     \usebibmacro{cite:parenlabelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}

\newbibmacro*{cite:parenlabelyear+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[bibhyperref]{\printtext[parens]{%
     \ifdefstring\blx@dateformat@labeldate{edtf}
       {}
       {\datecircaprint}%
     \dateeraprintpre{labelyear}%
     \printfield{labelyear}%
     \printfield{extrayear}%
     \dateuncertainprint%
     \iffieldsequal{labeldateera}{labelenddateera}{}
       {\dateeraprint{labelyear}}%
     \ifdefstring\blx@dateformat@labeldate{edtf}
       {\datecircaprintedtf}
       {}%
     \iffieldundef{labelendyear}
       {}
       {\iffieldsequal{labelyear}{labelendyear}{}
        {\ifdefstring\blx@dateformat@labeldate{edtf}
          {\slash}% strict EDTF
          {\bibdaterangesep
           \enddatecircaprint}%
         \dateeraprintpre{labelendyear}%
         \printfield{labelendyear}%
         \enddateuncertainprint
         \ifdefstring\blx@dateformat@labeldate{edtf}
           {\enddatecircaprintedtf}
           {}%
         \dateeraprint{labelendyear}}}}}}}
\makeatother

<code>authoryear</code> sample

For authoryear-ibid

\makeatletter
\renewbibmacro*{cite}{%
  \global\boolfalse{cbx:loccit}%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
       {\usebibmacro{cite:ibid}}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}%
           \setunit{\printdelim{nonameyeardelim}}}
          {\printnames{labelname}%
           \setunit{\printdelim{nameyeardelim}}}%
        \usebibmacro{cite:parenlabelyear+extrayear}}}
    {\usebibmacro{cite:shorthand}}}

\newbibmacro*{cite:parenlabelyear+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[bibhyperref]{\printtext[parens]{%
     \ifdefstring\blx@dateformat@labeldate{edtf}
       {}
       {\datecircaprint}%
     \dateeraprintpre{labelyear}%
     \printfield{labelyear}%
     \printfield{extrayear}%
     \dateuncertainprint%
     \iffieldsequal{labeldateera}{labelenddateera}{}
       {\dateeraprint{labelyear}}%
     \ifdefstring\blx@dateformat@labeldate{edtf}
       {\datecircaprintedtf}
       {}%
     \iffieldundef{labelendyear}
       {}
       {\iffieldsequal{labelyear}{labelendyear}{}
        {\ifdefstring\blx@dateformat@labeldate{edtf}
          {\slash}% strict EDTF
          {\bibdaterangesep
           \enddatecircaprint}%
         \dateeraprintpre{labelendyear}%
         \printfield{labelendyear}%
         \enddateuncertainprint
         \ifdefstring\blx@dateformat@labeldate{edtf}
           {\enddatecircaprintedtf}
           {}%
         \dateeraprint{labelendyear}}}}}}}
\makeatother

authoryear-ibid` sample

For authoryear-comp go with

\makeatletter
\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{%
          \global\booltrue{cbx:parens}%
          \printdelim{nonameyeardelim}\bibopenparen}
        \usebibmacro{cite:labelyear+extrayear}%
        \usebibmacro{cite:reinit}}
       {\iffieldequals{namehash}{\cbx@lasthash}
          {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                       \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
             {\setunit{\addcomma}%
              \usebibmacro{cite:extrayear}}
             {\setunit{\compcitedelim}%
              \usebibmacro{cite:labelyear+extrayear}%
              \savefield{labelyear}{\cbx@lastyear}}}
          {\printnames{labelname}%
           \setunit{%
             \global\booltrue{cbx:parens}%
             \printdelim{nameyeardelim}\bibopenparen}
           \usebibmacro{cite:labelyear+extrayear}%
           \savefield{namehash}{\cbx@lasthash}%
           \savefield{labelyear}{\cbx@lastyear}}}}
    {\usebibmacro{cite:shorthand}%
     \usebibmacro{cite:reinit}}%
  \setunit{%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}%
    \multicitedelim}}

\newbibmacro*{parenpostnote}{%
  \setunit{}%
  \printtext{%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}%
  \iffieldundef{postnote}
    {}
    {\setunit{\postnotedelim}%
     \printfield{postnote}}}

\DeclareCiteCommand{\cite}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{parenpostnote}}
\makeatother

<code>authoryear-comp</code> sample

For authoryear-icomp finally use

\makeatletter
\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
       {\usebibmacro{cite:ibid}}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}%
           \setunit{%
             \global\booltrue{cbx:parens}%
             \printdelim{nonameyeardelim}\bibopenparen}
           \usebibmacro{cite:labelyear+extrayear}%
           \usebibmacro{cite:reinit}}
          {\iffieldequals{namehash}{\cbx@lasthash}
             {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                          \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
                {\setunit{\addcomma}%
                 \usebibmacro{cite:extrayear}}
                {\setunit{\compcitedelim}%
                 \usebibmacro{cite:labelyear+extrayear}%
                 \savefield{labelyear}{\cbx@lastyear}}}
             {\printnames{labelname}%
              \setunit{%
                \global\booltrue{cbx:parens}%
                \printdelim{nameyeardelim}\bibopenparen}
              \usebibmacro{cite:labelyear+extrayear}%
              \savefield{namehash}{\cbx@lasthash}%
              \savefield{labelyear}{\cbx@lastyear}}}}}
    {\usebibmacro{cite:shorthand}%
     \usebibmacro{cite:reinit}}%
  \setunit{%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}%
    \multicitedelim}}

\newbibmacro*{cite:parenpostnote}{%
  \ifbool{cbx:loccit}
    {}
    {\usebibmacro{parenpostnote}}}

\newbibmacro*{parenpostnote}{%
  \setunit{}%
  \printtext{%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}%
  \iffieldundef{postnote}
    {}
    {\setunit{\postnotedelim}%
     \printfield{postnote}}}

\DeclareCiteCommand{\cite}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{cite:parenpostnote}}
\makeatother

<code>authoryear-icomp</code> sample

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.