ConTeXt:TikZ foreach 与法语模块交互

ConTeXt:TikZ foreach 与法语模块交互

TikZ 中的语句\foreach正在移动我的 ConTeXt 图形中的坐标;经过一些实验,我发现它是由两个指令引起的\usemodule[french]\setcharacterspacing[frenchpunctuation]任何一条指令都会导致问题)。以下是 MWE 和结果:

\usemodule[tikz]
\starttext
\starttikzpicture[declare function={a=1; dth=90;}]
  \foreach \i in {0, 1, ..., 3} {
    \draw (\i*dth: a) ++ ({(\i-0.5)*dth}: a) coordinate (A-\i)
    arc ({(\i-0.5)*dth}: {(\i+0.5)*dth}: a) coordinate (B-\i);
  };
  \foreach \i/\j in {0/1, 1/2, 2/3, 3/0} {
    \draw [thin] (B-\i) -- (A-\j);
  }  
\stoptikzpicture

\usemodule[french]
\setcharacterspacing[frenchpunctuation]
\starttikzpicture[declare function={a=1; dth=90;}]
  \foreach \i in {0, 1, ..., 3} {
    \draw (\i*dth: a) ++ ({(\i-0.5)*dth}: a) coordinate (A-\i)
    arc ({(\i-0.5)*dth}: {(\i+0.5)*dth}: a) coordinate (B-\i);
  };
  \foreach \i/\j in {0/1, 1/2, 2/3, 3/0} {
    \draw [thin] (B-\i) -- (A-\j);
  }  
\stoptikzpicture
\stoptext

结果

TikZ 与 LaTeX 中的法语包之间的交互存在很多问题,但我在论坛上找不到有关此行为的任何信息。我​​尝试了在 LaTeX 中有效的\shorthandoff/对,但 ConTeXt 引发了错误。有解决这个问题的办法吗?\shorthandonUndefined Control Sequence

先感谢您,

相关内容