How to reset lstset settings for listings?
Posted
by drittesbinom
on Stack Overflow
See other posts from Stack Overflow
or by drittesbinom
Published on 2010-04-16T17:01:47Z
Indexed on
2010/04/16
17:03 UTC
Read the original article
Hit count: 255
latex
At the top of my tex document, I set my sourcecode listing format by
\lstset{language=java}
\lstset{numbers=left, numberstyle=\tiny, numbersep=5pt, breaklines=true}
\lstset{emph={square}, emphstyle=\color{red}, emph={[2]root,base}, emphstyle={[2]\color{blue}}}
because I merely list Java source code. At one point in my document, I had to reformat for a single listing by
\lstset{commentstyle=\footnotesize\textit}
\lstset{basicstyle=\ttfamily\fontsize{11}{12}\selectfont}
\lstset{literate=
{!=} {$\neq$}{2}}
Now I have the problem that my previous Java formatting for listings is destroyed, and I dont know how to reset the lst settings to default. How can this be avoided?
© Stack Overflow or respective owner