0

Possible Duplicate:
backgroundcolor in lstset does not work

I've recently changed my document skeleton and now my code segments, defined with \begin{lstlisting}...\end{lstlisting}, changed from looking like this:

1 code line
2 code line
3 code line

to looking like this:

2
  code line
  code line
  code line

My listing definition is as follows:

\usepackage{listings}
\lstset{basicstyle=\ttfamily\scriptsize,emph={fence},emphstyle={\underbar},numbers=left,escapeinside={(*@}{@*)}}

After pruning my configuration I was able to pinpoint the culprit:

\RequirePackage[hebrew,english]{babel}

Apparently the lstlisting environment has an issue with Hebrew. How can I solve this?

Oak
  • 813
  • 2
    We would need more information in order to solve this problem. Something like a minimal working example (MWE) that illustrates your problem. Include your new document class, as well as the versions of files you use (include \listfiles in your preamble and extract the contents after *File List* in your .log file). – Werner May 15 '12 at 15:47
  • @Werner I'll try, but would meanwhile appreciate any general advice about what can even affect lstlisting in the first place – Oak May 15 '12 at 15:53
  • Your \lstset settings seem sufficient to produce the intended output, so there's not much else but an MWE that would help. Bizarre behaviour is sometimes the result of outdated packages (hence my \listfiles suggestion). Also include your TeX Distribution (TeX Live, or MiKTeX) and operating system (Windows, Mac, Linux). – Werner May 15 '12 at 16:05
  • @Werner isolated the culprit and updated my question :) – Oak May 17 '12 at 08:07
  • 1
    see http://tex.stackexchange.com/questions/12878/backgroundcolor-in-lstset-does-not-work – Marco Daniel May 17 '12 at 11:17

0 Answers0