Quoting Aditya Mahajan
On Sat, 30 Jun 2007, Mojca Miklavec wrote:
Consider \def\myvec#1{\overrightharpoonup{#1}} $(\myvec{\imath},\myvec{\jmath},\myvec{k})$ or $\myvec{\nabla}$, $\myvec{\sigma}$, $\myvec{r}$, ... The base size on top of i, j, k, ... is just too long and the harpoon is also slightly too big.
A realy realy ugly solution (if you do not want extensible arrows).
Here is a slightly better solution; I have tested it only for harpoons, and there are no configuration options for other "accents". But it works for both short and long objects. \def\definemathfancyarrow {\dotripleargument\dodefinemathfancyarrow} \def\dodefinemathfancyarrow[#1][#2][#3]% arrow short long {\setvalue{#1}{\dohandlemathfancyarrow[#2][#3]}} \def\dohandlemathfancyarrow[#1][#2]% {\mathpalette{\dodohandlemathfancyarrow{#1}{#2}}} %TODO: The clip operation should be configurable, whether you want to clip %right or clip left. \unexpanded\def\dodohandlemathfancyarrow#1#2#3#4% short long style text {\setbox0\hbox{$\m@th#3#4$}% \setbox2\hbox{$\m@th#1#3$}% \vbox{\ialign{##\crcr \ifdim\wd0<\wd2 \mirror{\clip[width=\wd0]{\mirror{$\m@th#1#3$}}}% \else #2#3% \fi\crcr \noalign{\kern-\onepoint\nointerlineskip}% $\m@th\hfil#3#4\hfil$\crcr}}} \definemathfancyarrow [fancyoverrightharpoonup] [\rightharpoonup] [\rightharpoonupfill] \let\myvec\fancyoverrightharpoonup \starttext $\myvec{\imath} \myvec{\jmath} \myvec{ABCD}$ \stoptext Aditya