I have a beamer class file, with a plenty of frames.
Almost all frames need the option [fragile] because I frequently use \verb| | to illustrate codes.
So I want the frame to be equipped with [fragile] globally so that I don't need to type the option manually.
Also, I want all the stuff inside verbatim(or possibly inside \texttt, but I prefer verbatim) to be grey-shaded, just as TeX exchange is doing now.
Here is a minimal working example. Can you please modifiy it to resolve the issue?
\documentclass{beamer}
\begin{document}
\begin{frame}[fragile] % I used [fragile] since \verb in frame yields an error.
\frametitle{fragile frame and shaded verbatim}
\begin{itemize}
\item
I'm using the \verb|beamer| class.
\item
want to set the \texttt{\colorbox{gray}{frame}} environment to be appended with the option \texttt{\colorbox{gray}{fragile}}.
\item
I want to set the stuff in the \texttt{\colorbox{gray}{verbatim}} command to be shaded just like \TeX exchange does.
\item
An ugly solution : \texttt{\colorbox{gray}{\textbackslash code\_example}}
\end{itemize}
\end{frame}
\end{document}

fragileoption (see comments in the linked question) – Alessandro Cuttin Mar 09 '20 at 10:50