From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26770 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Extending the black circled numbers Date: Tue, 04 Apr 2006 11:40:30 +0200 Message-ID: <44323F0E.1040600@elvenkind.com> References: 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 1144143654 3487 80.91.229.2 (4 Apr 2006 09:40:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Apr 2006 09:40:54 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 04 11:40:50 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 1FQi1h-0004PZ-BH for gctc-ntg-context-518@m.gmane.org; Tue, 04 Apr 2006 11:40:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5B1111278B; Tue, 4 Apr 2006 11:40:40 +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 09048-03; Tue, 4 Apr 2006 11:40:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C40A31276F; Tue, 4 Apr 2006 11:40:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 56FBE1276F for ; Tue, 4 Apr 2006 11:40:33 +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 08265-07-3 for ; Tue, 4 Apr 2006 11:40:32 +0200 (CEST) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with SMTP id 47C4A126F8 for ; Tue, 4 Apr 2006 11:40:32 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id DD0841833E for ; Tue, 4 Apr 2006 11:40:31 +0200 (CEST) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11529-03 for ; Tue, 4 Apr 2006 11:40:31 +0200 (CEST) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id F097D16BF4 for ; Tue, 4 Apr 2006 11:40:30 +0200 (CEST) User-Agent: Mozilla Thunderbird 1.0.6-7.1.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: by amavisd-new at elvenkind.net 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:26770 Archived-At: nico wrote: > Hello, > > For those who know, I'm trying to have the DocBook callout mechanism with > context. Basically, there are some numbers in lines of verbatim text, and > below the verbatim text the numbers are used to explain the portion of the > text (kind of footnote). Typically the numbers are rendered white in black > circle. I could use the Dingbats numbers, but it is limited to 10, so that > I emulated them with the following code to be able to go up to 99. > > The questions I have: > - Is it the right way to do it in context (do I really need metafont? > Simpler, smarter method?) This is pretty smart, I'd say. Of course it would be better to have an official font with encircled numbers for reasons of efficiency, but this looks pretty good and the code is quite clean so i believe you did well enough. One remark only: if you would know that want them all the same size (beforehand), you can call \evalwidth only once. > - What should I do to make them as anchors, so that it can be > cross-referenced (I mean, one can click on a hot spot that jump to the > number in the verbatim text). Like this maybe: \def\markline#1% {\conum{#1}% \expanded{\textreference[line#1]{\noexpand\conum{#1}}}} \def\refline#1{\in{line }[line#1]} \dorecurse{99}{\markline{\recurselevel}, } \dorecurse{99}{\refline{\recurselevel}, } Cheers, taco