diff options
Diffstat (limited to 'Master')
23 files changed, 1102 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/jnuexam/README b/Master/texmf-dist/doc/latex/jnuexam/README new file mode 100644 index 00000000000..7fa70e2b677 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/README @@ -0,0 +1,8 @@ + +Package: An exam class for Jinan University + +Author: Jianrui Lyu <tolvjr@163.com> + +Website: https://lvjr.bitbucket.io/jnuexam.html + +License: Creative Commons Attribution-ShareAlike 4.0 International License diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf Binary files differnew file mode 100644 index 00000000000..0f80518f944 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.tex new file mode 100644 index 00000000000..2165c33f56d --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3input.tex @@ -0,0 +1,9 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 直接包含 A4 试卷的 PDF 文件,生成双栏的 A3 试卷 +\documentclass[a3paper]{jnuexam} +\begin{document} +\includepdf[pages=-,nup=2x1,offset=1cm 0,delta=-2cm 0]{exam-a-a4print} +%\includepdf[pages=-,nup=2x1,offset=1cm 0,delta=-2cm 0,frame]{exam-a} +\end{document} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf Binary files differnew file mode 100644 index 00000000000..b6267d46181 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.tex new file mode 100644 index 00000000000..140cb573cac --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a3split.tex @@ -0,0 +1,6 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 将原有的 A4 试卷改为 A3 试卷双栏排版 +\PassOptionsToClass{a3paper,noanswer}{jnuexam} +\input{exam-a} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.pdf Binary files differnew file mode 100644 index 00000000000..d9119b72c82 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.tex new file mode 100644 index 00000000000..6da2c24a858 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a-a4print.tex @@ -0,0 +1,6 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 重新排版原有的 A4 试卷,不显示答案 +\PassOptionsToClass{noanswer}{jnuexam} +\input{exam-a} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf Binary files differnew file mode 100644 index 00000000000..1b4ef7a6ccb --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex new file mode 100644 index 00000000000..30925233ed4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-a.tex @@ -0,0 +1,441 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex +\documentclass{jnuexam} + +%\answerfalse %不显示答案 + +\setlength\arraycolsep{4pt} +\newcommand{\cov}{\operatorname{cov}} + +\begin{document} + +\renewcommand{\niandu}{2017--2018} +\renewcommand{\xueqi}{2} +\renewcommand{\kecheng}{大学数学} +\renewcommand{\zhuanye}{经管~3~学分} % 可以为空白 +\renewcommand{\jiaoshi}{吕荐瑞} +\renewcommand{\shijian}{2018~年~06~月~28~日} +\renewcommand{\bixiu}{1} % 1 为必修,0 为选修 +\renewcommand{\bijuan}{1} % 1 为闭卷,0 为开卷 +\renewcommand{\shijuan}{A} % A 或 B 或 C 卷 +\renewcommand{\neizhao}{1} % 1 打勾,0 不勾 +\renewcommand{\waizhao}{0} % 1 打勾,0 不勾 + +\makehead % 生成试卷表头 + +\makepart{填空题}{共~8~小题,每小题~2~分,共~16~分} + +\newpageb % B卷分页点 + +\begin{problem} +已知二阶行列式 $\text{$\left|\begin{array}{cc} + 1 & 2\\ + - 3 & x +\end{array}\right|$=0}$,则 $x=$ \fillout{$-6$}。 +\end{problem} + +\vfill + +\begin{problem} +五阶行列式的一共有 \fillout{$120$} 项。 +\end{problem} + +\vfill + +\begin{problem} +向量组 $\alpha_1=(1,1,0), \alpha_2=(0,1,1), \alpha_3=(1,0,1)$, +则将向量 $\beta=(4, 5, 3)$ 表示为 $\alpha_1, \alpha_2, \alpha_3$ +的线性组合为 $\beta=$ \fillout{$3\alpha_1+2\alpha_2+\alpha_3$}。 +\end{problem} + +\vfill + +\begin{problem} +已知$P(A)=0.3$, $P(B|A)=0.4$, $P(B|\bar{A})=0.5$, 则$P(B)=$ \fillout{$0.47$}。 +\end{problem} + +\vfill + +\begin{problem} +已知连续型$\xi$的密度函数为$\varphi(x)=\left\{ +\begin{array}{ll} + k \cos x, & - \frac{\pi}{2} < x < \frac{\pi}{2}\\ + 0, & \text{其它} +\end{array}\right.$, +则$k=$ \fillout{$\frac{1}{2}$}。 +\end{problem} + +\vfill + +\begin{problem} +已知随机变量$\xi$的期望和方差各为$E\xi=3, D\xi=2$, 则$E\xi^2=$ \fillout{$11$}。 +\end{problem} + +\vfill + +\begin{problem} +电子管寿命$\xi$满足平均寿命为$1000$小时的指数分布,则它的寿命小于$2000$小时概率为 \fillout{$1-e^{-2}$}。 +\end{problem} + +\vfill + +\begin{problem} +已知$\xi$和$\eta$相互独立且$\xi\sim N(1,4), \eta\sim N(2,5)$,则$\xi-2\eta\sim$ \fillout{$N(-3,24)$}。 +\end{problem} + +\vfill + +\newpagea % A卷分页点 + +\makepart{单选题}{共~8~小题,每小题~2~分,共~16~分} + +\newpageb % B卷分页点 + +\begin{problem} +下列各排列哪个是偶排列 \pickout{D} +\quaditem{3712456} +\quaditem{36715284} +\quaditem{654321} +\quaditem{41253} +\end{problem} + +\vfill + +\begin{problem} +若三阶行列式 $\left|\begin{array}{ccc} + a_1 & a_2 & a_3\\ + 2 b_1 - a_1 & 2 b_2 - a_2 & 2 b_3 - a_3\\ + c_1 & c_2 & c_3 +\end{array}\right| = 2$,则 $\left|\begin{array}{ccc} + a_1 & a_2 & a_3\\ + b_1 & b_2 & b_3\\ + c_1 & c_2 & c_3 +\end{array}\right|=$ \pickout{A} +\quaditem{1} +\quaditem{-1} +\quaditem{2} +\quaditem{-2} +\end{problem} + +\vfill + +\begin{problem} +已知矩阵 $A = \left(\begin{array}{ccc} + 1 & 1 & 0\\ + 1 & x & 0\\ + 0 & 0 & 1 +\end{array}\right)$ 其中两个特征值为 $\lambda_1 = 1$ 和 $\lambda_2 += 2$,则 $x=$ \pickout{B} +\quaditem{2} +\quaditem{1} +\quaditem{0} +\quaditem{-1} +\end{problem} + +\vfill + +\begin{problem} +二次型 $f = 4 x_1^2 - 2 x_1 x_2 + 6 x_2^2$ 对应的矩阵等于 \pickout{C} +\quaditem{$\left(\begin{array}{cc} + 4 & - 2\\ + - 2 & 6 +\end{array}\right)$} +\quaditem{$\left(\begin{array}{cc} + 2 & - 2\\ + - 2 & 3 +\end{array}\right)$} +\quaditem{$\left(\begin{array}{cc} + 4 & - 1\\ + - 1 & 6 +\end{array}\right)$} +\quaditem{$\left(\begin{array}{cc} + 2 & - 1\\ + - 1 & 3 +\end{array}\right)$} +\end{problem} + +\vfill + +\begin{problem} +对任何一个本校男学生,以$A$表示他是大一学生,$B$表示他是大二学生,则事件$A$和$B$是\pickout{B} +\halfitem{对立事件} +\halfitem{互斥事件} +\halfitem{既是对立事件又是互斥事件} +\halfitem{不是对立事件也不是互斥事件} +\end{problem} + +\vfill + +\begin{problem} +下列说法\CJKunderline{不正确}的是\pickout{B} +\fullitem{大数定律说明了大量相互独立且同分布的随机变量的均值的稳定性} +\fullitem{大数定律说明大量相互独立且同分布的随机变量的均值近似于正态分布} +\fullitem{中心极限定理说明了大量相互独立且同分布的随机变量的和的稳定性} +\fullitem{中心极限定理说明大量相互独立且同分布的随机变量的和近似于正态分布} +\end{problem} + +\vfill + +\begin{problem} +在数理统计中,对总体$X$和样本$(X_1,\cdots,X_n)$的说法哪个是\CJKunderline{不正确}的\pickout{D} +\halfitem{总体是随机变量} +\halfitem{样本是$n$元随机变量} +\halfitem{$X_1, \cdots, X_n$相互独立} +\halfitem{$X_1 = X_2 =\cdots = X_n$} +\end{problem} + +\vfill + +\begin{problem} +样本平均数$\bar{X}$\CJKunderline{未必是}总体期望值$\mu$的\pickout{A} +\quaditem{最大似然估计} +\quaditem{有效估计} +\quaditem{一致估计} +\quaditem{无偏估计} +\end{problem} + +\vfill + +\newpagea % A卷分页点 + +\makepart{计算题}{共~6~小题,每小题~8~分,共~48~分} + +\newpageb % B卷分页点 + +\begin{problem} +计算四阶行列式 $A = \left|\begin{array}{cccc} + 0 & 1 & 2 & 3\\ + 1 & 2 & 3 & 0\\ + 2 & 3 & 0 & 1\\ + 3 & 0 & 1 & 2 +\end{array}\right|$ 的值。 +\end{problem} + +\bigskip + +\begin{solution} +$A = \left|\begin{array}{cccc} + 0 & 1 & 2 & 3\\ + 1 & 2 & 3 & 0\\ + 2 & 3 & 0 & 1\\ + 3 & 0 & 1 & 2 + \end{array}\right| = \left|\begin{array}{cccc} + 0 & 1 & 2 & 3\\ + 1 & 2 & 3 & 0\\ + 0 & - 1 & - 6 & 1\\ + 0 & - 6 & - 8 & 2 + \end{array}\right| = 1 \cdot (- 1)^{2 + 1} \left|\begin{array}{ccc} + 1 & 2 & 3\\ + - 1 & - 6 & 1\\ + - 6 & - 8 & 2 + \end{array}\right|$ \dotfill 4分\par +\qquad\qquad $= -\left|\begin{array}{ccc} + 1 & 2 & 3\\ + 0 & - 4 & 4\\ + 0 & 4 & 20 + \end{array}\right| = - \left|\begin{array}{cc} + - 4 & 4\\ + 4 & 20 + \end{array}\right| = -(-4\cdot20-4\cdot4) = 96$ \dotfill 8分 +\end{solution} + +\vfill + +\begin{problem} +用配方法将二次型 $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$ 化为标准形 $f = d_1 y^2_1 + d_2 y^2_2 + d_3 y^2_3$ 。 +\end{problem} + +\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\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\qquad$= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3$ \dotfill 3分 \par +\qquad\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\qquad$= (x_1 + x_2 - 3 x_3)^2 + (x_2 - 3 x_3)^2 - 9 x_3^2$ \dotfill 6分\par +令$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$为标准形。\dotfill 8分 +\end{solution} + +\vfill + +\newpage + +\begin{problem} +设二元随机变量$(\xi, \eta)$的联合分布表为 +\begin{tabular}{|l|l|l|l|} + \hline + $\xi \backslash \eta$ & -1 & 0 & 1\\ + \hline + 0 & 0 & 1/3 & 0\\ + \hline + 1 & 1/3 & 0 & 1/3\\ + \hline +\end{tabular}。\par +(1) 求关于$\xi$和$\eta$的边缘分布。\par +(2) 判断$\xi$和$\eta$的独立性。\par +(3) 判断$\xi$和$\eta$的相关性。 +\end{problem} + +\bigskip + +\begin{solution} +(1) 边缘分布为 \begin{tabular}{|l|l|l|} + \hline + $\xi$ & 0 & 1\\ + \hline + $P$ & 1/3 & 2/3\\ + \hline +\end{tabular}, \ \begin{tabular}{|l|l|l|l|} + \hline + $\eta$ & -1 & 0 & 1\\ + \hline + $P$ & 1/3 & 1/3 & 1/3\\ + \hline +\end{tabular}. \dotfill 2分 \par +(2) 由$P(\xi = 0, \eta = 0) = \frac{1}{3} \neq \frac{1}{9} = P(\xi = 0) P(\eta = 0)$, +知$\xi$和$\eta$不独立. \dotfill 4分 \par +(3) 由联合分布表求得$\xi \eta$的分布为 \begin{tabular}{|l|l|l|l|} + \hline + $\xi \eta$ & -1 & 0 & 1\\ + \hline + $P$ & 1/3 & 1/3 & 1/3\\ + \hline +\end{tabular}.\dotfill 6分\par +因此有 $\cov(\xi, \eta) = E(\xi\eta) - E\xi E\eta = 0 -\frac{2}{3} \cdot 0 = 0$, +因此$\xi$和$\eta$不相关. \dotfill 8分 +\end{solution} + +\vfill + +\begin{problem} +设随机变量$\xi \sim N (1, 4)$,求$P (- 1 < \xi < 5)$。 +\end{problem} + +\bigskip + +\begin{solution} +$P(-1<\xi<5) = \Phi_0\left(\frac{5-1}{2}\right) - \Phi_0\left(\frac{-1-1}{2}\right)$ \dotfill 2分 \par +\qquad $= \Phi_0 (2) - \Phi_0 (- 1)$ \dotfill 4分 \par +\qquad $= \Phi_0 (2) + \Phi_0 (1) - 1$ \dotfill 6分 \par +\qquad $= 0.9773 + 0.8413 - 1 = 0.8186$ \dotfill 8分 +\end{solution} + +\vfill + +\newpage % A,B卷共同分页点 + +\begin{problem} +设每发炮弹命中飞机的概率是0.2且相互独立,现在发射100发炮弹。\par +(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$. \dotfill 2分 \par +(1) $P (10 < \xi < 30) = P (| \xi - E \xi | < 10) \geq 1 - \frac{D\xi}{10^2} + = 1 - \frac{16}{100} = 0.84$. \dotfill 4分 \par +(2) $P (10 < \xi < 30) \approx \Phi_0 \left( \frac{30 - 20}{\sqrt{16}}\right) + - \Phi_0 \left( \frac{10 - 20}{\sqrt{16}} \right)$ \dotfill 6分\par +\qquad $= 2 \Phi_0 (2.5) - 1 = 2 \cdot 0.9938 - 1 =0.9876$ \dotfill 8分 +\end{solution} + +\vfill + +\begin{problem} +从正态总体$N(\mu,\sigma^2)$中抽出样本容量为16的样本,算得其平均数为3160,标准差为100。 +试检验假设$H_0:\mu=3140$是否成立($\alpha = 0.01$)。 +\end{problem} + +\bigskip + +\begin{solution} +(1) 待检假设 $H_0 : \mu = 3140$. \dotfill 1分\par +(2) 选取统计量 $T = \frac{\bar{X}-\mu}{S / \sqrt{n}} \sim t(n-1)$. \dotfill 3分 \par +(3) 查表得到 $t_{\alpha} = t_{\alpha} (n - 1) = t_{0.01} (15) =2.947$. \dotfill 5分 \par +(4) 计算统计值 $t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} =\frac{3160-3140}{100/4} = 0.8$.\dotfill 7分 \par +(5) 由于 $| t | < t_{\alpha}$, 故接受 $H_0$, 即假设成立. \dotfill 8分 +\end{solution} + +\vfill + +\newpagea % A卷分页点 + +\makepart{证明题}{共~2~小题,每小题~10~分,共~20~分} + +\begin{problem} +不使用矩阵可相似对角化的判别定理,直接用矩阵的运算和性质证明下面的矩阵$A +=\left(\begin{array}{cc} + 1 & 1\\ + 0 & 1 +\end{array}\right)$不能相似对角化,即不存在可逆矩阵$P$和对角阵$\Lambda$使得$P^{-1}AP=\Lambda$。 +\end{problem} + +\bigskip + +\begin{proof} +假设有$P = \left(\begin{array}{cc} + a & b\\ + c & d +\end{array}\right)$使得$P^{-1}AP = \Lambda$,即$AP=P\Lambda$。\dotfill 2分\par +则有 $$\left(\begin{array}{cc} + a + c & b + d\\ + c & d +\end{array}\right) = \left(\begin{array}{cc} + 1 & 1\\ + 0 & 1 +\end{array}\right) \left(\begin{array}{cc} + a & b\\ + c & d +\end{array}\right) = \left(\begin{array}{cc} + a & b\\ + c & d +\end{array}\right) \left(\begin{array}{cc} + \lambda_1 & \\ + & \lambda_2 +\end{array}\right) = \left(\begin{array}{cc} + a \lambda_1 & b \lambda_2\\ + c \lambda_1 & d \lambda_2 +\end{array}\right)$$ 因此有 $\left\{ \begin{array}{llll} + a + c & = & a \lambda_1 & (1)\\ + b + d & = & b \lambda_2 & (2)\\ + c & = & c \lambda_1 & (3)\\ + d & = & d \lambda_2 & (4) +\end{array} \right.$ \dotfill 6分\par +由第1个和第3个方程消去$\lambda_1$,可以得到 $c^2 = 0$ 即 $c=0$; +由第2个和第4个方程消去$\lambda_2$,可以得到 $d^2 = 0$ 即 $d=0$。 +因此矩阵$P$不可逆,矛盾。\dotfill 10分 +\end{proof} + +\vfill + +\begin{problem} +设事件$A$和$B$相互独立,证明$A$和$\bar{B}$相互独立。 +\end{problem} + +\bigskip + +\begin{proof} +$P (A \cdot \bar{B}) = P (A - B) = P (A - A B)$ \dotfill 3分 \par +\qquad $= P (A) - P (A B) = P (A) - P (A) P (B)$ \dotfill 6分 \par +\qquad $= P (A) (1 - P (B)) = P (A) P (\bar{B})$ \dotfill 9分 \par +所以$A$和$\bar{B}$相互独立。\dotfill 10分 +\end{proof} + +\vfill + +\makedata{一些可能用到的数据} %附录数据 + +\begin{tabu}{*{4}{X[l,$]}} +\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{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 Binary files differnew file mode 100644 index 00000000000..b96cbfceda9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.tex new file mode 100644 index 00000000000..3bdbd18ea18 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3input.tex @@ -0,0 +1,9 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 直接包含 A4 试卷的 PDF 文件,生成双栏的 A3 试卷 +\documentclass[a3paper]{jnuexam} +\begin{document} +\includepdf[pages=-,nup=2x1,offset=1cm 0,delta=-2cm 0]{exam-b-a4print} +%\includepdf[pages=-,nup=2x1,offset=1cm 0,delta=-2cm 0,frame]{exam-b} +\end{document} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf Binary files differnew file mode 100644 index 00000000000..ba17005c2c5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.tex new file mode 100644 index 00000000000..fd39ae4b490 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a3split.tex @@ -0,0 +1,6 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 将原有的 A4 试卷改为 A3 试卷双栏排版 +\PassOptionsToClass{a3paper,noanswer}{jnuexam} +\input{exam-b} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.pdf Binary files differnew file mode 100644 index 00000000000..f6f63065421 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.tex new file mode 100644 index 00000000000..41db22542c4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b-a4print.tex @@ -0,0 +1,6 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 重新排版原有的 A4 试卷,不显示答案 +\PassOptionsToClass{noanswer}{jnuexam} +\input{exam-b} diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf b/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf Binary files differnew file mode 100644 index 00000000000..a9e757da8ab --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/exam-b.tex b/Master/texmf-dist/doc/latex/jnuexam/exam-b.tex new file mode 100644 index 00000000000..78b04a6bd04 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/exam-b.tex @@ -0,0 +1,6 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +% 从 A 卷自动生成 B 卷,将题目逆序排列 +\PassOptionsToClass{reverse}{jnuexam} +\input{exam-a} diff --git a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf Binary files differnew file mode 100644 index 00000000000..97cbce40683 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.pdf diff --git a/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex new file mode 100644 index 00000000000..0266b51a343 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jnuexam/jnuexam.tex @@ -0,0 +1,290 @@ +% -*- coding: utf-8 -*- +% !TEX program = xelatex + +\documentclass[12pt]{beamer} + +\usepackage{arev} +\usepackage[UTF8,noindent]{ctex} +\usepackage{ragged2e} +\usepackage{listings} +\usepackage{tabu} + +\setCJKsansfont{SimHei} +\setCJKmonofont{SimHei} +\setlength{\parskip}{7pt plus 1pt minus 1pt} + +\justifying +\let\oldraggedright\raggedright +\let\raggedright\justifying + +\lstset{ + basicstyle=\ttfamily\color{blue!50!red} +} + +\setbeamersize{text margin left=8mm,text margin right=8mm} + +\newenvironment{framex}{\begin{frame}[fragile=singleslide,environment=framex]}{\end{frame}} + +\setbeamertemplate{frametitle}{\strut\insertframetitle\strut\par} +\setbeamertemplate{navigation symbols}{} + +\begin{document} + +\title{暨南大学试卷 LaTeX 模板} +\author{吕荐瑞} +\institute{暨南大学数学系} + +\begin{frame}[plain] +\titlepage +\end{frame} + +\begin{framex} +\frametitle{简单介绍} +本文档介绍 \verb!jnuexam! 文档类。这个文档类提供暨南大学考试试卷的 LaTeX 模板。 +\par +这个模板将格式和内容分开,而且可以从一份 \verb!tex! 文件编译出四份试卷(A卷/B卷/A卷答案/B卷答案),使用方便。 +\par +这个模板的最新版本可以在下面地址下载:\newline + \url{https://lvjr.bitbucket.io/jnuexam.html} +\end{framex} + +\begin{framex} +\frametitle{编译方式} +这个文档类要求所有 \verb!tex! 文件都使用 \verb!UTF8! 编码, +若使用 \verb!GBK! 编码则无法得到正确结果。 +\par +如果对文件编码不熟悉,可以直接复制例子文件,然后在其中修改,即可正常编译。 +\par +这个文档类同时支持 \verb!XeLaTeX! 和 \verb!PDFLaTeX! 方式编译。为了得到最好的中文显示效果, +推荐用较先进的 \verb!XeLaTeX! 编译。 +\end{framex} + +\begin{framex} +\frametitle{试卷结构} +\begin{lstlisting} +\documentclass{jnuexam} +\begin{document} +...... +\makehead %生成试卷表头 +...... +\makepart{填空题}{题数分值} +...... +\makepart{单选题}{题数分值} +...... +\makepart{计算题}{题数分值} +...... +\makepart{证明题}{题数分值} +...... +\makedata{可能用到的数据} %附录数据 +...... +\end{document} +\end{lstlisting} +\end{framex} + +\begin{framex} +\frametitle{试卷表头} +\begin{lstlisting} +\renewcommand{\niandu}{2010--2011} +\renewcommand{\xueqi}{2} +\renewcommand{\kecheng}{大学数学} +\renewcommand{\zhuanye}{经管3学分} +\renewcommand{\jiaoshi}{吕荐瑞} +\renewcommand{\shijian}{2011年07月08日} +\renewcommand{\bixiu}{1} % 1为必修,0为选修 +\renewcommand{\bijuan}{1} % 1为闭卷,0为开卷 +\renewcommand{\shijuan}{A} % A/B/C卷 +\renewcommand{\neizhao}{1} % 1打勾,0不勾 +\renewcommand{\waizhao}{0} % 1打勾,0不勾 +\makehead %生成试卷表头 +\end{lstlisting} +其中 \verb!\zhuanye! 和 \verb!\shijian! 命令的内容可以为空。 +\end{framex} + +\begin{framex} +\frametitle{填空题目} +\begin{lstlisting} +\makepart{填空题}{题数分值} + +\begin{problem} +第一道填空题描述\fillout{答案}。 +\end{problem} + +\begin{problem} +第二道填空题描述\fillout{答案}。 +\end{problem} +\end{lstlisting} +\verb!\fillout! 命令将用下划线填满整行。另有个 \verb!\fillin! 命令,只留下最小宽度的下划线。 +\par +答案必须放在 \verb!\fillout! 或 \verb!\fillin! 命令里面;这样才能在生成空白试卷时隐藏它。 +\end{framex} + +\begin{framex} +\frametitle{选择题目} +\begin{lstlisting} +\makepart{单选题}{题数分值} + +\begin{problem} +第一道单选题描述\pickout{答案}。 +\end{problem} + +\begin{problem} +第二道单选题描述\pickout{答案}。 +\end{problem} +\end{lstlisting} +\verb!\pickout! 命令将把选择圆括号放在本行最右边。另外有个 \verb!\pickin! 命令,将选择圆括号放在当前位置。 +\par +答案必须放在 \verb!\pickout! 或 \verb!\pickin! 命令里面;这样才能在生成空白试卷时隐藏它。 +\end{framex} + +\begin{framex} +\frametitle{计算题目} +\begin{lstlisting} +\makepart{计算题}{题数分值} + +\begin{problem} +第一道计算题描述。 +\end{problem} +\begin{solution} +第一道计算题答案。 +\end{solution} + +\begin{problem} +第二道计算题描述。 +\end{problem} +\begin{solution} +第二道计算题答案。 +\end{solution} +\end{lstlisting} +\end{framex} + +\begin{framex} +\frametitle{证明题目} +\begin{lstlisting} +\makepart{证明题}{题数分值} + +\begin{problem} +第一道证明题描述。 +\end{problem} +\begin{proof} +第一道证明题答案。 +\end{proof} + +\begin{problem} +第二道证明题描述。 +\end{problem} +\begin{proof} +第二道证明题答案。 +\end{proof} +\end{lstlisting} +\end{framex} + +\begin{framex} +\frametitle{其它题型} +除了上述四种题型之外,其它题型可以用下面方式编写: +\begin{lstlisting} +\makepart{某题型}{题数分值} + +\begin{problem} +第一题描述。\answer{第一题答案} +\end{problem} + +\begin{problem} +第二题描述。\answer{第二题答案} +\end{problem} +\end{lstlisting} +其中题目答案必须放在 \verb!\answer! 命令里面;这样才能在生成空白试卷时隐藏它。 +\end{framex} + +\begin{framex} +\frametitle{附录数据} +在试卷最后,可以用下面命令增加附录数据部分: +\begin{lstlisting} +\makedata{可能用到的数据} %附录数据 +...... +\end{lstlisting} +附录数据必须放在 \verb!\makedata! 命令后面;否则在从A卷生成B卷时会出问题。 +\end{framex} + +\begin{framex} +\frametitle{空白试卷} +假设 \verb!exam-a.tex! 是含答案的试卷。新建一个包含以下内容的 \verb!exam-a-print.tex! 文档, +编译后将得到不含答案的空白试卷。 +\begin{lstlisting} +\PassOptionsToClass{noanswer}{jnuexam} +\input{exam-a} +\end{lstlisting} +也就是说,给 \verb!jnuexam! 文档类加上 \verb!noanswer! 选项后,编译时将会自动隐藏试卷答案。 +\end{framex} + +\begin{framex} +\frametitle{逆序出题} +假设 \verb!exam-a.tex! 是含答案的A卷。新建一个包含以下内容的 \verb!exam-b.tex! 文档, +编译后将得到逆序出题的B卷。 +\begin{lstlisting} +\PassOptionsToClass{reverse}{jnuexam} +\input{exam-a} +\end{lstlisting} +也就是说,给 \verb!jnuexam! 文档类加上 \verb!reverse! 选项后,编译时将会逆序排列各题型的小题。 +\end{framex} + +\begin{framex} +\frametitle{竖直空白} +在试卷的各个小题后面,可以留下一些竖直空白。本文档类支持下列这些竖直空白命令:\par +\renewcommand{\arraystretch}{1.3}% +\begin{tabu}{XX} + \hline + \texttt{\string\smallskip} & 竖直小空白 \\ + \hline + \texttt{\string\medskip} & 竖直中空白 \\ + \hline + \texttt{\string\bigskip} & 竖直大空白 \\ + \hline + \texttt{\string\vfill} & 竖直填充 \\ + \hline +\end{tabu} +当然,竖直空白命令可以连续使用多个,以得到所需的空白。 +\end{framex} + +\begin{framex} +\frametitle{分页命令} +分页命令 \verb!\newpage! 同样可以使用。由于A卷和B卷的小题顺序相反, +其中的分页位置通常也不同。故这里另外提供 \verb!\newpagea! 和 \verb!\newpageb! 命令, +分别只对 A 卷和 B 卷有效。 +\par +\renewcommand{\arraystretch}{1.3}% +\begin{tabu}{XX[2]} + \hline + \texttt{\string\newpage} & 分页,对A卷和B卷均有效 \\ + \hline + \texttt{\string\newpagea} & 分页,仅对A卷有效 \\ + \hline + \texttt{\string\newpageb} & 分页,仅对B卷有效 \\ + \hline +\end{tabu} +在试卷中\alert{不要}使用其他分页命令,比如 \verb!\clearpage! 等。 +\end{framex} + +\begin{framex} +\frametitle{分页例子} +关于分页命令的使用,可以看下面的典型例子: +\begin{lstlisting} +\makepart{某题型}{题型分值} +\newpageb +\begin{problem}第一题\end{problem}\vfill +\begin{problem}第二题\end{problem}\vfill +\newpage +\begin{problem}第三题\end{problem}\vfill +\begin{problem}第四题\end{problem}\vfill +\newpagea +\end{lstlisting} +这样编译得到的A卷就是这样的顺序: +\begin{lstlisting} +第一题 第二题 分页 第三题 第四题 分页 +\end{lstlisting} +而编译得到的B卷就是这样的顺序: +\begin{lstlisting} +第四题 第三题 分页 第二题 第一题 分页 +\end{lstlisting} +\end{framex} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls new file mode 100644 index 00000000000..38b86cbdaaf --- /dev/null +++ b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls @@ -0,0 +1,313 @@ +% -*- coding: utf-8 -*- +% ---------------------------------------------------------------------------- +% Author: Jianrui Lyu <tolvjr@163.com> +% Website: https://lvjr.bitbucket.io/jnuexam.html +% License: Creative Commons Attribution-ShareAlike 4.0 International License +% ---------------------------------------------------------------------------- + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{jnuexam}[2018/06/29 v0.2 An exam class for Jinan University] + +\newif\ifsidebyside \sidebysidefalse % 是否 A3 纸张 +\newif\ifreverse \reversefalse % 是否逆序出题 +\newif\ifanswer \answertrue % 是否显示答案 + +\DeclareOption{a3paper}{\sidebysidetrue} +\DeclareOption{reverse}{\reversetrue} +\DeclareOption{noanswer}{\answerfalse} + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexart}} %其它选项 + +\ProcessOptions %不可省略 + +% 四号 小四号 五号 小五号 +% 14bp 12bp 10.5bp 9bp +\LoadClass[cs4size,UTF8,noindent]{ctexart} + +\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 + +\newcommand{\mifengxian}{% +\def\1{\\[50mm]}\def\2{\\[15mm]}% +\begin{tikzpicture}[remember picture,overlay,very thick,font=\large] + \path (current page.south west) +(2cm,1cm) coordinate (a1); + \path (current page.north west) +(2cm,-1cm) coordinate (a2); + \path (current page.south west) +(3cm,1cm) coordinate (b1); + \path (current page.north west) +(3cm,-1cm) coordinate (b2); + \draw[dashed] (a1) -- node[left=1mm,text width=1em]{装\1订\1线} + node[right=1mm,text width=1em]{学\2生\2答\2卷\2不\2要\2超\2过\2此\2线} (a2); + \draw (b1) -- (b2); +\end{tikzpicture}} + +\newcommand{\caogaozhi}{% +\begin{tikzpicture}[remember picture,overlay,font=\sffamily\fontsize{180pt}{180pt}\selectfont] + \node[text=lightgray!40] at (current page.center) {草\quad 稿\quad 纸}; +\end{tikzpicture}} + +\RequirePackage{amsmath} +\RequirePackage{tabu} +\RequirePackage{multirow} +\RequirePackage{pifont} +\RequirePackage{lastpage} +\RequirePackage{fancyhdr} +\RequirePackage{xcolor} +\RequirePackage{comment} +\RequirePackage{environ} +\RequirePackage{etoolbox} +\RequirePackage{CJKfntef} + +\ifsidebyside + \RequirePackage{tikz} + \RequirePackage{everypage} + \AddEverypageHook{\mifengxian} + % 在 twocolumn 文档中,\newpage 可能是到下一栏,\clearpage 才能保证到下一页 + \preto{\@enddocumenthook}{\clearpage\pagestyle{empty}\caogaozhi\clearpage\caogaozhi\addtocounter{page}{-2}} + % 在旧版本 ctex 宏包中不能用 \AtEndDocument 添加含中文的内容,即不能用 \appto 而要用 \preto + %\AtEndDocument{\clearpage\pagestyle{empty}\caogaozhi\clearpage\caogaozhi\addtocounter{page}{-2}} + \RequirePackage{pdfpages} + % 新版本 pdfpages 将 \includepdf 放在文档开头时会有命令未定义的错误 + % 见 https://tex.stackexchange.com/questions/352007/ieeetran-and-pdfpages + \@ifundefined{@setmarks}{}{} +\fi + +\setlength{\parindent}{0em} +\setlength{\lineskiplimit}{3pt} +\setlength{\lineskip}{3pt} + +\newcommand{\niandu}{2016-2017} +\newcommand{\xueqi}{2} +\newcommand{\kecheng}{数学课程} +\newcommand{\zhuanye}{} % 专业学分 +\newcommand{\jiaoshi}{吕荐瑞} +\newcommand{\shijian}{} % 考试日期 +\newcommand{\bixiu}{1} % 1 为必修,0 为选修 +\newcommand{\bijuan}{1} % 1 为闭卷,0 为开卷 +\newcommand{\shijuan}{A} % A 或 B 或 C 卷 +\newcommand{\neizhao}{1} % 1 打勾,0 不勾 +\newcommand{\waizhao}{1} % 1 打勾,0 不勾 + +\newcommand{\underspace}[1]{\underline{\hspace{#1}}} +\newcommand{\underbox}[2]{\underline{\makebox[#1]{#2}}} + +\newcommand{\ischeck}[1]{\ifnum#1>0\,\ding{51}\,\else\quad\fi} +\newcommand{\isquad}[1]{\ifnum#1=0\,\ding{51}\,\else\quad\fi} + +\newcommand\my@temp@a{A} +\newcommand\my@temp@c{C} +\newcommand\my@empty{} + +\newcommand{\head@table@a}{% + \begin{tabular}{l} + 教学年度:\underbox{8em}{\niandu} 年度第 \underbox{3.5em}{\xueqi} 学期 \\ + 课程名称:\underbox{17.5em}{\kecheng\ifx\zhuanye\my@empty\else\kern0pt(\zhuanye)\fi} \\ + 授课教师:\underbox{17.5em}{\jiaoshi} \\ + 考试时间:\underbox{17.5em}{\shijian} \\ + \end{tabular} +} + +\newcommand{\head@table@b}{% + \renewcommand{\arraystretch}{1}% + \begin{tabular}{l} + \textbf{课程类别} \\ 必修~[\ischeck{\bixiu}]\quad 选修~[\isquad{\bixiu}] \\ + \hline + \textbf{考试方式} \\ 开卷~[\isquad{\bijuan}]\quad 闭卷~[\ischeck{\bijuan}] \\ + \hline + \textbf{试卷类别}~(\,A, B, C\,)\\\relax [\,\shijuan\,]\hfill 共~\pageref{LastPage}~页 + \end{tabular} +} + +\newcommand{\head@table@c}{% + \begin{tabular}{l} + \underspace{10em} 学院 \underspace{8em} 专业 \underspace{5.5em}~班~(级) \\[1em] + 姓名\underspace{8em} 学号 \underspace{10em}\hfill + \bfseries 内招~[\ischeck{\neizhao}] 外招~[\ischeck{\waizhao}] %\\[0.8em] + \end{tabular} +} + +\newcommand{\makehead}{ + \thispagestyle{plain} + \centerline{\LARGE\bfseries 暨\quad 南\quad 大\quad 学\quad 考\quad 试\quad 试\quad 卷} + \vspace{2em}% + \ifreverse + \ifx\shijuan\my@temp@a\renewcommand{\shijuan}{B}\fi + \ifx\shijuan\my@temp@c\renewcommand{\shijuan}{D}\fi + \fi + \noindent + \begin{tabu}{|@{}X@{}|} + \hline\renewcommand{\arraystretch}{1.5}% + \begin{tabu}{@{}>{\bfseries}l@{}|@{}X@{}|@{}l@{}} + \begin{tabular}{l}教\\ 师\\ 填\\ 写\end{tabular} & \head@table@a & \head@table@b + \end{tabu}\\ + \hline\renewcommand{\arraystretch}{0.9}% + \begin{tabu}{@{}>{\bfseries}l@{}|@{}X@{}} + \begin{tabular}{l}考\\ 生\\ 填\\ 写\end{tabular} & \head@table@c + \end{tabu}\\ + \hline + \end{tabu} + \vspace{1em} + \noindent\begin{tabu}{|*{8}{X[c]|}} + \hline + \bfseries{题 号} & 一 & 二 & 三 & 四 & 五 & 六 & 总 分\\ + \hline + \bfseries{得 分} & & & & & & & \\ + \hline + \end{tabu} +} + +\newcommand{\my@columnbox}[1]{\makebox[\columnwidth]{#1}} +\newcommand{\my@headleft}{暨南大学\kern-0.3em《\kecheng》\kern-0.3em 试卷\,\shijuan} +\newcommand{\my@headright}{姓名\hspace{6em}学号\hspace{6em}} +\newcommand{\my@headtext}{\my@headleft\hfill \my@headright} +\newcommand{\my@foottext}{第~\thepage~页\quad 共~\pageref{LastPage}~页} + +\fancypagestyle{plain}{ + \renewcommand{\headrulewidth}{0pt}% + \fancyhf{} + \ifsidebyside + \rhead{\small\underline{\my@columnbox{\my@headtext\strut}}} + \lfoot{\small\my@columnbox{\my@foottext}} + \rfoot{\small\my@columnbox{\stepcounter{page}\my@foottext}} + \else + \cfoot{\small\my@foottext} + \fi +} +\fancyhf{} +\pagestyle{fancy} +\ifsidebyside + \renewcommand{\headrulewidth}{0pt}% + \lhead{\small\underline{\my@columnbox{\my@headtext}\strut}} + \rhead{\small\underline{\my@columnbox{\my@headtext}\strut}} + \lfoot{\small\my@columnbox{\my@foottext}} + \rfoot{\small\my@columnbox{\stepcounter{page}\my@foottext}} +\else + \lhead{\small\my@headleft} + \rhead{\small\my@headright} + \cfoot{\small\my@foottext} +\fi + +\xdef\allproblems{} +\xdef\lastproblem{} +\newcounter{problem} +\newcounter{choice} + +\newcommand{\printproblems}{\ifreverse\lastproblem\allproblems\fi\xdef\allproblems{}\xdef\lastproblem{}} + +\newcommand{\makepart}[2]{% + \printproblems + \setcounter{problem}{0}% + \stepcounter{section}% + \vspace{1em}% + \noindent\begin{tabu}{|X[c]|X[c]|X[6]} + \cline{1-2} + 得分 & 评阅人 & \textbf{\Chinese{section}、#1}\\ + \cline{1-2} + & & (#2) \\ + \cline{1-2} + \end{tabu} + \vspace{1em} +} + +\newcommand{\makedata}[1]{% + \printproblems\my@stop@reverse + \centerline{\textbf{附录}\quad #1}\smallskip +} + +\preto{\@enddocumenthook}{\printproblems\my@stop@reverse} + +\newcommand{\answer}[1]{\ifanswer#1\else\phantom{#1}\fi} + +\newcommand{\ulinefill}[1]{\xleaders\hbox{\underline{\vphantom{#1}\kern1pt}}\hfill\kern0pt} +\newcommand{\fillout}[1]{\ulinefill{#1}\underline{\color{blue}\answer{#1}}\ulinefill{#1}} +\newcommand{\fillin}[1]{\underline{\hspace{1em}\color{blue}\answer{#1}\hspace{1em}}} + +\newcommand{\pickout}[1]{\hfill(\makebox[1.5em]{\color{blue}\answer{#1}})} +\newcommand{\pickin}[1]{(\makebox[1.5em]{\color{blue}\answer{#1}})} + +\newcommand{\my@item}{\ifnum\value{choice}=0\par\fi\stepcounter{choice}} +\newcommand{\fullitem}[1]{\my@item\makebox[\linewidth][l]{(\Alph{choice})\ #1}\break\ignorespaces} +\newcommand{\halfitem}[1]{\my@item\makebox[0.502\linewidth][l]{(\Alph{choice})\ #1}\allowbreak\ignorespaces} +\newcommand{\quaditem}[1]{\my@item\makebox[0.251\linewidth][l]{(\Alph{choice})\ #1}\allowbreak\ignorespaces} + +\newcommand\ignorepars{\@ifnextchar\par{\expandafter\ignorepars\@gobble}{}} + +\newenvironment{problemreal}{% + \stepcounter{problem}\setcounter{choice}{0}% + \textsf{\color{blue}\arabic{problem}}.\;\,\ignorespaces +}{\par} +\newenvironment{solutionreal}{\textsf{\color{blue}解答}\quad\ignorepars}{\par} +\newenvironment{proofreal}{\textsf{\color{blue}证明}\quad\ignorepars}{\par} + +\let \oldnewpage = \newpage +\let \oldvfill = \vfill +\let \oldsmallskip = \smallskip +\let \oldmedskip = \medskip +\let \oldbigskip = \bigskip + +\ifreverse + \NewEnviron{problem}{% + \xdef\allproblems{% + \unexpanded\expandafter{\lastproblem}% + \unexpanded\expandafter{\allproblems}% + }% + \xdef\lastproblem{% + \unexpanded{\begin{problemreal}}% + \unexpanded\expandafter{\BODY}% + \unexpanded{\end{problemreal}}% + }% + } + \NewEnviron{solution}{% + \xdef\lastproblem{% + \unexpanded\expandafter{\lastproblem}% + \unexpanded{\begin{solutionreal}}% + \unexpanded\expandafter{\BODY}% + \unexpanded{\end{solutionreal}}% + }% + } + \NewEnviron{proof}{% + \xdef\lastproblem{% + \unexpanded\expandafter{\lastproblem}% + \unexpanded{\begin{proofreal}}% + \unexpanded\expandafter{\BODY}% + \unexpanded{\end{proofreal}}% + }% + } + \renewcommand{\newpage}{\xdef\lastproblem{\noexpand\oldnewpage\unexpanded\expandafter{\lastproblem}}} + \renewcommand{\vfill}{\xdef\lastproblem{\unexpanded\expandafter{\lastproblem\oldvfill}}} + \renewcommand{\smallskip}{\xdef\lastproblem{\unexpanded\expandafter{\lastproblem\oldsmallskip}}} + \renewcommand{\medskip}{\xdef\lastproblem{\unexpanded\expandafter{\lastproblem\oldmedskip}}} + \renewcommand{\bigskip}{\xdef\lastproblem{\unexpanded\expandafter{\lastproblem\oldbigskip}}} + \let \newpagea = \relax + \let \newpageb = \newpage +\else + \newenvironment{problem}{\problemreal}{\endproblemreal} + \newenvironment{solution}{\solutionreal}{\endsolutionreal} + \newenvironment{proof}{\proofreal}{\endproofreal} + \let \newpagea = \newpage + \let \newpageb = \relax +\fi + +\newcommand{\my@stop@reverse}{% + \ifreverse + \renewenvironment{problem}{\problemreal}{\endproblemreal}% + \renewenvironment{solution}{\solutionreal}{\endsolutionreal}% + \renewenvironment{proof}{\proofreal}{\endproofreal}% + \let \newpage = \oldnewpage + \let \vfill = \oldvfill + \let \smallskip = \oldsmallskip + \let \medskip = \oldmedskip + \let \bigskip = \oldbigskip + \fi +} + +\def\CommentCutFile{\jobname.cut} + +\AtBeginDocument{% + \ifanswer\else + \excludecomment{solution} + \excludecomment{proof} + \fi +} + diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index ee1608a22ef..ff0ae78153f 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -350,7 +350,7 @@ my @TLP_working = qw( issuulinks istgame itnumpar iwhdp iwona jablantile jacow jamtimes japanese-otf japanese-otf-uptex jfmutil - jknapltx jkmath jlabels jlreq jmlr jneurosci jpsj jsclasses + jknapltx jkmath jlabels jlreq jmlr jneurosci jnuexam jpsj jsclasses jslectureplanner jumplines junicode jura juraabbrev jurabib juramisc jurarsp js-misc jvlisting kanaparser kantlipsum karnaugh karnaugh-map karnaughmap kastrup diff --git a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc index 162a0719960..e7023f312f4 100644 --- a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc @@ -84,6 +84,7 @@ depend imtekda depend iscram depend jacow depend jmlr +depend jnuexam depend jpsj depend kdgdocs depend kluwer diff --git a/Master/tlpkg/tlpsrc/jnuexam.tlpsrc b/Master/tlpkg/tlpsrc/jnuexam.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/jnuexam.tlpsrc |