0

I don't know how, but it seems that this file does not want to be compiled. Why? This is my mwe:

\documentclass{beamer}
\usetheme{default}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\usepackage{hyperref}
\usepackage{apacite}
\usepackage{filecontents}


\begin{filecontents}{\Sherbrooke.bib}
@misc{Anzieu1994,
  author = {Anzieu, D.},
  year = {1994},
  title = {Le penser},
}
\end{filecontents}

\begin{document}


\section
\begin{frame}
\cite{Anzieu1994}
\end{frame}


\begin{frame}{Références}
\bibliographystyle{apacite}
\bibliography{\Sherbrooke}
\renewcommand{\bibliographytypesize}{\small}
\end{frame}

\end{document}
2
  • Filename with backslash?
    – campa
    Commented Apr 16, 2021 at 15:55
  • apart from the backslash: the filecontents package is obsolete in a current latex. Commented Apr 16, 2021 at 16:00

1 Answer 1

1

As @Ulrike Fischer points out in a comment, the filecontents package is obsolete; the filecontents environment is part of the LaTeX kernel these days.

Furthermore, as @campa observes, you have a backslash in your filename, and on top of that the \section without an argument also won't work. And of course, changing the definition of \bibliographytypesize after \bibliography is unlikely to do anything.

I'm not familiar with apacite, but I understand that it is also dated, and that using biblatex and biblatex-apa (i.e. \usepackage[style=apa]{biblatex}) is preferred these days, so that's what I did here:

\documentclass{beamer}
\usetheme{default}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\usepackage{hyperref}
\begin{filecontents}[overwrite]{Sherbrooke.bib}
@misc{Anzieu1994,
  author = {Anzieu, D.},
  year = {1994},
  title = {Le penser},
}
\end{filecontents}
\usepackage[style=apa]{biblatex}
\bibliography{Sherbrooke}
\begin{document}

\begin{frame}
\cite{Anzieu1994}
\end{frame}

\begin{frame}{Références}
\printbibliography
\end{frame}

\end{document}

I hope that this can serve as a start!

You must log in to answer this question.

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