Hi David,

On Wed, Dec  3, 2025 at 14:41 (-0500), Alan Caruanambo wrote:

> How can I center the numbers so they display correctly?

I'm getting the impression that I run a different version of ConTeXt than
other people, or that there is something otherwise weird on my system.

When I run the code below, the '8' of '80%' and the '%' of '20%' are very
near the edge of the circle, but they are wholly contained in the circle.
I have no idea why your output is different.  See the attached PDF.

I am not an MP user, so I am afraid you will have to wait until some MP
wizard (or maybe even an MP guru or user) sees your question.

Good luck.

                                Jim

> El mié, 3 dic 2025 a la(s) 2:21 p.m., Jim ([email protected]) escribió:

>> Hi Alan,

>> On Wed, Dec  3, 2025 at 18:46 (-0000), [email protected] wrote:

>>> Hello list, how can I modify my code to add the percentage symbol (%) to
>> the number?

>>> \startTEXpage
>>>   \startMPcode
>>> draw lmt_chart_circle [
>>> samples = { { 80, 20 } },
>>> percentage = true,
>>> trace = false,
>>> labelcolor = "white",
>>>   % labelformat = "@0.1f"
>>>   ] ;
>>>   \stopMPcode
>>> \stopTEXpage

>> Here is one way

>> \startTEXpage
>>   \startMPcode
>> draw lmt_chart_circle [
>> samples = { { 80, 20 } },
>> percentage = true,
>> trace = false,
>> labelcolor = "white",
>> labelformat = "@0.1f\char37"
>>   ] ;
>>   \stopMPcode
>> \stopTEXpage

>> Probably there are nicer ways.

>> (37 is %'s ASCII code.)

>> Cheers.
>> Jim


>> ___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an entry
>> to the Wiki!

>>> maillist : [email protected] /
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>>> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net
>> (mirror)
>>> archive  : https://github.com/contextgarden/context
>>> wiki     : https://wiki.contextgarden.net

>> ___________________________________________________________________________________

>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!

>> maillist : [email protected] /
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki     : https://wiki.contextgarden.net

>> ___________________________________________________________________________________




> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the 
> Wiki!

> maillist : [email protected] / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Attachment: output.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to