texlive[63977] Master: kfupm-math-exam (25jul22)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 25 21:37:23 CEST 2022


Revision: 63977
          http://tug.org/svn/texlive?view=revision&revision=63977
Author:   karl
Date:     2022-07-25 21:37:23 +0200 (Mon, 25 Jul 2022)
Log Message:
-----------
kfupm-math-exam (25jul22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/
    trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/LICENSE
    trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/README.txt
    trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf
    trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.tex
    trunk/Master/texmf-dist/source/latex/kfupm-math-exam/
    trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.dtx
    trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.ins
    trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/
    trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/kfupm-math-exam.cls
    trunk/Master/tlpkg/tlpsrc/kfupm-math-exam.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/LICENSE	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) [2022] [Mohammed Alshahrani]
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/README.txt	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,29 @@
+KFUPM MATH EXAM 
+───────────────
+
+
+Table of Contents
+─────────────────
+
+
+
+kfupm-math-exam v0.1.1 : A LaTeX document style to produce homework, quiz and exam papers. 
+
+Last Modified: 2022-07-25
+Author : Mohammed Alshahrani
+Files : 
+        • kfupm-math-exam.cls - document class source file
+        • kfupm-math-exam.dtx - documented source file
+        • kfupm-math-exam.ins - installation script
+        • kfupm-math-exam.tex - tex documentation and examples
+        • kfupm-math-exam.pdf - pdf documentation and examples
+		• LICENSE - MIT LICENSE
+
+
+This document style provides commands and environments that simplify and streamline the process of preparing homework, quiz and exam papers according to a preffered style. The default style is based on the guidelines set by the department of mathematics at King Fahd University of Petroleum and Minerals (KFUPM). It can be easily customized to fit any style for any institution. 
+
+
+This material is subject to the MIT License.  See the file LICENSE
+
+
+[https://github.com/mmogib/kfupm-math-exam]


Property changes on: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf	2022-07-25 19:36:22 UTC (rev 63976)
+++ trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf	2022-07-25 19:37:23 UTC (rev 63977)

Property changes on: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.tex	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,63 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+
+\title{KFUP MATH EXAM \\
+ {\large version 0.1.0}}
+\author{ Mohammed Alshahrani}
+\date{July 2022}
+
+\begin{document}
+
+\maketitle
+
+\section{Usage}
+\begin{verbatim}
+\documentclass[
+  % all of the below options are optional and can be left out
+  % course name
+  course = {{MATH333: Methods of Applied Mathematics I}},
+  % quartile (default: 3)
+  quartile = {{}},
+  % assignment number/name (default: 1)
+  examtitle = {{Exam 1}},%Monday, %Wednesday,
+  examdate = {{Monday March 1, 2022}},
+  topic = {{}},
+  dept= {{/MATH}},
+  numofquestions=20,
+  numofversions=4,
+  numofoptions=5,
+  firstexercise = 1,
+  term = {{Term 213}},
+  betweenquestions=4.5cm
+]{kfupm-math-exam}
+
+
+\instructions{
+\underline{\large{\bf Important Instructions:}}
+\begin{enumerate}
+    \begin{normalsize}
+        \item  Instruction 1
+        \item  Instruction 2
+        \item  Instruction 3
+        \item  Instruction 4
+        \item  Instruction 5
+
+    \end{normalsize}
+\end{enumerate}
+}
+
+\begin{document}
+
+
+
+\versioncover{1}
+
+\newpage
+
+
+\end{document}
+\end{verbatim}
+
+\section{More Examples}
+TODO
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/kfupm-math-exam/kfupm-math-exam.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.dtx	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,411 @@
+%\iffalse
+% kfupm-math-exam.dtx generated using makedtx version 1.2 (c) Nicola Talbot
+% Command line args:
+%   -src "kfupm-math-exam\.cls=>kfupm-math-exam.cls"
+%   -doc "kfupm-math-exam.tex"
+%   kfupm-math-exam
+% Created on 2022/7/25 6:06
+%\fi
+%\iffalse
+%<*package>
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+%</package>
+%\fi
+% \iffalse
+% Doc-Source file to use with LaTeX2e
+% Copyright (C) 2022 Mohammed Alshahrani, all rights reserved.
+% \fi
+% \iffalse
+%<*driver>
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+
+\title{KFUP MATH EXAM \\
+ {\large version 0.1.0}}
+\author{ Mohammed Alshahrani}
+\date{July 2022}
+
+\begin{document}
+\DocInput{kfupm-math-exam.dtx}
+\end{document}
+%</driver>
+%\fi
+%
+%\maketitle
+%
+%\section{Usage}
+%\begin{verbatim}
+%\documentclass[
+%  % all of the below options are optional and can be left out
+%  % course name
+%  course = {{MATH333: Methods of Applied Mathematics I}},
+%  % quartile (default: 3)
+%  quartile = {{}},
+%  % assignment number/name (default: 1)
+%  examtitle = {{Exam 1}},%Monday, %Wednesday,
+%  examdate = {{Monday March 1, 2022}},
+%  topic = {{}},
+%  dept= {{/MATH}},
+%  numofquestions=20,
+%  numofversions=4,
+%  numofoptions=5,
+%  firstexercise = 1,
+%  term = {{Term 213}},
+%  betweenquestions=4.5cm
+%]{kfupm-math-exam}
+%
+%
+%\instructions{
+%\underline{\large{\bf Important Instructions:}}
+%\begin{enumerate}
+%    \begin{normalsize}
+%        \item  Instruction 1
+%        \item  Instruction 2
+%        \item  Instruction 3
+%        \item  Instruction 4
+%        \item  Instruction 5
+%
+%    \end{normalsize}
+%\end{enumerate}
+%}
+%
+%\begin{document}
+%
+%
+%
+%\versioncover{1}
+%
+%\newpage
+%
+%\begin{itemize}
+%    \item i
+%
+%\end{itemize}
+%
+%\newpage
+%\versioncover{12}
+%
+%\newpage
+%
+%
+%\end{document}
+%\end{verbatim}
+%
+%
+%\StopEventually{}
+%\section{The Code}
+%\iffalse
+%    \begin{macrocode}
+%<*kfupm-math-exam.cls>
+%    \end{macrocode}
+%\fi
+% kfupm-math-exam.cls
+%   Department of Mathematics
+%   King Fahd University of Petroleum and Minerals
+% A LaTeX2e document class for preparing the exams of the department of mathematics, KFUPM.
+
+% --- METADATA -----------------------------------------------------------------
+\def\fileversion{0.1.0}
+\def\filedate{2022/07/25}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{kfupm-math-exam}[\filedate\space Version \fileversion\space by
+  Department of Mathematics, KFUPM]
+% --- OPTION PROCESSSING -------------------------------------------------------
+\RequirePackage{kvoptions} \SetupKeyvalOptions{
+  family = kfupmmathexam,
+  prefix = kfupmmathexam@,
+  setkeys = \kvsetkeys
+}
+\DeclareStringOption[212]%
+  {term}
+\DeclareStringOption[Exam]%
+  {topic}
+\DeclareStringOption[King Fahd University of Petroleum \& Minerals]%
+  {university}
+\DeclareStringOption[Department of Mathematics]%
+  {dept}
+\DeclareStringOption[MATH101 CALCULUS I]%
+  {course}
+\DeclareStringOption[3]%
+  {quartile}
+\DeclareStringOption[1]%
+  {examtitle}
+\DeclareStringOption[March 9, 2022]%
+  {examdate}
+\DeclareStringOption[4]%
+  {numofversions}
+\DeclareStringOption[15]%
+  {numofquestions}
+\DeclareStringOption[5]%
+  {numofoptions}
+\DeclareStringOption[0123456]%
+  {studentnumber}
+\DeclareStringOption[snumver at kfupm.edu.sa]%
+  {email}
+\DeclareStringOption[1]%
+  {firstexercise}
+\DeclareStringOption[3.5cm]{betweenquestions}
+\DeclareStringOption[0.762cm]{spaceafterbody}
+\DeclareStringOption[0.5cm]{betweenoptions}
+% pass unrecognized options to `article` class
+\DeclareDefaultOption{%
+  \PassOptionsToClass{\CurrentOption}{article}%
+}
+% process all options
+\ProcessKeyvalOptions{kfupmmathexam}
+% load parent class with some default options
+\LoadClass[a4paper, 12pt]{article}
+% --- PACKAGES AND SETUP -------------------------------------------------------
+\RequirePackage[
+    paperheight=33cm,
+    paperwidth=21.5cm,
+    headheight = 20pt,
+    margin = 2cm,
+    tmargin = \dimexpr 2cm - 10pt \relax,
+  ]{geometry} % set up nicer margins
+  \addtolength{\footskip}{20pt}
+\RequirePackage{fancyhdr} % for headers and footers
+\RequirePackage{graphicx} % for including figures
+\RequirePackage{amsmath} % use AMS math package
+\RequirePackage{amssymb} % use AMS symbols
+\RequirePackage{amsthm} % for writing proofs
+\RequirePackage{array} % for setting up arguments to columns
+\RequirePackage{booktabs} % for professional tables
+\RequirePackage%
+  [tworuled, linesnumbered, noend, noline]%
+  {algorithm2e} % for typesetting pseudo-code
+\RequirePackage{xcolor} % for colored text (comments in algorithms)
+\RequirePackage{trimspaces, xstring} % for multiple author parsing
+\RequirePackage[shortlabels]{enumitem} \labelsep=.75cm
+\RequirePackage{mathrsfs}
+\RequirePackage{xparse}
+\RequirePackage{environ}
+\RequirePackage{pgfplots}
+\pgfplotsset{compat=newest}
+\RequirePackage{tcolorbox}
+
+% option post-processing
+\newcommand{\kme at temp}{}
+\newcommand{\kme at sub}[4]{%
+  \ifnum#3 = 1\relax%
+    \ifnum#4 = 1\relax%
+      \renewcommand{\kme at temp}{#1}%
+    \else%
+      \StrBefore{#1}{#2}[\kme at temp]%
+    \fi%
+  \else%
+    \ifnum#3 = #4\relax%
+      \StrBehind[\numexpr#3 - 1\relax]{#1}{#2}[\kme at temp]%
+    \else%
+      \StrBetween[\numexpr#3 - 1\relax,#3]{#1}{#2}{#2}[\kme at temp]%
+    \fi%
+  \fi%
+  \expandafter\trim at spaces\expandafter{\kme at temp}%
+}
+\newcommand{\kme at authorProcessed}[1]{%
+  \kme at sub{\kfupmmathexam at name}{;}{#1}{\arabic{kme at numAuthors}}~%
+  (\kme at sub{\kfupmmathexam at studentnumber}{;}{#1}{\arabic{kme at numAuthors}})\\%
+  \texttt{\kme at sub{\kfupmmathexam at email}{;}{#1}{\arabic{kme at numAuthors}}}%
+  % if there are more authors, do a recursive call for the next one
+  \ifnum#1 < \arabic{kme at numAuthors}\relax\and\kme at authorProcessed{\numexpr#1 + 1\relax}\fi%
+}
+\newcommand{\kme at authorsProcessed}{%
+  % count number of authors; one more than number of semicolons
+  \StrCount{\kfupmmathexam at name}{;}[\kme at numAuthors]%
+  \newcounter{kme at numAuthors}%
+  \setcounter{kme at numAuthors}{\kme at numAuthors}%
+  \stepcounter{kme at numAuthors}%
+  % produce output
+  \kme at authorProcessed{1}%
+}
+% look for figures in the figures directory
+\graphicspath{{figures/}}
+% set up headers and footers; same for all pages
+\setlength{\headheight}{10pt}
+\newcommand{\kfupmmathexam at setupHF}{%
+  \fancyhf{}
+  \fancyhead[L]{\sffamily \small KFUPM  }
+  \fancyhead[C]{\sffamily Page \thepage ~of  \pageref{LastPage}}
+  \fancyhead[R]{\sffamily Term \kfupmmathexam at term}
+  \fancyfoot[L]{\sffamily /\kfupmmathexam at dept}
+  \fancyfoot[R]{\sffamily\bfseries\thepage}
+  \renewcommand{\headrulewidth}{0.5pt}
+  \renewcommand{\footrulewidth}{0.5pt}
+}
+\fancypagestyle{plain}{\kfupmmathexam at setupHF{}} \kfupmmathexam at setupHF{}
+\pagestyle{fancy}
+\NewDocumentCommand{\coverpage}{O{\kfupmmathexam at course} O{\kfupmmathexam at examtitle} O{\kfupmmathexam at term} O{\kfupmmathexam at examdate}}{%
+\thispagestyle{empty}
+\begin{center}
+    \begin{large}
+        Kink Fahd University of Petroleum and Minerals\\
+        Mathematics\\
+        \vspace*{2cm}
+        {\bf #1}  \\
+        {\bf #2}  \\
+        {\bf #3}  \\
+        {\bf #4}  \\
+
+        \vspace*{3cm}
+        {\bf{\Huge{\fbox{EXAM COVER }}}}\\
+        \vspace*{2cm}
+        {\bf Number of versions: \kfupmmathexam at numofversions }  \\
+        {\bf Number of questions: \kfupmmathexam at numofquestions }  \\
+        {\bf Number of Answers: \kfupmmathexam at numofoptions  }  \\
+
+        \vspace*{0.2cm}
+
+    \end{large}
+
+    \vfill
+
+    \tiny{This exam was prepared using EXAM SHUFFLER}
+    \tiny{For questions send an email to Dr. Mohammed Alshahrani (mshahrani at kfupm.edu.sa) }
+\end{center}
+\newpage
+}
+\newcommand{\versioncover}[1]{
+\thispagestyle{empty}
+\begin{center}
+    \begin{large}
+        Kink Fahd University of Petroleum and Minerals \\
+        Mathematics \\
+        \vspace*{4.5cm}
+        {\bf \fbox{ \codestr{CODE}{#1} } }  \hfill {\bf \fbox{ \codestr{CODE}{#1} }} \\
+        {\bf math333 }  \\
+        {\bf exam 1 }  \\
+        {\bf 182 }  \\
+        {\bf monday march 13 }  \\
+        {\bf Net Time Allowed: 120 minutes }  \\
+
+        \vspace*{0.2cm}
+
+    \end{large}
+\end{center}
+\ifthenelse{\equal{#1}{0}}{
+\begin{center}
+\vspace*{6cm}
+{\bf {\Huge{MASTER VERSION}}}  \\
+\end{center}
+}{
+\large{Name:  }\hrulefill
+
+\vspace{3mm}
+
+\large{ID: } \hrulefill \large{  Sec: } \hrulefill \large{.}
+
+\vspace{1cm}
+
+\large{\bf{Check that this exam has {\underline{ \thenumberofquestions }} questions.}}
+
+\vspace{1cm}
+
+\getInstructions
+}
+\newpage
+
+\renewcommand{\thepage}{\noindent Term 182, math333, exam 1 \hfill Page {\bf \arabic{page} of \pagecount{\thenumberofpages} } \hfill {\bf \fbox{ \codestr{CODE}{#1} }}}
+\setcounter{page}{1}
+
+}
+% ensure that the title is inserted in the document
+\title{\coverpage}
+\author{}
+\date{}
+\AtBeginDocument{\pagestyle{myheadings}}%\maketitle
+
+% add some keywords
+\SetKw{And}{and} \SetKw{Or}{or} \SetKw{To}{to}
+% make it possible to not have line numbers on a single line
+\let\oldnl\nl
+\newcommand{\nonl}{\renewcommand{\nl}{\let\nl\oldnl}}
+% style algorithm captions
+\newcommand{\kfupmmathexam at capsty}[1]{\!}
+\SetAlCapSty{kfupmmathexam at capsty} \SetAlCapNameFnt{\scshape\hspace{.69em}}
+% get rid of semicolons
+\DontPrintSemicolon
+% comment formatting
+\newcommand\agacommfont[1]{\footnotesize\ttfamily\textcolor{gray}{#1}}
+\SetCommentSty{agacommfont}
+% --- USEFUL MACROS ------------------------------------------------------------
+\newcommand*{\R}{{\mathbb R}}
+\newcommand*{\N}{{\mathbb N}}
+\newcommand*{\Z}{{\mathbb Z}}
+\newcommand*{\Q}{{\mathbb Q}}
+
+% lengths and commands of the exam options
+\newcount\numberofversions
+\numberofversions=\kfupmmathexam at numofversions
+\advance\numberofversions +1
+\newcounter{numberofquestions}
+\setcounter{numberofquestions}{\kfupmmathexam at numofquestions}
+\newcounter{numberofpages}
+\setcounter{numberofpages}{0}
+% --- define new database for exam questions ----
+\newcounter{examcodecounter}
+\setcounter{examcodecounter}{1}
+
+
+\ExplSyntaxOn
+\str_new:N \l_alphabets_str
+\str_set:Nn \l_alphabets_str {abcdefghigklmnopqrstuvwxuz}
+\newcommand{\instructions}[1]{
+  \tl_set:Nn \l_tmpa_str {#1}
+}
+\newcommand{\getInstructions}[1]{
+  \tl_use:N \l_tmpa_str
+}
+\int_new:N \l_tmppages_int
+\int_set:Nn \l_tmppages_int {0}
+\cs_set:Npn \l_calc_pages_int:n #1 {
+    \int_set:Nn \l_tmppages_int {\int_div_truncate:nn {#1}{2}}
+    \int_set:Nn \l_tmppages_int {\int_compare:nNnTF {0}={\int_mod:nn {#1}{2}}{\l_tmppages_int}{\l_tmppages_int+1}}
+    \int_use:N \l_tmppages_int
+}
+\newcommand{\pagecount}[1]{
+    \l_calc_pages_int:n {15}
+}
+
+
+\str_new:N \l_exam_code_str
+\int_new:N \l_exam_version_int
+\cs_set:Npn \l_concat_codenumber_str:nn #1#2 {
+    \int_set:Nn \l_exam_version_int {100+#2}
+    \str_clear_new:N \l_partone_str
+    \str_clear_new:N \l_parttwo_str
+    \str_set:Nn \l_partone_str {#1}
+    \str_set:Nx \l_parttwo_str {\int_use:N \l_exam_version_int}
+    \str_set:Nx \l_parttwo_str {\str_range:Nnn \l_parttwo_str {-2}{-1}}
+    \str_concat:NNN \l_exam_code_str \l_partone_str \l_parttwo_str
+    \str_use:N \l_exam_code_str
+}
+\newcommand{\codestr}[2]{
+    \int_compare:nNnTF {0}={#2}{MASTER}{
+    \l_concat_codenumber_str:nn {#1}{#2}
+    }
+}
+
+% working with list
+
+\ExplSyntaxOff
+%\iffalse
+%    \begin{macrocode}
+%</kfupm-math-exam.cls>
+%    \end{macrocode}
+%\fi
+%\Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/kfupm-math-exam/kfupm-math-exam.ins	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,31 @@
+% kfupm-math-exam.ins generated using makedtx version 1.2 2022/7/25 6:06
+\input docstrip
+
+\preamble
+
+ kfupm-math-exam.dtx
+ Copyright 2022 Mohammed Alshahrani
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
+   http://www.latex-project.org/lppl.txt
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Mohammed Alshahrani.
+
+ This work consists of the files kfupm-math-exam.dtx and kfupm-math-exam.ins and the derived file kfupm-math-exam.cls.
+
+\endpreamble
+
+\askforoverwritefalse
+
+\generate{\file{kfupm-math-exam.cls}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{kfupm-math-exam.dtx}{kfupm-math-exam.cls,package}}
+}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/kfupm-math-exam.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/kfupm-math-exam.cls	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/kfupm-math-exam.cls	2022-07-25 19:37:23 UTC (rev 63977)
@@ -0,0 +1,307 @@
+%%
+%% This is file `kfupm-math-exam.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% kfupm-math-exam.dtx  (with options: `kfupm-math-exam.cls,package')
+%% 
+%%  kfupm-math-exam.dtx
+%%  Copyright 2022 Mohammed Alshahrani
+%% 
+%%  This work may be distributed and/or modified under the
+%%  conditions of the LaTeX Project Public License, either version 1.3
+%%  of this license or (at your option) any later version.
+%%  The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%%  and version 1.3 or later is part of all distributions of LaTeX
+%%  version 2005/12/01 or later.
+%% 
+%%  This work has the LPPL maintenance status `maintained'.
+%% 
+%%  The Current Maintainer of this work is Mohammed Alshahrani.
+%% 
+%%  This work consists of the files kfupm-math-exam.dtx and kfupm-math-exam.ins and the derived file kfupm-math-exam.cls.
+%% 
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+
+\def\fileversion{0.1.0}
+\def\filedate{2022/07/25}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{kfupm-math-exam}[\filedate\space Version \fileversion\space by
+  Department of Mathematics, KFUPM]
+\RequirePackage{kvoptions} \SetupKeyvalOptions{
+  family = kfupmmathexam,
+  prefix = kfupmmathexam@,
+  setkeys = \kvsetkeys
+}
+\DeclareStringOption[212]%
+  {term}
+\DeclareStringOption[Exam]%
+  {topic}
+\DeclareStringOption[King Fahd University of Petroleum \& Minerals]%
+  {university}
+\DeclareStringOption[Department of Mathematics]%
+  {dept}
+\DeclareStringOption[MATH101 CALCULUS I]%
+  {course}
+\DeclareStringOption[3]%
+  {quartile}
+\DeclareStringOption[1]%
+  {examtitle}
+\DeclareStringOption[March 9, 2022]%
+  {examdate}
+\DeclareStringOption[4]%
+  {numofversions}
+\DeclareStringOption[15]%
+  {numofquestions}
+\DeclareStringOption[5]%
+  {numofoptions}
+\DeclareStringOption[0123456]%
+  {studentnumber}
+\DeclareStringOption[snumver at kfupm.edu.sa]%
+  {email}
+\DeclareStringOption[1]%
+  {firstexercise}
+\DeclareStringOption[3.5cm]{betweenquestions}
+\DeclareStringOption[0.762cm]{spaceafterbody}
+\DeclareStringOption[0.5cm]{betweenoptions}
+\DeclareDefaultOption{%
+  \PassOptionsToClass{\CurrentOption}{article}%
+}
+\ProcessKeyvalOptions{kfupmmathexam}
+\LoadClass[a4paper, 12pt]{article}
+\RequirePackage[
+    paperheight=33cm,
+    paperwidth=21.5cm,
+    headheight = 20pt,
+    margin = 2cm,
+    tmargin = \dimexpr 2cm - 10pt \relax,
+  ]{geometry} % set up nicer margins
+  \addtolength{\footskip}{20pt}
+\RequirePackage{fancyhdr} % for headers and footers
+\RequirePackage{graphicx} % for including figures
+\RequirePackage{amsmath} % use AMS math package
+\RequirePackage{amssymb} % use AMS symbols
+\RequirePackage{amsthm} % for writing proofs
+\RequirePackage{array} % for setting up arguments to columns
+\RequirePackage{booktabs} % for professional tables
+\RequirePackage%
+  [tworuled, linesnumbered, noend, noline]%
+  {algorithm2e} % for typesetting pseudo-code
+\RequirePackage{xcolor} % for colored text (comments in algorithms)
+\RequirePackage{trimspaces, xstring} % for multiple author parsing
+\RequirePackage[shortlabels]{enumitem} \labelsep=.75cm
+\RequirePackage{mathrsfs}
+\RequirePackage{xparse}
+\RequirePackage{environ}
+\RequirePackage{pgfplots}
+\pgfplotsset{compat=newest}
+\RequirePackage{tcolorbox}
+
+\newcommand{\kme at temp}{}
+\newcommand{\kme at sub}[4]{%
+  \ifnum#3 = 1\relax%
+    \ifnum#4 = 1\relax%
+      \renewcommand{\kme at temp}{#1}%
+    \else%
+      \StrBefore{#1}{#2}[\kme at temp]%
+    \fi%
+  \else%
+    \ifnum#3 = #4\relax%
+      \StrBehind[\numexpr#3 - 1\relax]{#1}{#2}[\kme at temp]%
+    \else%
+      \StrBetween[\numexpr#3 - 1\relax,#3]{#1}{#2}{#2}[\kme at temp]%
+    \fi%
+  \fi%
+  \expandafter\trim at spaces\expandafter{\kme at temp}%
+}
+\newcommand{\kme at authorProcessed}[1]{%
+  \kme at sub{\kfupmmathexam at name}{;}{#1}{\arabic{kme at numAuthors}}~%
+  (\kme at sub{\kfupmmathexam at studentnumber}{;}{#1}{\arabic{kme at numAuthors}})\\%
+  \texttt{\kme at sub{\kfupmmathexam at email}{;}{#1}{\arabic{kme at numAuthors}}}%
+  % if there are more authors, do a recursive call for the next one
+  \ifnum#1 < \arabic{kme at numAuthors}\relax\and\kme at authorProcessed{\numexpr#1 + 1\relax}\fi%
+}
+\newcommand{\kme at authorsProcessed}{%
+  % count number of authors; one more than number of semicolons
+  \StrCount{\kfupmmathexam at name}{;}[\kme at numAuthors]%
+  \newcounter{kme at numAuthors}%
+  \setcounter{kme at numAuthors}{\kme at numAuthors}%
+  \stepcounter{kme at numAuthors}%
+  % produce output
+  \kme at authorProcessed{1}%
+}
+\graphicspath{{figures/}}
+\setlength{\headheight}{10pt}
+\newcommand{\kfupmmathexam at setupHF}{%
+  \fancyhf{}
+  \fancyhead[L]{\sffamily \small KFUPM  }
+  \fancyhead[C]{\sffamily Page \thepage ~of  \pageref{LastPage}}
+  \fancyhead[R]{\sffamily Term \kfupmmathexam at term}
+  \fancyfoot[L]{\sffamily /\kfupmmathexam at dept}
+  \fancyfoot[R]{\sffamily\bfseries\thepage}
+  \renewcommand{\headrulewidth}{0.5pt}
+  \renewcommand{\footrulewidth}{0.5pt}
+}
+\fancypagestyle{plain}{\kfupmmathexam at setupHF{}} \kfupmmathexam at setupHF{}
+\pagestyle{fancy}
+\NewDocumentCommand{\coverpage}{O{\kfupmmathexam at course} O{\kfupmmathexam at examtitle} O{\kfupmmathexam at term} O{\kfupmmathexam at examdate}}{%
+\thispagestyle{empty}
+\begin{center}
+    \begin{large}
+        Kink Fahd University of Petroleum and Minerals\\
+        Mathematics\\
+        \vspace*{2cm}
+        {\bf #1}  \\
+        {\bf #2}  \\
+        {\bf #3}  \\
+        {\bf #4}  \\
+
+        \vspace*{3cm}
+        {\bf{\Huge{\fbox{EXAM COVER }}}}\\
+        \vspace*{2cm}
+        {\bf Number of versions: \kfupmmathexam at numofversions }  \\
+        {\bf Number of questions: \kfupmmathexam at numofquestions }  \\
+        {\bf Number of Answers: \kfupmmathexam at numofoptions  }  \\
+
+        \vspace*{0.2cm}
+
+    \end{large}
+
+    \vfill
+
+    \tiny{This exam was prepared using EXAM SHUFFLER}
+    \tiny{For questions send an email to Dr. Mohammed Alshahrani (mshahrani at kfupm.edu.sa) }
+\end{center}
+\newpage
+}
+\newcommand{\versioncover}[1]{
+\thispagestyle{empty}
+\begin{center}
+    \begin{large}
+        Kink Fahd University of Petroleum and Minerals \\
+        Mathematics \\
+        \vspace*{4.5cm}
+        {\bf \fbox{ \codestr{CODE}{#1} } }  \hfill {\bf \fbox{ \codestr{CODE}{#1} }} \\
+        {\bf math333 }  \\
+        {\bf exam 1 }  \\
+        {\bf 182 }  \\
+        {\bf monday march 13 }  \\
+        {\bf Net Time Allowed: 120 minutes }  \\
+
+        \vspace*{0.2cm}
+
+    \end{large}
+\end{center}
+\ifthenelse{\equal{#1}{0}}{
+\begin{center}
+\vspace*{6cm}
+{\bf {\Huge{MASTER VERSION}}}  \\
+\end{center}
+}{
+\large{Name:  }\hrulefill
+
+\vspace{3mm}
+
+\large{ID: } \hrulefill \large{  Sec: } \hrulefill \large{.}
+
+\vspace{1cm}
+
+\large{\bf{Check that this exam has {\underline{ \thenumberofquestions }} questions.}}
+
+\vspace{1cm}
+
+\getInstructions
+}
+\newpage
+
+\renewcommand{\thepage}{\noindent Term 182, math333, exam 1 \hfill Page {\bf \arabic{page} of \pagecount{\thenumberofpages} } \hfill {\bf \fbox{ \codestr{CODE}{#1} }}}
+\setcounter{page}{1}
+
+}
+\title{\coverpage}
+\author{}
+\date{}
+\AtBeginDocument{\pagestyle{myheadings}}%\maketitle
+
+\SetKw{And}{and} \SetKw{Or}{or} \SetKw{To}{to}
+\let\oldnl\nl
+\newcommand{\nonl}{\renewcommand{\nl}{\let\nl\oldnl}}
+\newcommand{\kfupmmathexam at capsty}[1]{\!}
+\SetAlCapSty{kfupmmathexam at capsty} \SetAlCapNameFnt{\scshape\hspace{.69em}}
+\DontPrintSemicolon
+\newcommand\agacommfont[1]{\footnotesize\ttfamily\textcolor{gray}{#1}}
+\SetCommentSty{agacommfont}
+\newcommand*{\R}{{\mathbb R}}
+\newcommand*{\N}{{\mathbb N}}
+\newcommand*{\Z}{{\mathbb Z}}
+\newcommand*{\Q}{{\mathbb Q}}
+
+\newcount\numberofversions
+\numberofversions=\kfupmmathexam at numofversions
+\advance\numberofversions +1
+\newcounter{numberofquestions}
+\setcounter{numberofquestions}{\kfupmmathexam at numofquestions}
+\newcounter{numberofpages}
+\setcounter{numberofpages}{0}
+\newcounter{examcodecounter}
+\setcounter{examcodecounter}{1}
+
+\ExplSyntaxOn
+\str_new:N \l_alphabets_str
+\str_set:Nn \l_alphabets_str {abcdefghigklmnopqrstuvwxuz}
+\newcommand{\instructions}[1]{
+  \tl_set:Nn \l_tmpa_str {#1}
+}
+\newcommand{\getInstructions}[1]{
+  \tl_use:N \l_tmpa_str
+}
+\int_new:N \l_tmppages_int
+\int_set:Nn \l_tmppages_int {0}
+\cs_set:Npn \l_calc_pages_int:n #1 {
+    \int_set:Nn \l_tmppages_int {\int_div_truncate:nn {#1}{2}}
+    \int_set:Nn \l_tmppages_int {\int_compare:nNnTF {0}={\int_mod:nn {#1}{2}}{\l_tmppages_int}{\l_tmppages_int+1}}
+    \int_use:N \l_tmppages_int
+}
+\newcommand{\pagecount}[1]{
+    \l_calc_pages_int:n {15}
+}
+
+\str_new:N \l_exam_code_str
+\int_new:N \l_exam_version_int
+\cs_set:Npn \l_concat_codenumber_str:nn #1#2 {
+    \int_set:Nn \l_exam_version_int {100+#2}
+    \str_clear_new:N \l_partone_str
+    \str_clear_new:N \l_parttwo_str
+    \str_set:Nn \l_partone_str {#1}
+    \str_set:Nx \l_parttwo_str {\int_use:N \l_exam_version_int}
+    \str_set:Nx \l_parttwo_str {\str_range:Nnn \l_parttwo_str {-2}{-1}}
+    \str_concat:NNN \l_exam_code_str \l_partone_str \l_parttwo_str
+    \str_use:N \l_exam_code_str
+}
+\newcommand{\codestr}[2]{
+    \int_compare:nNnTF {0}={#2}{MASTER}{
+    \l_concat_codenumber_str:nn {#1}{#2}
+    }
+}
+
+
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `kfupm-math-exam.cls'.


Property changes on: trunk/Master/texmf-dist/tex/latex/kfupm-math-exam/kfupm-math-exam.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-07-25 19:36:22 UTC (rev 63976)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-07-25 19:37:23 UTC (rev 63977)
@@ -434,7 +434,7 @@
     kastrup kaytannollista-latexia
     kblocks kdgdocs kdpcover kerkis kerntest ketcindy
     keycommand keyfloat keyindex keyparse keyreader keystroke
-    keyval2e keyvaltable kinematikz kix kixfont
+    keyval2e keyvaltable kfupm-math-exam kinematikz kix kixfont
     knitting knittingpattern knowledge
     knuth-errata knuth-hint knuth-lib knuth-local knuth-pdf
     koma-moderncvclassic koma-script koma-script-examples koma-script-sfs

Modified: trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc	2022-07-25 19:36:22 UTC (rev 63976)
+++ trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc	2022-07-25 19:37:23 UTC (rev 63977)
@@ -111,6 +111,7 @@
 depend jpsj
 depend kdgdocs
 depend kdpcover
+depend kfupm-math-exam
 depend kluwer
 depend ksp-thesis
 depend ku-template

Added: trunk/Master/tlpkg/tlpsrc/kfupm-math-exam.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.