1

I would like to scan the bib file for entry type, put them into 3 categories, and show those separate with title. I got this working with the code below. I would like to change two things:

  • Delete the strange output at the footcite (blx@hook@citekey@next);
  • Put all three bibliographies below eachother, so no new page.

How can I do that?


\documentclass{report}

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

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

\AtEveryCitekey{
  \ifentrytype{misc}{
    \iffieldundef{howpublished}{
      \addtocategory{websites}{\thefield{entrykey}}
    }{
      \addtocategory{spoken}{\thefield{entrykey}}
    }
  }{
  }
}

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

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
%books
@book{3,
  author = {Menger, Carl},
  title = {Grunds{\"a}tze der Volkswirtschaftslehre},
  publisher = {Braum{\"u}ller},
  year = {1982} 
}

%spoken
@misc{4,
  author = "Janssen, Jan",
  title = "",
  month = may,
  year = "2014",
  howpublished = "Congres"
}

%websites
@misc{5,
  author = {The Guardian},
  title = {Cyprus banks remain closed to prevent run on deposits},
  url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
  urldate = "2014-11-15"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\tableofcontents
\chapter{Chapter}
Some text
\footcite{3,4,5}

\addcontentsline{toc}{chapter}{Bibliography}
\printbibliography[category=books,title={Books}]
\printbibliography[category=websites,title={Online articles}]
\printbibliography[category=spoken,title={Conferences}]


\end{document}
  • 1
    Please edit your question to add the error message you speak of. – jub0bs Feb 14 '15 at 15:22
  • That's the strange output: blx@hook@citekey@next – Scripter Feb 14 '15 at 15:27
2

Thanks to lockstep's editing of the tags, I found the answer myself.

\documentclass{report}

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

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

\AtEveryCitekey{
  \ifentrytype{misc}{
    \iffieldundef{howpublished}{
      \addtocategory{websites}{\thefield{entrykey}}
    }{
      \addtocategory{spoken}{\thefield{entrykey}}
    }
  }{
  }
}

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

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
%books
@book{3,
  author = {Menger, Carl},
  title = {Grunds{\"a}tze der Volkswirtschaftslehre},
  publisher = {Braum{\"u}ller},
  year = {1982} 
}

%spoken
@misc{4,
  author = "Janssen, Jan",
  title = "",
  month = may,
  year = "2014",
  howpublished = "Congres"
}

%websites
@misc{5,
  author = {The Guardian},
  title = {Cyprus banks remain closed to prevent run on deposits},
  url = "http://www.theguardian.com/world/2013/mar/26/cyprus-banks-closed-prevent-run-deposits",
  urldate = "2014-11-15"
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\tableofcontents
\chapter{Chapter}
Some text
\footcite{3,4,5}

\addcontentsline{toc}{chapter}{Bibliography}

\chapter*{Bibliography}
\section*{Books}

\begingroup
\let\clearpage\relax
\printbibliography[category=books,heading=none]
\endgroup

\section*{Online articles}
\begingroup
\let\clearpage\relax
\printbibliography[category=websites,heading=none]
\endgroup

\section*{Conferences}
\begingroup
\let\clearpage\relax
\printbibliography[category=spoken,heading=none]
\endgroup


\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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