# How can I get rid of bold just for one word in the lstlisting environment?

I have the following Matlab code in my Latex file:

\documentclass[a4paper,12pt]{article}

\begin{document}
\begin{lstlisting}[frame=single,escapeinside={@}{@}]
gamma=[1/4,3/4];
alpha=[1/4,3/4];
\end{lstlisting}
\end{document}


But in my Latex file the variable name gamma is in bold and alpha isn't. How can I get rid of the bold for one specific variablename?

• Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. Oct 19, 2013 at 9:18
• Your updated code needs \usepackage{listings}, but with that neither word is bold, so there is more your set-up you need to tell us about. Oct 19, 2013 at 9:45
• You might be interested in the matlab-prettifier package; see this answer. Apr 28, 2014 at 15:55

By default the language matlab treats gamma as a keyword. You can remove that via the deletekeywords option:

\documentclass[a4paper,12pt]{article}

\usepackage{listings}

\begin{document}
\begin{lstlisting}[frame=single,escapeinside={@}{@},language=matlab,deletekeywords={gamma}]
gamma=[1/4,3/4];
alpha=[1/4,3/4];
\end{lstlisting}
\end{document}