7

Problem

I'd like to change the behaviour of the firstfull option that the biblatex-dw style provides. I don't want to have a full citation of every work appearing the first time in the document but only if it is cited only once in the whole document. Additionally if it is fully cited it should not appear in the bibliography.

Example

A MWE to clarify what I mean:

\documentclass{article}
\usepackage[
    style=authortitle-dw,
    backend=biber,
    autocite=footnote,
    firstfull=true,
]{biblatex}

\DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites} % prevent some warnings

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book {foo,
    author = {Foo, Francis},
    title = {All about Foo},
    year = {2011},
    location = {Footown},
}

@book {bar,
    author = {Bar, Bernie},
    title = {Barstory},
    year = {2000},
    location = {Barcity},
}
\end{filecontents}

\addbibresource{\jobname.bib}
\begin{document}
\autocite{bar}
\autocite{foo}
\autocite{bar}

\printbibliography
\end{document}

This produces the following result:

Citations

enter image description here

The citation of "Francis" is ok because it has only been cited once. But the other one ("Bernie") I'd prefer to have no full citation.

Bibliography

enter image description here

As expected all works that have been cited have been included in the bibliography. This is also not what I'd like. Because "Francis" has only been cited once it has yet been cited fully in the footnote. So I don't need to have it in the bibliography.

Undesired partial Solution

The second problem with the bibliography could be solved if I'd manually add options = {skipbib=true} to every entry in the .bib file that will only be cited once. So in this case "Francis" wouldn't be in the bibliography anymore. This is not what I'd like to have as a solution because this frickeling is error-prone.

Remark: This question is not a duplicate of Check if an entry is cited multiple times but a solution might build up on lockstep's answer.

1 Answer 1

6
\documentclass{article}

\usepackage[
    style=authortitle-dw,
    backend=biber,
    autocite=footnote,
    firstfull=true,
    citecounter=true% ADDED
]{biblatex}

\DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites}% prevent some warnings

\DeclareBibliographyCategory{citedmorethanonce}% ADDED

\renewbibmacro*{cite:full}{%
  \ifnumgreater{\value{citecounter}}{1}{% ADDED
    \addtocategory{citedmorethanonce}{\thefield{entrykey}}% ADDED
    \usebibmacro{cite:normal}% ADDED
  }{% ADDED
    \usebibmacro{cite:full:citepages}%
    \usedriver
      {\DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}%
    \iffieldundef{shorthand}
      {}
      {\ifbool{cbx:citedas}
        {\addspace\usebibmacro{shorthandintro}}
%      {}}}% DELETED
        {}}}}% ADDED

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book {foo,
    author = {Foo, Francis},
    title = {All about Foo},
    year = {2011},
    location = {Footown},
}
@book {bar,
    author = {Bar, Bernie},
    title = {Barstory},
    year = {2000},
    location = {Barcity},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\textheight=150pt% just for the example

\begin{document}

\autocite{bar}
\autocite{foo}
\autocite{bar}

\printbibliography[category=citedmorethanonce]

\end{document}

enter image description here

0

You must log in to answer this question.

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