Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

biblatex has the option of using "ibid" in citations with the authoryear-ibid option. With this option activated, my pdf output contains both:

(I) (ibid.); and

(II) John (ibid).

I would like to keep (I) but not (II) -- i.e., I would like biblatex to print John (2000) but not John (ibid). Does anyone know how to do that?

(Here is another way of formulating my question if you use natbib=true: can I activate the use of ibid with \citep but not with \citet?)

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

The \ifciteibid test must be removed from the textcite bibmacro. For convenience, I use the xpatch package to selectively change the bibmacro's definition.

\documentclass{article}

\usepackage[style=authoryear-ibid,natbib=true]{biblatex}

\usepackage{xpatch}

\xpatchbibmacro{textcite}{%
       {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
          {\usebibmacro{cite:ibid}}
      {\iffieldundef{labelyear}
             {\usebibmacro{cite:label}}
             {\usebibmacro{cite:labelyear+extrayear}}}}
}{%
      {\iffieldundef{labelyear}
             {\usebibmacro{cite:label}}
             {\usebibmacro{cite:labelyear+extrayear}}}
}{}{}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Some text \citep{A01}.

As was shown in \citet{A01}~\dots

Some more text \citep{A01}.

\printbibliography

\end{document}

enter image description here

EDIT: Here are the modifications necessary for the authoryear-icomp style (which uses a different implementation of textcite):

\usepackage{xpatch}

\xpatchbibmacro{textcite}{%
          {\usebibmacro{cite:label}%
       \setunit{%
         \global\booltrue{cbx:parens}%
         \addspace\bibopenparen}%
       \ifnumequal{\value{citecount}}{1}
         {\usebibmacro{prenote}}
         {}%
       \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
         {\usebibmacro{cite:ibid}}
         {\usebibmacro{cite:labelyear+extrayear}}}
}{%
          {\usebibmacro{cite:label}%
       \setunit{%
         \global\booltrue{cbx:parens}%
         \addspace\bibopenparen}%
       \ifnumequal{\value{citecount}}{1}
         {\usebibmacro{prenote}}
         {}%
      \usebibmacro{cite:labelyear+extrayear}}
}{}{}

\xpatchbibmacro{textcite}{%
             {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
        {\usebibmacro{cite:ibid}}
        {\usebibmacro{cite:labelyear+extrayear}}}%
}{%
             {\usebibmacro{cite:labelyear+extrayear}}%
}{}{}
share|improve this answer
    
that works great with citestyle=authoryear-ibid. But I've noticed that this solution does not work with authoryear-icomp style and I don't understand why that happens. Do you know how I can fix this? –  falsum Jul 29 '12 at 2:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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