summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:12:51 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-03 13:12:51 +0000
commit5bbe15e9a12a7f0e669dbca67001fcd0e0f2aa48 (patch)
tree8ac5dda3f30da6b7088d9fabc6c1e0bd2d4827ac /Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
parentb4bf58caca096bc3377bc47cf94db66069316dcf (diff)
xepersian v1.1.6
git-svn-id: svn://tug.org/texlive/trunk@23383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty26
1 files changed, 14 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
index 37d138f3526..6b624cb6b9c 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
+++ b/Master/texmf-dist/tex/xelatex/xepersian/xepersian-multiplechoice.sty
@@ -20,22 +20,26 @@
\RequirePackage{ifthen}
\RequirePackage{calc}
\RequirePackage{verbatim}
-\RequirePackage{multicol}
+\RequirePackage{tabularx}
\def\@headerfont{\bfseries}
\newcommand\headerfont[1]{\gdef\@headerfont{#1}}
\def\@X{X}
\newcommand\X[1]{\gdef\@X{#1}}
\def\pbs#1{\let\tmp=\\#1\let\\=\tmp}
+\newcolumntype{D}{>{\pbs\centering}X}
+\newcolumntype{Q}{>{\@headerfont}X}
+
+\renewcommand\tabularxcolumn[1]{m{#1}}
\newcommand\makeform@nocorrection{%
- \addtocontents{frm}{\protect\end{tabular}}
+ \addtocontents{frm}{\protect\end{tabularx}}
\@starttoc{frm}}
\newcommand\makeform@correction{%
- \addtocontents{frm}{\protect\end{tabular}}}
+ \addtocontents{frm}{\protect\end{tabularx}}}
\newcommand\makemask@nocorrection{%
- \addtocontents{msk}{\protect\end{tabular}}
+ \addtocontents{msk}{\protect\end{tabularx}}
\@starttoc{msk}}
\newcommand\makemask@correction{%
- \addtocontents{msk}{\protect\end{tabular}}}
+ \addtocontents{msk}{\protect\end{tabularx}}}
\newlength\questionspace
\setlength\questionspace{0pt}
\newcommand\answerstitle[1]{\gdef\@answerstitle{#1}}
@@ -48,21 +52,21 @@
\def\@initorcheck{%
\xdef\@choices{\the@choice}%
\setcounter{@choice}{1}%
- \gdef\@arraydesc{|l||}%
+ \gdef\@arraydesc{|Q||}%
\gdef\@headerline{}%
\whiledo{\not{\value{@choice}>\@choices}}{
- \xdef\@arraydesc{\@arraydesc c|}
+ \xdef\@arraydesc{\@arraydesc D|}
\def\@appendheader{\g@addto@macro\@headerline}
\@appendheader{&\protect\@headerfont}
\edef\@the@choice{{\alph{@choice}}}
\expandafter\@appendheader\@the@choice
\stepcounter{@choice}}%
\addtocontents{frm}{%
- \protect\begin{tabular}{\@arraydesc}
+ \protect\begin{tabularx}{\protect\linewidth}{\@arraydesc}
\protect\hline
\@headerline\protect\\\protect\hline\protect\hline}%
\addtocontents{msk}{%
- \protect\begin{tabular}{\@arraydesc}
+ \protect\begin{tabularx}{\protect\linewidth}{\@arraydesc}
\protect\hline
\@headerline\protect\\\protect\hline\protect\hline}%
\gdef\@initorcheck{%
@@ -80,11 +84,9 @@
\fbox{\parbox[c]{\linewidth}{#1}}
\vspace\questionspace\par
{\@answerstitlefont\@answerstitle}
-\begin{multicols}{4}
\begin{list}{\@answernumberfont\alph{@choice})~}{\usecounter{@choice}}}{%
%% \end{question}
\end{list}
-\end{multicols}
\@initorcheck%
\addtocontents{frm}{\@formanswerline\protect\\\protect\hline}%
\addtocontents{msk}{\@maskanswerline\protect\\\protect\hline}%
@@ -148,7 +150,7 @@
\questiontitle{سؤال \thequestion:}
\ProcessOptions
%%
-%% Copyright © 2008–2011 Vafa Khalighi <vafakhlgh@gmail.com>
+%% Copyright © 2008–2011 Vafa Khalighi <vafa018@gmail.com>
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of