Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
\texttt overfull hbox problem
How to automatically hyphenate within \texttt?

Much of the LaTeX documents I write deal with computer-sciencey stuff that I like to put in monospace using either \tt or \texttt, but if the pieces of text that I wrap in teletype are toward the end of a line in the pdf, instead of breaking to the next line, they continue off the edge of the PDF. Is there a way to get this to break to the next line?

A similar question to this regarding underlined text uses an extra package to do this. Is there a way for me to do this with the existing \tt command or is there some extra package that I will have to use?

Edit - Here is an example of the problem:

Here is a bunch of text explaining all the intimate details of the oh so very
important research that I do. At about this point in my description, I would
like to reference the qualified name of an important method that I will then
go into a great amount of detail about,
so here it is {\tt fantasticPackageName.LongAndFancyClassName.importantMethodName()}

And the result:

enter image description here

share|improve this question

marked as duplicate by lockstep, Caramdir, Kurt, Stefan Kottwitz Nov 17 '12 at 19:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
Could you please add an example of the problem? –  egreg Nov 13 '12 at 22:25
    
@egreg I have added an example of the problem I am experiencing. –  jbranchaud Nov 13 '12 at 22:35
    
You can find a solution here: tex.stackexchange.com/questions/44361/… –  Mafra Nov 13 '12 at 23:18