I'd like to be able to custom-define a frame environment that has two arguments, <+-> and fragile. The first allows me to uncover items in a list environment, the second allows me to use the matlab-prettifier package. There seem to be two hurdles
1) fragile seems incompatible with <+->
2) I'm unable to custom-define an environment even just with fragile in it.
The MWE below illustrates both problems. It compiles correctly as written. There are two commented-out lines. If you uncomment either of them, and comment out the line below, then pdflatex will throw an error Are there workarounds for either or both problems?
\documentclass{beamer}
\usepackage[framed]{matlab-prettifier}
\lstnewenvironment{myMPcolor}{%
\lstset{basicstyle=\color{red}}
}{}
%\newenvironment{colorFrame}[fragile][1]{%
\newenvironment{colorFrame}[1]{%
\setbeamercolor{background canvas}{bg=cyan}
\begin{frame}[<+->]{\hfill #1 \hfill }
}{\end{frame}}
\begin{document}
%\begin{frame}[<+->,fragile]{Title}
\begin{frame}[fragile]{Title}
\begin{itemize}
\item first point
\begin{itemize}
\item subpoint
\end{itemize}
\end{itemize}
\begin{myMPcolor}
This is a matlab command
\end{myMPcolor}
\end{frame}
\begin{colorFrame}{Title}
\begin{itemize}
\item first point
\begin{itemize}
\item subpoint
\end{itemize}
\end{itemize}
\end{colorFrame}
\end{document}
<+->and b)fragile? There might be some workaround. – samcarter_is_at_topanswers.xyz Mar 18 '18 at 12:19\end{frame}. However this is another question. – samcarter_is_at_topanswers.xyz Mar 18 '18 at 19:59