![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
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