ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: nico <nicolas.marsgui@libertysurf.fr>
Subject: Re: Extending the black circled numbers
Date: Tue, 04 Apr 2006 20:42:55 +0200	[thread overview]
Message-ID: <ops7hx9tby9niby6@localhost> (raw)
In-Reply-To: <44323F0E.1040600@elvenkind.com>

On Tue, 04 Apr 2006 11:40:30 +0200, Taco Hoekwater <taco@elvenkind.com>  
wrote:

> nico wrote:
>> Hello,
>>
>> For those who know, I'm trying to have the DocBook callout mechanism  
>> with
>> context. [...]. 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.

Ok, thanks.

> One remark only: if you would know that want them all the
> same size (beforehand), you can call \evalwidth only once.

I tried this, but I had a weird behaviour with size (I have the same  
behaviour with the Hans example), and the other thing is that the size to  
use depends on the environment where you are. In the verbatim text (where  
I ask small font) the circled numbers must be smaller than in the current  
text flow.

>> - 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}, }

Yes, it works fine! Thanks much!

Regards,
BG

  reply	other threads:[~2006-04-04 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03 22:52 nico
2006-04-04  9:40 ` Taco Hoekwater
2006-04-04 18:42   ` nico [this message]
2006-04-04 12:44 ` Hans Hagen
2006-04-04 18:56   ` nico
2006-04-04 20:50     ` Hans Hagen
2006-04-04 22:13       ` nico
2006-04-05  7:42         ` Hans Hagen
2006-04-05 19:59           ` nico
2006-04-05 20:42             ` nico
2006-04-05 20:50               ` Hans Hagen
2006-04-05 20:52               ` Hans Hagen
2006-04-05 23:06                 ` nico
2006-04-06  0:20                 ` nico
2006-04-06  8:17                   ` Hans Hagen

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=ops7hx9tby9niby6@localhost \
    --to=nicolas.marsgui@libertysurf.fr \
    --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).