使用 \underline 时的 Badboxes

使用 \underline 时的 Badboxes

我有以下内容:

\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}

由于\underline,文本被强制对齐,产生等待空间,从而生成 badbox。有没有办法通过不生成 badbox 来修复对齐问题?

答案1

\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}

在此处输入图片描述

相关内容