3

I use the wheelchart package https://ctan.org/pkg/wheelchart?lang=en. I'm trying to get the "contour" key to work. When I create the example without "contour" everything works, as soon as I add "contour", I get the error:

Undefined control sequence. } TeX capacity exceeded, sorry [input stack size=10000]. }

Here's the code copied from the manual:

\documentclass[tikz]{standalone}
\ExplSyntaxOn
\cs_generate_variant:Nn
\tl_gset:Nn {Ne}
\cs_generate_variant:Nn \str_case:nnF {enF}
\cs_generate_variant:Nn \tl_set:Nn {Ne}
\cs_generate_variant:Nn \regex_match:nnTF {nVTF} 
\cs_generate_variant:Nn \str_case:nn {en} 
\cs_generate_variant:Nn \clist_gput_right:Nn {Ne} 
\cs_generate_variant:Nn \clist_put_right:Nn {ce} 
\cs_set_eq:NN \cs_set:Npe 
\cs_set:Npx \cs_set_eq:NN 
\cs_set:cpe \cs_set:cpx
\ExplSyntaxOff
\usepackage{wheelchart}

\begin{document} \begin{tikzpicture} \colorlet{good}{green!75!black} \colorlet{bad}{red} \colorlet{neutral}{black!60} \colorlet{none}{white} \wheelchart[ anchor xsep=15, contour=gray, data={“\WCvarC”: \WCvarA{} (\WCperc)}, middle={Ratings given by\\pgfmathprintnumber{\WCtotalnum}~participants}, radius={1.8}{2.2}, start half=270, wheel lines={black!15,thick} ]{% 10/neutral/ok, 9/good!60!white/good, 3/good/{very good}, 20/none/none, 0/bad/{very bad}, 8/bad!60!white/bad% } \end{tikzpicture} \end{document}

1 Answers1

3

Then the version of expl3 is not up to date enough. It is probably sufficient to add the two lines marked in the code below with %added at the end.

enter image description here

\documentclass[border=6pt]{standalone}
\ExplSyntaxOn
\cs_generate_variant:Nn \tl_gset:Nn { Ne }
\cs_generate_variant:Nn \str_case:nnF { enF }
\cs_generate_variant:Nn \tl_set:Nn { Ne }
\cs_generate_variant:Nn \regex_match:nnTF { nVTF }
\cs_generate_variant:Nn \str_case:nn { en }
\cs_generate_variant:Nn \clist_gput_right:Nn { Ne }
\cs_generate_variant:Nn \clist_put_right:Nn { ce }
\cs_generate_variant:Nn \tl_build_gput_left:Nn { Ne }%added
\cs_generate_variant:Nn \tl_build_gput_right:Nn { Ne }%added
\cs_set_eq:NN \cs_set:Npe \cs_set:Npx
\cs_set_eq:NN \cs_set:cpe \cs_set:cpx
\ExplSyntaxOff
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\colorlet{good}{green!75!black}
\colorlet{bad}{red}
\colorlet{neutral}{black!60}
\colorlet{none}{white}
\wheelchart[
    anchor xsep=15,
    contour=gray,
    data=``\WCvarC'': \WCvarA{} (\WCperc),
    middle=Ratings given by\\\WCtotalnum{} participants,
    radius={1.8}{2.2},
    start half=270,
    wheel lines={black!15,thick}
]{%
    10/neutral/ok,
    9/good!60!white/good,
    3/good/very good,
    20/none/none,
    0/bad/very bad,
    8/bad!60!white/bad%
}
\end{tikzpicture}
\end{document}
matexmatics
  • 4,819
  • Thanks, it works perfectly! I have the pdfTeX 3.141592653-2.6-1.40.25 version (TeX Live 2023). How can I get a more up-to-date expl3 version? (thanks for the fast reply and the very useful package) – Nicolas Andre Feb 01 '24 at 21:02
  • @NicolasAndre Thank you! See for example this question: https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution – matexmatics Feb 01 '24 at 23:18