From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26631 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Substack in Context Date: Thu, 30 Mar 2006 13:26:12 +0200 Message-ID: <442BC054.5090302@wxs.nl> References: <43DB4918.8060505@elvenkind.com> <43DB5B1B.50902@elvenkind.com> <43DB75C0.8090201@seznam.cz> <43FC7AF2.6050609@elvenkind.com> 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 1143717999 16235 80.91.229.2 (30 Mar 2006 11:26:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Mar 2006 11:26:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 30 13:26:33 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 1FOvIJ-0007pJ-RE for gctc-ntg-context-518@m.gmane.org; Thu, 30 Mar 2006 13:26:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 726281279B; Thu, 30 Mar 2006 13:26:26 +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 06793-02; Thu, 30 Mar 2006 13:26:19 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B59721278E; Thu, 30 Mar 2006 13:26:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DEEEC1278E for ; Thu, 30 Mar 2006 13:26:15 +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 06794-02 for ; Thu, 30 Mar 2006 13:26:15 +0200 (CEST) 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 EDB9F12780 for ; Thu, 30 Mar 2006 13:26:14 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 10409 for ; Thu, 30 Mar 2006 15:26:14 +0400 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: mailing list for ConTeXt users In-Reply-To: <43FC7AF2.6050609@elvenkind.com> 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:26631 Archived-At: Taco Hoekwater wrote: > Does this look ok? > (code is not production-ready yet, but seems reasonable to me) > > Taco > > \def\startsubstack > {\begingroup > \null > \vcenter\bgroup > \pushmacro\domatrixNC > \let\endmath\relax > \def\NC{\domatrixNC}% > \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% > \global\let\domatrixNC\dodomatrixNC > \def\NR{\endmath% > \global\let\domatrixNC\dodomatrixNC > \vadjust{\kern -.33\bodyfontsize}\crcr}% > \mathsurround\zeropoint > \everycr\emptytoks > \halign\bgroup \hfil$\scriptstyle ##$\hfil\crcr } > > \def\stopsubstack > {\crcr > \egroup > \popmacro\domatrixNC > \egroup > \endgroup} > without vadjust: (mathstrut + nointerlineskip) \def\startsubstack {\begingroup \null \vcenter\bgroup \pushmacro\domatrixNC \let\stopmathmode\relax % to be sure, will go away \def\NC{\domatrixNC}% \def\MC{\domatrixNC\startmathmode}% \global\let\domatrixNC\dodomatrixNC \def\NR{\stopmathmode \global\let\domatrixNC\dodomatrixNC \crcr\noalign{\nointerlineskip}}% \mathsurround\zeropoint \everycr\emptytoks \halign\bgroup\hfil$\scriptstyle\mathstrut##$\hfil\crcr } \def\stopsubstack {\crcr \egroup \popmacro\domatrixNC \egroup \endgroup} > \starttext > > \startformula > \sum_{% > \startsubstack > i = 1 \NR > i \neq n \NR > i \neq m > \stopsubstack > }a_i > \stopformula > > \stoptext > > Aditya Mahajan wrote: > >> <--- On Jan 28, Taco Hoekwater wrote ---> >> >> >>> Aditya Mahajan wrote: >>> >>> >>>>> The definition from m-newmat is at least partly superceded by the >>>>> new core math definitions Hans added last week, so a new implementation >>>>> would be better. >>>>> >>>> Can you suggest something? >>>> >>> Like this maybe? >>> >>> \def\substack#1% >>> {\begingroup >>> \let\\\cr >>> \startmathmatrix #1\stopmathmatrix >>> \endgroup} >>> >>> Probably needs a bit of tweaking to make it look better >>> (perhaps a [strut=no] parameter?). >>> >>> >> <--- On Jan 28, Vit Zyka wrote ---> >> >> >>> What about use math primitive \atop: >>> >>> \def\substack#1% >>> {\begingroup >>> \let\\\atop >>> #1 >>> \endgroup} >>> >>> >> >> Sorry for not getting back for almost a month. Both suggestions work >> only partially. Consider >> >> \startmathformula >> \sum_{% >> \startmathmatrix >> i = 1 \NR i \neq n \NR i \neq m >> \stopmathmatrix >> }a_i >> \stopformula >> >> As Taco mentioned, the spacing is bad. >> >> \atop gives correct spacing but you need to put subscripts in groups >> of two. >> >> \startformula >> \sum_{ {i = 1 \atop i \neq n}\atop i \neq m } a_i >> \stopformula >> >> Moreover, the font size is incorrect in both cases. Compare with the >> size of the subscript in \sum_{i = 1}. >> >> Any suggestions? >> >> Aditya >> _______________________________________________ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------