# Underline overfull \hbox

I am getting the following Overfull \hbox (0.10945pt too wide) in paragraph at lines 12--13. How could I prevent this?

I am using \, inside \dotuline because I want to use a little bit longer dotted underline.

\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dot]{dashundergaps}

\setlength\parindent{0pt}

\begin{document}

Lorem \dotuline{\,\,LoremLoremLoremLoremLoremLoremLoremLorem LoremLoremLoremLoremLorem\,\,} Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem

\end{document}


UPDATE

\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\hyphenation{Lor-em}
\usepackage[dot]{dashundergaps}

\setlength\parindent{0pt}

\begin{document}

Lorem \dotuline{\,\,Lor\-emLor\-emLor\-emLor\-emLor\-emLor\-emLor\-em} Lor\-em Lor\-emLor\-emLor\-emLor\-emLor\-emLor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em Lor\-em

\end{document}


In this case I am getting the following Overfull \hbox (20.50162pt too wide) in paragraph at lines 13--14

• why do you have \setlength\parindent{0pt} as you are not setting \parskip you make it very difficult to distinguish paragraphs. Dec 26, 2022 at 22:31
• @DavidCarlisle cuz I do not want indention. After each paragraph I use ˛\vskip 1cm Dec 26, 2022 at 22:44
• \newcommand{\newpara}{\vskip 1cm} I think this is better looking, or is there a better way? Dec 26, 2022 at 22:47
• do not mark each paragraph space. the paragraph layout is a global property of the document. Just use a blank line to end a paragraph, add \usepackage{parskip} and paragraphs will be marked with vertical space rather than indentation. Dec 26, 2022 at 23:39

Your string of Lorems simply stretches past the line limit, and TeX can't find a good place to end the line (before the Lorem would add too much space, and inserting the break afterward, which it does, overfills the hbox). (This is unrelated to your \dotuline).
Try locating which "Lorem" TeX inserts a line break after, and insert a discretionary hyphen (\-) in it somewhere to tell TeX to allow a break there (eg Lor\-em).
You could also add \hyphenation{Lor-em} to your preamble to let TeX know that whenever it encounters a Lorem it needs to break up, it can insert a discretionary hyphen between the r and e.
• @mala97 now you have no spaces between many of your "Lor\-em"s, which still leads to the same issue (you have unbreakable "emLor"s). Also, instead of doing many Lor\-ems, perhaps just put \hyphenation{Lor-em} in your preamble. Dec 26, 2022 at 20:54