7

I'm using \lstinline among other things for writing file names of my source files. For example

\lstinline{foofoo.pl}

Then, sometimes I have the problem that some lines containing this string are longer than others:

example

If I use something like that

\lstset{
  breaklines=true
}

The text will be breaked like

foofoo
.pl

But I only want

asdfljsfljadf foofoo.pl

with a correct length of the line or a line break before the whole text of lstinline, like

asdfljsfljadf
foofoo.pl

I hope that you understand my problem... ;)

Thanks for your help!

0

1 Answer 1

8

for such paragraphs use

\begin{sloppypar}
... your paragraph with \lstinline...
\end{sloppypar}
2
  • 4
    isn't there an universal solution? because I'm writing my thesis with about 50-100 pages.. And I don't want to check in each paragraph, if there appears such a problem..
    – mrbela
    Commented Dec 11, 2013 at 15:11
  • use as documentclass option draft and it will be easy to see where are such problems.
    – user2478
    Commented Dec 11, 2013 at 15:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .