# Can't insert newlines in the code listing

I am currently trying to insert a batch file programming code in my report. I am using the code listing. I am not able to add new lines to format my code! I have following code example yet:

 \begin{lstlisting}[escapechar=ä]
ä\colorbox{white}{\color{RoyalBlue}\texttt{Microsoft Windows [Version 6.2.9200]


The output is like this in a single line which I don't prefer: Microsoft Windows Version 6.2.9200 2012 Microsoft Corporation. All rights reserved.

The output I desire should be:

Microsoft Windows [Version 6.2.9200]

I have tried to use inserting newline by using \\, \newline etc. after first line, nothing helped me. Any suggestion from you are welcome. Please note that latex's code listing(Supported languages) doesn't support Batch file programming language syntax.

• Please, take a look at tex.stackexchange.com/questions/49021/… – user13907 Aug 16 '13 at 13:11
• You cannot have line breaks inside a \colorbox – daleif Aug 16 '13 at 13:39
• Close voters: the question here is different from the linked one. The cause here is the box, as daleif observes, rather than anything to do with using a verbatim environment (which is escaped here). – Joseph Wright Aug 16 '13 at 14:26

Surely there are better methods, but what about using a \parbox?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{listings}

\begin{document}

\begin{lstlisting}[escapechar=ä]
ä\colorbox{yellow}{%
\parbox{3.9in}{\color{blue}\texttt{Microsoft Windows [Version 6.2.9200]\\\\

• @pss You'd better ask another question for this, providing a minimal working example (MWE) starting with \documentclass{...} and ending with \end{document} so to reproduce your situation. BTW: you have enough reputation now to upvote answers and questions, when you like them. – karlkoeller Aug 16 '13 at 18:51