From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20758 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.comp.tex.context Subject: [ANN] Macros for displaying unicode vectors Date: Thu, 9 Jun 2005 19:48:42 +0200 Message-ID: <20050609174842.GD5505@puritan.pcp.ath.cx> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118339317 29234 80.91.229.2 (9 Jun 2005 17:48:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2005 17:48:37 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 09 19:48:23 2005 Return-path: 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 1DgR4z-0003jA-Cy for gctc-ntg-context-518@m.gmane.org; Thu, 09 Jun 2005 19:44:33 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6716C127E0; Thu, 9 Jun 2005 19:48:46 +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 01428-02; Thu, 9 Jun 2005 19:48:42 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C27DF127BE; Thu, 9 Jun 2005 19:48:42 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3E2BF127BE for ; Thu, 9 Jun 2005 19:48:42 +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 01342-03 for ; Thu, 9 Jun 2005 19:48:41 +0200 (CEST) Original-Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by ronja.ntg.nl (Postfix) with ESMTP id 425C41278A for ; Thu, 9 Jun 2005 19:48:40 +0200 (CEST) Original-Received: from puritan.pcp.ath.cx ([213.112.43.228] [213.112.43.228]) by mxfep01.bredband.com with ESMTP id <20050609174840.XLC12498.mxfep01.bredband.com@puritan.pcp.ath.cx> for ; Thu, 9 Jun 2005 19:48:40 +0200 Original-Received: by puritan.pcp.ath.cx (Postfix, from userid 1000) id C4BA0ADFEA; Thu, 9 Jun 2005 19:48:42 +0200 (CEST) Original-To: NTG-context List Mail-Followup-To: NTG-context List Content-Disposition: inline User-Agent: Mutt/1.5.8i X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20758 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20758 Here's a nice way to display the contents of a unicode vector, as rendered by ConTeXt: \def\unicodevectortablerow#1#2% {\NC \ss\ix\uchexnumber{\numexpr(#2-1)\relax} \VL \dorecurse{16} {\newcount\u \u=\numexpr(#1*256+(#2-1)+(\recurselevel-1)*16)\relax \utfunihash\u \VL}% \AR} % TODO: *{17}{c|} in format doesn't work \def\unicodevectortable#1% {\bgroup \Expand \placetable [] [] {Unicode Vector #1} \starttable[|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|] \NC\VL[3] \dorecurse{15}{\ss\ix\uchexnumbers{#1}\uchexnumber{\recurselevel}\NC} \ss\ix\uchexnumbers{#1}F\VL[3]\AR \HL[3] \dorecurse{15} {\glet\row\recurselevel \unicodevectortablerow{#1}{\row} \HL} \unicodevectortablerow{#1}{16} \HL[3] \stoptable \egroup} And then \starttext \unicodevectortable{34} \stoptext The \glet\row\recurselevel is terrible, but I couldn't come up with a better solution. Also, even though thrd-tab.tex suggests that one may write *{N}{FORMAT} in the template, that doesn't seem to work. Suggestions?, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}