From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52604 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Using \startalign outside of math mode? Date: Fri, 28 Aug 2009 10:31:23 -0400 (EDT) Message-ID: 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: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251469917 9538 80.91.229.12 (28 Aug 2009 14:31:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2009 14:31:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 28 16:31:50 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 1Mh2UX-0000vt-Ls for gctc-ntg-context-518@m.gmane.org; Fri, 28 Aug 2009 16:31:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AC16EC9A7C; Fri, 28 Aug 2009 16:31:48 +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 XQxJ2d0sWl-y; Fri, 28 Aug 2009 16:31:46 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E316C9A47; Fri, 28 Aug 2009 16:31:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 648B3C9A47 for ; Fri, 28 Aug 2009 16:31:44 +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 wS2m+KQaMX5W for ; Fri, 28 Aug 2009 16:31:41 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by balder.ntg.nl (Postfix) with ESMTP id EF73DC9A1F for ; Fri, 28 Aug 2009 16:31:40 +0200 (CEST) Original-Received: FROM [192.168.2.8] (c-76-28-88-45.hsd1.ct.comcast.net [76.28.88.45]) By hackers.mr.itd.umich.edu ID 4A97EA4B.1FAB2.8250 ; Authuser adityam; 28 Aug 2009 10:31:39 EDT In-Reply-To: <20090828112910.GY12901@katherina.student.utwente.nl> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) 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:52604 Archived-At: On Fri, 28 Aug 2009, Matthijs Kooijman wrote: > Hi, > > I'm using a custom pretty printer to apply some formatting to a buffer. > However, I'm not using a monospaced font, but some sans serif font to display > the result. In the original text, I have some lines that are nicely aligned > using leading spaces. For example: > > foo = bar > | baz > > Obviously, when using a non monospaced font for this, the alignment is lost. > When in math mode, I can use \startalign to force alignment, like: > > \startalign > foo \NC= bar > \NC| baz > \stopalgin > > However, I haven't manage to switch to math mode inside pretty printed text. > Also, even if I would, I would get my text rendered in math mode, which > probably won't work. > > So, I'm wondering if there is anything like \startalign to use outside of math > mode? I've been looking at the implementation of \startalign, but couldn't > find it... Startalign is essentially a table with some predefined defaults. You can try something like (untested) \starttable[|rs(0.2em)|cs(0.2em)|l|] \NC foo \NC = \NC bar \NC \AR \NC \NC | \NC baz \NC \AR \stoptable 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 ___________________________________________________________________________________