%% LyX 1.6.0svn created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,a4paper,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{listings}
\usepackage{babel}

\makeatletter
\makeatother

\begin{document}
Listing \ref{lst:listing1} (Should be 1)


\begingroup
\inputencoding{latin1}
\begin{lstlisting}[caption={\label{lst:listing1}Listing}]
Listing1

\end{lstlisting}
\endgroup


Listing \ref{lst:listing1} (Should be 1)



Listing \ref{lst:listing2} (Should be 2)

set "\textbackslash{}lstset\{captionpos=b\}"

\lstset{captionpos=b}


\begingroup
\inputencoding{latin1}
\begin{lstlisting}[caption={\label{lst:listing2}Listing}]
Listing2

\end{lstlisting}
\endgroup


Listing \ref{lst:listing2} (Should be 2)
\end{document}
