2

With this code:

Our baseline\footnote{The config can be found in the
published repository under the name
\begin{tiny}\texttt{dropout01.l2\_1e\_2.6l.n500.inpstddev3.fl2.max\_seqs100.grad\_noise03.nadam.lr05e\_3.nbm6.nbrl.grad\_clip\_inf.nbm3}\end{tiny}
.}

I get the warning Underfull \hbox (badness 10000). I found many similar questions here with the same error message, which mostly suggest to add \hfill or something like that. But nothing like that worked for me to get rid of the warning.

What exactly is the problem? And how to I get rid of the warning?

2

You should use the url package for such objects, it knows how to break at a number of different characters already and you won't have to escape the underscores:

Sample output

\documentclass{article}

\usepackage{url}

\begin{document}

Our baseline\footnote{The config can be found in the
published repository under the name
\url{dropout01.l2_1e_2.6l.n500.inpstddev3.fl2.max_seqs100.grad_noise03.nadam.lr05e_3.nbm6.nbrl.grad_clip_inf.nbm3}.}

\end{document}

Note \begin{tiny}...\end{tiny} is not defined by LaTeX, it is accident of LaTeX syntax that it works, the correct construct is {\tiny ....}. On the other hand if you wish to style the output of \url then you should redefine \UrlFont

\renewcommand{\UrlFont}{\tiny\tt}

The above example then produces

tiny samle

which is too small to read comfortably.

0

Given the comment by leandriis, by inserting \allowbreak{} in some places inside my \texttt, I solved this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.