I want to highlight some TeX code listings, so I use lstlisting.
\begin{lstlisting}[language=TeX]
\begin{tabular}{ |p{4cm}|p{4cm}|p{4cm}| }
\hline
\multicolumn{3}{|c|}{Country List} \\
\hline
Country Name & ISO ALPHA 2 & ISO ALPHA 3 \\
\hline
Afghanistan & AF & AFG \\
Aland Islands & AX & ALA \\
Albania & AL & ALB \\
\hline
\end{tabular}
\end{lstlisting}
My lstset is:
\lstset{extendedchars=\true,keepspaces=true,
basicstyle=\ttfamily,columns=flexible,
escapechar=$,escapebegin=\[,escapeend=\]
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\color{codegray},
stringstyle=\color{codepurple},
breakatwhitespace=false,
breaklines=true,
captionpos=b,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
But I'm not happy with the result - only end became magenta and other text is black:
I believe begin is a keyword on an equal basis with end, but it's black too.
Is there any way to make TeX code highlighted?

