# biblatex : avoid redundant information

I'm exploring the great possibilities of biblatex ... and there are a few questions I can't resolve.

I'll start :) with one (edit !) of them :

I'm using "crossref" to cite several chapters in a book. Currently, when a second chapter in the same book is cited, all information about the publisher etc is reprinted. I'd like only the first reference to the book to have the full information, the following chapter could just have "author, chapter, in : bookname, op. cit."

Something tells me this should be possible ... would you know how to achieve this ?

Here's a small code :

\documentclass[ngerman,french]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
\usepackage{lmodern}
\usepackage{perpage}
\MakePerPage{footnote}
%% Biblatex %%
\usepackage[language=french,%
autopunct=true,%
strict,%
citepages=suppress,%
idemtracker=true,%
loccittracker=true,%
opcittracker=true,%
related=false,
backend=biber]%
{biblatex}%

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{MH_Holzwege,
keywords =     {MH,D},
author =   {Martin Heidegger},
title =    {Holzwege},
publisher =    {Vittorio Klostermann},
year =     2003,
series =   {Einzelausgabe des Bd. 5 der Gesamtausgabe},
edition =      {8., unver\"{a}nderte Auflage},

@InBook{MH_Kunstwerk,
keywords =     {MH,D},
author =   {Martin Heidegger},
title =    {Der Ursprung des Kunstwerkes},
pages =    {1--74},
crossref = {MH_Holzwege}
}

@InBook{MH_NietzscheGott,
keywords =     {MH,D},
author =   {Martin Heidegger},
title =    {Nietzsches Wort {Gott} ist tot'\,},
pages =    {193--247},
crossref = {MH_Holzwege}
}

@InBook{MH_Weltbild,
keywords =     {MH,D},
author =   {Martin Heidegger},
title =    {Die Zeit des Weltbildes},
pages =    {69--104},
crossref = {MH_Holzwege}

@Book{MH_SZ,
keywords =     {MH,D},
author =   {Martin Heidegger},
title =    {{Sein und Zeit}},
publisher =    {Max Niemeyer},
year =     2001,
edition =      {18. Auflage},
}

\end{filecontents}

\makeatother

\usepackage{babel}

\begin{document}

\title{Titre}

\author{A. Teur}

\maketitle

Texte\footcite[20]{MH_Kunstwerk}.

Plus de texte \footcite{MH_Weltbild}.

Et hop \footcite{MH_SZ}

Une derni\ere\footcite{MH_NietzscheGott}

\printbibliography[title={Oeuvres de Martin Heidegger},keyword=MH,keyword=D]

\end{document}

-
Welcome here! For the future, you're better off asking one question in each post. – pst Apr 21 '14 at 17:19
Ad 2: Have a look at biblatex-publist. This will change the bibliography style for all bibliographies though, at present it is not really possible to change the bibstyle between two \printbibliography statements (see also biblatex: different bibstyles in the same document?). – moewe Apr 21 '14 at 17:27
OK, than I'll stop looking for a way to resolve problem n. 2, thanks for telling me. And my question reduces itself to number 1. – Jos Apr 21 '14 at 18:53
Maybe you would like to edit your question then to remove #2 (you can ask a new question about issue #2 later, if one arises). – moewe Apr 21 '14 at 19:09
No. 1 is one of the most infuriating aspects of switching to biblatex. Mostly, things are so much nicer but then there are these odd bumps in it where it can't cope with stuff easily managed by bibtex. (The 'In' issue is another one.) – cfr Apr 21 '14 at 19:12

I think it can be done, without undue difficulty. Here's a sort of proof of concept:

\newbibmacro*{cite:seen:related}{%
{\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{}

\newcommand{\ifrelatedunseen}[2]{%
\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection}
{#2}
{#1}}

\renewbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
\global\togglefalse{cbx:fullcite}%
\global\togglefalse{cbx:loccit}%
\bibhypertarget{cite\the\value{instcount}}{%
\ifciteseen
{\iffieldundef{shorthand}
{\ifciteibid
{\usebibmacro{cite:ibid}}
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\usebibmacro{cite:name}}%
\usebibmacro{cite:title}}%
\usebibmacro{cite:save}}
{\usebibmacro{cite:shorthand}}}
{\ifboolexpr {
test {\iffieldundef{crossref}}
or not ( test {\ifentrytype{inbook}}
or test {\ifentrytype{incollection}} ) }
{\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\ifrelatedunseen
{\usebibmacro{cite:seen:related}%
\usebibmacro{cite:full}%
\usebibmacro{cite:save}}
{\usebibmacro{related:info}}}}}}

\newbibmacro*{related:info}{%
\usedriver{}{inbook:rel}}

\DeclareBibliographyDriver{inbook:rel}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit%
\bibstring{opcit}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit\newblock
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}


Basically: we modify cite so that it looks for a crossref in inbook or incollection types. If there is one uses the (ordinary) method for seeing if the crossref has been previously cited, and calls a modified macro (which in turn calls a revised driver) if it has. If the crossref not been previously cited (directly or indirectly) it calls a macro which records the citation of the crossref as if it had been cited.

It's a bit rough of course; "production" code would need to deal with (e.g)

• shorthands (as well as "op. cit"), and perhaps idem and ibid as well, but I don't see insuperable difficulties, though the cite saving mechanism would need to be modified to deal with the "note" classes.

• (perhaps) the incollection type separately from inbook (since one might want to print editors' names)

• xref fields as well as crossref (which is what I have used, since that was what was in the MWE) (and I've always found the xref mechanism rather difficulty in any event)

It does have certain merits, however: if the "main work" is cited, the citetracker picks it up automatically. And if there is a \citereset, it works as it should (i.e. we lose the op.cit.)

This code inserted (between \makeatletter ... \makeatother into the above MWE gives the following.

-
Great answer +1. Maybe you would like to switch between blx@bsee@ and blx@fsee@ depending on \iffootnote, as I understand it, the former is for the body text, the latter list for footnote citations. (I'm not sure, if this will work properly though.) – moewe Apr 22 '14 at 9:12
@moewe You may well be right! I was in rather a rush, and I'm sure there are quite a number of refinements which would be desirable to make this robust enough to be general. I'll try experimenting a little this evening. – Paul Stanley Apr 22 '14 at 9:15
Great! It would be good to see quite a generally-applicable and robust solution, as this is a question that comes up from time to time, and has not received a satisfying answer (I think). – moewe Apr 22 '14 at 9:23
Thanks ! I'm sorry, it took a bit of time to experiment. I couldn't figure out how to avoid having the author name twice when using biblatex-philosophy, so I'm now using your solution. – Jos Apr 27 '14 at 14:03
for your information, I have adapted this code to a package ctan.org/pkg/biblatex-opcit-booktitle – Maïeul Aug 30 '15 at 16:34