summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-08 21:40:58 +0000
committerKarl Berry <karl@freefriends.org>2019-11-08 21:40:58 +0000
commitcee1b7f2580148a33ae6cc0631c56c7e35ce0bff (patch)
treef1f4b8c3cadb58d72d04bf20dcc136eae4f57a23
parent69e924ee6c8d31ad1ad84dfe14dd724fe50553df (diff)
jnuexam (8nov19)
git-svn-id: svn://tug.org/texlive/trunk@52696 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdfbin111416 -> 102199 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdfbin103007 -> 94090 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-a-empty.pdfbin100412 -> 91316 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-a.pdfbin118234 -> 104945 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-a.tex68
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdfbin111285 -> 102033 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdfbin102968 -> 93887 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-b-empty.pdfbin100270 -> 91140 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/exam-b.pdfbin118116 -> 104821 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdfbin65809 -> 74286 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex107
-rw-r--r--Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls178
12 files changed, 259 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf
index 5c185d3fc7d..c8ade766802 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf
index f17c0ce2e38..de83638ce7d 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-empty.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-empty.pdf
index 846854d86dc..653325a6525 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-a-empty.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-empty.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf
index c57592e6754..5eb115847a8 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex
index 44bc600fae0..54b2d1ac404 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex
@@ -39,10 +39,10 @@
\vfill
\begin{problem}
-已知二阶行列式 $\text{$\left|\begin{array}{cc}
+已知二阶行列式 $\left|\begin{array}{cc}
1 & 2\\
- 3 & x
-\end{array}\right|$=0}$,则 $x=$ \fillout{$-6$}.
+\end{array}\right|=0$,则 $x=$ \fillout{$-6$}.
\end{problem}
\vfill
@@ -178,10 +178,10 @@
\begin{solution}
\everymath{\displaystyle}%
-原式$=\int\e^{2x}\,\sec^2 x\dx+2\int\e^{2x}\,\tan x\dx$ \score{2}
-\hspace{5em}${}=\int\e^{2x}\,\d(\tan x)+ 2\int\e^{2x}\,\tan x\dx$ \score{4}
-\hspace{5em}${}=\e^{2x}\,\tan x - 2\int\e^{2x}\,\tan x\dx+ 2\int\e^{2x}\,\tan x\dx$ \score{6}
-\hspace{5em}${}=\e^{2x}\,\tan x + C$ \score{8}
+原式 \? $=\int\e^{2x}\,\sec^2 x\dx+2\int\e^{2x}\,\tan x\dx$ \score{2}
+\+ $=\int\e^{2x}\,\d(\tan x)+ 2\int\e^{2x}\,\tan x\dx$ \score{4}
+\+ $=\e^{2x}\,\tan x - 2\int\e^{2x}\,\tan x\dx+ 2\int\e^{2x}\,\tan x\dx$ \score{6}
+\+ $=\e^{2x}\,\tan x + C$ \score{8}
\end{solution}
\vfill
@@ -220,7 +220,7 @@
\bigskip
\begin{solution}
-$A = \left|\begin{array}{cccc}
+$A \? = \left|\begin{array}{cccc}
0 & 1 & 2 & 3\\
1 & 2 & 3 & 0\\
2 & 3 & 0 & 1\\
@@ -235,7 +235,7 @@ $A = \left|\begin{array}{cccc}
- 1 & - 6 & 1\\
- 6 & - 8 & 2
\end{array}\right|$ \score{4}
-\qquad $= -\left|\begin{array}{ccc}
+\+ $= -\left|\begin{array}{ccc}
1 & 2 & 3\\
0 & - 4 & 4\\
0 & 4 & 20
@@ -255,11 +255,11 @@ x_2 x_3 + 9 x^2_3$ 化为标准形 $f = d_1 y^2_1 + d_2 y^2_2 + d_3 y^2_3$ .
\bigskip
\begin{solution}
-$f = x_1^2 + 2 x_1 x_2 - 6 x_1 x_3 + 2 x_2^2 - 12 x_2 x_3 + 9 x^2_3$ \par
-\qquad$= x_1^2 + 2 x_1 (x_2 - 3 x_3) + (x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3 $ \par
-\qquad$= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3$ \score{3}
-\qquad$= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 2 x_2 \cdot 3 x_3 + (3 x_3)^2 - 9x_3^2$ \par
-\qquad$= (x_1 + x_2 - 3 x_3)^2 + (x_2 - 3 x_3)^2 - 9 x_3^2$ \score{6}
+$f \? = x_1^2 + 2 x_1 x_2 - 6 x_1 x_3 + 2 x_2^2 - 12 x_2 x_3 + 9 x^2_3$ \par
+ \+ $= x_1^2 + 2 x_1 (x_2 - 3 x_3) + (x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3 $ \par
+ \+ $= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3$ \score{3}
+ \+ $= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 2 x_2 \cdot 3 x_3 + (3 x_3)^2 - 9x_3^2$ \par
+ \+ $= (x_1 + x_2 - 3 x_3)^2 + (x_2 - 3 x_3)^2 - 9 x_3^2$ \score{6}
令$y_1 = x_1 + x_2 - 3 x_3, y_2 = x_2 - 3 x_3, y_3 = x_3$, \newline
则$f = y_1^2 + y_2^2 - 9y_3^2$为标准形.\score{8}
\end{solution}
@@ -270,19 +270,19 @@ $f = x_1^2 + 2 x_1 x_2 - 6 x_1 x_3 + 2 x_2^2 - 12 x_2 x_3 + 9 x^2_3$ \par
\begin{problem}
设每发炮弹命中飞机的概率是0.2且相互独立,现在发射100发炮弹.\par
-\step 用切贝谢夫不等式估计命中数目$\xi$在10发到30发之间的概率.\par
-\step 用中心极限定理估计命中数目$\xi$在10发到30发之间的概率.
+(1) 用切贝谢夫不等式估计命中数目$\xi$在10发到30发之间的概率.\par
+(2) 用中心极限定理估计命中数目$\xi$在10发到30发之间的概率.
\end{problem}
\bigskip
\begin{solution}
$E\xi = n p = 100 \cdot 0.2 = 20, D\xi = n p q = 100 \cdot 0.2 \cdot 0.8 = 16$. \score{2}
-\step $P (10 < \xi < 30) = P (| \xi - E \xi | < 10) \ge 1 - \frac{D\xi}{10^2}
+(1) $P (10 < \xi < 30) = P (|\xi - E\xi| < 10) \ge 1 - \frac{D\xi}{10^2}
= 1 - \frac{16}{100} = 0.84$. \score{4}
-\step $P (10 < \xi < 30) \approx \Phi_0 \left( \frac{30 - 20}{\sqrt{16}}\right)
- - \Phi_0 \left( \frac{10 - 20}{\sqrt{16}} \right)$ \score{6}
-\qquad $= 2 \Phi_0 (2.5) - 1 = 2 \cdot 0.9938 - 1 =0.9876$ \score{8}
+(2) $P (10 < \xi < 30) \? \approx \Phi_0\left(\frac{30 - 20}{\sqrt{16}}\right)
+ - \Phi_0\left(\frac{10 - 20}{\sqrt{16}}\right)$ \score{6}
+ \+ $= 2 \Phi_0(2.5) - 1 = 2 \cdot 0.9938 - 1 =0.9876$ \score{8}
\end{solution}
\vfill
@@ -295,11 +295,11 @@ $E\xi = n p = 100 \cdot 0.2 = 20, D\xi = n p q = 100 \cdot 0.2 \cdot 0.8 = 16$.
\bigskip
\begin{solution}
-\step 待检假设 $H_0 : \mu = 3140$. \score{1}
-\step 选取统计量 $T = \frac{\bar{X}-\mu}{S / \sqrt{n}} \sim t(n-1)$. \score{3}
-\step 查表得到 $t_{\alpha} = t_{\alpha} (n - 1) = t_{0.01} (15) =2.947$. \score{5}
-\step 计算统计值 $t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} =\frac{3160-3140}{100/4} = 0.8$.\score{7}
-\step 由于 $| t | < t_{\alpha}$, 故接受 $H_0$, 即假设成立. \score{8}
+(1) 待检假设 $H_0 : \mu = 3140$. \score{1}
+(2) 选取统计量 $T = \frac{\widebar{X}-\mu}{S / \sqrt{n}} \sim t(n-1)$. \score{3}
+(3) 查表得到 $t_{\alpha} = t_{\alpha} (n - 1) = t_{0.01} (15) =2.947$. \score{5}
+(4) 计算统计值 $t = \frac{\widebar{x} - \mu_0}{s/\sqrt{n}} =\frac{3160-3140}{100/4} = 0.8$.\score{7}
+(5) 由于 $| t | < t_{\alpha}$, 故接受 $H_0$, 即假设成立. \score{8}
\end{solution}
\vfill
@@ -308,6 +308,8 @@ $E\xi = n p = 100 \cdot 0.2 = 20, D\xi = n p q = 100 \cdot 0.2 \cdot 0.8 = 16$.
\makepart{证明题}{共~2~小题,每小题~8~分,共~16~分}
+\renewcommand{\solutionname}{证} % 将“解”字改为“证”字
+
\begin{problem}
设数列$\{x_n\}$满足$x_1=\sqrt2$,$x_{n+1}=\sqrt{2+x_n}$.证明数列收敛,并求出极限.
\end{problem}
@@ -315,13 +317,13 @@ $E\xi = n p = 100 \cdot 0.2 = 20, D\xi = n p q = 100 \cdot 0.2 \cdot 0.8 = 16$.
\bigskip
\begin{solution}
-\step 事实上,由于$x_1<2$,且$x_k<2$时
+(1) 事实上,由于$x_1<2$,且$x_k<2$时
$$x_{k+1}=\sqrt{2+x_k}<\sqrt{2+2}=2,$$
由数学归纳法知对所有$n$都有$x_n<2$,即数列有上界.
又由于
$$\frac{x_{n+1}}{x_n}=\sqrt{\frac{2}{x_n^2}+\frac{1}{x_n}}>\sqrt{\frac{2}{2^2}+\frac{1}{2}}=1,$$
所以数列单调增加.由极限存在准则II,数列必定收敛.\score{4}
-\step 设数列的极限为$A$,对递推公式两边同时取极限得到
+(2) 设数列的极限为$A$,对递推公式两边同时取极限得到
$$A=\sqrt{2+A}.$$
解得$A=2$,即数列$\{x_n\}$的极限为$2$.\score{8}
\end{solution}
@@ -329,29 +331,29 @@ $$A=\sqrt{2+A}.$$
\vfill
\begin{problem}
-设事件$A$和$B$相互独立,证明$A$和$\bar{B}$相互独立.
+设事件$A$和$B$相互独立,证明$A$和$\widebar{B}$相互独立.
\end{problem}
\bigskip
\begin{solution}
-$P (A \cdot \bar{B}) = P (A - B) = P (A - A B)$ \score{2}
-\qquad $= P (A) - P (A B) = P (A) - P (A) P (B)$ \score{4}
-\qquad $= P (A) (1 - P (B)) = P (A) P (\bar{B})$ \score{6}
-所以$A$和$\bar{B}$相互独立.\score{8}
+\? $P (A \cdot \widebar{B}) = P (A - B) = P (A - A B)$ \score{2}
+\< $= P (A) - P (A B) = P (A) - P (A) P (B)$ \score{4}
+\< $= P (A) (1 - P (B)) = P (A) P (\widebar{B})$ \score{6}
+所以$A$和$\widebar{B}$相互独立.\score{8}
\end{solution}
\vfill
\makedata{一些可能用到的数据} %附录数据
-\begin{tabu}{*{4}{X[l,$]}}
+\begin{tabularx}{\linewidth}{*{4}{>{$}X<{$}}}
\hline
\Phi_0(0.5)=0.6915 & \Phi_0(1)=0.8413 & \Phi_0(2)=0.9773 & \Phi_0(2.5)=0.9938 \\
t_{0.01}(8)=3.355 & t_{0.01}(9)=3.250 & t_{0.01}(15)=2.947 & t_{0.01}(16)=2.921 \\
\chi_{0.005}^2(8)=22.0 & \chi_{0.005}^2(9)=23.6 & \chi_{0.005}^2(15)=32.8 & \chi_{0.005}^2(16)=34.3 \\
\chi_{0.995}^2(8)=1.34 & \chi_{0.995}^2(9)=1.73 & \chi_{0.995}^2(15)=4.60 & \chi_{0.995}^2(16)=5.14 \\
\hline
-\end{tabu}
+\end{tabularx}
\end{document}
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdf
index 9b0fd8d18df..7351872d942 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf
index c224b9ab33d..ff8a2e40bab 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-empty.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b-empty.pdf
index 1b27aa32c81..9809fb34cc5 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-b-empty.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-empty.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf
index 8a378a7e3d8..69dd16f1879 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf
index 79517e4623c..dac435686dd 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf
+++ b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex
index f41fb784f6c..bfc98e08349 100644
--- a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex
+++ b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex
@@ -5,9 +5,7 @@
\usepackage[UTF8,noindent]{ctex}
\usepackage{arev}
-\usepackage{ragged2e}
-\usepackage{listings}
-\usepackage{tabu}
+\usefonttheme{professionalfonts}
\makeatletter
@@ -28,39 +26,45 @@
\setlength{\parskip}{7pt plus 1pt minus 1pt}
-\justifying
-\let\oldraggedright\raggedright
-\let\raggedright\justifying
-
-\lstset{
- basicstyle=\ttfamily\color{blue!50!red}
-}
-
-\lstnewenvironment{code}{}{}
-
\setbeamersize{text margin left=8mm,text margin right=8mm}
-\newenvironment{framex}{\begin{frame}[fragile=singleslide,environment=framex]}{\end{frame}}
+\setbeamercolor{normal text}{bg=gray!20}
\setbeamertemplate{frametitle}{\strut\insertframetitle\strut\par}
\setbeamertemplate{navigation symbols}{}
+\newcommand{\cdotfill}{\leavevmode\xleaders\hbox to 0.5em{\hss$\cdot$\hss}\hfill\kern0pt\relax}
+
+\usepackage{tabularx}
+
\newcommand{\ulinefill}[1]{\xleaders\hbox{\underline{\vphantom{#1}\kern1pt}}\hfill\kern0pt}
\newcommand{\fillbox}[1]{\ulinefill{#1}\underline{#1}\ulinefill{#1}}
-\setbeamercolor{normal text}{bg=gray!20}
-
\setbeamertemplate{title page}{%
\renewcommand{\arraystretch}{2}%
\usebeamerfont{title}
- \begin{tabu}{|X|}
+ \begin{tabularx}{\linewidth}{|X|}
\hline
模板名称:\fillbox{\usebeamercolor[fg]{title}\inserttitle} \\
模板作者:\fillbox{\insertauthor} \\
所在单位:\fillbox{\insertinstitute} \\
更新日期:\fillbox{\the\year}年\fillbox{\the\month}月\fillbox{\the\day}日\\
\hline
- \end{tabu}%
+ \end{tabularx}%
+}
+
+\usepackage{ragged2e}
+
+\justifying
+\let\oldraggedright\raggedright
+\let\raggedright\justifying
+
+\usepackage{fancyvrb}
+
+\newenvironment{framex}{\begin{frame}[fragile=singleslide,environment=framex]}{\end{frame}}
+
+\DefineVerbatimEnvironment{code}{Verbatim}{%
+ formatcom=\color{blue!50!red}%
}
\begin{document}
@@ -136,6 +140,22 @@
\end{framex}
\begin{framex}
+\frametitle{判断题目}
+\begin{code}
+\makepart{判断题}{题数分值}
+
+\begin{problem}
+第一道判断题描述。\true
+\end{problem}
+
+\begin{problem}
+第二道判断题描述。\false
+\end{problem}
+\end{code}
+其中 \verb!\true! 和 \verb!\false! 命令分别表示正确和错误。
+\end{framex}
+
+\begin{framex}
\frametitle{填空题目}
\begin{code}
\makepart{填空题}{题数分值}
@@ -243,6 +263,15 @@
\end{framex}
\begin{framex}
+\frametitle{解答名称}
+通过重新定义 \verb!\solutionname! 命令,可以改变 \verb!solution! 环境的名称。
+比如下面例子将“解答”二字改为“证明”:
+\begin{code}
+\renewcommand{\solutionname}{证明}
+\end{code}
+\end{framex}
+
+\begin{framex}
\frametitle{评分命令}
计算题和证明题等主观题的排版方法是完全一样的。在编写这些主观题的解答时,
可以用 \verb!\score! 命令给出各步骤得分。比如:
@@ -256,6 +285,40 @@ $2+2=4$ \score{8}
\end{framex}
\begin{framex}
+\frametitle{对齐命令}
+此文档类提供几个对齐命令,用于在不同行之间对齐。比如
+\vskip1em\hrule
+我们有$(a+b)^2 = (a+b)(a+b)$ \par
+\leavevmode\phantom{我们有$(a+b)^2$}${}= a^2 + 2ab + b^2$ \cdotfill 2分
+\vskip0.6em\hrule\vskip1em
+\begin{code}
+我们有$(a+b)^2 \? = (a+b)(a+b)$ \\
+ \+$= a^2+2ab+b^2$ \score{2}
+\end{code}
+第一个公式内部的 \verb!\?! 保存当前水平位置,
+而第二个公式前面的 \verb!\+! 表示跳到之前保存的位置。
+\par
+这两个对齐命令 \verb!\?! 和 \verb!\+! 需要编译两次才能生效。
+\end{framex}
+
+\begin{framex}
+\frametitle{对齐命令}
+此文档类提供几个对齐命令,用于在不同行的对齐。比如
+\vskip1em\hrule
+我们有$(a+b)^2 = (a+b)(a+b)$ \par
+\leavevmode\phantom{我们\,}${}= a^2 + 2ab + b^2$ \cdotfill 2分
+\vskip0.6em\hrule\vskip1em
+\begin{code}
+我们有 \? $(a+b)^2 = (a+b)(a+b)$ \\
+ \< $= a^2+2ab+b^2$ \score{2}
+\end{code}
+第一行公式前面的 \verb!\?! 保存当前水平位置,
+而第二行公式前面的 \verb!\<! 表示跳到之前保存位置的左侧(左移一个等号的宽度)。
+\par
+这两个对齐命令 \verb!\?! 和 \verb!\<! 需要编译两次才能生效。
+\end{framex}
+
+\begin{framex}
\frametitle{其它题型}
除了上述四种题型之外,其它题型可以用下面方式编写:
\begin{code}
@@ -308,7 +371,7 @@ $2+2=4$ \score{8}
\frametitle{竖直空白}
在试卷的各个小题后面,可以留下一些竖直空白。本文档类支持下列这些竖直空白命令:\par
\renewcommand{\arraystretch}{1.3}%
-\begin{tabu}{XX}
+\begin{tabularx}{\linewidth}{l<{\qquad}X}
\hline
\texttt{\string\smallskip} & 竖直小空白 \\
\hline
@@ -318,7 +381,7 @@ $2+2=4$ \score{8}
\hline
\texttt{\string\vfill} & 竖直填充 \\
\hline
-\end{tabu}
+\end{tabularx}\par
当然,竖直空白命令可以连续使用多个,以得到所需的空白。
\end{framex}
@@ -329,7 +392,7 @@ $2+2=4$ \score{8}
分别只对 A 卷和 B 卷有效。
\par
\renewcommand{\arraystretch}{1.3}%
-\begin{tabu}{XX[2]}
+\begin{tabularx}{\linewidth}{l<{\qquad}X}
\hline
\texttt{\string\newpage} & 分页,对A卷和B卷均有效 \\
\hline
@@ -337,7 +400,7 @@ $2+2=4$ \score{8}
\hline
\texttt{\string\newpageb} & 分页,仅对B卷有效 \\
\hline
-\end{tabu}
+\end{tabularx}\par
在试卷中\alert{不要}使用其他分页命令,比如 \verb!\clearpage! 等。
\end{framex}
diff --git a/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls
index e839799d0e8..84e36954a50 100644
--- a/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls
+++ b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls
@@ -6,18 +6,22 @@
% ----------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jnuexam}[2018/11/21 v0.5 An exam class for Jinan University]
+\ProvidesClass{jnuexam}[2019/11/08 v0.7 An exam class for Jinan University]
\newif\ifsidebyside \sidebysidefalse % 是否 A3 纸张
\newif\ifreverse \reversefalse % 是否逆序出题
\newif\ifanswer \answertrue % 是否显示答案
+\newif\ifamsfonts \amsfontsfalse % 切换数学字体
\newif\ifsourcehan \sourcehanfalse % 切换思源字体
+\newif\ifdisplay \displayfalse % 切换展示公式
\newif\ifcollection \collectionfalse % 用于试卷题库
\DeclareOption{a3paper}{\sidebysidetrue}
\DeclareOption{reverse}{\reversetrue}
\DeclareOption{noanswer}{\answerfalse}
+\DeclareOption{amsfonts}{\amsfontstrue}
\DeclareOption{sourcehan}{\sourcehantrue}
+\DeclareOption{display}{\displaytrue}
\DeclareOption{collection}{\collectiontrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}} %其它选项
@@ -28,14 +32,22 @@
% 14bp 12bp 10.5bp 9bp
\LoadClass[cs4size,UTF8,noindent]{ctexart}
+\ifamsfonts
+ \RequirePackage{amssymb}
+\else
+ \RequirePackage[utopia]{mathdesign} % charter, utopia
+ \renewcommand\bfdefault{bx}
+ \let\oldoiint\oiint\renewcommand{\oiint}{\oldoiint\nolimits}
+ \DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }
+\fi
+
\ifsidebyside
\RequirePackage[a3paper,landscape,twocolumn,columnsep=40mm,left=50mm,right=30mm,top=25mm,bottom=25mm]{geometry}
\else
\RequirePackage[a4paper,left=30mm,right=30mm,top=25mm,bottom=25mm]{geometry}
\fi
-\RequirePackage{tabu}
-\RequirePackage{amssymb}
+\RequirePackage{tabularx}
\RequirePackage{lastpage}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
@@ -44,9 +56,12 @@
\RequirePackage{etoolbox}
\RequirePackage{calc}
+\newcolumntype{Y}{>{\centering\arraybackslash}X}
+\newcolumntype{n}[1]{>{\centering\arraybackslash}m{#1}}
+
\setlength{\parindent}{0em}
-\setlength{\lineskiplimit}{3pt}
-\setlength{\lineskip}{3pt}
+\setlength{\lineskiplimit}{4pt}
+\setlength{\lineskip}{4pt}
%% ---------------------------------------------------------------------------
%% 密封线命令 \mifengxian
@@ -116,10 +131,10 @@
\newcommand{\head@table@a}{%
\begin{tabular}{l}
- \underbox{11em}{\niandu}学年度第\underbox{5.5em}{\xueqi}学期 \\
- 课程名称:\underbox{17.5em}{\kecheng\ifx\zhuanye\my@empty\else\kern0pt(\zhuanye)\fi} \\
- 授课教师:\underparbox{17.5em}{\centering\rule{0pt}{3ex}\jiaoshi} \\
- 考试时间:\underbox{17.5em}{\shijian} \\
+ \underbox{11\ccwd}{\niandu}学年度第\underbox{5.5\ccwd}{\xueqi}学期 \\
+ 课程名称:\underbox{17.5\ccwd}{\kecheng\ifx\zhuanye\my@empty\else\kern0pt(\zhuanye)\fi} \\
+ 授课教师:\underparbox{17.5\ccwd}{\centering\rule{0pt}{3ex}\jiaoshi} \\
+ 考试时间:\underbox{17.5\ccwd}{\shijian} \\
\end{tabular}
}
@@ -136,9 +151,9 @@
\newcommand{\head@table@c}{%
\begin{tabular}{l}
- \underspace{10em}学院\underspace{8em}专业\underspace{7.5em}班\kern0pt(\kern0pt{}级\kern0pt) \\[1em]
- 姓名\underspace{8em}学号\underspace{10em}\hfill
- \bfseries 内招~[\ischeck{\neizhao}] 外招~[\ischeck{\waizhao}] %\\[0.8em]
+ \underspace{10\ccwd}学院\underspace{8\ccwd}专业\underspace{7.5\ccwd}班\kern0pt(\kern0pt{}级\kern0pt) \\[1em]
+ 姓名\underspace{8\ccwd}学号\underspace{10\ccwd}\hfill
+ \bfseries 内招~[\ischeck{\neizhao}]~~外招~[\ischeck{\waizhao}] %\\[0.8em]
\end{tabular}
}
@@ -151,25 +166,25 @@
\ifx\shijuan\my@temp@c\renewcommand{\shijuan}{D}\fi
\fi
\noindent
- \begin{tabu}{|@{}X@{}|}
+ \begin{tabularx}{\linewidth}{|@{}X@{}|}
\hline\renewcommand{\arraystretch}{1.5}%
- \begin{tabu}{@{}>{\bfseries}l@{}|@{}X@{}|@{}l@{}}
+ {\begin{tabularx}{\linewidth}{@{}>{\bfseries}l@{}|@{}X@{}|@{}l@{}}
\begin{tabular}{l}教\\ 师\\ 填\\ 写\end{tabular} & \head@table@a & \head@table@b
- \end{tabu}\\
+ \end{tabularx}}\\
\hline\renewcommand{\arraystretch}{0.9}%
- \begin{tabu}{@{}>{\bfseries}l@{}|@{}X@{}}
+ {\begin{tabularx}{\linewidth}{@{}>{\bfseries}l@{}|@{}X@{}}
\begin{tabular}{l}考\\ 生\\ 填\\ 写\end{tabular} & \head@table@c
- \end{tabu}\\
+ \end{tabularx}}\\
\hline
- \end{tabu}
- \vspace{1em}
- \noindent\begin{tabu}{|*{8}{X[c]|}}
+ \end{tabularx}
+ \par\vspace{1em}
+ \noindent\begin{tabularx}{\linewidth}{|*{8}{Y|}}
\hline
- \bfseries{题 号} & 一 & 二 & 三 & 四 & 五 & 六 & 总 分\\
+ \textbf{题号} & 一 & 二 & 三 & 四 & 五 & 六 & 总分\\
\hline
- \bfseries{得 分} & & & & & & & \\
+ \parbox[c][2em][c]{2.2em}{\bfseries 得分} & & & & & & & \\
\hline
- \end{tabu}
+ \end{tabularx}
}
%% ---------------------------------------------------------------------------
@@ -218,6 +233,7 @@
\xdef\allproblems{}
\xdef\lastproblem{}
\newcounter{problem}
+\newcommand{\solutionname}{解}
\newcounter{choice} % 后面选择题的 abcd 环境要用到
\newcounter{step} % 后面解答题的 \step 命令要用到
@@ -228,14 +244,14 @@
\setcounter{problem}{0}%
\stepcounter{section}%
\vspace{1em}%
- \noindent\begin{tabu}{|X[c]|X[c]|X[6]}
+ \noindent\begin{tabularx}{\linewidth}{|n{1.7cm}|n{1.7cm}|X}
\cline{1-2}
得分 & 评阅人 & \textbf{\Chinese{section}、#1}\\
\cline{1-2}
& & (#2) \\
\cline{1-2}
- \end{tabu}
- \vspace{1em}
+ \end{tabularx}
+ \par\vspace{1em}
}
\newcommand{\makedata}[1]{%
@@ -249,11 +265,11 @@
\newenvironment{problemreal}{%
\stepcounter{problem}\setcounter{choice}{0}\setcounter{step}{0}%
- \textsf{\color{blue}\arabic{problem}}.\;\,\ignorespaces
+ \textbf{\textsf{{\color{blue}\arabic{problem}}.}}\;\,\ignorespaces
}{\par}
\newenvironment{solutionreal}{%
\setcounter{step}{0}%
- \textsf{\color{blue}解答}\quad\ignorepars
+ \textbf{\textsf{{\color{blue}\solutionname}.}}\;\,\ignorepars
}{\par}
\let \oldnewpage = \newpage
@@ -373,15 +389,16 @@
\newcommand{\answertable}[3][1em]{%
答题须知:本题答案必须写在如下表格中,否则不给分.\par
- \begin{tabu}{|c|*{#3}{X[c]|}}
+ \begin{tabularx}{\linewidth}{|c|*{#3}{Y|}}
\hline
\answer@lines{#1}{#2}{#3}
- \end{tabu}%
+ \end{tabularx}%
\par\vspace{0.8em}%
}
%% ---------------------------------------------------------------------------
%% 答案切换命令 \answer
+%% 判断命令 \true 和 \false
%% 填空命令 \fillin 和 \fillout
%% 选择命令 \pickin 和 \pickout
%% 四个选项排版环境 abcd,根据四个选项的长度自动排成一行、两行或四行
@@ -389,11 +406,14 @@
\newcommand{\answer}[1]{\ifanswer#1\else\phantom{#1}\fi}
+\newcommand{\cdotfill}{\leavevmode\xleaders\hbox to 0.5em{\hss$\cdot$\hss}\hfill\kern0pt\relax}
+\newcommand{\true}{\unskip\nobreak\cdotfill(\makebox[1.5em]{\color{blue}\answer{$\checkmark$}})}
+\newcommand{\false}{\unskip\nobreak\cdotfill(\makebox[1.5em]{\color{blue}\answer{\sffamily x}})}
+
\newcommand{\ulinefill}[1]{\xleaders\hbox{\underline{\vphantom{#1}\kern1pt}}\hfill\kern0pt}
\newcommand{\fillout}[1]{\allowbreak\hbox{}\nobreak\ulinefill{#1}\underline{\color{blue}\answer{#1}}\ulinefill{#1}}
\newcommand{\fillin}[1]{\underline{\hspace{1em}\color{blue}\answer{#1}\hspace{1em}}}
-\newcommand{\cdotfill}{\leavevmode\xleaders\hbox to 0.5em{\hss$\cdot$\hss}\hfill\kern0pt\relax}
\newcommand{\pickout}[1]{\unskip\nobreak\cdotfill(\makebox[1.5em]{\color{blue}\answer{#1}})}
\newcommand{\pickin}[1]{\unskip\nobreak\hspace{0.3em}(\makebox[1.5em]{\color{blue}\answer{#1}})\hspace{0.3em}\ignorespaces}
@@ -431,21 +451,86 @@
\fi
}
-%\newcommand{\my@item}{\ifnum\value{choice}=0\par\fi\stepcounter{choice}}
-%\newcommand{\fullitem}[1]{\my@item\parbox{\linewidth}{(\Alph{choice})\ #1\rule[-0.5em]{0pt}{0.5em}}\hfill\ignorespaces}
-%\newcommand{\halfitem}[2][0.5]{\my@item\makebox[#1\linewidth][l]{(\Alph{choice})\ #2}\hfill\ignorespaces}
-%\newcommand{\quaritem}[2][0.25]{\my@item\makebox[#1\linewidth][l]{(\Alph{choice})\ #2}\hfill\ignorespaces}
-
%% ---------------------------------------------------------------------------
%% 解答题步骤命令 \step
%% ---------------------------------------------------------------------------
\newcommand{\step}{%
\stepcounter{step}%
- \makebox[2em][l]{\ttfamily(\arabic{step})}%
+ \textsf{(\arabic{step})}\;\,%
}
%% ---------------------------------------------------------------------------
+%% 自由对齐命令 \tabpoint, \tabto, \tableft
+%% 命令 \tabpoint 记录当前的水平位置,也可以简写为 \?
+%% 命令 \tabto 跳到之前记录的位置,也可以简写为 \+
+%% 命令 \tableft 跳到之前记录的位置的左侧,也可以简写为 \<
+%% 这些自由对齐命令需要编译两次才能生效
+%% ---------------------------------------------------------------------------
+
+\usepackage{zref-savepos}
+
+\@ifundefined{zsaveposx}{\let\zsaveposx\zsavepos}{} % 旧版本无 \zsaveposx 命令
+
+\newcounter{saveposcnt}
+\newcounter{useposcnt}
+\renewcommand*{\thesaveposcnt}{savepos\number\value{saveposcnt}}
+\renewcommand*{\theuseposcnt}{usepos\number\value{useposcnt}}
+
+\def\my@alignment@offset{}
+
+\def\my@alignment@list{}
+\forcsvlist{\listadd\my@alignment@list}{=,<,>,\le,\ge,\leq,\geq,\approx}
+
+\newlength{\my@alignment@kern}
+
+\newcommand*{\my@alignment@check}[1]{%
+ \ifx\my@let@token #1%
+ \def\my@alignment@offset{5}%
+ \listbreak
+ \fi
+}
+
+\newcommand{\my@alignment@next}{%
+ \ifdefempty{\my@alignment@offset}{%
+ \def\my@alignment@offset{0}%
+ \forlistloop{\my@alignment@check}{\my@alignment@list}%
+ }{}%
+ \settowidth{\my@alignment@kern}{$\mkern\my@alignment@offset mu$}%
+ \stepcounter{saveposcnt}%
+ \rlap{\kern\my@alignment@kern\zsaveposx{\thesaveposcnt}}%
+}
+
+\newcommand*{\tabpoint}[1][]{%
+ \leavevmode
+ \def\my@alignment@offset{#1}%
+ \futurelet\my@let@token\my@alignment@next
+}
+\let \? = \tabpoint
+
+\newcommand*{\tabto}{%
+ \stepcounter{useposcnt}%
+ \zsaveposx{\theuseposcnt}%
+ \noindent
+ \hskip\zposx{\thesaveposcnt}sp\relax
+ \hskip-\zposx{\theuseposcnt}sp\relax
+ \ignorespaces
+}
+\let \+ = \tabto
+
+\newcommand*{\tableft}{%
+ \settowidth{\my@alignment@kern}{$=\mkern5mu$}%
+ \stepcounter{useposcnt}%
+ \zsaveposx{\theuseposcnt}%
+ \noindent
+ \hskip\zposx{\thesaveposcnt}sp\relax
+ \hskip-\zposx{\theuseposcnt}sp\relax
+ \hskip-\my@alignment@kern
+ \ignorespaces
+}
+\let \< = \tableft
+
+%% ---------------------------------------------------------------------------
%% 评分命令 \score
%% ---------------------------------------------------------------------------
@@ -467,6 +552,14 @@
}
%% ---------------------------------------------------------------------------
+%% 文档选项 display 将全部公式都设为展示公式
+%% 命令 \display 将当前环境的公式都设为展示公式
+%% ---------------------------------------------------------------------------
+
+\newcommand{\display}{\everymath\expandafter{\the\everymath\displaystyle}}
+\ifbool{display}{\display}{}
+
+%% ---------------------------------------------------------------------------
%% 载入个人定制文件 jnuexam.cfg
%% 中文字体切换选项 sourcehan
%% ---------------------------------------------------------------------------
@@ -526,6 +619,7 @@
\RequirePackage{CJKfntef}
\RequirePackage{multirow}
\RequirePackage{diagbox}
+\RequirePackage{tabu}
\RequirePackage{relsize}
\newcommand{\Int}{\mathop{\mathlarger{\int}}}
@@ -557,9 +651,15 @@
\renewrobustcmd{\d}{\ifbool{mmode}{\diff}{\oldd}}%
}
-\newcommand{\va}{\vec{a\vphantom{b}}}
+% from mathabx package
+\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
+\DeclareFontShape{U}{mathx}{m}{n}{<-> mathx10}{}
+\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
+\DeclareMathAccent{\widebar}{0}{mathx}{"73}
+
+\newcommand{\va}{\vec{a}}
\newcommand{\vb}{\vec{b}}
-\newcommand{\vc}{\vec{c\vphantom{b}}}
+\newcommand{\vc}{\vec{c}}
\newcommand{\vd}{\vec{d}}
\newcommand{\ve}{\vec{e}}
\newcommand{\vi}{\vec{i}}