\documentclass[fontsize=15pt]{scrbook}
\usepackage[left=1.00cm, right=1.00cm, top=1.00cm, bottom=1.00cm]{geometry}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tabularx,tabulary}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\tcbuselibrary{breakable}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri}
\renewcommand{\theequation}{\arabic{equation}}% without it I get the (0.1) (0.2)
\newtcolorbox{myremark}[1]{%
attach boxed title to top right={yshift=-2mm},
coltitle=black,colbacktitle=red!45!white,enhanced,
fonttitle=\bfseries,
title=#1,
colframe=red!75!black,
colback=yellow!80,
}
\begin{document}
hello \textarabic{السلام عليكم} how are you
\begin{myremark}{\textarabic{ملاحظة}}
\begin{Arabic}
مثال على الرياضيات باللغة العربية
\end{Arabic}
\begin{equation}
\frac{d}{dx}(\sin x) = \cos x
\end{equation}
\end{myremark}
\begin{myremark}{\textarabic{ملاحظة}}
\begin{Arabic}
مثال على الرياضيات باللغة العربية
\end{Arabic}
\begin{equation}
\frac{d}{dx}(\sin x) = \cos x
\end{equation}
\end{myremark}
\end{document}
I get the parentheses like this )1( and )2(
答案1
\documentclass[fontsize=15pt]{scrbook}
\usepackage[left=1.00cm, right=1.00cm, top=1.00cm, bottom=1.00cm]{geometry}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tabularx,tabulary}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\tcbuselibrary{breakable}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri}
\newtcolorbox{myremark}[1]{%
attach boxed title to top right={yshift=-2mm},
coltitle=black,colbacktitle=red!45!white,enhanced,
fonttitle=\bfseries,
title=#1,
colframe=red!75!black,
colback=yellow!80,
}
\renewcommand{\theequation}{\arabic{equation}} % Revert to default Arabic numbering style for equations
\makeatletter
\def\tagform@#1{\maketag@@@{\normalfont\upshape(#1)}} % Ensure equation numbers are always upright
\makeatother
\begin{document}
hello \textarabic{السلام عليكم} how are you
\begin{myremark}{\textarabic{ملاحظة}}
\begin{Arabic}
مثال على الرياضيات باللغة العربية
\end{Arabic}
\begin{equation}
\frac{d}{dx}(\sin x) = \cos x
\end{equation}
\end{myremark}
\begin{myremark}{\textarabic{ملاحظة}}
\begin{Arabic}
مثال على الرياضيات باللغة العربية
\end{Arabic}
\begin{equation}
\frac{d}{dx}(\sin x) = \cos x
\end{equation}
\end{myremark}
\end{document}