![带有拉丁数学符号的阿拉伯语](https://linux22.com/image/306523/%E5%B8%A6%E6%9C%89%E6%8B%89%E4%B8%81%E6%95%B0%E5%AD%A6%E7%AC%A6%E5%8F%B7%E7%9A%84%E9%98%BF%E6%8B%89%E4%BC%AF%E8%AF%AD.png)
我想写出如下图所示的数学公式:
例如,我有以下一段代码
\documentclass[10pt,a4paper]{report}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{xunicode}
\usepackage{xcolor}
\usepackage{pifont}
\usepackage{enumitem}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\makeatletter
\newcounter{descriptcount}
\newlist{enumdescript}{description}{2}
\setlist[enumdescript,1]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\Roman{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\setlist[enumdescript,2]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\alph{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\begin{document}
\begin{Arabic}
\begin{enumdescript}
\item [\textbf{{\textarabic{محسن }}}]
\
\begin{itemize}
\item \textarabic{محسن محسن محسن محسن} \hfill $$f(x)=\begin{cases}
\sum\limits_{i=1}^{s} x^{i} & \textarabic{إذا كان} x < 0\\
\\
\int\limits_{i=1}^{s} x^{i} dx & \textarabic{إذا كان} x > 0\\
\\
\textrm{tg}(x) & {غير ذلك} (\pi\sim 3.141 \textarabic{مع} )\end{cases}$$
\end{enumdescript}
\end{Arabic}
\end{document}
产生
答案1
您必须切换到文本模式:
\documentclass[10pt,a4paper]{report}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{xunicode}
\usepackage{xcolor}
\usepackage{pifont}
\usepackage{enumitem}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\makeatletter
\newcounter{descriptcount}
\newlist{enumdescript}{description}{2}
\setlist[enumdescript,1]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\Roman{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\setlist[enumdescript,2]{%
before={\setcounter{descriptcount}{0}%
\renewcommand*\thedescriptcount{\alph{descriptcount}}}
,font=\bfseries\stepcounter{descriptcount}\thedescriptcount~
}
\begin{document}
\begin{Arabic}
\begin{enumdescript}
\item [\textbf{{\textarabic{محسن }}}]\mbox{}
\begin{itemize}
\item \textarabic{محسن محسن محسن محسن} \hfill
\[
f(x)=\begin{cases}
\sum\limits_{i=1}^{s} x^{i} & \text{إذا كان}\quad x < 0\\
\\
\int\limits_{i=1}^{s} x^{i} dx & \text{إذا كان}\quad x > 0\\
\\
\operatorname{tg}(x) & \text{غير ذلك}\quad (\pi\sim 3.141\ \text{مع})
\end{cases}
\]
\end{itemize}
\end{enumdescript}
\end{Arabic}
\end{document}
注意。不要使用$$
,而应该使用\[...\]
。此外,正切函数的名称应该是 的参数\operatorname
。