0

Please how to write "name of theorem" behind " نظرية"

\documentclass[12pt,a4paper]{book}
\usepackage[arabic]{minitoc}

\usepackage[most]{tcolorbox}
\usepackage[pdfstartview=FitH,citecolor=red,colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}
\hypersetup{linktocpage}

\newtcolorbox[auto counter,number within=section,number freestyle={\noexpand\arabic{chapter}.\noexpand\arabic{\tcbcounter}.}]{theorem}[2][]{
  breakable,
  enhanced,
  colback=violet!3!white,
  boxrule=0.5pt,
  arc=0.5pt,
  outer arc=0.5pt,
  title=نظرية~\thetcbcounter,
  label=#2
  fonttitle=\bfseries\strut,
  coltitle=purple,
  colbacktitle=violet!10!white,
  title style={
right color=violet!60!white,
    left color=teal!20!white,
    middle color=violet!30!teal!20!, 
     }, #1}{}
 
%======================================================== 
% languages & fonts===========================================
\usepackage[numbers]{natbib}

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

\setcounter{minitocdepth}{1}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Amiri}
%%


\begin{document}

\begin{theorem}{2}{name of theorem}
text
\end{theorem}
\ref{2}
\end{document}

1 Answer 1

4

Not sure this is what you like, I don't know Arabic rules:

\documentclass[12pt,a4paper]{book}
\usepackage[arabic]{minitoc}

\usepackage[most]{tcolorbox}
\usepackage[pdfstartview=FitH,citecolor=red,colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}
\hypersetup{linktocpage}

\newtcolorbox[auto counter,number within=section,number freestyle={\noexpand\arabic{chapter}.\noexpand\arabic{\tcbcounter}.}]{theorem}[3][]{
  breakable,
  enhanced,
  colback=violet!3!white,
  boxrule=0.5pt,
  arc=0.5pt,
  outer arc=0.5pt,
  title=نظرية~\thetcbcounter~#3,
  label=#2,
  fonttitle=\bfseries\strut,
  coltitle=purple,
  colbacktitle=violet!10!white,
  title style={
right color=violet!60!white,
    left color=teal!20!white,
    middle color=violet!30!teal!20!, 
     }, #1}{}
 
%======================================================== 
% languages & fonts===========================================
\usepackage[numbers]{natbib}

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

\setcounter{minitocdepth}{1}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Amiri}
%%


\begin{document}

\begin{theorem}{2}{name of theorem}
text
\end{theorem}
\ref{2}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .