I have sometimes very long words, which are for example method names and so on.
Is there any possibility to force LaTeX to push them to a new line, if they overflow the margins?
It is possible to push them into a new line, because I know in my document aren't words which are too long for a line.
Here a mini example which produce the problem:
\documentclass{scrartcl}
\begin{document}
\section{Test}
Finally there is a simple solution using \textsc{\textbf{XMLResource.OPTION\_RECORD\_UNKNOWN\_FEATURE}} option. And the
text must go on \ldots.
\par
And another example the show must go on, but we have too less text (\textbf{createUnspecifiedNodeWarningMarker} and
\textbf{createUnspecifiedNodeErrorMarker}, sdjklashjksa \textbf{createUnspecifiedLinkWarningMarker} and
\textbf{createUnspecifiedLinkErrorMarker}).
\end{document}
Thanks for any advices.


\raggedrightwould be the best solution. otherwise, if hyphenation is suppressed (which would make the technical terms more comprehensible) many lines will be very badly stretched and thus hard to read. – barbara beeton Jul 5 '12 at 18:31\raggedrightdoesn't work with all words. Is there a possibility to disable hyphenation for a region? WithflushleftI got better results. – CSchulz Jul 5 '12 at 18:37\begingroup \hyphenpenalty=10000 \exhyphenpenalty=10000 <de-hyphenated text here> \par \endgroupshould satisfactorily isolate the change. if the group doesn't end with a\par(or a blank line), any salutary effects of changing the penalties could be lost for the last paragraph. and yes,\flushleftis better here than\raggedright. – barbara beeton Jul 5 '12 at 19:07\flushleftit’s an environment{flushleft}. You likely know that but a other user reading this later my don’t … – Tobi Jul 5 '12 at 19:12\sloppyparsuggestion at tex.stackexchange.com/questions/53364/… – Ethan Bolker Jul 5 '12 at 19:36