On 27.01.05, Kevin Pfeiffer wrote:
> Wolfgang Hennerbichler writes:
> > On Wed, 2005-01-26 at 16:31 +0100, G. Milde wrote:
> > > [Wolfgang Hennerbichler wrote:]
> > > > not line break the code. If a line is longer than a sheet of
> > > > paper, it's just cut off.
> > >
> > > ... how should LyX knwo which lines to break.
> >
> > I'd say: Every line that exceeds the defined margin.
> 
> Splitting lines is difficult enough with ordinary text, but with various 
> programming languages?

Furthermore, LyX does only know about the margin definition, if it is set
in the Format>Document dialog. In many (most?) cases, the textwidth is
set by the class or a package. The same holds for the length of the line,
which depends on the chosen font. All this is handled by LaTeX, so LyX
would need to parse for "overfull hbox" warnings.

IMHO, the problem could only be solved by a LaTeX package. 

If I got it right, the listings package has a (rudimentary) support for
line wrapping. See its documentation listings.dvi, section 5.6 "Automatic
formatting" for details.


-- 
G.Milde web.de

Reply via email to