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


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


If I use something like that


The text will be breaked like


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


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

Thanks for your help!


for such paragraphs use

... your paragraph with \lstinline...
  • 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 Dec 11 '13 at 15:11
  • use as documentclass option draft and it will be easy to see where are such problems. – user2478 Dec 11 '13 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.