[texhax] \underarc

Uwe Lueck uwe.lueck at web.de
Wed Sep 9 07:48:00 CEST 2015


On Dienstag, 08. September 2015 um 12:16 Uhr, Rodolfo Medina wrote:
> I want to put a small arc under a letter or a group of letters, like a smile.
> I see that `arcs' package can do what I want with the \underarc command; but
> don't know how to install and use it with plain TeX instead of LaTeX. Is it
> possibile, and how? Or maybe is there another different alternative way to
> achieve what I want? With `mathabx' package, using \wideparen, I put a round
> accent above a letter, opened below, i.e. the exact contrary of what I want to
> do now; and then `mathabx' have the \undergroup command, which though is not
> just what I'm looking for.

Some \undersmile made from \underbrace and some \usmile, \usmileii, and \usmileiii 
made from \d are attached below.

arcs.sty uses the same "smile" symbol as `\usmile' below, but tries to find
a font size from all those available with LaTeX that fits one through three
letters most appropriately. These sizes are more and larger than \teni, \seveni, 
and \fivei with plain.tex, and with the LaTeX package `relsize' that arcs.sty 
uses, you can switch among them in a straightforward way. For doing something 
like this with plain.tex, one would have to determine a minimum and a maximum 
size and how many steps between them should be tried. 

\bye,

    Uwe.

%% to be used with plain.tex
%% defines and exemplifies \undersmile and \usmile...
%% texhax September 2015
\catcode`\@=11
\def\undersmile#1{\vtop{\m at th\ialign{##\crcr
  $\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern2\p@\nointerlineskip}
  \usmilefill\crcr\noalign{\kern2\p@}}}}
\font\smallex=cmex10 at 5pt
\def\usmilefill{\setbox\z@\hbox{\smallex\char"7C}%
  \teni\sh at ft{-1ex}\smallex\usmilekern
  \char"7C\leaders\vrule height\ht\z@ \hfill \char"7D\usmilekern}
\def\usmilekern{\kern2.5\p@}
\def\fontusmile#1#2{{\o at lign{\relax$#2$\crcr
  \hidewidth\teni\sh at ft{-1ex}#1\char"5E\hidewidth}}}
\def\usmile   {\fontusmile\fivei }
\def\usmileii {\fontusmile\seveni}
\def\usmileiii{\fontusmile\teni  }
\catcode`\@=12

$ \usmile{ab} \dots \usmileii{cde} \dots \usmileiii{cde} \dots
  \undersmile{ab} \dots \undersmile{cde} \dots \undersmile{fghijk} $

\bye



More information about the texhax mailing list