[OS X TeX] how to produce a wide arc?
Luis Sequeira
lfsequeira at fc.ul.pt
Wed Nov 30 11:12:24 EST 2005
It is easy to produce extensible "accents" in math, such as \widehat
{ABC} or \widehat{ABCDEFGHIJ} (where the "hat" extends as needed to
encompass the width of the argument). Similarly for \overbrace{}, and
so on.
I would like to do something like for representing arcs: something
like \arc{AB} should put an arc above the letters.
I can sort of simulate it by putting \frown above the letters, i.e.
\newcommand{\arc}[1]{\overset{\frown}{#1}}
but this of course does not stretch.
I can "almost" do it with the code below, but for reasons that I
can't fathom the arc does stretch but appears misaligned with the
text (it is shifted to the right somewhat).
Now maybe:
1) there already is some command to do it; or
2) someone can find the fault in the code below...
\newlength{\arclen}
\newlength{\archeight}
\settoheight{\archeight}{$\frown$}
\newcommand{\arc}[1]%
{\settowidth{\arclen}{#1}%
\overset{\resizebox{\arclen}{\archeight}{$\frown$}}{#1}}
If replying to the list, I'd appreciate cc: to my address (as I'm on
digest).
TIA
Luis Sequeira
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list