From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35203 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: \overleftrightarrow Date: Sat, 30 Jun 2007 10:47:05 +0200 Message-ID: <6faad9f00706300147l2a333998t7f6c3ef0fd2607be@mail.gmail.com> References: 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 1183193246 23402 80.91.229.12 (30 Jun 2007 08:47:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2007 08:47:26 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 30 10:47:19 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 1I4Ybt-0004q0-Ei for gctc-ntg-context-518@m.gmane.org; Sat, 30 Jun 2007 10:47:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BA8611FEE5; Sat, 30 Jun 2007 10:47:16 +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 17676-01-9; Sat, 30 Jun 2007 10:47:13 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E9FA1FF01; Sat, 30 Jun 2007 10:47:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E2A0C1FF01 for ; Sat, 30 Jun 2007 10:47:10 +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 17676-01-8 for ; Sat, 30 Jun 2007 10:47:07 +0200 (CEST) Original-Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by ronja.ntg.nl (Postfix) with ESMTP id EEC7C1FEE5 for ; Sat, 30 Jun 2007 10:47:06 +0200 (CEST) Original-Received: by nz-out-0506.google.com with SMTP id m7so1016418nzf for ; Sat, 30 Jun 2007 01:47:05 -0700 (PDT) Original-Received: by 10.142.98.18 with SMTP id v18mr237785wfb.1183193225327; Sat, 30 Jun 2007 01:47:05 -0700 (PDT) Original-Received: by 10.143.7.3 with HTTP; Sat, 30 Jun 2007 01:47:05 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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:35203 Archived-At: On 6/29/07, Aditya Mahajan wrote: > Actually just adding overleftrightarrow is easy, but better will be an > interface to easily define such commands. So .... > > > If not, what can I do so that I can use it? > > ConTeXt uses overleftarrow and overrightarrow as defined in plain > tex. This does not work in subscripts. > > $\overleftarrow{A}$ $\overleftarrow{ABC}$ > $a_{\overleftarrow{A}}$ $b_{\overleftarrow{ABC}}$ > > Here is a solution. First we patch math-ext so that arrowfills take a > style. /.../ Wow! Aditya, thanks a lot! I didn't do any extensive testing, but the functionality should really end up in the core (including the added bonus if possible ;). > As an added bonus: > > \definemathoverarrow [overtwoheadrightarrow] [\twoheadrightarrowfill] > \definemathoverarrow [overtwoheadleftarrow] [\twoheadleftarrowfill] > \definemathoverarrow [overrightharpoondown] [1pt] [\rightharpoondownfill] > \definemathoverarrow [overrightharpoonup] [\rightharpoonupfill] > \definemathoverarrow [overleftharpoondown] [1pt] [\leftharpoondownfill] > \definemathoverarrow [overleftharpoonup] [\leftharpoonupfill] > > $\overtwoheadrightarrow {XYZ}$ > $\overtwoheadleftarrow {XYZ}$ > $\overrightharpoondown {XYZ}$ > $\overrightharpoonup {XYZ}$ > $\overleftharpoondown {XYZ}$ > $\overleftharpoonup {XYZ}$ > > There are also underarrows, which will not be too hard to do. I will > patch math-ext with both overarrows and underarrows. I think that > there needs to be some "italic correction" for the arrow. It is > centered on the math box, but the math box is tilted to the right. Any > way to determine the "correct" horizontal skip that should be added. > > Mojca, I remember that you had some trouble with overharpoons. Does > this take care of that? \vec is not good for two reasons: a) often stretchable arrows are needed (vectors both over single letters and things like {AB} are mixed, and \vec looks really weird in cases where letters are longer, or when we have combinations of them) b) vectors should be harpoons (not arrows) according to our conventions. My old \overrightharpoonup definitions had two other problems: c) scalability/interfering with style change: you solved exactly that one in a really nice way - thanks a lot (I did patch it, but it looked like really ugly code) d) glyphs themselves and their size (probably only the Polish guys can help here) - and that's the real problem at the moment 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. ---- But to sum up: I really like your patch, and I vote for its inclusion. (The most annoying problem is stil open though.) Thanks a lot, Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________