2

I am not sure where blx@hook@citekey@next comes from in the example below.

The output of the footcite is:

1 blx@hook@citekey@nextCarl Menger. Grundsätze der Volkswirtschaftslehre. Braumüller, 1982.

\documentclass{report}

\usepackage[backend=bibtex,citestyle=verbose-ibid,bibstyle=numeric,sorting=nyt,defernumbers=true]{biblatex}

\DeclareBibliographyCategory{websites}
\DeclareBibliographyCategory{spoken}
\DeclareBibliographyCategory{books}

\AtEveryCitekey{
  \ifentrytype{book}{
      \addtocategory{books}{\thefield{entrykey}}
  }
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}

@book{3,
  author = {Menger, Carl},
  title = {Grunds{\"a}tze der Volkswirtschaftslehre},
  publisher = {Braum{\"u}ller},
  year = {1982} 
}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\chapter{Chapter}
Some text
\footcite{3}

\end{document}
Scripter
  • 215
  • 1
  • 12
  • Very good example. But please delete, or at least comment the loading of package filecontents. Inexperienced users tend to overwrite files by acciddent. – Johannes_B Feb 22 '15 at 13:34

1 Answers1

4

The answer is quite simple, If something then something else someother. You are missing the else part in you conditional.

\documentclass{article}
\setlength{\textheight}{5cm}

\usepackage[backend=bibtex,citestyle=verbose-ibid,bibstyle=numeric,sorting=nyt,defernumbers=true]{biblatex}

\DeclareBibliographyCategory{books}

\AtEveryCitekey{
    \ifentrytype{book}{
        \addtocategory{books}{\thefield{entrykey}}
    }{}%<---------- else, well, nothing
}


\begin{filecontents}{\jobname.bib}

    @book{3,
        author = {Menger, Carl},
        title = {Grunds{\"a}tze der
    Volkswirtschaftslehre},
    publisher = {Braum{\"u}ller},
    year = {1982} 
}
          }
      \end{filecontents}

      \addbibresource{\jobname.bib}

      \begin{document}

      \section{Chapter}
      Some text
      \footcite{3}

      \end{document}
Johannes_B
  • 24,235
  • 10
  • 93
  • 248