\usepackage{listings}
\lstset{basicstyle=\ttfamily,%
	tabsize=2,
  keywordstyle=\color{blue},%
  keywordstyle=[2]\color{keywords2}%
}


% definiert shortcut-Umgebung fuer latex code
\lstnewenvironment{latexcode}[1][]
 {\lstset{language={[LaTeX]TeX},%
%		 backgroundcolor=\color[gray]{0.7},%
morekeywords={maketitle,titlehead,subject,subtitle,publishers,includegraphics},
		 numbers=left,numberstyle=\small,#1}
 }{}

% definiert shoutcut fuer die Anbindung von Latex code aus Dateien
\newcommand{\inputtexcode}[2][]%
  {\lstinputlisting[language={[LaTeX]TeX},%
   numbers=left,%
%   backgroundcolor={\color{white}},%   
morekeywords={maketitle,titlehead,subject,subtitle,publishers,includegraphics},
   fontadjust=true,
   numberstyle=\small,#1]
   {#2}
  }
 
\lstdefinelanguage{bibtex}
  {keywords={%
      @article,@book,@collectedbook,@conference,@electronic,@ieeetranbstctl,%
      @inbook,@incollectedbook,@incollection,@injournal,@inproceedings,%
      @manual,@mastersthesis,@misc,@patent,@periodical,@phdthesis,@preamble,%
      @proceedings,@standard,@string,@techreport,@unpublished,%
      @online,@collection,%
	    @<literatur-type>%
      },
  keywords=[2]{author,year,title,subtitle,indexsorttitle,url,%
     urldate,editor,booktitle,publisher,address,isbn,%
     doi,crossref,booktitleadon,%
     edition,option,date,note,and
      },
   comment=[l][\itshape]{@comment},
   sensitive=false,
  }
  
\lstnewenvironment{bibtexcode}[1][]
 {\lstset{language={bibtex},%
%		 backgroundcolor=\color[gray]{0.7},%
     keywordstyle=\color{blue},
		 numbers=left,numberstyle=\small,#1}
 }{}

