0

I found the best (IMHO) way to include Mathematica code in LaTeX: Fanciest way to include Mathematica code in LaTeX (@jkuczm)

To the test I put the TeX code from link above, but it doesn't work with Beamer presentation. File can't be compiled. I get many errors like this:

Integrate[{y^(-3)*(1-(a/y)^2)^(-2)},{y,r,Infinity}] \end {mmaCell} \begin \ETC.
! Paragraph ended before \FV@BeginScanning was complete.


! LaTeX Error: \begin{list} on input line 45 ended by \end{beamer@framepauses}.

! Missing } inserted.

! Extra }, or forgotten \endgroup.

! LaTeX Error: \begin{list} on input line 45 ended by \end{beamer@frameslide}.

! LaTeX Error: \begin{list} on input line 45 ended by \end{document}.

! You can't use `\end' in internal vertical mode.

! LaTeX Error: \begin{list} on input line 45 ended by \end{document}.

! Emergency stop.

Any ideas on how to include Mathematica code in Beamer?

Edit: It was enough to use fragile frame. Thanks for @samcarter

Rico
  • 23

1 Answers1

1

Fragile code, such as listings have to be used in

\begin{frame}[fragile]

\end{frame}