This question already has an answer here:

I was trying to use the matlab-prettifier package with the LaTeX beamer package, and I noticed I was getting errors when trying to compile. Mainly I was getting an error when trying to use matlab-prettifier environment, within beamer's frame environment.

Here is a MWE:






Trying to run this code sample gives me a "runaway argument error".

I should also say that the error is not limited to trying to insert the "double-quote" environment defined in the preamble, I've also tried using other matlab-prettifier environments, but haven't had any success...

Does anyone know of a workaround?

marked as duplicate by Mike Renfro, Community Jan 26 '16 at 2:51

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.