2

By typing

Some text \autocite[88]{A01}.

Now Textcite \textcite[88]{A01}

I try to achieve the following output: enter image description here

Using this answer, I do get the footnotes right. Unfortunately, there are brackets when using \textcite, which I consider bad typography.

enter image description here

Using this answer, \textcite works as expected. However, parenthesis in footnotes now span both year and page number. enter image description here

Using one of the rich examples have not brought me closer. Whats left is my MWE.

    \documentclass{article}
    \usepackage[style=authoryear-icomp,autocite=footnote]{biblatex}
    \usepackage{filecontents}

    \begin{filecontents}{\jobname.bib}
    @article{A01,        
      author = {Author, A.},
      year = {2001},
      title = {Alpha},
      journaltitle = {A Journal},
      volume = {1},
      number = {1},
    }
    @misc{B02,
      author = {Buthor, B.},
      year = {2002},
      title = {Bravo},
      location = {There},
    }
    \end{filecontents}
    \addbibresource{\jobname.bib}

    \textheight=120pt% only for the example

    \begin{document}

    Some text \autocite[88]{A01}.

    Some text \autocite[88]{B02}.

    Some text \autocite[88]{B02}.

    Now Textcite \textcite[88]{A01}

    \printbibliography

    \end{document}
6
  • What about the comp features? What should \autocites[12]{A01}[13]{B02}, \autocite[12]{A01,B02} and \autocite{A01,B02} give? If you can drop the "comp" feature, things might get easier code-length wise. And while we're at it: What about the "ibid"? Do you want it \textcite-style with the name, or as normally without the name.
    – moewe
    Mar 13, 2016 at 13:53
  • But what about "Knuth 1984, Knuth 1986a, Knuth 1986b", would you want "Knuth 1984,1986a,b" there? (I should have probably said \autocite{knuth:ct:b,knuth:ct:c} in my comment.)
    – moewe
    Mar 13, 2016 at 14:03
  • Sorry, I was confused. Both comp and ibid would be nice to have, hence me using icomp. However, citing as stated above should be priority.
    – lactea
    Mar 13, 2016 at 14:08
  • "Nice to have" doesn't actually say what you think about say "Knuth (1986a), p. 12, (b)" which is what could happen with icomp, I imagine. That would probably not be something you find nice, but then do you want "Knuth (1986a,b)" if possible? And what about "ibid" do you want "Knuth (ibid)" or just "ibid"? (I realise that these questions might be annoying, but they are needed to decide which approach to take, the cite macro in authoryear takes about 10 lines in authoryear-icomp it is 2.5 times that + some helper macros)
    – moewe
    Mar 13, 2016 at 14:13
  • I highly appreciate your efforts. Thank you for asking very specific questions. Your assumptions are right. "(1984; 1986a,b)" would be ideal for \textcite{K84}{K86a}{K86b}. As we usually include page numbers, \textcite[12]{K84}[13]{K86a}{K86b} would lead to "(1984, p. 12; 1986a, p. 13; 1986b)". Using \autocite[12]{K86a}[13]{K86b} gives "Knuth (1986a), p. 12; Knuth (1986b), p. 13." in footnotes, which is sufficient. "ibid" instead of "Knuth (ibid)" meets my faculty requirements, too. If taken care of the sorting manually, the comp feature is not necessary.
    – lactea
    Mar 13, 2016 at 14:37

1 Answer 1

1

Modifying authoryear-icomp with regards to brackets around years is not that simple, so may I interest you in the \DeclareInnerCiteDelims feature of my biblatex-ext package? Simply use the style style=ext-<yourstyle> instead of style=<yourstyle>. The ext-... styles are written so that they can be used as a drop-in replacement of the standard styles.

With \DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen} you wrap the year in \footcite (and \autocite if it ends up in as a \footcite with autocite=footnote) in round brackets.

\documentclass{article}
\usepackage[style=ext-authoryear-icomp,autocite=footnote]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A01,        
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  journaltitle = {A Journal},
  volume = {1},
  number = {1},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
  location = {There},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\textheight=120pt% only for the example

\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}

\begin{document}
Some text \autocite[88]{A01}.

Some text \autocite[88]{B02}.

Some text \autocite[88]{B02}.

Now Textcite \textcite[88]{A01}

\printbibliography
\end{document}

enter image description here

Edited for name changes in version 0.4 of biblatex-ext.

If you don't want to use an external package, you will have to modify the cite and cite:postnote bibmacros as follows

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

\renewbibmacro*{cite:postnote}{%
  \setunit{}%
  \printtext{%
    \ifbool{cbx:parens}
      {\bibcloseparen
       \global\boolfalse{cbx:parens}}
      {}}%
  \ifbool{cbx:loccit}
    {}
    {\usebibmacro{postnote}}}
\makeatother

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .