esami LaTeX 包中练习的版本总数

esami LaTeX 包中练习的版本总数

esami软件包允许您编写几种类型的考试。我有一个取决于参数的练习,即


\newproblem{

\FPsetpar{a}{-13}{-3}

\begin{problem}\PTs{2} Factor the following polynomial

$$
-2x^3 \FPsignpol{-4*\a+7}{x^2}\FPsignpol{-2*\a*\a+11*\a-4}{x}\FPsignpol{4*\a*\a-6*\a-4}{}
$$

\end{problem}
}

我想打印此练习的所有版本。有人能帮我吗?提前致谢。软件包文档中提供的 \totale-versioni 文件似乎没有提供该问题的解决方案。

这是一个最小完整的例子。

1 个主文件

\documentclass[italian,a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


\usepackage[shuffle,xyz,autopstoff,solutions]{esami}

\geometry{a4paper,top=1.5cm,bottom=1.5cm,left=1.1cm,right=1.1cm}

\usepackage{float,tikz,xfp}

\def\profname{Professor Name}
\def\examname{Data}
\def\numcompiti{1}%%% The number of versions
\date{2021/10/09}%%% THE DATE IN THE FORMAT AAAA/M/D
\def\Data{\longdate}%%% or \shortdate: the date in the heading

\begin{document}
\testversioni

\pagestyle{empty}

\whiledo{\thevers<\numcompiti}{\stepvers

\FPeval\seme{round(\thenomefile*(\thevers)+1-trunc(\thenomefile*(\thevers)/(2^31-1):0)*(2^31-1):0)}

\randomi=\seme

\begin{center}
{\Large \textsc{School name}
\\~\\
\textsc{Test name}}
\\
\end{center}
\esercizi{ex}

\setcounter{ex@no}{0}

\closevers
}
\end{document}

2 esami-xyz.cfg 文件

%% Package `esami' to use with LaTeX 2e
%%  Copyright (C) 2008-2013  G. Messineo e S. Vassallo
%%
%% This is file `esami-xyz.cfg',
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% esami-xyz.cfg,             2013-03-20                %%
%% Copyright (C) 2008-2013 G. Messineo e S. Vassallo    %%
%%                                                      %%
%% This program can be redistributed and/or modified    %%
%% under the terms of the LaTeX Project Public License  %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% +=============================+
% |         THE HEADING         |
% +=============================+

 \@ifpackagewith{esami}{prova}{%
 \def\testa{\relax}}
{%
\def\testa{
\setcounter{page}{0}
\thispagestyle{empty}
\begin{center}
~\vskip3cm
{\huge \hskip1cm\textsc{School name}}
\vskip0.8cm
{\huge\hskip1cm\textsc{Test name}}
\vskip0.8cm
{\huge\hskip1cm\textsc{del \underline{~~~~~~~~~~~~~~~}}
}
\end{center}
\vskip0.5cm 

\noindent
\hskip1cm \underline{\textsc{Studente name}: 
\hskip6cm \textsc{Class}: ~~~}%
\vfill\eject
 }
 }

% +=============================+
% |         THE FOOTER          |
% +=============================+

\ifes@solutions%%%solutions
\def\ps@esame{\let\@oddhead\@empty\def\@oddfoot{\hfil \textbf{\versionname\
n. \thevers} -- %%
\textbf{\solutionsname} --  %%
 \pagename\ \thepage}\let\@evenhead\@empty\let\@evenfoot\@empty}
\else%%% no solutions
    \def\ps@esame{
    \let\@oddhead\@empty\def\@oddfoot%%
    {\hfil  \textbf{\versionname\ n. \thevers\
      -- \pagename\ \thepage}\hfil}
\let\@evenhead\@empty\let\@evenfoot\@empty}
\fi

% +=============================+
% |   THE SOLUTION STRING       |
% +=============================+

\def\ps@soltest{\let\@oddhead\@empty\def\@oddfoot{\hfil %\textbf{\versionname\ n. \thevers} -- %%
\textbf{\solutionsname} -- \pagename\ \thepage
\hfil}\let\@evenhead\@empty\let\@evenfoot\@empty}

\ifes@solutions
\newcommand{\stringasol}{\newpage%
\vspace{.8cm}
\pagestyle{soltest}
 \input{\jobname.sol.tex}                                                                                %
}
\else
\newcommand{\stringasol}{\relax}
\fi


% +=============================+
% |   SOME INTRUCTIONS          |
% +=============================+

\def\istruzionii{{
}}

\def\istruzioniii{\setlength{\fboxsep}{1.5ex}\setlength{\fboxrule}{1.2pt}{\sffamily
\framebox{\parbox{\textwidth}{\textbf{Some other instructions.}}}}\\[3ex]}

3 练习文件

\newproblem{
\FPsetpar{a}{-13}{-3}
\begin{problem}\PTs{2} Factor the polynomial
$$
-2x^3 \FPsignpol{-4*\a+7}{x^2}\FPsignpol{-2*\a*\a+11*\a-4}{x}\FPsignpol{4*\a*\a-6*\a-4}{}
$$
\end{problem}
}

相关内容