From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35477 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: overleftrightarrow Date: Thu, 19 Jul 2007 11:42:52 -0400 Message-ID: <20070719114252.m0ioefpin4gocg84@web.mail.umich.edu> References: <6faad9f00706300147l2a333998t7f6c3ef0fd2607be@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184859803 24804 80.91.229.12 (19 Jul 2007 15:43:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2007 15:43:23 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 19 17:43:20 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IBY9v-0007A7-AI for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jul 2007 17:43:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B82CD1FD8D; Thu, 19 Jul 2007 17:43:18 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01375-09-4; Thu, 19 Jul 2007 17:43:01 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D55361FC98; Thu, 19 Jul 2007 17:43:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8AF131FC98 for ; Thu, 19 Jul 2007 17:42:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01375-09-3 for ; Thu, 19 Jul 2007 17:42:53 +0200 (CEST) Original-Received: from chipewa.web.itd.umich.edu (chipewa.web.itd.umich.edu [141.211.144.147]) by ronja.ntg.nl (Postfix) with ESMTP id 5C06E1FC93 for ; Thu, 19 Jul 2007 17:42:53 +0200 (CEST) Original-Received: (from www@localhost) by chipewa.web.itd.umich.edu (8.12.10/8.12.9) id l6JFgqAV012550 for ntg-context@ntg.nl; Thu, 19 Jul 2007 11:42:52 -0400 Original-Received: from wwwgate33.motorola.com (wwwgate33.motorola.com [136.182.158.137]) by web.mail.umich.edu (Horde MIME library) with HTTP; Thu, 19 Jul 2007 11:42:52 -0400 In-Reply-To: Content-Disposition: inline User-Agent: Internet Messaging Program (IMP) H3 (4.0.5) X-Remote-Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 X-IMP-Server: 141.211.144.229 X-Originating-IP: 136.182.158.137 X-Originating-User: adityam X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35477 Archived-At: 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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________