0

I used the @egreg's answer in beamer, but it doesn't work. How to handle it?

enter image description here

kalakay
  • 2,469

1 Answers1

2

You need the fragile frame option if your frame contains something fragile like a lstlisting.

(and don't forget to compile with shell-escape enabled)

% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}

\documentclass{beamer} \usepackage[all]{tcolorbox}

\setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{example-image-duck}}

\tcbset{ boxrule=0pt, opacityfill=0, listing engine=minted, docexample/.add style={}{ fontlower=\normalsize, minted language=latex, % <-------- documentation minted options={ autogobble=true, fontsize=\small, style=bw, % <------- } } } \begin{document}

\begin{frame}[fragile] \begin{dispExample} \begin{equation} \int_{-\infty}^{\infty} \exp (-x^2) , dx = \sqrt{\pi} \end{equation} \end{dispExample} \end{frame} \end{document}

enter image description here