* Extending the black circled numbers
@ 2006-04-03 22:52 nico
2006-04-04 9:40 ` Taco Hoekwater
2006-04-04 12:44 ` Hans Hagen
0 siblings, 2 replies; 15+ messages in thread
From: nico @ 2006-04-03 22:52 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-03 22:52 Extending the black circled numbers nico
@ 2006-04-04 9:40 ` Taco Hoekwater
2006-04-04 18:42 ` nico
2006-04-04 12:44 ` Hans Hagen
1 sibling, 1 reply; 15+ messages in thread
From: Taco Hoekwater @ 2006-04-04 9:40 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-03 22:52 Extending the black circled numbers nico
2006-04-04 9:40 ` Taco Hoekwater
@ 2006-04-04 12:44 ` Hans Hagen
2006-04-04 18:56 ` nico
1 sibling, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2006-04-04 12:44 UTC (permalink / raw)
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?)
> - 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
>
\setupcolors[state=start]
\startuniqueMPgraphic{CoCircle}
fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor OverlayColor ;
\stopuniqueMPgraphic
\defineoverlay[cocircle][\uniqueMPgraphic{CoCircle}]
\definecolor[CoBackgroundColor] [red]
\definecolor[CoForegroundColor] [white]
\def\conum#1%
{\setbox\scratchbox\hbox
{\small\ss\bf
\setbox\scratchbox\hbox{99}%
\hbox to 1.2\wd\scratchbox{\hss#1\hss}}%
\framed
[background=cocircle,
offset=overlay,
frame=off,
width=\the\wd\scratchbox,
height=\the\wd\scratchbox,
backgroundcolor=CoBackgroundColor,
foregroundcolor=CoForegroundColor]
{\box\scratchbox}}
\starttext
\dontleavehmode \dorecurse{99}{\conum{\recurselevel}, }
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-04 9:40 ` Taco Hoekwater
@ 2006-04-04 18:42 ` nico
0 siblings, 0 replies; 15+ messages in thread
From: nico @ 2006-04-04 18:42 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-04 12:44 ` Hans Hagen
@ 2006-04-04 18:56 ` nico
2006-04-04 20:50 ` Hans Hagen
0 siblings, 1 reply; 15+ messages in thread
From: nico @ 2006-04-04 18:56 UTC (permalink / raw)
On Tue, 04 Apr 2006 14:44:28 +0200, Hans Hagen <pragma@wxs.nl> wrote:
> nico wrote:
>> Hello,
>>
>> 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?)
> \setupcolors[state=start]
>
> \startuniqueMPgraphic{CoCircle}
> fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor
> OverlayColor ;
> \stopuniqueMPgraphic
I see here the Hans touch again: it's better and I don't really understand
how it works :-)
But there's something strange: the first circle is greater than the others
(but the numbers have all the same size). Tracing a bit I see that the
first circle has a width=16.5333pt, the others 13.19997pt. What's the
reason for this?
Thanks much!
Regards,
BG
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-04 18:56 ` nico
@ 2006-04-04 20:50 ` Hans Hagen
2006-04-04 22:13 ` nico
0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2006-04-04 20:50 UTC (permalink / raw)
nico wrote:
> On Tue, 04 Apr 2006 14:44:28 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>
>> nico wrote:
>>
>>> Hello,
>>>
>>> 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?)
>>>
>
>
>> \setupcolors[state=start]
>>
>> \startuniqueMPgraphic{CoCircle}
>> fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor
>> OverlayColor ;
>> \stopuniqueMPgraphic
>>
>
> I see here the Hans touch again: it's better and I don't really understand
> how it works :-)
> But there's something strange: the first circle is greater than the others
> (but the numbers have all the same size). Tracing a bit I see that the
> first circle has a width=16.5333pt, the others 13.19997pt. What's the
> reason for this?
>
what os the exact code that you use?how many mp runs do yuo have?
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-04 20:50 ` Hans Hagen
@ 2006-04-04 22:13 ` nico
2006-04-05 7:42 ` Hans Hagen
0 siblings, 1 reply; 15+ messages in thread
From: nico @ 2006-04-04 22:13 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]
On Tue, 04 Apr 2006 22:50:58 +0200, Hans Hagen <pragma@wxs.nl> wrote:
> nico wrote:
>> On Tue, 04 Apr 2006 14:44:28 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>>
>>
>>> nico wrote:
>>>
>>>> Hello,
>>>>
>>>> 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?)
>>>>
>>
>>
>>> \setupcolors[state=start]
>>>
>>> \startuniqueMPgraphic{CoCircle}
>>> fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor
>>> OverlayColor ;
>>> \stopuniqueMPgraphic
>>>
>>
>> I see here the Hans touch again: it's better and I don't really
>> understand
>> how it works :-)
>> But there's something strange: the first circle is greater than the
>> others
>> (but the numbers have all the same size). Tracing a bit I see that the
>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>> reason for this?
>>
> what os the exact code that you use?how many mp runs do yuo have?
It's exactly the one you gave. I attach the file I compile. Two mpruns; I
attach the log too.
Regards,
BG
[-- Attachment #2: cotest.tex --]
[-- Type: application/x-tex, Size: 830 bytes --]
[-- Attachment #3: cotest.log --]
[-- Type: application/octet-stream, Size: 5171 bytes --]
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=cont-en 2006.3.30) 5 APR 2006 00:02
entering extended mode
(/usr/local/share/texmf-local/web2c/natural.tcx)
**&cont-en cotest.tex
(./cotest.tex
ConTeXt ver: 2006.03.25 13:21 fmt: 2006.3.30 int: english mes: english
language : language en is active
<protectionstate 0>
system : cont-new loaded
(/usr/local/share/texmf-local/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
color : palette rollover is available
)
system : cont-old loaded
(/usr/local/share/texmf-local/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system : cont-fil loaded
(/usr/local/share/texmf-local/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system : cont-sys loaded
(/usr/local/share/texmf-dist/tex/context/user/cont-sys.tex
(/usr/local/share/texmf-local/tex/context/base/type-exa.tex)
(/usr/local/share/texmf-local/tex/context/base/type-syn.tex)
(/usr/local/share/texmf-local/tex/context/base/type-enc.tex)
(/usr/local/share/texmf-local/tex/context/base/type-siz.tex)
(/usr/local/share/texmf-local/tex/context/base/type-map.tex)
(/usr/local/share/texmf-local/tex/context/base/type-spe.tex)
(/usr/local/share/texmf-local/tex/context/base/type-akb.tex))
bodyfont : 12pt rm is loaded
language : patterns nl->texnansi:texnansi->1->2:3 nl->ec:ec->2->2:3 fr->
texnansi:texnansi->3->2:3 fr->ec:ec->4->2:3 de->texnansi:texnansi->5->2:3 de->e
c:ec->6->2:3 it->texnansi:texnansi->7->2:3 it->ec:ec->8->2:3 pt->texnansi:texna
nsi->9->2:3 pt->ec:ec->10->2:3 hr->ec:ec->11->2:3 pl->pl0:pl0->12->2:3 pl->ec:e
c->13->2:3 pl->qx:qx->14->2:3 cz->il2:il2->15->2:3 cz->ec:ec->16->2:3 sk->il2:i
l2->17->2:3 sk->ec:ec->18->2:3 sl->ec:ec->19->2:3 en->ec:ec->21->2:3 uk->ec:ec-
>22->2:3 us->ec:ec->23->2:3 da->ec:ec->24->2:3 sv->ec:ec->25->2:3 af->ec:ec->26
->2:3 no->ec:ec->27->2:3 deo->ec:ec->28->2:3 es->ec:ec->29->2:3 ca->ec:ec->30->
2:3 la->ec:ec->31->2:3 ro->ec:ec->32->2:3 tr->ec:ec->33->2:3 fi->ec:ec->35->2:3
hu->ec:ec->36->2:3 loaded
specials : tex,postscript,rokicki loaded
\openout2 = `cotest.tui'.
system : cotest.top loaded
(./cotest.top
specials : loading definition file tpd
(/usr/local/share/texmf-local/tex/context/base/spec-tpd.tex
specials : loading definition file fdf
(/usr/local/share/texmf-local/tex/context/base/spec-fdf.tex)
specials : fdf loaded
)
specials : fdf,tpd loaded
)
\openout0 = `cotest-mpgraph.mp'.
\openout0 = `mpgraph.mp'.
color : system rgb is global activated
(./cotest.tuo) (./cotest.tuo) (./cotest.tuo) (./cotest.tuo) (./cotest.tuo)
(./cotest.tuo) (./cotest.tuo) (./cotest.tuo) (./cotest.tuo) (./cotest.tuo)
(./cotest.tuo) (./cotest.tuo) (./cotest.tuo)
systems : begin file cotest at line 29
(/usr/local/share/texmf-local/tex/context/base/pdfr-ec.tex)
\openout5 = `cotest-mpgraph.mp'.
systems : randomizer starts with 8365963
[MP to PDF] (./cotest-mpgraph.4000)
fonts : resetting map file list
fonts : using map file: original-base
fonts : using map file: ec-public-lm
fonts : using map file: ec-base
fonts : using map file: 8r-base
fonts : using map file: t5-base
fonts : using map file: original-ams-base
fonts : using map file: original-ams-euler
fonts : using map file: original-public-lm
(./cotest.tuo) [MP to PDF] (./cotest-mpgraph.3999) [1.1{/usr/local/share/texmf-
local/fonts/map/pdftex/context/original-empty.map}{/usr/local/share/texmf-local
/fonts/map/pdftex/context/original-base.map}{/usr/local/share/texmf-local/fonts
/map/pdftex/context/ec-public-lm.map}{/usr/local/share/texmf-local/fonts/map/pd
ftex/context/ec-base.map}{/usr/local/share/texmf-local/fonts/map/pdftex/context
/8r-base.map}{/usr/local/share/texmf-local/fonts/map/pdftex/context/t5-base.map
}{/usr/local/share/texmf-local/fonts/map/pdftex/context/original-ams-base.map}{
/usr/local/share/texmf-local/fonts/map/pdftex/context/original-ams-euler.map}{/
usr/local/share/texmf-local/fonts/map/pdftex/context/original-public-lm.map}]
systems : end file cotest at line 31
[flush and process cotest-mpgraph.mp afterwards] )
Here is how much of TeX's memory you used:
1291 strings out of 60376
22080 string characters out of 604529
4540797 words of memory out of 5530891
38203 multiletter control sequences out of 10000+100000
83670 words of font info for 40 fonts, out of 500000 for 2000
232 hyphenation exceptions out of 1000
47i,18n,57p,234b,775s stack positions out of 1500i,500n,5000p,200000b,5000s
PDF statistics:
15 PDF objects out of 300000
0 named destinations out of 131072
17 words of extra memory for PDF output out of 65536
{/usr/local/share/texmf-dist/
fonts/enc/dvips/lm/lm-ec.enc}</usr/local/share/texmf-dist/fonts/type1/public/lm
/lmssbx10.pfb></usr/local/share/texmf-dist/fonts/type1/public/lm/lmr12.pfb>
Output written on cotest.pdf (1 page, 39735 bytes).
[-- Attachment #4: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-04 22:13 ` nico
@ 2006-04-05 7:42 ` Hans Hagen
2006-04-05 19:59 ` nico
0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2006-04-05 7:42 UTC (permalink / raw)
nico wrote:
> On Tue, 04 Apr 2006 22:50:58 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>> nico wrote:
>>> On Tue, 04 Apr 2006 14:44:28 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>>>
>>>
>>>> nico wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> 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?)
>>>>>
>>>
>>>
>>>> \setupcolors[state=start]
>>>>
>>>> \startuniqueMPgraphic{CoCircle}
>>>> fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor
>>>> OverlayColor ;
>>>> \stopuniqueMPgraphic
>>>>
>>>
>>> I see here the Hans touch again: it's better and I don't really
>>> understand
>>> how it works :-)
>>> But there's something strange: the first circle is greater than the
>>> others
>>> (but the numbers have all the same size). Tracing a bit I see that the
>>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>>> reason for this?
>>>
>> what os the exact code that you use?how many mp runs do yuo have?
>
> It's exactly the one you gave. I attach the file I compile. Two
> mpruns; I attach the log too.
one run here .. can you try the beta? i remember a spurious space problem someplace
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-05 7:42 ` Hans Hagen
@ 2006-04-05 19:59 ` nico
2006-04-05 20:42 ` nico
0 siblings, 1 reply; 15+ messages in thread
From: nico @ 2006-04-05 19:59 UTC (permalink / raw)
On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>>>> But there's something strange: the first circle is greater than the
>>>> others
>>>> (but the numbers have all the same size). Tracing a bit I see that the
>>>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>>>> reason for this?
>>>>
>>> what os the exact code that you use?how many mp runs do yuo have?
>>
>> It's exactly the one you gave. I attach the file I compile. Two
>> mpruns; I attach the log too.
> one run here .. can you try the beta? i remember a spurious space
> problem someplace
Same thing. I've found that I haven't the problem with producing dvi
instead of pdf. I've limited the case to:
\starttext
\setbox\scratchbox\hbox
{\small\ss\bf
\setbox\scratchbox\hbox{99}%
\hbox to 1.2\wd\scratchbox{\hss1\hss}}
\writestatus{co}{width=\the\wd\scratchbox}%
\setbox\scratchbox\hbox
{\small\ss\bf
\setbox\scratchbox\hbox{99}%
\hbox to 1.2\wd\scratchbox{\hss1\hss}}
\writestatus{co}{width=\the\wd\scratchbox}%
\stoptext
With --output=pdftex I have the log:
(./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo)
(./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo)
(./try.tuo)
systems : begin file try at line 1
(/usr/local/share/texmf-local/tex/context/base/pdfr-ec.tex)
co : width=16.5333pt
co : width=13.19997pt
systems : end file try at line 15
)
Should I update something else? texexec --version gives:
TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2006.04.05 20:06
cont-en : ver: 2006.04.05 20:06 fmt: 2006.4.5 mes: english
Regards,
BG
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
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
0 siblings, 2 replies; 15+ messages in thread
From: nico @ 2006-04-05 20:42 UTC (permalink / raw)
On Wed, 05 Apr 2006 21:59:36 +0200, nico <nicolas.marsgui@libertysurf.fr>
wrote:
> On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>>>>> But there's something strange: the first circle is greater than the
>>>>> others
>>>>> (but the numbers have all the same size). Tracing a bit I see that
>>>>> the
>>>>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>>>>> reason for this?
>>>>>
>>>> what os the exact code that you use?how many mp runs do yuo have?
>>>
>>> It's exactly the one you gave. I attach the file I compile. Two
>>> mpruns; I attach the log too.
>> one run here .. can you try the beta? i remember a spurious space
>> problem someplace
Well, here is an even smaller test that shows the problem:
\starttext
\setbox0\hbox{\ss 99}
\writestatus{co}{width=\the\wd0}%
\setbox0\hbox{\ss 99}
\writestatus{co}{width=\the\wd0}%
\stoptext
It seems to be related to some font loading stuff, since when I don't put
\ss I haven't this. So, if I put the following in the test I have no more
the problem.
\setbox\scratchbox\hbox{\ss 99} % workaround to fix the strange size
initialization...
\starttext
\dontleavehmode \dorecurse{99}{\conum{\recurselevel}, }
\stoptext
Regards,
BG
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-05 20:42 ` nico
@ 2006-04-05 20:50 ` Hans Hagen
2006-04-05 20:52 ` Hans Hagen
1 sibling, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2006-04-05 20:50 UTC (permalink / raw)
nico wrote:
> On Wed, 05 Apr 2006 21:59:36 +0200, nico <nicolas.marsgui@libertysurf.fr>
> wrote:
>
>
>> On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>>
>>
>>>>>> But there's something strange: the first circle is greater than the
>>>>>> others
>>>>>> (but the numbers have all the same size). Tracing a bit I see that
>>>>>> the
>>>>>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>>>>>> reason for this?
>>>>>>
>>>>>>
>>>>> what os the exact code that you use?how many mp runs do yuo have?
>>>>>
>>>> It's exactly the one you gave. I attach the file I compile. Two
>>>> mpruns; I attach the log too.
>>>>
>>> one run here .. can you try the beta? i remember a spurious space
>>> problem someplace
>>>
>
> Well, here is an even smaller test that shows the problem:
>
> \starttext
>
> \setbox0\hbox{\ss 99}
> \writestatus{co}{width=\the\wd0}%
>
> \setbox0\hbox{\ss 99}
> \writestatus{co}{width=\the\wd0}%
>
> \stoptext
>
actually that file faile here because of a bug in pdftex that i ran into earlier todat (no text on the page, so an empty document, but an incomplete object being flushed)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
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
1 sibling, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2006-04-05 20:52 UTC (permalink / raw)
nico wrote:
> It seems to be related to some font loading stuff, since when I don't put
> \ss I haven't this. So, if I put the following in the test I have no more
> the problem.
>
strange, here it shows twice the same size
\starttext
{\tracingall\setbox0\hbox{\ss 99}\the\wd0}
\stoptext
may give some info where a blank space (or so) creeps in
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-05 20:52 ` Hans Hagen
@ 2006-04-05 23:06 ` nico
2006-04-06 0:20 ` nico
1 sibling, 0 replies; 15+ messages in thread
From: nico @ 2006-04-05 23:06 UTC (permalink / raw)
On Wed, 05 Apr 2006 22:52:33 +0200, Hans Hagen <pragma@wxs.nl> wrote:
> nico wrote:
>> It seems to be related to some font loading stuff, since when I don't
>> put
>> \ss I haven't this. So, if I put the following in the test I have no
>> more
>> the problem.
>>
> strange, here it shows twice the same size
>
> \starttext
> {\tracingall\setbox0\hbox{\ss 99}\the\wd0}
> \stoptext
>
> may give some info where a blank space (or so) creeps in
Ok, you don't need to waste your time with this minor thing (that you
cannot reproduce). Within the long verbose log there is:
{into \box0=
\hbox(8.333+0.0)x15.66658 []}
{vertical mode: \setbox}
{entering hbox group (level 2) at line 2}
In fact a second setbox after gives:
{leaving hbox group (level 2) entered at line 2}
{changing \box0=
\hbox(8.333+0.0)x15.66658 []}
{into \box0=
\hbox(8.333+0.0)x11.74997 []}
{vertical mode: end-group character }}
If you are still interested I can send you the full bzipped log (15KB),
but you can stay at this step since I've an easy workaround. Thanks for
your patience.
Regards,
BG
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
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
1 sibling, 1 reply; 15+ messages in thread
From: nico @ 2006-04-06 0:20 UTC (permalink / raw)
On Wed, 05 Apr 2006 22:52:33 +0200, Hans Hagen <pragma@wxs.nl> wrote:
> nico wrote:
>> It seems to be related to some font loading stuff, since when I don't
>> put
>> \ss I haven't this. So, if I put the following in the test I have no
>> more
>> the problem.
>>
> strange, here it shows twice the same size
>
> \starttext
> {\tracingall\setbox0\hbox{\ss 99}\the\wd0}
> \stoptext
>
> may give some info where a blank space (or so) creeps in
Looking at the log, I've found blank spaces after "\pdfobj reserveobjnum"
in enco-pfr.tex. Removing them makes the file compile ok (the bubbles are
all the same :-).
\def\dodoincludepdffontresource
{% does this font has an encoding specified vector
\doifsomething\currentencoding % no \ifx
{% is there a pdf font encoding resource file defined
\ifcsname\pdffontresource\endcsname
% (fake) object defined
\else\ifcsname\pdffontfileresource\endcsname
% is there a resource already included
\doifsomething\pdffontfileresource
% --> {\pdfobj reserveobjnum {}% <-- blank space
{\pdfobj reserveobjnum{}%
\setxvalue\pdffontresource{\the\pdflastobj}%
\flushatshipout{\dododoincludepdffontresource{\currentencoding}}}%
% \doglobal\appendetoks
% \noexpand\dododoincludepdffontresource{\currentencoding}%
% \to \everybeforeshipout}% prevent multiple loading
\fi\fi
\ifcsname\pdffontresource\endcsname
\expanded{\pdffontattr\font{/ToUnicode
\csname\pdffontresource\endcsname\space0 R}}%
% do it only once for each font
\letgvalue{\s!ucmap\fontfile}\empty
\fi}}
...
\def\dodoincludepdffontresource
{\doifsomething\currentencoding % no \ifx
{\expandafter\ifx\csname\pdffontresource\endcsname\relax
\expandafter\ifx\csname\pdffontfileresource\endcsname\relax\else
\doifsomething\pdffontfileresource
% --> {\pdfobj reserveobjnum {}% <-- blank space
{\pdfobj reserveobjnum{}%
\setxvalue\pdffontresource{\the\pdflastobj}%
\flushatshipout{\dododoincludepdffontresource{\currentencoding}}}%
% \doglobal\appendetoks
% \noexpand\dododoincludepdffontresource{\currentencoding}%
% \to \everybeforeshipout}% prevent multiple loading
\fi
\fi
\expandafter\ifx\csname\pdffontresource\endcsname\relax\else
\expanded{\pdffontattr\font{/ToUnicode
\csname\pdffontresource\endcsname\space0 R}}%
% do it only once for each font
\letgvalue{\s!ucmap\fontfile}\empty
\fi}}
Regards,
BG
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Extending the black circled numbers
2006-04-06 0:20 ` nico
@ 2006-04-06 8:17 ` Hans Hagen
0 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2006-04-06 8:17 UTC (permalink / raw)
nico wrote:
> On Wed, 05 Apr 2006 22:52:33 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>
>> nico wrote:
>>
>>> It seems to be related to some font loading stuff, since when I don't
>>> put
>>> \ss I haven't this. So, if I put the following in the test I have no
>>> more
>>> the problem.
>>>
>>>
>> strange, here it shows twice the same size
>>
>> \starttext
>> {\tracingall\setbox0\hbox{\ss 99}\the\wd0}
>> \stoptext
>>
>> may give some info where a blank space (or so) creeps in
>>
>
> Looking at the log, I've found blank spaces after "\pdfobj reserveobjnum"
> in enco-pfr.tex. Removing them makes the file compile ok (the bubbles are
> all the same :-).
>
indeed ... that code has been 'adapted' to the latest pdftex recently;
clever deduction, once you can read such logs, you're an expert
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2006-04-06 8:17 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-03 22:52 Extending the black circled numbers nico
2006-04-04 9:40 ` Taco Hoekwater
2006-04-04 18:42 ` nico
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
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).