From: Nikolai Weibull <mailing-lists.context-users@rawuncut.elitemail.org>
Subject: [ANN] Macros for displaying unicode vectors
Date: Thu, 9 Jun 2005 19:48:42 +0200 [thread overview]
Message-ID: <20050609174842.GD5505@puritan.pcp.ath.cx> (raw)
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);}
reply other threads:[~2005-06-09 17:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050609174842.GD5505@puritan.pcp.ath.cx \
--to=mailing-lists.context-users@rawuncut.elitemail.org \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).