LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Lars Hellström <[log in to unmask]>
Sun, 24 Jun 2001 22:16:34 +0200
text/plain (27 lines)
At 17.31 +0200 2001-06-24, Mark Steinberger wrote:
>Thus what is needed is an improved \bar macro that adjusts its length
>to the letter it occurs over.

I suspect there is font magic involved in this which prevents you from
doing quite that (maybe with new math fonts it could happen automagically),
but I've recently used the following with acceptable results for most
capitals:

\makeatletter
\newcommand{\cmpl}[1]{%
   \sbox\z@{$#1$}%
   \dimen@=\wd\z@
   \advance \dimen@ -\strip@pt\fontdimen\@ne\textfont\@ne \ht\z@
   \setbox\tw@=\hb@xt@\dimen@{}%
   \ht\tw@=\ht\z@ \dp\tw@=\dp\z@
   \box\z@
   \llap{$\overline{\box\tw@}$}%
}
\makeatother

It's still an \overline, but it takes the italic slant into account.

It's all rather off-topic for this list, though.

Lars Hellström

ATOM RSS1 RSS2