texlive[67262] Master/texmf-dist: exam-zh (1jun23)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 1 21:59:54 CEST 2023


Revision: 67262
          http://tug.org/svn/texlive?view=revision&revision=67262
Author:   karl
Date:     2023-06-01 21:59:53 +0200 (Thu, 01 Jun 2023)
Log Message:
-----------
exam-zh (1jun23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/README.md
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/main-changelog.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/package.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/introduction.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/usage.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc-setup.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.pdf
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.tex
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-multiple.pdf
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.pdf
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.tex
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-chinese-english.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-choices.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-font.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-question.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-symbols.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-textfigure.sty
    trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md	2023-06-01 19:59:53 UTC (rev 67262)
@@ -5,6 +5,40 @@
 格式参照 [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 并且此项目遵守 [Semantic Versioning](https://semver.org/spec/v2.0.0.html)。
 
+
+## [0.1.25] - 2023-06-01
+
+### Changed
+
+- 修改 `\sim*` 的效果为原来的 `\sim`(I6Z0MD)
+
+
+## [0.1.24] - 2023-05-11
+
+### Fixed
+
+- 修复 TeXLive2023 造成的师生两版编译失效问题
+
+## [0.1.23] - 2022-12-20
+
+### Changed
+
+- `\paren` 默认更改为 `show`
+
+
+## [0.1.22] - 2022-09-30
+
+### Fixed
+
+- 修复 `foot-content` 中无法使用命令的问题(#I5NNR8)
+
+## [0.1.21] - 2022-09-24
+
+### Fixed
+
+- 修复 `question` 环境结合 `\fillin` 的 label 对齐问题
+
+
 ## [0.1.20] - 2022-09-18
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/README.md	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/README.md	2023-06-01 19:59:53 UTC (rev 67262)
@@ -11,6 +11,7 @@
 - design the sealline easily;
 - use it in Windows, macOS and Linux;
 - ... (for more that you can do with it, please read the manual(in Chinese): `exam-zh-doc.pdf`
+- QQ group: 652500180
 
 
 Repository: https://gitee.com/xkwxdyy/exam-zh
@@ -24,6 +25,7 @@
 - 作者:Zeping Lee
 - 维护者:Kangwei Xia, Lijun Guo
 - 授权:[LaTeX Project Public License 1.3c](https://www.latex-project.org/lppl.txt)
+- QQ 用户交流群:652500180
 
 
 本项目提供了一个中国高考试卷样式的 LaTeX 模板,旨在帮助中小学教师更方便地使用 LaTeX。模板具有以下特性:

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/main-changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/main-changelog.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/main-changelog.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -7,4 +7,5 @@
   \item 2022.4 开发字体模块
   \item 2022.6 开发密封线、草稿纸、评分框
   \item 2022.7 增加语文英语题型
+  \item 2022.8 开发图文排版模版
 \end{itemize}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/package.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/package.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/back/package.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -28,7 +28,7 @@
 \file{exam-zh-textfigure.sty} 的宏包依赖:
 
 \begin{itemize}
-  \item \pkg{wrapstuff}:图文混排
+  \item \pkg{wrapstuff}:图文混排(会自动检测,本地无此宏包则不会加载)
   \item \pkg{tabularray}:表格
   \item \pkg{varwidth}:“弹性”的 \env{minipage}
   \item \pkg{graphicx}:插图

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/introduction.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/introduction.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -18,4 +18,10 @@
 
 但是上述前人所做的工作值得参考,比如 \cls{exam-zh} 的 A4 和 A3 页面切换就参考了 \href{https://www.ctan.org/pkg/jnuexam}{jnuexam} 项目。
 
-本模板将借鉴前辈经验,重新设计,并使用 \LaTeX3 编写,以适应 \TeX 技术发展潮流; 同时还将构建一套简洁的接口,方便用户使用。
\ No newline at end of file
+本模板将借鉴前辈经验,重新设计,并使用 \LaTeX3 编写,以适应 \TeX 技术发展潮流; 同时还将构建一套简洁的接口,方便用户使用。
+
+如果您觉得 \cls{exam-zh} 对您有帮助,也欢迎进行打赏,这会激励维护者更好地维护和开发 \cls{exam-zh}。
+
+\begin{center}
+  \includegraphics[width = 0.7\textwidth]{xdyy-qrcode.png}
+\end{center}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/usage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/usage.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/usage.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -505,7 +505,7 @@
     fillin/type = paren,
     paren/show-paren = true
   }
-  \newcommand{\true}{$\surd$}
+  \newcommand{\true}{$\checkmark$}
   \newcommand{\false}{$\times$}
 
   \begin{question}
@@ -992,6 +992,20 @@
 \end{function}
 
 
+
+\subsubsection{页面设置}
+
+\cls{exam-zh} 根据是 |a3paper| 还是 |a4paper| 有不同页面设置,而为了能够实现用户接口,将页面设置部分放在了 \tn{AtEndPreamble} 命令中,所以用户如果想要修改页面设置,也需要在导言区使用
+
+\begin{latexcode}
+  \AtEndPreamble{%
+    \geometry{
+      ...
+    }
+  }
+\end{latexcode}
+将用户设置放在 \cls{exam-zh} 的默认设置后从而使其产生作用。
+
 \subsection{参数设置}
 
 \begin{function}{\examsetup}
@@ -1156,8 +1170,8 @@
 \end{function}
 
 \begin{function}[added = 2022-09-12]{page/head-content}
-  \begin{ccnusyntax}[emph={[1]foot-content}]
-    foot-content = (*\meta{页眉格式}*)
+  \begin{ccnusyntax}[emph={[1]head-content}]
+    head-content = (*\meta{页眉格式}*)
   \end{ccnusyntax}
   页眉内容设置。内容为 \pkg{fancyhdr} 宏包的页眉命令,比如
 \begin{latexcode}
@@ -2011,9 +2025,9 @@
   控制 \tn{paren} 答案的显示与否。注意和 \opt{question/show-answer} 的先后顺序可能会影响结果。
 \end{function}
 
-\begin{function}[added = 2022-07-15]{paren/show-paren}
+\begin{function}[added = 2022-07-15,updated = 2022-12-25]{paren/show-paren}
   \begin{ccnusyntax}[emph={[1]show-paren}]
-    show-paren = (*\TFF*)
+    show-paren = (*\TTF*)
   \end{ccnusyntax}
   是否显示 \tn{paren} 命令的括号。
 \end{function}

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc-setup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc-setup.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc-setup.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -20,7 +20,7 @@
 \graphicspath{{figures}}
 
 \hypersetup{
-  pdftitle  = {exam-zh: 高考试卷 LaTeX 模板},
+  pdftitle  = {exam-zh: 中国试卷 LaTeX 模板},
   pdfauthor = {夏康玮}
 }
 % 全角标点放在引号中,需要改成半角式,否则间距过大,不好看
@@ -31,11 +31,12 @@
 
 
 \title{\textcolor{MaterialIndigo800}{%
-  \textbf{exam-zh: 高考试卷 \LaTeX \xpinyin[font=\sffamily,format=\color{MaterialIndigo800}]{模}{mu2}板}}}
+  \textbf{exam-zh: 中国试卷 \LaTeX \xpinyin[font=\sffamily,format=\color{MaterialIndigo800}]{模}{mu2}板}}}
 \author{李泽平,夏康玮,郭李军}
 \date{\DocDate\quad \DocVersion%
   \thanks{%
-    \url{https://gitee.com/xkwxdyy/exam-zh}
+    \url{https://gitee.com/xkwxdyy/exam-zh} \\
+    \hspace*{1.5em} QQ 用户交流群:652500180
   }
 }
 

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -1,7 +1,7 @@
 \documentclass{xdyydoc}
 
-\newcommand{\DocDate}{2022-9-18}
-\newcommand{\DocVersion}{v0.1.20}
+\newcommand{\DocDate}{2022-10-4}
+\newcommand{\DocVersion}{v0.1.25}
 \input{exam-zh-doc-setup.tex}
 \usepackage{amssymb}
 
@@ -60,7 +60,7 @@
 \section{\cls{exam-zh}:TODO}
 
 \begin{itemize}
-  \item 增加试卷范例(语文,英语)
+  % \item 增加试卷范例(语文,英语)
   \item 答案控制
     \begin{itemize}
       \item 选择题
@@ -82,8 +82,18 @@
         \end{itemize}
     \end{itemize}
   \item 选择题答案标记
-  \item 图文排版(参考 xkwxdyy 的 \pkg{text-figure} 宏包和 qinglee 的 \pkg{wrapstuff} 宏包)
+  \item \env{choices} 环境“均分”效果
+  % \item 图文排版(参考 xkwxdyy 的 \pkg{text-figure} 宏包和 qinglee 的 \pkg{wrapstuff} 宏包)
   \item 测试兼容性
+  \item \env{question} 环境的引用
+  \item \tn{fillin} 的进一步优化
+    \begin{itemize}
+      \item 根据答案的宽度留白
+      \item \tn{fillin*} 的基线能否自动调整
+    \end{itemize}
+  \item 每个子包设置用户接口
+  \item 通过 \tn{CJKunderline} 的 \meta{hidden} 键实现 \tn{fillin} 的无答案的时候,长度是答案的长度
+  \item \env{poem} 环境的引用字体不是斜体
 \end{itemize}
 
 

Added: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png	2023-06-01 19:59:53 UTC (rev 67262)

Property changes on: trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/figures/xdyy-qrcode.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-multiple.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.tex	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/examples/example-single.tex	2023-06-01 19:59:53 UTC (rev 67262)
@@ -4,7 +4,7 @@
 \examsetup{
   page/size=a4paper,
   paren/show-paren=true,
-  paren/show-answer=false,
+  paren/show-answer=true,
   fillin/show-answer=false,
   solution/show-solution=false
 }

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-chinese-english.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-chinese-english.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-chinese-english.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -8,7 +8,7 @@
 
 \RequirePackage{expl3}
 
-\ProvidesExplPackage {exam-zh-chinese-english} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-chinese-english} {2023-06-01} {v0.1.25}
   {exam-zh chinese and english module}
 
 \PassOptionsToPackage { tcolorbox } { most }

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-choices.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-choices.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-choices.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -1,7 +1,7 @@
 %
 % Copyright (c) 2022 Zeping Lee
 % Released under the LaTeX Project Public License v1.3c License.
-% Repository: https://gitee.com/zepinglee/exam-zh
+% Repository: https://gitee.com/xkwxdyy/exam-zh
 %
 
 \NeedsTeXFormat{LaTeX2e}
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-choices} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-choices} {2023-06-01} {v0.1.25}
   {exam-zh choices module}
 
 \dim_new:N \l__examzh_choices_column_sep_dim

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-font.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-font.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-font.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-font} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-font} {2023-06-01} {v0.1.25}
   {exam-zh font module}
 
 \RequirePackage { unicode-math }

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-question.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-question.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-question.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-question} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-question} {2023-06-01} {v0.1.25}
   {exam-zh question module}
 
 
@@ -19,6 +19,7 @@
   { \RequirePackage [ most ] { tcolorbox } }
 % \RequirePackage { zref-savepos }
 \RequirePackage { xeCJKfntef }
+\RequirePackage { enumitem }
 
 % https://github.com/CTeX-org/forum/issues/264#issuecomment-1200087776
 \disable at package@load { etex }
@@ -45,6 +46,11 @@
 % ulem 宏包重定义了 \emph,使用 \normalem 恢复
 \normalem
 
+\setlist{nosep}
+\setlist
+  {
+    labelsep    = 4pt,
+  }
 
 % question 环境相关变量
 
@@ -70,6 +76,7 @@
 \skip_new:N \l__examzh_question_bottom_sep_skip
 % label 的对齐
 \tl_new:N \l__examzh_question_label_align_tl
+\tl_new:N \l__examzh_problem_label_align_tl
 
 
 \keys_define:nn { exam-zh }
@@ -188,7 +195,7 @@
     label .tl_set:N = \l__examzh_question_label_tl,
     label-align .choices:nn =
       { left, center, right }
-      { \tl_set_eq:NN \l__examzh_question_label_align_tl \l_keys_choice_tl },
+      { \tl_set_eq:NN \l__examzh_problem_label_align_tl \l_keys_choice_tl },
     points-prelabel .tl_set:N = \l__examzh_problem_points_prelabel_tl,
     points-postlabel .tl_set:N = \l__examzh_problem_points_postlabel_tl,
   }
@@ -215,18 +222,24 @@
 % 选择题和填空题的题干
 \NewDocumentEnvironment { question } { O { } +b }
   {
-    \bool_set_false:N \l__examzh_question_problem_style_bool
-    \__examzh_question_begin:nn {#1}{#2}
+    % \bool_set_false:N \l__examzh_question_problem_style_bool
+    \group_begin:
+      \__examzh_question_begin:nn {#1}{#2}
+      \__examzh_question_end:nn {#1}{#2} 
+    \group_end:
   }
-  { \__examzh_question_end:nn {#1}{#2}  }
+  {}
 
 % 解答题
 \NewDocumentEnvironment { problem } { O { } +b }
   {
-    \bool_set_true:N \l__examzh_question_problem_style_bool
-    \__examzh_problem_begin:nn {#1}{#2}
+    % \bool_set_true:N \l__examzh_question_problem_style_bool
+    \group_begin:
+      \__examzh_problem_begin:nn {#1}{#2}
+      \__examzh_problem_end:nn {#1}{#2} 
+    \group_end:
   }
-  { \__examzh_problem_end:nn {#1}{#2} }
+  { }
 
 \prg_generate_conditional_variant:Nnn \int_compare:nNn { xNn } { T }
 \cs_new:Npn \__examzh_question_begin:nn #1#2
@@ -263,11 +276,14 @@
     \list 
       {
         % \int_use:N \g__examzh_question_index_int . 
-        \__examzh_question_make_label:n
+        \bool_if:NTF \l__examzh_question_combine_fillin_bool
           {
-            \bool_if:NT \l__examzh_question_combine_fillin_bool
+            % \framebox[6em]
+            % \fbox
+              % {
+            \__examzh_question_make_label:n
               {
-                \tl_if_blank:VTF \l__examzh_question_combine_fillin_args_tl
+                  \tl_if_blank:VTF \l__examzh_question_combine_fillin_args_tl
                   { \fillin }
                   {
                     \use:x
@@ -275,11 +291,36 @@
                         \exp_not:N \fillin \l__examzh_question_combine_fillin_args_tl
                       }
                   }
+                  \__examzh_question_the_label:
               }
-            \int_compare:xNnT { \g__examzh_question_index_int } < { 11 }
-              { \phantom {1} }
-            \__examzh_question_the_label:
+              % }
           }
+          {
+            \__examzh_question_make_label:n
+              {
+                \__examzh_question_the_label:
+              }
+          }
+        % \__examzh_question_make_label:n
+        %   {
+        %     \bool_if:NT \l__examzh_question_combine_fillin_bool
+        %       {
+        %         % \makebox
+        %           % {
+        %             \tl_if_blank:VTF \l__examzh_question_combine_fillin_args_tl
+        %               { \fillin }
+        %               {
+        %                 \use:x
+        %                   {
+        %                     \exp_not:N \fillin \l__examzh_question_combine_fillin_args_tl
+        %                   }
+        %               }
+        %           % }
+        %       }
+        %     \int_compare:xNnT { \g__examzh_question_index_int } < { 11 }
+        %       { \phantom {1} }
+        %     \__examzh_question_the_label:
+        %   }
       }
       {
         % 用 group 是为了防止 combine-fillin 的 type 影响了环境里面的 fillin 的type
@@ -286,7 +327,7 @@
         \group_begin:
           \dim_gset:Nn \topsep       { 0pt }
           \dim_gset:Nn \partopsep    { 0pt }
-          \dim_gset:Nn \itemsep      { 0pt }
+          \dim_gset:Nn \itemsep      { 0em }
           \dim_gset:Nn \parsep       { 0pt }
           % \group_begin:
             % 上面 \fillin 里面的设置是局部的,这样的问题是 question 的可选参数改 type 的时候不会影响 \l__examzh_fillin_type_str 的值
@@ -371,6 +412,27 @@
         \keys_set:nx { exam-zh / fillin } { \seq_use:Nn \l_tmpa_seq {,} }
       }
   }
+\cs_new:Npn \__examzh_problem_begin_labelsep_labelwidth_set:
+  {
+    \str_case:Vn \l__examzh_problem_label_align_tl 
+      {
+        { left } 
+          { 
+            \dim_gset:Nn \labelsep { .7em }
+            \dim_gset:Nn \labelwidth { 1.8em } 
+          }
+        { center }
+          {
+            \dim_gset:Nn \labelsep { .7em } 
+            \dim_gset:Nn \labelwidth { 1.3em } 
+          }
+        { right  } 
+          {
+            \dim_gset:Nn \labelsep { .7em } 
+            \dim_gset:Nn \labelwidth { 1.3em } 
+          }
+      }
+  }
 \cs_new:Npn \__examzh_question_begin_labelsep_labelwidth_set:
   {
     \bool_if:NTF \l__examzh_question_combine_fillin_bool
@@ -384,14 +446,32 @@
                     { paren } 
                       { 
                         % combin-left-paren
-                        \dim_gset:Nn \labelsep { 2.8em } 
-                        \dim_gset:Nn \labelwidth { 4.2em } 
+                        \bool_if:NTF \l__examzh_question_show_fillin_answer_bool
+                          {
+                            % 显示答案
+                            \dim_gset:Nn \labelsep { 2.6em } 
+                            \dim_gset:Nn \labelwidth { 3.8em } 
+                          }
+                          {
+                            % 不显示答案
+                            \dim_gset:Nn \labelsep { 4.5em } 
+                            \dim_gset:Nn \labelwidth { 3.8em } 
+                          }
                       }
                     { line }
                       { 
                         % combin-left-line
-                        \dim_gset:Nn \labelsep { 2.4em } 
-                        \dim_gset:Nn \labelwidth { 3.8em } 
+                        \bool_if:NTF \l__examzh_question_show_fillin_answer_bool
+                          {
+                            % 显示答案
+                            \dim_gset:Nn \labelsep { 2.2em } 
+                            \dim_gset:Nn \labelwidth { 3.8em } 
+                          }
+                          {
+                            % 不显示答案
+                            \dim_gset:Nn \labelsep { 3.8em } 
+                            \dim_gset:Nn \labelwidth { 3.8em } 
+                          } 
                       }
                   }
                   { 
@@ -425,8 +505,44 @@
               }
             { right  }
               {
-                \dim_gset:Nn \labelsep { .7em } 
-                \dim_gset:Nn \labelwidth { 1.3em }
+                \str_case:VnF \l__examzh_fillin_type_str
+                  {
+                    { paren } 
+                      { 
+                        % combin-left-paren
+                        \bool_if:NTF \l__examzh_question_show_fillin_answer_bool
+                          {
+                            % 显示答案
+                            \dim_gset:Nn \labelsep { 3.8em } 
+                            \dim_gset:Nn \labelwidth { 2em } 
+                          }
+                          {
+                            % 不显示答案
+                            \dim_gset:Nn \labelsep { 5.8em } 
+                            \dim_gset:Nn \labelwidth { 2em } 
+                          }
+                      }
+                    { line }
+                      { 
+                        % combin-left-line
+                        \bool_if:NTF \l__examzh_question_show_fillin_answer_bool
+                          {
+                            % 显示答案
+                            \dim_gset:Nn \labelsep { 0.7em } 
+                            \dim_gset:Nn \labelwidth { 1.3em } 
+                          }
+                          {
+                            % 不显示答案
+                            \dim_gset:Nn \labelsep { 5.2em } 
+                            \dim_gset:Nn \labelwidth { 2em } 
+                          }
+                      }
+                  }
+                  { 
+                    % combin-left-paren/line 外的
+                    \dim_gset:Nn \labelsep { 2.8em } 
+                    \dim_gset:Nn \labelwidth { 1.3em }
+                  }
               }
           }
       }
@@ -497,7 +613,7 @@
     \list 
       {
         % \int_use:N \g__examzh_question_index_int . 
-        \__examzh_question_make_label:n
+        \__examzh_problem_make_label:n
           {
             \__examzh_question_the_label:
           }
@@ -509,12 +625,7 @@
           \dim_gset:Nn \partopsep    { 0pt }
           \dim_gset:Nn \itemsep      { 0pt }
           \dim_gset:Nn \parsep       { 0pt }
-          % \group_begin:
-            % 上面 \fillin 里面的设置是局部的,这样的问题是 question 的可选参数改 type 的时候不会影响 \l__examzh_fillin_type_str 的值
-            % 所以要把 \l__examzh_question_combine_fillin_args_tl 里关于 type 的选取出来
-            \__examzh_question_begin_fillin_type_set:
-            \__examzh_question_begin_labelsep_labelwidth_set:
-          % \group_end:
+          \__examzh_problem_begin_labelsep_labelwidth_set:
           \dim_gset:Nn \leftmargin { 0pt }
           \dim_gset:Nn \itemindent { 2em }
           \dim_gset_eq:NN \listparindent \itemindent
@@ -565,6 +676,15 @@
         { right  } { \hss \llap { #1 } }
       }
   }
+\cs_new:Npn \__examzh_problem_make_label:n #1
+  {
+    \str_case:Vn \l__examzh_problem_label_align_tl
+      {
+        { left   } { \rlap { #1 } \hss }
+        { center } { \hss \clap { #1 } \hss }
+        { right  } { \hss \llap { #1 } }
+      }
+  }
 \NewDocumentCommand \AddQuestionCounter { m m }
   {
     % 生成用户层命令
@@ -801,7 +921,7 @@
   {
     show-answer = false,
     text-color  = black,
-    show-paren  = false,
+    show-paren  = true,
     type        = hfill
   }
 \keys_define:nn { exam-zh }
@@ -872,6 +992,9 @@
 % no-answer-type = counter 的计数器
 \int_new:N \g__examzh_fillin_no_answer_counter_int
 
+% 控制fillin 没答案的时候的长度由内容长度决定
+\bool_new:N \l__examzh_fillin_width_type_hidden_bool
+
 \keys_define:nn { exam-zh / fillin }
   {
     type .code:n = 
@@ -888,7 +1011,7 @@
     color .tl_set:N = \l__examzh_fillin_color_tl,
     text-color .tl_set:N = \l__examzh_fillin_text_color_tl,
     no-answer-type .choices:nn =
-      { blacktriangle, counter, none }
+      { blacktriangle, counter, none, hidden }
       { \str_set:Nx \l__examzh_fillin_no_answer_type_str { \l_keys_choice_tl } },
     no-answer-counter-index .int_gset:N = \g__examzh_fillin_no_answer_counter_int,
     no-answer-counter-label .tl_set:N = \l__examzh_fillin_label_tl,
@@ -1488,8 +1611,8 @@
 \NewDocumentEnvironment { solution } { O{ } +b }
   {
     % \addvspace { \l__examzh_solution_top_sep_skip }
+    \keys_set:nn { exam-zh / solution } {#1}
     \vspace { \l__examzh_solution_top_sep_skip }
-    \keys_set:nn { exam-zh / solution } {#1}
     % 放在这是使得 \examsetup 设置 qedsymbol 可以放在正文区
     \cs_set_eq:NN \qedsymbol \l__examzh_solution_qedsymbol_tl
     \bool_if:NTF \l__examzh_solution_show_bool

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-symbols.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-symbols.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-symbols.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -8,7 +8,7 @@
 
 \RequirePackage{expl3}
 
-\ProvidesExplPackage {exam-zh-symbols} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-symbols} {2023-06-01} {v0.1.25}
   {exam-zh symbols module}
 
 \RequirePackage { tikz }
@@ -1086,7 +1086,7 @@
   }
 \AtBeginDocument
   {
-    \cs_set_eq:NN \__examzh_symbols_old_sim: \backsim
+    \cs_set_eq:NN \__examzh_symbols_old_sim: \sim
     \RenewDocumentCommand { \sim } { s }
       {
         \IfBooleanTF {#1}

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-textfigure.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-textfigure.sty	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-textfigure.sty	2023-06-01 19:59:53 UTC (rev 67262)
@@ -7,7 +7,7 @@
 
 \RequirePackage{expl3}
 
-\ProvidesExplPackage {exam-zh-textfigure} {2022-9-18} {v0.1.20}
+\ProvidesExplPackage {exam-zh-textfigure} {2023-06-01} {v0.1.25}
   {exam-zh text with figure module}
 
 
@@ -654,4 +654,6 @@
       #2 { t } { l }
       { 0pt + \l__examzh_textfigure_figure_xshift_dim }
       { -1em + \l__examzh_textfigure_figure_yshift_dim }
-  }
\ No newline at end of file
+  }
+
+\endinput
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls	2023-06-01 19:59:38 UTC (rev 67261)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls	2023-06-01 19:59:53 UTC (rev 67262)
@@ -6,7 +6,7 @@
 
 \NeedsTeXFormat{LaTeX2e}[2017/04/15]
 \RequirePackage{expl3}
-\ProvidesExplClass {exam-zh} {2022-9-18} {v0.1.20} {LaTeX template for Chinese exam}
+\ProvidesExplClass {exam-zh} {2023-06-01} {v0.1.25} {LaTeX template for Chinese exam}
 
 % 检查 LaTeX2e kernel 版本
 \msg_new:nnn { exam-zh } { latex-too-old }
@@ -531,10 +531,15 @@
   { list .meta:nn = { exam-zh / list } {#1} }
 
 \setlist{nosep}
+\setlist
+  {
+    labelsep    = 4pt,
+  }
 
 \setlist[enumerate, 1]
   {
     labelindent = \parindent,
+    labelsep    = 4pt,
     leftmargin  = *,
     label       = { \arabic * .}
   }
@@ -550,7 +555,6 @@
     listparindent = \parindent,
     label       = {( \arabic * )},
   }
-
 % 多种方法: method环境
 \newlist{method}{enumerate}{1}
 \setlist[method, 1]
@@ -1597,7 +1601,7 @@
 \tl_new:N \l__examzh_foot_content_before_page_tl
 \tl_new:N \l__examzh_foot_content_after_page_tl
 \tl_new:N \l__examzh_foot_content_after_lastpage_tl
-\cs_generate_variant:Nn \regex_count:nnN { nxN }
+\cs_generate_variant:Nn \regex_count:nnN { nxN, noN }
 
 \cs_new:Npn \__examzh_foot_content_only_page_input:ww #1 ; #2 \q_stop
   {
@@ -1662,9 +1666,19 @@
     \l__examzh_foot_content_after_lastpage_tl
   }
 \cs_new_nopar:Npn \__examzh_relax: { \relax }
+% \cs_new:Npn \__examzh_foot_lastpage_tmp_set:
+%   {
+%     \cs_if_eq:NNTF \lastpage at lastpage \__examzh_relax:
+%       { \int_set:Nn \l__examzh_tmp_int { 0 } }
+%       { \int_set:Nn \l__examzh_tmp_int { \lastpage at lastpage } }
+%   }
+
+% https://gitee.com/xkwxdyy/exam-zh/issues/I6B7MU#note_17945353_link
 \cs_new:Npn \__examzh_foot_lastpage_tmp_set:
   {
-    \cs_if_eq:NNTF \lastpage at lastpage \__examzh_relax:
+    \bool_lazy_or:nnTF 
+      { \cs_if_eq_p:NN \lastpage at lastpage \__examzh_relax: }
+      { \str_if_eq_p:ee \lastpage at lastpage {??} }
       { \int_set:Nn \l__examzh_tmp_int { 0 } }
       { \int_set:Nn \l__examzh_tmp_int { \lastpage at lastpage } }
   }
@@ -1675,7 +1689,9 @@
 \cs_new:cpn { __examzh_foot_content_a4paper_output: }
   {
     % 检测输入有多少个 ;
-    \regex_count:nxN { ; } 
+    % \regex_count:nxN { ; }
+    % https://gitee.com/xkwxdyy/exam-zh/issues/I5NNR8#note_13447684_link
+    \regex_count:noN { ; } 
       { \l__examzh_foot_content_format_tl }
       \l__examzh_foot_content_count_semicolon_int
     \int_case:nnF { \l__examzh_foot_content_count_semicolon_int }



More information about the tex-live-commits mailing list.