我最近发布了一个关于 probsoln 的问题,但后来我尝试将我的考试转移到 esami 包,因为它看起来更强大,而且是我想要的。然而,我费了好大劲才把例子修改成我想要的。目前,我的(pre-probsoln / pre-esami)考试如下:
对我来说,他们有这种格式有点重要,因为我使用的是基于掌握程度的评分,并希望练习按我列出的学习成果列出。目前,esami 包正在生成如下示例:
- 我终其一生都搞不清楚如何改变它的格式,让它看起来像我想要的那样。“练习 1”不是我想要的。我试着在文档中查找,但找不到其他可用的练习选项。所以我想我可以完全删除 esami 生成的“练习 1”,因为我将手动编写这些。
- 另外,有时当我重新编译时,练习会随机化,这很好。但我想知道如何修复种子?我无法通过文档理解这一点。我最终想制作一个考试版本,然后制作一个解决方案版本,但我需要保证相同的种子才能做到这一点。
文件:
\RequirePackage{currfile}
\documentclass[12pt,english]{article}
\usepackage[shufflerandom,xyz,autopstoff,twocolumns,fillb,solutionsonly]{esami}%%%%% TEMA
\usepackage{lmodern,textcomp}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% +=============================+
% | DEFINITIONS |
% +=============================+
\def\examname{The name of the exam}
\def\numcompiti{4}%%% The number of the versions
\date{2013/3/22}%%% THE DATE IN THE FORMAT AAAA/M/D
\def\Data{\longdate}%%% or \shortdate: the date in the heading
%\def\cartella{d:/folder}%%% The folder where are the exercises: by default the current folder%
\geometry{margin=0.5in}
\newcommand*{\myTitleName}{}
\newcommand*{\setmyTitleName}{%
\edef\myTitleName{\currfilebase}%
\expandafter\expandafter\expandafter\setmyTitleNameaux
\expandafter\myTitleName\expandafter"\myTitleName"\relax
}
\newcommand*{\setmyTitleNameaux}{}
\def\setmyTitleNameaux#1"#2"#3\relax{\def\myTitleName{#2}}
\setmyTitleName
\renewcommand\labelenumi{\alph{enumi})}
\begin{document}
\begin{center}
\huge \myTitleName \\ % Title is the same as the file name.
\large Tuesday, November $19^{\textrm{th}}$, 2020 \\ %Adjust the date of exam
% \flushleft \large Name:
\end{center}
\testversioni
\pagestyle{esame}
\whiledo{\thevers<\numcompiti}{\stepvers
% +=============================+
% | THE SEED |
% +=============================+
%\FPeval\seme{round((\thenomefile+(3*\thevers)):0)}
%%% OR SOME OTHER LIKE
\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)}
%\FPeval\seme{round(1+abs(\thenomefile/(\thevers)+sin(\thevers)*(\thevers)^(2)):0)}
\permuta
% +=============================+
% | STUFF DEFINED IN CFG FILE |
% +=============================+
Instructions: Make sure to clearly show your work on each problem. If there's not enough work or steps, you may not receive a pass due to the lack of work. Make sure to follow the directions or you may not earn points toward mastery of the outcome! \textbf{Be sure to box your answer. It is possible to not pass a problem due to boxing something that is not an answer, so be careful!}
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Add: PC1* - Completely factor the polynomial (over \textbf{the real numbers}):
%a)
\esercizi{PS1A}
%b)
%\esercizi{PS1B}
\newpage
%
%
\setcounter{page}{1} %%% dvi
}
\end{document}
问题:
\newproblem{
\begin{problem}
\FPsetpar{a}{3}{10}
a) $\displaystyle p(x) = \a$
\begin{solution}
\end{solution}
\end{problem}
}
\newproblem{
\begin{problem*}[4]\estraialfa{4}{a,b,c,x,y,z}{element}Let $A=\{\elementi,\elementii,\elementiii\}$ and $B=\{\elementi,\elementiii,\elementiv\}$.
\begin{parts}
\item \PTs{2}
List (without repetition) the elements of the set $A\cup B$
\begin{solution}[3cm]
\[A \cup B=\left\{\elementi,\elementii,\elementiii,\elementiv\right\}\]
\end{solution}
\begin{workarea}{3cm}
$A \cup B=$
\end{workarea}
\item \PTs{2}
List (without repetition) the elements of the set $A\cap B$
\begin{solution}[3cm]
\[A \cap B=\left\{\elementi,\elementiii\right\}\]
\end{solution}
\begin{workarea}{3cm}
$A \cap B=$
\end{workarea}
\end{parts}
\end{problem*}
}
提前致谢
编辑:这是我现在看到的:
答案1
要更改练习名称,您可以尝试以下方法:
\renewcommand\exlabel{name of exercise}
\newcommand\exlabelsol{name of exercise in the solutions}
\newcommand\exlabelformat{{\scshape\exlabel\ \theex@no.}} %% Format of the exercise name if the exercise is not divided into parts
\newcommand\exlabelformatwp{{\scshape\exlabel\ \theex@no.}}%% Format of the exercise name if the exercise is not divided into parts
修复种子:
\FPeval\seme{fixed number} %
\randomi=\seme %you must add this string to your code anyway
请注意,如果您选择仅取决于考试日期和版本的种子(默认行为),则文本和解决方案始终相等。
编辑:要更改每个练习的名称,您可以使用以下代码:
\renewcommand\exlabel{your label}
更改\exercise
命令中包含的每个练习的名称或
\newproblem{\renewcommand\exlabel{your label}
如果你想更改每个练习的名称
编辑 2:要修复数字问题,您可以使用此代码
在序言中
\makeatletter
\renewcommand\exlabelformat{{\scshape\exlabel\theex@no}}
\renewcommmand\exlabelformatwp{{\scshape\exlabel\theex@no\ }}
\makeatother
在练习代码中(在 newproblem 内部,或者最好在\esercizi
命令之前)
\renewcommand\exlabel{your choice}
编辑3:如果您想自动拥有类似PS1 PS2 PS3的东西...
你必须\exlabel{PS}
在序言中使用
\makeatletter
\renewcommand\exlabelformat{{\scshape\exlabel\theex@no}}
\renewcommand\exlabelformatwp{{\scshape\exlabel\theex@no\ }}
\makeatother
否则你可以使用
\makeatletter
\renewcommand\exlabelformat{{\scshape\exlabel}}
\renewcommand\exlabelformatwp{{\scshape\exlabel\ }}
\makeatother
没有\theex@no
该\exlabel
命令定义了练习名称 该\exlabelformat
命令定义了名称的书写方式。如果您想要数字,则必须输入,\theex@no
否则不需要。
ex@no
是一个乳胶计数器,所以如果你想要自动编号,如 PS1A PS1B PS1C ... 你可以使用
\renewcommand\exlabelformat{{\scshape\exlabel\Alph{ex@no}\}}
\renewcommand\exlabelformatwp{{\scshape\exlabel\Alph{ex@no}\ }}