3

This package is a modified version of the "exam" package, compatible with the Arabic language (via XeLaTeX/polyglossia) for exams

In the link there are the package files, but no one worked. https://www.ctan.org/tex-archive/macros/xetex/latex/sexam

could one fix the problem?

% !TEX TS-program = XeLaTeX
\documentclass[12pt]{exam}
\usepackage{bacex}
%--------------------info---------------------
\newcommand{\alg}{\bf الجمهورية الجزائرية الديمقراطية الشعبية}
\newcommand{\gov}{\bf وزارة التربية الوطنية \hfill   الديوان الوطني للامتحانات و المسابقات}
\newcommand{\bac}{\bf امتحـان بكالوريا التعليم الثانوي 
  \hfill 
   دورة :  
جوان 2017
}
\newcommand{ \duree }{\bf المدة :}
\newcommand{ \niveau }{\bf 
الشعبة : 
تقني رياضي }
\newcommand{ \exam }{\bf اختبار في مادة : }
%--------------------------------------------------------------------------
\begin{document} 
%---------------------------------------------------------------
\begin{center}
\alg  
\\
\gov 
\\
\bac
\end{center}
{\niveau}

\rule{\textwidth}{1.4pt}\\[-2pt]
\centerline{ \exam 
الرياضيات
  \hfill  
\duree 
04 سا و 30 د }\\[-8pt]
\rule{\textwidth}{1.4pt}
%----------------------------------------------
\choi   %           اختيار الموضوعين
\\
%---------------------------------------
\one              % الموضوع  الأول
%----------------------------------------------
\vspace{0.6cm}
%--------------------------------------------------
\begin{questions}

\question [04]    %التمرين الأول
الفضاء منسوب إلى المعلم المتعامد المتجانس 
$\left(O;\overrightarrow{i};\overrightarrow{j};\overrightarrow{k}\right)$ 
.
\\

نعتبر النقط 
$A(0;-1;2)$
،
$B(3;2;5)$
،
$C(3;-1;-1)$
و
$D(-3;5;-1)$
\\

ليكن 
$(P)$
و
$(Q)$
المستويين اللذان معادلتاهما على الترتيب :
$x+y+z-1=0$
و
$x-z+2=0$
\end{questions}
\end{document}
5
  • Can you post a MWE of your code?
    – MadyYuvi
    Dec 22 '20 at 13:46
  • I didn't do any code, am still trying to run the package files. just the PDF files work. I mean could you run the sexam_wexam_doc_ar.tex for example. Dec 22 '20 at 13:51
  • 1
    don't just say "it doesn't work" show the exact error from the log file, For me in texlive2020 your example worked without error except I don't have the font so I got ! Package fontspec Error: The font "Simplified Arabic" cannot be found. Dec 22 '20 at 14:30
  • @DavidCarlisle , I turned the code on TeXstudio but didn't get me-result- just waiting!!!!, then I tried to run the code on TeXWork , was fine-no errors-. but the question now is why didn't the TeXstudio work? Dec 23 '20 at 20:34
  • @MamounMohammed texstudip and texworks are simply text editors they do not affect the errors that are produced by tex but you may have the paths set up so latex doesn't start properly from texstudio Dec 23 '20 at 20:40
4

Your example works without error in texlive other than the font Simplified Arabic is not available (to me at least) so you get the error

! Package fontspec Error: The font "Simplified Arabic" cannot be found.

three times. You could edit a local copy to use a font that you do have, or as below locally redefine the font declaration so the font definition in the bacex package is ignored.

\documentclass[12pt]{exam}
\usepackage{fontspec}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Arial}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.3]{Arial}
\newfontfamily\arabicfonttt[Script=Arabic,Scale=0.8]{Arial}
\let\zz\newfontfamily
\def\newfontfamily#1[#2]#3{}
\usepackage{bacex}
\let\newfontfamily\zz
%--------------------info---------------------
\newcommand{\alg}{\bf الجمهورية الجزائرية الديمقراطية الشعبية}
\newcommand{\gov}{\bf وزارة التربية الوطنية \hfill   الديوان الوطني للامتحانات و المسابقات}
\newcommand{\bac}{\bf امتحـان بكالوريا التعليم الثانوي 
  \hfill 
   دورة :  
جوان 2017
}
\newcommand{ \duree }{\bf المدة :}
\newcommand{ \niveau }{\bf 
الشعبة : 
تقني رياضي }
\newcommand{ \exam }{\bf اختبار في مادة : }
%--------------------------------------------------------------------------
\begin{document} 
%---------------------------------------------------------------
\begin{center}
\alg  
\\
\gov 
\\
\bac
\end{center}
{\niveau}

\rule{\textwidth}{1.4pt}\\[-2pt]
\centerline{ \exam 
الرياضيات
  \hfill  
\duree 
04 سا و 30 د }\\[-8pt]
\rule{\textwidth}{1.4pt}
%----------------------------------------------
\choi   %           اختيار الموضوعين
\\
%---------------------------------------
\one              % الموضوع  الأول
%----------------------------------------------
\vspace{0.6cm}
%--------------------------------------------------
\begin{questions}

\question [04]    %التمرين الأول
الفضاء منسوب إلى المعلم المتعامد المتجانس 
$\left(O;\overrightarrow{i};\overrightarrow{j};\overrightarrow{k}\right)$ 
.
\\

نعتبر النقط 
$A(0;-1;2)$
،
$B(3;2;5)$
،
$C(3;-1;-1)$
و
$D(-3;5;-1)$
\\

ليكن 
$(P)$
و
$(Q)$
المستويين اللذان معادلتاهما على الترتيب :
$x+y+z-1=0$
و
$x-z+2=0$
\end{questions}
\end{document}

I used Arial here: I can not read this script but it hopefully looks as intended.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.