From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68389 Path: news.gmane.org!not-for-mail From: Alasdair McAndrew Newsgroups: gmane.comp.tex.context Subject: Re: mathalignment within a table - help needed! Date: Sat, 14 May 2011 11:57:53 +1000 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0361160926==" X-Trace: dough.gmane.org 1305338290 15348 80.91.229.12 (14 May 2011 01:58:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 14 May 2011 01:58:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat May 14 03:58:06 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QL47K-0001Il-Fn for gctc-ntg-context-518@m.gmane.org; Sat, 14 May 2011 03:58:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DFCF9CACE9; Sat, 14 May 2011 03:58:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oawbfZRlwZCr; Sat, 14 May 2011 03:58:03 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA2DACACE6; Sat, 14 May 2011 03:58:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 195D6CACE6 for ; Sat, 14 May 2011 03:58:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id igKrPlfOf575 for ; Sat, 14 May 2011 03:57:57 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id C854FCAC2D for ; Sat, 14 May 2011 03:57:57 +0200 (CEST) Original-Received: from mail-yi0-f41.google.com (mail-yi0-f41.google.com [209.85.218.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4E1vt1h003088 for ; Sat, 14 May 2011 03:57:56 +0200 Original-Received: by yib18 with SMTP id 18so1334874yib.14 for ; Fri, 13 May 2011 18:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rMnsrJsrWaAQyFso72HmupuzhVGxeh5NijNZ9bhNFzE=; b=IV8DTZz+2UCMPjOwk7Zd12haFdrByRyn7wqLJO4yZhe3+n/itCtri9TfH/K7pewhvl AiY/fV7eNi1q4zXx4U/bgAbXZli3jP3kork5o26nV4IpWWn0dwuBdR2Lx9r3JZAM3Rhb mQbTfahgvpBJ4gbFdPU9QGaSjOQDSEYTemClQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=LG0kJePEEtq7dGMwnV1RyEAAXlSXxW2frps6qny4mORIZPyVR78gvBz5s4BzqXq/7k eUmi9+4rBh3rkAA68zmYiqFlPTfjrjvVtz6lFkAltmwoVxnp5K12Bj245TwlcVfPjDaW aaw1JwU+NC1kYdktvfOzp0SkYbw1iivoNZlJE= Original-Received: by 10.91.66.39 with SMTP id t39mr1927304agk.28.1305338273594; Fri, 13 May 2011 18:57:53 -0700 (PDT) Original-Received: by 10.90.119.1 with HTTP; Fri, 13 May 2011 18:57:53 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xEHdVUFV - dfcfcfe7ab29 - 20110514 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:68389 Archived-At: --===============0361160926== Content-Type: multipart/alternative; boundary=0016e640cc7c1bfd3a04a332c02a --0016e640cc7c1bfd3a04a332c02a Content-Type: text/plain; charset=ISO-8859-1 Thanks, the framed bit is fine, except that the base of the frame is aligned with the exercise number "(a)", whereas I'd like the top line of the equations aligned with the (a)... I'll keep fiddling. This is one of those occasions which makes the conversion from LaTeX to ConTeXt tricky for a beginner! Thanks again, Alasdair On Sat, May 14, 2011 at 11:23 AM, Aditya Mahajan wrote: > On Sat, 14 May 2011, Alasdair McAndrew wrote: > > Hello, >> >> I'm trying to typeset some linear algebra exercises for my students; the >> exercises will be within a table, and each second element will be a system >> of linear equations. This sort of thing: >> >> \starttable[|l|M|l|M|] >> \NC (a) \NC % >> >> >> \startmathalignment[n=7,align={right,middle,right,middle,right,middle,right}] >> \NC 3x\NC +\NC 6y\NC -\NC 2z\NC =\NC -13\NR >> \NC -6x\NC -\NC 9y\NC +\NC 5z\NC =\NC 22\NR >> \NC 3x\NC +\NC 3y\NC -\NC 5z\NC =\NC -13\NR >> \stopmathalignment >> \NC (b) \NC % >> >> >> \startmathalignment[n=7,align={right,middle,right,middle,right,middle,right}] >> \NC x\NC +\NC 3y\NC +\NC 3z\NC =\NC -4\NR >> \NC x\NC +\NC 4y\NC +\NC 5z\NC =\NC -5\NR >> \NC 2x\NC +\NC 4y\NC +\NC 3z\NC =\NC -5\NR >> \stopmathalignment >> \NC\AR >> \stoptable >> >> But this doesn't work. There seems to be a problem with the mathalignment >> environment within the table. What do I need enclose these in so that >> they >> will be treated as displayed equations within the table environment? >> > > (Untested): \framed[align=normal,width=fit]{\startformula > \startmathalignment ... \stopmathalignment \stopformula} > > math alignment is a display math environment, and must be inside a > \startformula ... \stopformula. > > Two comments: > > 1. You know about \definemathalignment, right? > 2. I think that this effect can be obtained more easily using > > \startitemize[two,columns,a] > \item ... > \item .. > \stopitemize > > but you might need to insert a negative \vskip (or \blank) to get matrix to > align with the item symbol. > > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > -- Blog: http://amca01.wordpress.com Web: http://bit.ly/Alasdair Facebook: http://www.facebook.com/alasdair.mcandrew --0016e640cc7c1bfd3a04a332c02a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, the framed bit is fine, except that the base of the frame is aligne= d with the exercise number "(a)", whereas I'd like the top li= ne of the equations aligned with the (a)...

I'll keep fiddling.= =A0 This is one of those occasions which makes the conversion from LaTeX to= ConTeXt tricky for a beginner!

Thanks again,
Alasdair

On Sat, May= 14, 2011 at 11:23 AM, Aditya Mahajan <adityam@umich.edu> wrote:
On Sat, 14 May 2011, Alasdair McAndrew wrote:

Hello,

I'm trying to typeset some linear algebra exercises for my students; th= e
exercises will be within a table, and each second element will be a system<= br> of linear equations. =A0This sort of thing:

\starttable[|l|M|l|M|]
\NC (a) \NC %

\startmathalignment[n=3D7,align=3D{right,middle,right,middle,right,middle,r= ight}]
=A0 =A0 \NC 3x\NC +\NC 6y\NC -\NC 2z\NC =3D\NC -13\NR
=A0 =A0 \NC -6x\NC -\NC 9y\NC +\NC 5z\NC =3D\NC 22\NR
=A0 =A0 \NC 3x\NC +\NC 3y\NC -\NC 5z\NC =3D\NC -13\NR
=A0 \stopmathalignment
\NC (b) \NC %

\startmathalignment[n=3D7,align=3D{right,middle,right,middle,right,middle,r= ight}]
\NC x\NC +\NC 3y\NC +\NC 3z\NC =3D\NC -4\NR
\NC x\NC +\NC 4y\NC +\NC 5z\NC =3D\NC -5\NR
\NC 2x\NC +\NC 4y\NC +\NC 3z\NC =3D\NC -5\NR
\stopmathalignment
\NC\AR
\stoptable

But this doesn't work. =A0There seems to be a problem with the mathalig= nment
environment within the table. =A0What do I need enclose these in so that th= ey
will be treated as displayed equations within the table environment?

(Untested): \framed[align=3Dnormal,width=3Dfit]{\startformula \startmathali= gnment ... \stopmathalignment \stopformula}

math alignment is a display math environment, and must be inside a \startfo= rmula ... \stopformula.

Two comments:

1. You know about \definemathalignment, right?
2. I think that this effect can be obtained more easily using

\startitemize[two,columns,a]
=A0\item ...
=A0\item ..
\stopitemize

but you might need to insert a negative \vskip (or \blank) to get matrix to= align with the item symbol.

Aditya
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________



--
Blog: http://amca01.wordpress.com
Web:=A0 http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alas= dair.mcandrew
--0016e640cc7c1bfd3a04a332c02a-- --===============0361160926== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0361160926==--