I'm reading this question Underline Omitting the Descenders and wondering if there is a way to do this with Plain TeX and XeTeX.

up vote 9 down vote accepted

The answer of Stefan Kottwitz converted to plain TeX. Package soul can also be loaded in plain TeX. Package color can be loaded with the help of miniltx. XeTeX is supported the same way as in LaTeX, package graphicx loads the configuration file graphics.cfg, which usually detects XeTeX and sets the correct graphics driver xetex.def.

\input soul.sty
\input miniltx
\input color.sty

\def\whiten#1{%
  \llap{\textcolor{white}{{\the\SOUL@token}}\hskip#1pt\relax}%
}
\def\myul{%
  \def\SOUL@everyspace{$\underline{\hbox{\space}}$\kern\z@}%
  \def\SOUL@everytoken{%
    \setbox0=\hbox{\the\SOUL@token}%
    \ifdim\dp0>\z@
      \raise\dp0\hbox{$\underline{\phantom{\hbox{\the\SOUL@token}}}$}%
      \whiten{1}\whiten{0}%
      \whiten{-1}\whiten{-2}%
      \llap{\the\SOUL@token}%
    \else
      $\underline{\hbox{\the\SOUL@token}}$%
    \fi
  }%
  \SOUL@
}
\resetatcatcode

\font\HugeFont=cmss12 at 20pt
\HugeFont

\myul{jumping quickly}

\bye

Result

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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