考试类别中的题目总数和分数/分数

考试类别中的题目总数和分数/分数

我正在使用exam模板,想知道如何计算问题总数和分数总数以便在封面上提供总数(在声明之前)?

这是我所拥有的。我确信它很容易,但在文档中找不到示例或正确的命令...

有人可以帮忙吗?

\documentclass[11pt]{exam}
\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
\usepackage[margin=1in]{geometry}

\begin{document} 

% some hearder and student info here, excluded for simplicity

% instructions
\textbf{Instructions:}

% how to count questions and marks to give the totals on a cover sheet?
This exam contains XXX questions, \numpages pages (including the cover) for the total of XXX marks.

\begin{questions}
% Basic question
\addpoints
\question[10] Differentiate $f(x)=x^2$ with respect to $x$.
% Basic question
\addpoints
\question[10] Differentiate $f(x)=x^3$ with respect to $x$.
\end{questions}

\end{document}

答案1

exam文件的第 4.7 节显示,有一些命令如下

\numquestions,,\numpages其中\numpoints包括在文档末尾打印相关计数器的值。exam使用totcounter类似的方法。

注意:\numquestions questions将打印2questions,即使用\numquestions{} questions(如 touhami 所建议的)或\numquestions\ questions提供必要的明确空间。

\documentclass[11pt]{exam}
\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
\usepackage[margin=1in]{geometry}

\begin{document} 

% some hearder and student info here, excluded for simplicity

% instructions
\textbf{Instructions:}

% how to count questions and marks to give the totals on a cover sheet?
This exam contains \numquestions\ questions, \numpages\ pages (including the cover) for the total of \numpoints\ marks.

\begin{questions}
% Basic question
\addpoints
\question[10] Differentiate $f(x)=x^2$ with respect to $x$.
% Basic question
\addpoints
\question[10] Differentiate $f(x)=x^3$ with respect to $x$.
\end{questions}

\end{document}

在此处输入图片描述

相关内容