From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26764 Path: news.gmane.org!not-for-mail From: nico Newsgroups: gmane.comp.tex.context Subject: Extending the black circled numbers Date: Tue, 04 Apr 2006 00:52:58 +0200 Message-ID: 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 1144104648 13317 80.91.229.2 (3 Apr 2006 22:50:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Apr 2006 22:50:48 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 04 00:50:46 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 1FQXsR-0000QZ-3T for gctc-ntg-context-518@m.gmane.org; Tue, 04 Apr 2006 00:50:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 19CB0126F8; Tue, 4 Apr 2006 00:50:26 +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 31342-01; Tue, 4 Apr 2006 00:50:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CA07D1278B; Tue, 4 Apr 2006 00:50:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 48E2D1278B for ; Tue, 4 Apr 2006 00:50:17 +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 30966-08 for ; Tue, 4 Apr 2006 00:50:14 +0200 (CEST) Original-Received: from swip.net (mailfe12.tele2.fr [212.247.155.108]) by ronja.ntg.nl (Postfix) with SMTP id 896D7126F8 for ; Tue, 4 Apr 2006 00:50:14 +0200 (CEST) X-T2-Posting-ID: 3brHPWvyEzVNt0QNlxQWsxGJRDYe7rueGgqwO1zxZAg= X-Cloudmark-Score: 0.000000 [] Original-Received: from [83.179.74.112] (HELO localhost) by mailfe12.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 3485573 for ntg-context@ntg.nl; Tue, 04 Apr 2006 00:50:13 +0200 Original-To: "mailing list for ConTeXt users" User-Agent: Opera M2/7.54 (FreeBSD, build 955) 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:26764 Archived-At: 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?) - 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). Thanks for any hint, \newdimen \cowidth % Maximum size of the circle fits for number 99 \def\evalwidth% {\bgroup% \setbox0\hbox{\small\bf{\ss 99}}% \global\cowidth=1.2\wd0% \egroup} % Background black circle \startuniqueMPgraphic{CoCircle} fill fullcircle scaled \overlaywidth withcolor black ; \stopuniqueMPgraphic \defineoverlay[cocircle][\uniqueMPgraphic{CoCircle}] % Display the black circled number \def\conum#1% {\evalwidth% \framed[background=cocircle,strut=no,frame=off, width=\the\cowidth,height=\the\cowidth,offset=overlay] {\color[white]{\small\bf{\ss #1}}}} \starttext \dorecurse{99}{\conum{\recurselevel}, } \stoptext Regards, BG