I want to produce MATLAB prettified code with MATLAB code. Using .\
causes error. alsoletter={.\\}
in \lstdefinestyle
does not seem to work
\documentclass[aspectratio=169, xcolor={x11names}, t, handout]{beamer}
\usepackage{calc}
\usetheme{Dresden}
\usefonttheme{professionalfonts}
\renewcommand{\sfdefault}{ppl}
\usepackage[T1]{fontenc}
\renewcommand{\encodingdefault}{T1}
\usepackage{listings}
% ========== MATLAB codes packages =========
% BEGIN_FOLD
\usepackage[]{matlab-prettifier}
% BEGIN_FOLD
% Inline code
% BEGIN_FOLD
\lstdefinestyle{matlab}{
% style
style=Matlab-editor,
basicstyle=\linespread{0.8}\mlttfamily\footnotesize,
% alsoletter={.\\},
literate=
*{.\\}{\textcolor{IndianRed1}{. \textbackslash{}}}{1}, % .\
}
\lstset{style=matlab}
% END_FOLD
% END_FOLD
% END_FOLD
\begin{document}
\begin{frame}[fragile, environment=frame, allowframebreaks=0.99]
\begin{lstlisting}
a.\b
\end{lstlisting}
\end{frame}
\end{document}