TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 was marked as an exact duplicate of an existing question.

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