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



Browse other questions tagged .