Hi there,
a friend of mine wants a special kind of underlining. I'll give you an
example of what he wants. If he wants to underline 'helping' he wants the
underlining to stop under the letter 'p' and 'g' and wants the vertical
position of the underline to be as under the letter 'h'. I hope somebody
knows what I'm talking about.
Any ideas or suggestions? Thanks in advance.
Paul
--
"This is a one line proof...if we start sufficiently far to the left."
-- pe...@cbmvax.cbm.commodore.com
+--------------------------------------------------------------------------+
| internet : P.va...@LR.TUDelft.NL Faculty of Aerospace Engineering |
| : p...@gnu.ai.mit.edu Delft University of Technology |
| phone : +31-15-2785370 Kluyverweg 1, 2629 HS Delft |
| fax : +31-15-2786480 The Netherlands |
+--------------------------------------------------------------------------+
: a friend of mine wants a special kind of underlining. I'll give you an
: example of what he wants. If he wants to underline 'helping' he wants the
: underlining to stop under the letter 'p' and 'g' and wants the vertical
: position of the underline to be as under the letter 'h'.
This requires an underlined font, since there is no way in any page
description language to do the non-linear calculations required for such a
feature. The font itself would have to be hand-underlined, unless there is a
font-embellishment tool that knows how to compute non-linear erosions, which
is a daunting mathematical process.
Richard J. Kinch, Ph.D. ki...@holonet.net
6994 Pebble Beach Court Publisher, TrueTeX (R) brand
Lake Worth FL 33467 typesetting software.
Tel (561) 966-8400
FAX (561) 966-0962 See http://idt.net/~kinch
Put the following code in a .sty file (a package), load that package
and use the macro "\munder{text}:
%%% \munder
\def\munder#1{\@domunder#1\Endlist}
\def\Endlist{\Endlist}
\def\@domunder{\afterassignment\Dobf\let\next= }
\def\Dobf{%
\ifx\next\Endlist\let\next\relax
\else
\if\next g{g}%
\else\if\next j{j}%
\else\if\next p{p}%
\else\if\next q{q}%
\else\if\next y{y}%
\else\if\next f\ifmmode{f}\else\underline{f}\fi
\else
\underline{\next}%
\fi
\fi
\fi
\fi
\fi
\fi
\let\next\@domunder
\fi\next}
%%% end of \munder
All letters will be underlined, except j, p, q, y (and f in math mode).
Do not put strange things in the text to be underlined. Do not try to
underline too much text in one call to \munder.
Best regards,
--
Jean-Pierre Drucbert Email: druc...@onecert.fr
ONERA/CERT GPI Téléphone 05-62-25-25-15
Office National d'Études et de Recherches Aérospatiales
Centre d'Études et de Recherches de Toulouse
Groupe de Prestations Informatiques
Complexe Scientifique de Rangueil
2, Avenue Édouard Belin BP 4025 F-31055 TOULOUSE CEDEX
FRANCE
Barbarus hic ego sum, qui non intellegor ulli.
Publius Ovidius Naso
I think you mean you want broken underlining allowing for descenders of
letters. I had always imagined that the only way to do this is with
an underline font, but I see it can be done with the color package.
However, an underlined font would still be the *best* method.
Here is my test using ulem.sty and the color package. I change one
internal macro, which performs the underlining of each word, to
erase a "poor man's bold" image of the text out of the underline
before placing the text.
\usepackage{ulem}
\usepackage{color}
<define a color "white" here if necessary>
\makeatletter
\def\brokenuline{\bgroup
\UL@pixel.3\p@ \ULdepth .25ex
\let\UL@putbox\UL@brokenputbox \ULset}
\def\UL@brokenputbox{\ifx\UL@start\@empty \else % not inner
\vrule\@width\z@ \LA@penalty\@M
{\UL@skip\wd\UL@box \advance\UL@skip\UL@pixel \UL@leaders \kern-\UL@skip}%
\textcolor{white}{%
\kern-2\UL@pixel\copy\UL@box\kern-\wd\UL@box
\kern \UL@pixel\raise.4\p@\copy\UL@box\kern-\wd\UL@box
\kern \UL@pixel\lower.4\p@\copy\UL@box\kern-\wd\UL@box
\kern \UL@pixel\raise.4\p@\copy\UL@box\kern-\wd\UL@box
\kern \UL@pixel\copy\UL@box\kern-\wd\UL@box
\kern-2\UL@pixel}\box\UL@box \fi}
\makeatother
\begin{document}
Those \brokenuline{Sloppy jazz grapes squint (while) pilfering.}
\end{document}
Yes, it is the theorical approach for an aesthetical perfection. But
you can wait a long time before to have such fonts, So I gave
yesterday a less perfect answer, more practical, with acceptable
results if you don't take a magnifying glass but want your paper
printed soon. You are a publisher; I am an engineer. We have not the
same look at documents.
Regards.