I am currently defining a list environment that, until now, worked just fine for my purposes. However, it turns out that when adding a string of (non-math) numbers that is too long, LaTex will fail to break into two different lines, thus generating a line that is too large (i.e., overfull warning). Here is the MWE:
\documentclass[a4paper]{article}
\begin{document}
\newdimen\colsep \colsep=1em
\def\topbox#1#2{\vtop{\parindent=0pt \hsize=\dimexpr#1\relax #2}}
\def\entryb#1#2#3#4{\par
\vspace{5pt}\hbox{\topbox{1.75cm}{#1\raggedleft}\kern\colsep
\topbox{\hsize-2\colsep-1.75cm}{{\bf#2}\hfill {\footnotesize#3}\endgraf#4}}
\smallskip
}
\entryb
{[1]}
{\normalfont{Author (XXXX)} \textit{Very fancy title}. \textbf{Not so fancy journal} \normalfont{(forthcoming), pp. ?--?. DOI: 10.19292020384080/03059.8374659022.20945896}}
{}
{}
\end{document}
Here is the output:
As you can see, the line containing the DOI is longer than it should.
Can anybody please help me find a way to tell LaTex to automatically break any string of numbers that is too long?
Thank you all very much for your help.