Roberto Gorjão wrote:
Hi!

I have an article set with the APA class and two columns. In this article I need to write some amount of javascript code. The problem is that sometimes this code lines get too long, without any spaces, so lines extend beyond the columns width. How can I set those paragraphs to break when they reach the end of the column?
First, you can add explicit hyphenation points (ctrl minus)
in lyx-code too.  Well, perhaps not what you want for
computer code, as hyphens could be mistaken for
minus signs. It breaks the lines nicely though, and I think
you can tell latex to use "nothing" instead of a hyphen
when breaking lines. Reset this before continuing with
normal text though!

It would be perfect if broken lines of code got indented after the break.
You should also have a look at the "listings" package,
which even have some support in newer versions of LyX.
I seem to remember that it can break lines if you want it to.



Helge Hafting

Reply via email to