1

This question already has an answer here:

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

marked as duplicate by Werner beamer Feb 3 '17 at 18:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you make a complete compilable document? – user36296 Feb 3 '17 at 18:03
  • Did you use a fragile frame? – user36296 Feb 3 '17 at 18:04
  • I didn't use a fragile frame. Thank you for a suggestion. I'll try it for a while. – Rico Feb 3 '17 at 18:08
  • Great! It works fine. I would like to thank you :-) – Rico Feb 3 '17 at 18:11
1

Fragile code, such as listings have to be used in

\begin{frame}[fragile]

\end{frame}

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