Zeilenumbruch in listings

Schriftbild, Absätze und Auflistungen einstellen


boginja
Forum-Newbie
Forum-Newbie
Beiträge: 2
Registriert: Di 26. Okt 2010, 14:07

Zeilenumbruch in listings

Beitrag von boginja »

Hallo,

für die Uni muss ich ein Programm in Fortran 77 dokumentieren. Dazu verwende ich das Paket listings und benutzte es auch, um bspw. Namen von Routinen im Fließtext 'anders' darzustellen. Dabei funkioniert jedoch der Zeilenumbruch innerhalb des listing-Kodes (der ja mitunter nur ein Wort umfasst) nicht.

Muss ich das 'per Hand' lösen oder gibt's da eine elegantere Methode?

Herzlichen Dank,
Boginja

Minimalbeispiel:
\documentclass[a4paper,11pt]{scrbook}
\usepackage[ngerman,english]{babel}
\usepackage[T1]{fontenc}	
\usepackage[utf 8]{inputenc}
\usepackage{listings} \lstset{breaklines=true,language=[77]Fortran}

\newcommand{\code}[1]{\lstinline|#1|}

\begin{document}
If an additional gluon contributing to the diffractive $X$ system is found in the routine \code{FINDPARTONS}, the kinematics of the $q\bar{q}g$ system have to be obtained as well. This is done in the routine \code{GLUONKINEMATICS} which is called from the routine \code{DIFFRACTIVE} described below.
\end{document}
Konkret wird das Wort 'GLUONKINEMATICS' über den Zeilenrand hinaus geschrieben.