From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52602 Path: news.gmane.org!not-for-mail From: Matthijs Kooijman Newsgroups: gmane.comp.tex.context Subject: Re: Using \startalign outside of math mode? Date: Fri, 28 Aug 2009 13:57:12 +0200 Message-ID: <20090828115712.GZ12901@katherina.student.utwente.nl> References: <20090828112910.GY12901@katherina.student.utwente.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0624546830==" X-Trace: ger.gmane.org 1251460652 11833 80.91.229.12 (28 Aug 2009 11:57:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2009 11:57:32 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 28 13:57:25 2009 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.50) id 1Mh054-0002i4-Hm for gctc-ntg-context-518@m.gmane.org; Fri, 28 Aug 2009 13:57:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BCEC4C9A8A; Fri, 28 Aug 2009 13:57:21 +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 TYeEUv7YPHwX; Fri, 28 Aug 2009 13:57:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 172CCC9A47; Fri, 28 Aug 2009 13:57:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CC92AC9A47 for ; Fri, 28 Aug 2009 13:57:14 +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 tEoFI+c6r0UZ for ; Fri, 28 Aug 2009 13:57:12 +0200 (CEST) Original-Received: from katherina.student.utwente.nl (katherina.student.utwente.nl [130.89.168.160]) by balder.ntg.nl (Postfix) with ESMTP id B445EC9A1F for ; Fri, 28 Aug 2009 13:57:12 +0200 (CEST) Original-Received: from matthijs by katherina.student.utwente.nl with local (Exim 4.69) (envelope-from ) id 1Mh04u-0002mO-AZ for ntg-context@ntg.nl; Fri, 28 Aug 2009 13:57:12 +0200 Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: <20090828112910.GY12901@katherina.student.utwente.nl> X-PGP-Fingerprint: 7F6A 9F44 2820 18E2 18DE 24AA CF49 D0E6 8A2F AFBC X-PGP-Key: http://katherina.student.utwente.nl/~matthijs/gpg_pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) 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:52602 Archived-At: --===============0624546830== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3rzwkXnKuCXxoL5m" Content-Disposition: inline --3rzwkXnKuCXxoL5m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, > foo = bar > | baz it seems I found some sort of a solution. Using the \setwidthof I found at [1], I wrote the following: \def\setwidthof#1\to#2% {\bgroup \setbox\scratchbox\hbox{#1}% \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}} foo = bar \setwidthof{foo }\to\alignwidth \hskip\alignwidth| baz This works, but is not so pretty, obviously. Since I'm using a custom pretty printer, I can probably hack something up that generates this from the more natural form automatically. Still, I'm wondering if there are more pretty methods to do this. In particular, this method is completely limited to indents at the start of a line (e.g., aligning the b's of bar and baz isn't possible, though I could perhs do more complicated math using the width of "| ", but that will become even more hideous... Any other suggestions? Gr. Matthijs [1]: http://www.ntg.nl/pipermail/ntg-context/2009/037404.html --3rzwkXnKuCXxoL5m Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqXxhgACgkQz0nQ5oovr7zm4gCeM8BPmyI5/JEC5pctRLcKoCPe coMAn2dRAzgbXSMfzm2abzNogiobVkuL =5Yvf -----END PGP SIGNATURE----- --3rzwkXnKuCXxoL5m-- --===============0624546830== 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0624546830==--