3

I'm using typewriter text to highlight program code within my writing, however, long method names without spaces don't seem to wrap to the next line (see Figure 1).

It is possible to make typewriter text automatically wrap when reaching the edge of a page?

Thanks

% Preview source code for paragraph 1

This is a long method name which does not wrap: \texttt{void ThisIsAnExmpleOfALongMethodNameWhichDoesNotWrap()}
Normal text wraps as expected, though.

Figure 1

  • Is this only typewriter text or is it verbatim? You need to share your code. – Aubrey Blumsohn May 12 '15 at 15:33
  • 1
    Bear in mind also that typewriter text does not hyphenate. See tex.stackexchange.com/questions/44361/… – Aubrey Blumsohn May 12 '15 at 15:52
  • Thanks for the response. I have updated the Figure and included my code. It is likely being cause by the fact that typewriter text does not hyphenate, it seems. – Bataleon May 12 '15 at 15:53

Browse other questions tagged or ask your own question.