2

The content I have written inside the


\usepackage[english]{babel}

\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

\title{Your Paper} \author{You}

\begin{document} \maketitle I want the below block to wrap around the margin without overshooting it. When you compile you can see that it goes beyound the margin. I think it might due some default \texttt{\texttt} property.

\texttt{ ( { dfadfasfadfa, ddfadfas, dfadfa, dafjakdf, djflakjdfa, kdjflakjdj , dkfjadfaaddafa faffadfad fafljfdfadf }, djfadjfkadfafda, {kdfja, akdfjalkd, kdjfaljdfa, kjldajfa }, dfadfa dfa, dfadfa )}.

\end{document}

is going beyond the margin then coming to the next line. enter image description here

tonygrey
  • 137
  • 1
    Welcome to TeX.SE! Could you edit your code to begin with your \documentclass{} and end with \end{document} , a Minimal Working Example (MWE) please. It makes copy and pasting easier when the code can be compiled and also we do not need to guess what commands or packages you are using. – JamesT Apr 12 '23 at 09:58
  • 2
    The text is wide and inserting a line break between words will lead to underfill or overfill. Do you want to allow hyphenation of the text inside \texttt? See How to automatically hyphenate within \texttt?. Or do you just want to stop the text overflowing into the margin? – Dai Bowen Apr 12 '23 at 11:26
  • Justified text in typewriter usually does not make sense and almost always is problematic. I would suggest to put it in a flushleft environment or the corresponding environment of package ragged2e, if you would like to have hyphenation. – cabohah Apr 12 '23 at 11:51

0 Answers0