使用 Latex 编写阿拉伯数学考试

使用 Latex 编写阿拉伯数学考试

我想用 latex 写我的考试。我尝试将我的英语考试转换如下:

\documentclass[12pt,a4paper]{article}

\usepackage{polyglossia}
\setmainlanguage{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Simplified Arabic}

\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm,mathtools,systeme}
\usepackage[tikz]{bclogo}
\usepackage{tikz,tkz-tab,moreverb}
\usetikzlibrary{arrows}
\usepackage{pifont}
\usepackage{fancybox}
\usepackage[usestackEOL]{stackengine}
\usepackage{verbatim}
\usepackage{color}
\usepackage[final]{pdfpages}
\usepackage{awesomebox}
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=2.3cm}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usetikzlibrary{shapes}
\fancypagestyle{mypagestyle}{%
    \renewcommand{\headrulewidth}{0pt}
    \fancyhf{}
    \fancyfoot[C]{\tikz{ \node [rectangle, draw = black] (rectangle) at (0,0) {\thepage/\pageref{LastPage}}   }}
}
\pagestyle{mypagestyle}
\newtheoremstyle{sboxexc}
  {\topsep}
  {\topsep}
  {\itshape}
  {0pt}
  {\bfseries}
  {}
  { }
  {\thmname{#1}}
\newcounter{counter}
\setcounter{counter}{1}
\theoremstyle{sboxexc}
\newcommand{\optionaltext}{}
\newtheorem*{Exc}{\shadowbox{\ding{228} السؤال \arabic{counter}\optionaltext}}
\newcommand{\exo}[2][]{\renewcommand{\optionaltext}{#2}\begin{Exc}\normalfont\mbox{}\par}
\newcommand{\finexo}{\renewcommand{\optionaltext}{}\end{Exc}\addtocounter{counter}{1}}
\newcommand{\isEquivTo}[1]{\underset{#1}{\sim}}
\newcommand*{\transp}[2][-3mu]{\ensuremath{\mskip1mu\prescript{\smash{\mathrm t\mkern#1}}{}{\mathstrut#2}}}%
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\rg}{rg}
\DeclareMathOperator{\vect}{Vect}
\usepackage{enumitem}
\usepackage{tasks}
\NewTasksEnvironment[
  label-width=20pt,
  label=(\alph*),
  before-skip=0.5\topsep,
  after-skip=0.5\topsep,
  after-item-skip=2\itemsep,
]{choices}[\choice]
\definecolor{sfaxlogo}{RGB}{127,176,206}
\colorlet{sfaxblue}{sfaxlogo!70!black!60!blue}
\begin{document}
\mbox{}\begin{figure*}[t]
\scriptsize\bfseries
\leavevmode%
\Longstack{%
المملكة الأردنيّة\\
وزارة التعليم\\
جامعة ....\\
كلية الآداب والعلوم\\
قسم الرياضيات
          }\hfill%
\includegraphics[width=3.0cm,height=2.3cm]{nu2}  \hfill%
\Longstack{%
العام الأكاديمي: 2023-2024 \\
$\dotfill\dotfill\dotfill \star\star\star \dotfill\dotfill\dotfill$\\
عنوان المقرر: مقدمة في التكامل\\
كود المقرر: 106-رياضيات\\
الفصل: 7\\
$\dotfill\dotfill\dotfill \star\star\star \dotfill\dotfill\dotfill$\\
\textbf{\ding{45} أستاذ المسؤول :} د. محمّد محمّد
    }
\end{figure*}

\vspace*{-1.2cm}

\begin{center}
\shadowbox{\parbox{.9\linewidth}{\centering\bfseries
\large امتحان منتصف الفصل 2
\par
12 نوفمبر 2023
\normalfont\textbf{الرياضيات}
}}
\end{center}

\exo{: ($10$ درجات)}
\noindent اختر الإجابة الصحيحة بتحديدها بدائرة الاختيار الصحيح أدناه:

\begin{enumerate}[label=(\arabic*)]
\item $\displaystyle\int \frac{3x^2}{x^3 + 1} dx$ يساوي:
\begin{choices}(2)
\choice $\ln(x^3 + 1) + C$
\choice $3\ln(x^3 + 1) + C$
\choice $\frac{1}{3}\ln(x^3 + 1) + C$
\choice $\ln(x^3) + C$
\end{choices}
حيث $C$ ثابت حقيقي.

\item $\displaystyle\int e^{2x} dx$ يساوي:
\begin{choices}(2)
\choice $\frac{1}{2}e^{2x} + C$
\choice $2e^x + C$
\choice $e^{2x} + C$
\choice $2e^{2x} + C$
\end{choices}
حيث $C$ ثابت حقيقي.

\item تفكيك الكسر الجزئي للتعبير $\frac{5x^2-2x+1}{(x+2)(x-3)}$ يكتب على الشكل:
\begin{choices}(2)
\choice $\frac{A}{x-2} + \frac{B}{x+3}$
\choice $\frac{A}{x+2} + \frac{B}{x-3}$
\choice $\frac{A}{x+2} + \frac{B}{x-2}$
\choice $\frac{A}{x-3} + \frac{B}{x+3}$
\end{choices}
حيث $A$ و $B$ ثوابت حقيقية.
\end{enumerate}

\finexo

%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%
\exo{: ($10$ درجات)}
\noindent أجب ب''صواب'' أو ب''خطأ'' في المقترحات التّالية
\begin{enumerate}[label=(\arabic*)]
\item $\displaystyle\int_{a}^{b} 5dx = 5(b-a)$.\hfill (....)
\item تكامل $\displaystyle\int 2x^2 dx$ يساوي $x^3 + C$, بحيث $C$ قيمة ثابتة.\hfill (....)
\end{enumerate}
\finexo
%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%

\end{document}

但它并没有完成。

这是我原来的英语数学考试模板

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc} % not needed in new latex versions
\usepackage[T1]{fontenc}
\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm,mathtools,systeme}
\usepackage[tikz]{bclogo}
\usepackage{tikz,tkz-tab,moreverb} % tableau de signe moreverb not needed
\usetikzlibrary{arrows}
\usepackage[french]{babel}
\usepackage{pifont} %bouni
\usepackage{fancybox} %pour faire l'encadrement
\usepackage[usestackEOL]{stackengine}
\usepackage{verbatim}
\usepackage{color}
\usepackage[final]{pdfpages} %pour inserer une page pdf
\usepackage{awesomebox} %takecare
%---- Dimensions des marges ---
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.5cm,bottom=2.3cm}
%\usepackage{setspace}
%\onehalfspacing
%---- pages numbers with tikz---
\usepackage{fancyhdr}
\usepackage{lastpage}
\usetikzlibrary{shapes}
\fancypagestyle{mypagestyle}{%
    \renewcommand{\headrulewidth}{0pt}
    \fancyhf{}
    \fancyfoot[C]{\tikz{ \node [rectangle, draw = black] (rectangle) at (0,0) {\thepage/\pageref{LastPage}}   }}
}
\pagestyle{mypagestyle}
%----New Structure Exercice -----
\newtheoremstyle{sboxexc}% name of the style to be used
  {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
  {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
  {\itshape}% name of font to use in the body of the theorem
  {0pt}%  of space to indent
  {\bfseries}% name of head font
  {}% punctuation between head and body
  { }% space after theorem head; " " = normal interword space
  {\thmname{#1}}% Manually specify head
\newcounter{counter}
\setcounter{counter}{1}
\theoremstyle{sboxexc}
\newcommand{\optionaltext}{}
\newtheorem*{Exc}{\shadowbox{\ding{228} Question \arabic{counter}\optionaltext}}
\newcommand{\exo}[2][]{\renewcommand{\optionaltext}{#2}\begin{Exc}\normalfont\mbox{}\par}
\newcommand{\finexo}{\renewcommand{\optionaltext}{}\end{Exc}\addtocounter{counter}{1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\isEquivTo}[1]{\underset{#1}{\sim}}
\newcommand*{\transp}[2][-3mu]{\ensuremath{\mskip1mu\prescript{\smash{\mathrm t\mkern#1}}{}{\mathstrut#2}}}%
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\rg}{rg}
\DeclareMathOperator{\vect}{Vect}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------debut multiple choice------------------
\usepackage{enumitem}
\usepackage{tasks}

\NewTasksEnvironment[
  label-width=20pt,
  label=(\alph*),
  before-skip=0.5\topsep,
  after-skip=0.5\topsep,
  after-item-skip=2\itemsep,
]{choices}[\choice]
%----------------------------Fin multiple choice------------------
\definecolor{sfaxlogo}{RGB}{127,176,206}
\colorlet{sfaxblue}{sfaxlogo!70!black!60!blue}
%\pagestyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%begin entete%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mbox{}\begin{figure*}[t]
\scriptsize\bfseries
\leavevmode%
\Longstack{%
Kingdom of Jordan\\
Ministry of Education\\
%et de la Recherche Scientifique\\
\textbf{-- -- -- $\star\star\star$ -- -- --}\\
...... University\\
\textbf{-- -- -- $\star\star\star$ -- -- --}\\
College of Arts \& Sciences \\
Mathematics department
          }\hfill%
\includegraphics[width=3.0cm,height=2.3cm]{example-image-b} \hfill%
\Longstack{%
Academic Year : 2023-2024 \\
$\dotfill\dotfill\dotfill \star\star\star \dotfill\dotfill\dotfill$\\
Course Title: Introduction to Integral\\
Course Code : $106$-Math\\
 Section: 7\\
$\dotfill\dotfill\dotfill \star\star\star \dotfill\dotfill\dotfill$\\
\textbf{\ding{45} Responsible Professor :} Dr. ......
    }
%-----double trais
%\stackunder[1pt]{\rule{\linewidth}{1.2pt}}
% {\rule{\linewidth}{1.2pt}}
\end{figure*}
%----------------------------------------------
\vspace*{-1.2cm}
%----------------------------------------------
\begin{center}
\shadowbox{\parbox{.9\linewidth}{\centering\bfseries
{\large M}idterm Exam 2\quad
(College of Computer Science
and Information Systems)\par
12 November 2023
\normalfont ( 18:30 \ding{217} 19:30 )
        }}
\end{center}
%\begin{center}
%\shadowbox{\parbox{.9\linewidth}{\centering\bfseries
%{\large M}idterm exam 1\quad
%(Duration: One Hour)
%\par 09 Janvier 2023
%\normalfont ( 8h.30 \ding{217} 10h.30 )
  %      }}
%\end{center}
%----------------------------------------------------------------%
\noindent
\begin{tabular}[t]{@{}c@{}}
\makebox[\textwidth][s]{%
\small
  \begin{tabular}{@{}l@{}}
\textbf{Name :} ...................................................  \\
\textbf{Academic Number :}  ...........................
  \end{tabular}
  \hfill
%\begin{tabular}{@{}c@{}}
  %\includegraphics[height=3\normalbaselineskip]{fsegma}
%\end{tabular}
%\hfill
\begin{tabular}{@{}r@{}}
\textbf{Serial Number: }...........................%\\
%\textbf{Durée :} $45$ minutes
\end{tabular}%
}
\end{tabular}
%%%%%%%%%%%%%%%%%%%%%%%%%%%end entete%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{-0.5cm}
%-------attention-----
\begin{center}
\begin{bclogo}[logo=\bcattention,noborder=true]{}
\textit{No documents are allowed. Answer all the exam questions. Your writing's clarity and precision will be considered.}
\end{bclogo}
\end{center}
%-------fin attention-----
\vspace{-0.7cm}
%%%%%%%%%%%%%%%%debut exercice%%%%%%%%%%%%%%%%%%%
\exo{: ($10$ Marks)}
\noindent Choose the one correct answer by circling it below:

\begin{enumerate}[label=(\arabic*)]
\item $\displaystyle\int \frac{3x^2}{x^3 + 1} dx$ is equal to:
\begin{choices}(2)
\choice $\ln(x^3 + 1) + C$
\choice $3\ln(x^3 + 1) + C$
\choice $\frac{1}{3}\ln(x^3 + 1) + C$
\choice $\ln(x^3) + C$
\end{choices}
Here $C$ is any real constant.

\item $\displaystyle\int e^{2x} dx$ is equal to:
\begin{choices}(2)
\choice $\frac{1}{2}e^{2x} + C$
\choice $2e^x + C$
\choice $e^{2x} + C$
\choice $2e^{2x} + C$
\end{choices}
Here $C$ is any real constant.
\item The partial fraction decomposition of $\frac{5x^2-2x+1}{(x+2)(x-3)}$ is expressed as:
\begin{choices}(2)
\choice $\frac{A}{x-2} + \frac{B}{x+3}$
\choice $\frac{A}{x+2} + \frac{B}{x-3}$
\choice $\frac{A}{x+2} + \frac{B}{x-2}$
\choice $\frac{A}{x-3} + \frac{B}{x+3}$
\end{choices}
Here $A$ and $B$ are real constants.
\end{enumerate}
\finexo
%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%
\exo{: ($4$ Marks)}
\noindent Answer using ``T'' for True or ``F'' for False for the given statements:
\begin{enumerate}[label=(\arabic*)]
\item $\displaystyle\int_{a}^{b} 5dx = 5(b-a)$, where $a$ and $b$ are any real constants.\hfill (....)
\item The integral $\displaystyle\int 2x^2 dx$ is equal to $x^3 + C$, where $C$ is a real constant.\hfill (....)
\end{enumerate}
\finexo
%%%%%%%%%%%%%%%% fin exercice%%%%%%%%%%%%%%%%%%%
\end{document} 

我的目标是遵循我的英语模板并用阿拉伯语进行考试。

相关内容