2

I am making lecture notes for a course, and I would like to use includeonlylecture to make a separate slide set for each week.

I use bibtex for citations, and it would best for me if every set of slides would contain an own bibliography. Is there some elegant way to do this?

Thanks and best regards, CB

3

Is the use of bibtex mandatory? I am asking, because biblatex provided so called “refsections” which can be used to compile individual bibliographies for parts of document. Below is a very simple MWE that illustrates capabilities.

The key is the use of \newrefsection that tells biblatex where to split the document into subpart regarding the bibliography. You can then use \printbibliography with an optional argument to restrict it to a certain refsection.

\printbibliography[section=1,heading=Lecture1]

I added another optional argument to customize the header of the sub bibliographies. This can be customized with the following command.

 \defbibheading{Lecture1}{\frametitle{References for Lecture 1}}

I put the name into \frametitle{…} since I assume you want it to appear in the title of the frame. But you can basically use any code you want (like, e.g. \section{My bib head}).

I put the bibliographies at the end of the respective sections, but you could also put them all at the end.

\documentclass{beamer}
\usepackage[style=authoryear,backend=bibtex]{biblatex}
\bibliography{bib}

\begin{document}

\defbibheading{Lecture1}{\frametitle{References for Lecture 1}}
\defbibheading{Lecture2}{\frametitle{References for Lecture 2}}

\lecture{Quiet}{Week 1} \newrefsection
    \begin{frame}
        \cite{Smith1997}
    \end{frame}    
    \frame{\printbibliography[section=1,heading=Lecture1]}

\lecture{Loud}{Week 2} \newrefsection  
    \begin{frame}{}
        \cite{Doe2001}
    \end{frame}    
    \frame{\printbibliography[section=2,heading=Lecture2]}

\end{document}

Here are the bib entries I used for this example. Save it as bib.bib.

@article{Smith1997,
    Author = {Smith, Elliot},
    Journal = {Singer and Songwriter},
    Title = {Eithe/Or},
    Volume = {23},
    Year = {1997}}

@article{Doe2001,
    Author = {Converge},
    Journal = {Hardcore and Metal},
    Volume = {19},
    Title = {Jane Doe},
    Year = {2001}}
  • I totally agree with you, @moewe. This is really a comment, not an answer. I am pretty new to SE and thus I not have the reputation to “comment everywhere”. Only 2 points left though ;-) I'll try to write something up and enhance my comment-“answer” with it. – Daniel Apr 6 '16 at 9:44
  • 1
    I'm sure that enhanced answer earned you the missing reputation in no time :-). BTW: biblatex comes with its own example file that is available on all system where biblatex is installed properly, just use biblatex-examples.bib. You might also want to note that \addbibresource{file.bib} is the enhanced version of \bibliography{file}. \bibliography is marked as deprecated, but I'm quite sure it will continue to be supported. – moewe Apr 6 '16 at 14:04
  • Yes, it did indeed :-) And thanks, @moewe for the tips! That's very useful. – Daniel Apr 6 '16 at 14:06

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.