I'm very well aware that it is considered best practice not to use underlining other than on typewriters and in handwriting. But sometimes it is needed nonetheless.
In my opinion the typographically least offending way to underline in print is to leave out the descenders. This is also how I learned to do it in handwriting.
Very few fonts offer a pre-made underlined variant, but some text-processors (e.g. OS X text-engine) do — depending on the font used — an acceptable job at emulating this effect:
How would I tweak any of the existing ways/packages for underlining to do the same?
As a bonus, I'd like to be able to tweak the behaviour (extent of the omitted part, apply to which letters) per font and text style, preferably working with XeLaTeX.
Best Answer
We could do for each letter:
So we would get an underline with matching gaps.
Here I modified the
soul
approach of Marco in this way, just for a demonstration what I mean, which could be improved (boldness, loop):