I have the following:

\documentclass[10pt,twocolumn]{article}

\usepackage{XCharter,amsmath}
\usepackage[T1]{fontenc}

\usepackage[right=1cm,left=1cm,top=1cm,bottom=2cm]{geometry}

\setlength\parindent{0pt}

\begin{document}
When $^\text{1}$ \underline{\smash{you warm a meal up}} in a microwave oven, $^\text{2}$ \underline{\smash{the food absorbs radio waves}} and these are converted into heat. While $^\text{3}$ \underline{\smash{it is cooking the meal}}, only the food gets hot. So when $^\text{4}$ \underline{\smash{it has heated the food up}}, the dish, glass or plastic container will still be relatively cool, as $^\text{5}$ \underline{\smash{these materials will not have absorbed the radio waves.}} This means that $^\text{6}$ \underline{\smash{we can describe microwaving}} as quite an efficient use of electricity.

Although $^\text{7}$ \underline{\smash{we often think of the microwave}} as a fairly modern appliance, in fact $^\text{8}$ \underline{\smash{someone invented it}} back in 1945. The first microwaves were huge, nearly two meters high, but $^\text{9}$ \underline{\smash{restaurants were already using them}} in the 1950s. Within twenty years manufacturers were producing much smaller models, and by 1975 $^\text{10}$\underline{\smash{they had sold over a million}} in the USA alone.
\end{document}


Because of the \underline, the text is being forced to justification producing wait spaces and thus generating badboxes. Is there a way to fix the justification by not generating badboxes?

• the example doesn't work ... – user2478 Mar 11 '16 at 16:43
• @Herbert Check it now. It's been fixed. – Alejandro Mar 11 '16 at 16:44
• is it too difficult that you test your own code??? amsmath is missing – user2478 Mar 11 '16 at 16:45
• @Herbert I thought I had it. Now it works. – Alejandro Mar 11 '16 at 16:47

\documentclass[10pt,twocolumn]{article}
\usepackage[T1]{fontenc}
\usepackage{XCharter,amsmath,soul}
\setul{1pt}{0.2pt}
\usepackage[right=1cm,left=1cm,top=1cm,bottom=2cm]{geometry}
\setlength\parindent{0pt}

\begin{document}

When \footnotemark\ \ul{you warm a meal up} in a microwave oven,
\footnotemark\ \ul{the food absorbs radio waves} and these are converted into heat. While \footnotemark\ \ul{it is cooking the meal}, only
the food gets hot. So when \footnotemark\ \ul{it has heated
the food up}, the dish, glass or plastic container will still
be relatively cool, as \footnotemark\ \ul{these materials
will not have absorbed the radio waves.} This means that
\footnotemark\ \ul{we can describe microwaving} as quite
an efficient use of electricity.

\end{document}


• Just a quick question: how can you restart the counter of the \footnotemark? – Alejandro Mar 11 '16 at 17:55
• \setcounter{footnote}{...} Replace ... with your number – user2478 Mar 11 '16 at 18:56