From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40519 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: LaTeX maths with array... Date: Sat, 19 Apr 2008 16:41:44 -0400 (EDT) Message-ID: References: <30c383e70804191124l649ab7bex54e496a6f81359a0@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: ger.gmane.org 1208637784 23105 80.91.229.12 (19 Apr 2008 20:43:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Apr 2008 20:43:04 +0000 (UTC) To: vim.unix@gmail.com, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 19 22:43:39 2008 connect(): Connection refused 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 1JnJuG-0004mk-Rq for gctc-ntg-context-518@m.gmane.org; Sat, 19 Apr 2008 22:43:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3E0F11FB7E; Sat, 19 Apr 2008 22:42:49 +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 01928-02-6; Sat, 19 Apr 2008 22:42:04 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 987F91FBC6; Sat, 19 Apr 2008 22:42:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 75A9C1FB7E for ; Sat, 19 Apr 2008 22:42:03 +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 00753-03-5 for ; Sat, 19 Apr 2008 22:41:30 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id CF3F11FC06 for ; Sat, 19 Apr 2008 22:41:29 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-68-40-40-75.hsd1.mi.comcast.net [68.40.40.75]) BY hellskitchen.mr.itd.umich.edu ID 480A58F3.1A6BC.9283 ; 19 Apr 2008 16:41:23 -0400 In-Reply-To: <30c383e70804191124l649ab7bex54e496a6f81359a0@mail.gmail.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) 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:40519 Archived-At: On Sat, 19 Apr 2008, Pau wrote: > Hi, > > I am preparing an e-journal for astro and I have many articles with > lots of equations. Unfortunately, authors are using LaTeX maths and > this is giving me trouble. > > I have read and followed the steps of > > http://wiki.contextgarden.net/LaTeX_Math_in_ConTeXt > > and > > http://wiki.contextgarden.net/Math_with_newmat > > and it has helped me a lot but there's a snag I run all the time in: array > > Typically, the equation giving troubles is of the kind: > > \begin{equation} > \begin{array}{rl} > h & \sim \mu M^{2/3}f^{2/3}/r\\ > & \sim M_{ch}^{5/3}f^{2/3}/r\\ > \end{array} > \end{equation} The correct way to translate array in ConTeXt is \startformula \startmatrix[align={right,left}] \NC h \NC \sim \mu M^{2/3}f^{2/3}/r \NR \NC \NC \sim M_{ch}^{5/3} f^{2/3}/r \NR \stopmatrix \stopformula However, I think that the original input is wrong. The autor probably wanted to use split (or align), rather than array. > when I try to compile, I get > > ! Misplaced alignment tab character &. > l.484 h& > \sim \mu M^{2/3}f^{2/3}/r\\ > > Of course, when I use > > \startformula\eqalign{ > h & \sim \mu M^{2/3}f^{2/3}/r \cr > & \sim M_{ch}^{5/3}f^{2/3}/r \cr > }\stopformula > > > everything runs smoothly but I cannot convert all equations containing > a {array}{rl} or similar, because I would never end... I guess that > writing a script to convert them in eqlign would be feasible, but it's > a very... precarious way... I would prefer to fix the problem from > ConTeXt itself... > > how?? Do you want ConTeXt to parse \begin{array}{...} ... \end{array} and typeset it? This is possible, but essentially involves rewritting array in ConTeXt, without any of the configuration options that ConTeXt provides. The (now deprecated) amsl module provided something similar to LaTeX array. Have you tried using that part of the code? 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 ___________________________________________________________________________________