On 12/3/2025 8:18 PM, Jim wrote:
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.)

\letterpercent or \percent

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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