Tcolorbox에서 카운터를 10씩 늘리고... 추천이 좋나요?

Tcolorbox에서 카운터를 10씩 늘리고... 추천이 좋나요?

나는 폴리글로시아를 사용하여 아랍어로 확률에 관한 책을 쓰고 있는데, 내 상자 중 일부의 카운터를 10씩 늘리고 싶습니다. (이의 원인은 아랍어 문자가 abjad로 계산되어 9번째 첫 번째 숫자의 1을 사용하기 때문입니다. 문자는 다음 9번째 문자에 10을 사용하고 다음 9번째 문자에 100을 사용하고 28번째와 마지막 문자에 1000을 사용한 후... 이 위키피디아를 프랑스어로 볼 수 있습니다. 다른 출처는 없습니다...http://fr.wikipedia.org/wiki/Num%C3%A9ration_arabe).. 내가 찾은 해결책은 명령을 사용하여 반복할 때마다 카운터를 9씩 늘리는 것입니다. phantom={\addtocounter{\tcbcounter}{9}}그러나 이 상자의 레이블은 이 명령 이전의 카운터를 참조합니다... 문서에서 이것이 자연스럽다는 것을 보았습니다. tcolorbox 패키지 중 .. 내 항목에 9를 추가한 후 예제의 레이블을 레이블에 어떻게 참조할 수 있습니까? 또는 다른 아이디어입니다. 감사합니다. 내 파일의 예는 다음과 같습니다.

\documentclass[14pt,a4paper]{extbook}

\usepackage{titlesec}


\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}


\usepackage{boxedminipage}
\usepackage{slashbox}

\usepackage{titlesec}


\usepackage{enumitem}

\usepackage{minitoc}

\usepackage{rotating}

\usepackage{fmultico}
\setlength{\columnseprule}{0.1pt}

\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage{pdflscape}

\usepackage{array}


\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}

\newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Amiri}
\setsansfont[Script=Arabic,Scale=1.5]{Amiri}


\tikzstyle{boxwhite} =
    [draw=white, thick, scale=.7, fill=white,
        line width=0.1pt, text=black, rectangle,
        font=\Large,
        left, minimum height=.5cm]

\newcounter{example}

\newtcolorbox[auto counter, 
number within=section,
number freestyle={\noexpand\arabic{section}\noexpand\alph{\tcbcounter}}]{example}[2][]{
enhanced,
colback=white,
colframe=white,
top=-.7cm,
bottom=-2mm,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
label={#2},
overlay unbroken and first={
\node[boxwhite]
at ([xshift=1.4cm,yshift=-.15cm]frame.north east)
{\strut\RL{\setlength{\extrarowheight}{-30.5pt}\textbf{$\begin{array}{c}
\hline
\rule{0pt}{2ex}
\mbox{\RL{مثال}}
\\
\mbox{\large\thetcbcounter}
\rule{0pt}{1.5ex}
\end{array}$}}};},
breakable,
width=1.048\textwidth,       
arc=0pt,outer arc=0pt,
enlarge left by=-.085\textwidth,
extrude right by=-5pt,
extrude left by=-5pt,
#1}%

\newtcolorbox[use counter from=example]{example9}[2][]{
enhanced,
phantom={\addtocounter{\tcbcounter}{9}},
colback=white,
colframe=white,
top=-.7cm,
bottom=-2mm,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,pad at break=2mm,
fontupper=\normalsize,
label={#2},
overlay unbroken and first={%
\node[boxwhite]
at ([xshift=1.4cm,yshift=-.15cm]frame.north east)
{\strut\RL{\setlength{\extrarowheight}{-30.5pt}\textbf{$\begin{array}{c}
\hline
\rule{0pt}{2ex}
\mbox{\RL{مثال}}
\\
\mbox{\large\thetcbcounter}
\rule{0pt}{1.5ex}
\end{array}$}}};},
breakable,
width=1.048\textwidth,      
arc=0pt,outer arc=0pt,
enlarge left by=-.085\textwidth,
extrude right by=-5pt,
extrude left by=-5pt,
#1}%
\begin{document}

\begin{example}{ex0:a}
First 
\end{example}
\begin{example}{ex0:b}
Second 
\end{example}
\begin{example}{ex0:c}
....
\end{example}
\begin{example}{ex0:d}
....
\end{example}
\begin{example}{ex0:e}
....
\end{example}
\begin{example}{ex0:f}
....
\end{example}
\begin{example}{ex0:g}
....
\end{example}
\begin{example}{ex0:h}
....
\end{example}
\begin{example}{ex0:i}
....
\end{example}
\begin{example}{ex0:j}
....
\end{example}
\begin{example9}{ex0:k}
\LR{A good numeroted}
\end{example9}
\begin{example}{ex0:l}
\LR{A bad numeroted}
\end{example}
\LR{but the reference \ref{ex0:k} of the ten-th exercise is bad...}

 \end{document}

답변1

카운터를 참조하려면 씩 늘려야 합니다 \refstepcounter. 이는 레이블에서 사용하는 내부 명령을 변경합니다.

따라서 카운터를 늘려야합니다.

\addtocounter{\tcbcounter}{8}\refstepcounter{tcbcounter}}

마지막 단계에서 올바른 작업을 수행하도록 합니다.

관련 정보