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.

I'm using the verbose-trad2 citation style of biblatex and trying to change some things around. In my style, Idem is more restricted than just identical author name, so I set idemtracker=false. I also redefined the appropriate bibliography string (ibidem), so that I get, for example,

  1. Author name, « Title », op cit., p. X

  2. Idem, p. Y.

if two citations following each other share the same author and title, but differ in the page number in the postnote. That's all well.

Now, if the page is the same in the two citations, I'd like the page reference to be suppressed in the second citation (that's taken care of with ibidpage=true). Moreover, in this case only, I'd like the Latin abbreviation to be Ibid. instead of Idem. Is there a way to do this?

Here are links to some files:

Thanks for your time and any help!

share|improve this question
1  
What you are looking for is usually handled by the loccittracker I think (you would need to rename the string, though). Sorry I don't have time to look into it now – I see you enabled it, there must be something preventing it from being really switched on. –  ienissei Jun 30 '12 at 7:12
add comment

1 Answer

up vote 8 down vote accepted

With ibidpage=true you also get loccittracker=constrict. The case where you want Ibid instead of Idem is detected by the \ifloccit test. Under verbose-trad2, this test is executed in the cite:ibid bibliography macro. Here is its definition from verbose-trad2.cbx:

\newbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \bibstring[\mkibid]{ibidem}}}%
  \ifloccit
    {\global\toggletrue{cbx:loccit}}
    {}}

You can redefine this macro to print Idem when \ifloccit yields false.

\documentclass{report}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=verbose-trad2,ibidpage,idemtracker=false]{biblatex}
\usepackage[colorlinks]{hyperref}

\renewcommand*{\mkibid}[1]{\emph{#1}}

\makeatletter
\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidem}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{idem\thefield{gender}}}}}}
\makeatother

\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill
Filler text \autocite{knuth:ct:a}.
Filler text \autocite{knuth:ct:b}.
Same labelname, different work \autocite{knuth:ct:a}.
Same work, different postnote \autocite[16]{knuth:ct:a}.
Same work, same postnote \autocite[16]{knuth:ct:a}.
Same labelname, different work \autocite[10]{knuth:ct:b}.
Same work, same postnote \autocite[10]{knuth:ct:b}.
Same work, different postnote \autocite[10--15]{knuth:ct:b}.
\printbibliography
\end{document}

enter image description here

share|improve this answer
    
Bingo, works perfectly well! I just needed to remove the bibliography string definition I mentioned in my question. Thank you very much Audrey! –  Christoph B. Jul 2 '12 at 8:31
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.