From 30ca482fc79a7e14921d0589b73420328f2f311f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 7 Jul 2018 20:45:48 +0000 Subject: jnuexam (7jul18) git-svn-id: svn://tug.org/texlive/trunk@48157 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/tex/latex/jnuexam') diff --git a/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls index 38b86cbdaaf..0b2b11fc4f4 100644 --- a/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls +++ b/Master/texmf-dist/tex/latex/jnuexam/jnuexam.cls @@ -2,11 +2,11 @@ % ---------------------------------------------------------------------------- % Author: Jianrui Lyu % Website: https://lvjr.bitbucket.io/jnuexam.html -% License: Creative Commons Attribution-ShareAlike 4.0 International License +% License: The LaTeX Project Public License 1.3 % ---------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jnuexam}[2018/06/29 v0.2 An exam class for Jinan University] +\ProvidesClass{jnuexam}[2018/07/07 v0.3 An exam class for Jinan University] \newif\ifsidebyside \sidebysidefalse % 是否 A3 纸张 \newif\ifreverse \reversefalse % 是否逆序出题 @@ -70,7 +70,9 @@ \RequirePackage{pdfpages} % 新版本 pdfpages 将 \includepdf 放在文档开头时会有命令未定义的错误 % 见 https://tex.stackexchange.com/questions/352007/ieeetran-and-pdfpages - \@ifundefined{@setmarks}{}{} + % 另外从 LaTeX release 2018 开始 \@ifundefined 不再将未定义命令定义为 \relax + % 见 https://www.latex-project.org/news/latex2e-news/ltnews28.pdf + \@ifundefined{@setmarks}{\let\@setmarks\relax}{} \fi \setlength{\parindent}{0em} @@ -91,6 +93,7 @@ \newcommand{\underspace}[1]{\underline{\hspace{#1}}} \newcommand{\underbox}[2]{\underline{\makebox[#1]{#2}}} +\newcommand{\underparbox}[2]{\underline{\parbox[b]{#1}{#2}}} \newcommand{\ischeck}[1]{\ifnum#1>0\,\ding{51}\,\else\quad\fi} \newcommand{\isquad}[1]{\ifnum#1=0\,\ding{51}\,\else\quad\fi} @@ -101,9 +104,9 @@ \newcommand{\head@table@a}{% \begin{tabular}{l} - 教学年度:\underbox{8em}{\niandu} 年度第 \underbox{3.5em}{\xueqi} 学期 \\ + \underbox{10em}{\niandu} 学年度第 \underbox{5.5em}{\xueqi} 学期 \\ 课程名称:\underbox{17.5em}{\kecheng\ifx\zhuanye\my@empty\else\kern0pt(\zhuanye)\fi} \\ - 授课教师:\underbox{17.5em}{\jiaoshi} \\ + 授课教师:\underparbox{17.5em}{\centering\rule{0pt}{3ex}\jiaoshi} \\ 考试时间:\underbox{17.5em}{\shijian} \\ \end{tabular} } @@ -227,9 +230,9 @@ \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{\fullitem}[1]{\my@item\parbox{\linewidth}{(\Alph{choice})\ #1\rule[-0.5em]{0pt}{0.5em}}\hfill\ignorespaces} +\newcommand{\halfitem}[1]{\my@item\makebox[0.5\linewidth][l]{(\Alph{choice})\ #1}\hfill\ignorespaces} +\newcommand{\quaritem}[1]{\my@item\makebox[0.25\linewidth][l]{(\Alph{choice})\ #1}\hfill\ignorespaces} \newcommand\ignorepars{\@ifnextchar\par{\expandafter\ignorepars\@gobble}{}} @@ -310,4 +313,3 @@ \excludecomment{proof} \fi } - -- cgit v1.2.3