From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25584 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: LaTeX array equivalence with multiline \lbrace Date: Thu, 26 Jan 2006 22:50:45 +0100 Message-ID: <43D94435.7090006@wxs.nl> References: <43D67EB3.5020800@nibua-r.org> <43D76D7A.7060106@wxs.nl> <43D7AA52.4090402@nibua-r.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1138312384 8117 80.91.229.2 (26 Jan 2006 21:53:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Jan 2006 21:53:04 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 26 22:52:57 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1F2F2i-00075X-2o for gctc-ntg-context-518@m.gmane.org; Thu, 26 Jan 2006 22:52:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE7CC12808; Thu, 26 Jan 2006 22:52:34 +0100 (CET) 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 18801-10; Thu, 26 Jan 2006 22:52:34 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6D265127B7; Thu, 26 Jan 2006 22:50:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 459D6127B7 for ; Thu, 26 Jan 2006 22:50:50 +0100 (CET) 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 18806-03 for ; Thu, 26 Jan 2006 22:50:49 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 0B5F6127B6 for ; Thu, 26 Jan 2006 22:50:48 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 2801 for ; Thu, 26 Jan 2006 17:02:51 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43D7AA52.4090402@nibua-r.org> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:25584 Archived-At: Renaud AUBIN wrote: >I've read the post [NTG-context] Math Cases and I'm interested to have >the possibility to do this kind of numbering: > > { b , if whatever (1a) > a ={ > { c, otherwise (1b) > > > >>If I understand you correctly, then something like this >> >>\definealign[cases][left={\left\{}, right={\right.}, n=2, >>align={left,left}] >> >>will give us \startcases, \stopcases which works like \cases. Such a >>feature will be very useful. >> >> >>Is it possible to define left|right in such a way that >>\definealign[important][left={\framed\bgroup},right={\egroup}] >>results in a frame around the equations (and does not include the equation >>numbers), that is the frame is as broad as the width of the largest >>equation that follows. This mechanism can be used to highlight equations. >> >>Also, in another post, I had asked if it is possible to have cases that >>are numbered, that is, can I get >> >> { b , if whatever (1a) >> a ={ >> { c, otherwise (1b) >> >>This is not important, but will be nice to have. >> >> something like this? \unprotect \definesystemvariable{ce} \def\v!mathcases {mathcases} \def\c!numberdistance{numberdistance} \def\setupmathcases {\dodoubleempty\dosetupmathcases} \def\dosetupmathcases[#1][#2]% {\ifsecondargument \getparameters[\??ce#1][#2]% \else \getparameters[\??ce][#1]% \fi} \let\currentmathcases\empty \def\mathcasesparameter#1% {\executeifdefined{\??ce\currentmathcases#1}{\executeifdefined{\??ce#1}\empty}} \setupmathcases [\c!distance=1em, \c!numberdistance=2.5em] \def\definemathcases {\dodoubleempty\dodefinemathcases} \def\dodefinemathcases[#1]% [#2]% {\setvalue{\e!start#1}{\dodoubleempty\dostartmathcases[#1]}% \setvalue{\e!stop #1}{\dostopmathcases}% \setupmathcases[#1]}% [#2] \definemathcases[cases] \definemathcases[\v!mathcases] \def\dodocasesNC {\gdef\docasesNC{\endmath&}} \let\docasesNR\doalignNR \def\dostartmathcases[#1][#2]% {\begingroup \edef\currentmathcases{#1}% \doifassignmentelse{#2}{\setupmathcases[#1][#2]}\donothing \left\{% \,% \vcenter\bgroup \pushmacro\docasesNC \let\endmath\relax \def\NC{\docasesNC}% \def\MC{\docasesNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\docasesNC\dodocasesNC \def\NR{\endmath&\global\let\docasesNC\dodocasesNC\doxxdoubleempty\docasesNR}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \global\eqaligncolumn\plusone \halign\bgroup \span$##$\hfil &\hskip\mathcasesparameter\c!distance\relax\popmacro\docasesNC##\hfil &\hskip\mathcasesparameter\c!numberdistance\relax\span\textineqalign{##}% \crcr} % todo: number \def\dostopmathcases {\crcr \egroup \popmacro\docasesNC \egroup \right. \endgroup} \protect \showframe \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR[+] \NC 4 \NC otherwise \NR \stopcases \stopformula \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR[+] \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------