texlive[64109] Master/texmf-dist: exam-zh (12aug22)

commits+karl at tug.org commits+karl at tug.org
Fri Aug 12 23:11:04 CEST 2022


Revision: 64109
          http://tug.org/svn/texlive?view=revision&revision=64109
Author:   karl
Date:     2022-08-12 23:11:04 +0200 (Fri, 12 Aug 2022)
Log Message:
-----------
exam-zh (12aug22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md
    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/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.cls

Modified: trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/CHANGELOG.md	2022-08-12 21:11:04 UTC (rev 64109)
@@ -5,6 +5,17 @@
 格式参照 [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 并且此项目遵守 [Semantic Versioning](https://semver.org/spec/v2.0.0.html)。
 
+## [0.1.17] - 2022-08-12
+
+### Added
+
+- 增加 `question` 的 `hang` 键值控制“悬挂效果”
+
+### Fixed
+
+- 修复同一行的 `\fillin` 造成的 `\linegoal` 冲突问题
+
+
 ## [0.1.16] - 2022-08-11
 
 ### Fixed

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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/body/usage.tex	2022-08-12 21:11:04 UTC (rev 64109)
@@ -1633,9 +1633,31 @@
 \examsetup{
   fillin/show-answer = false,
   question/combine-fillin = false,
+  question/index = 1,
 }
 
+\begin{function}[added = 2022-08-12]{question/hang}
+  \begin{ccnusyntax}[emph={[1]hang}]
+    combine-fillin = (*\TTF*)
+  \end{ccnusyntax}
+  \env{question} 环境是否是“悬挂效果”。
+\end{function}
 
+\begin{latexexample}{\opt{question/hang} 的效果}
+  \begin{question}
+    劳仑衣普桑,认至将指点效则机,最你更枝。想极整月正进好志次回总般,段然取向使张规军证回,世市总李率英茄持伴。用阶千样响领交出,器程办管据家元写
+  \end{question}
+  
+  \begin{question}[hang = false]
+    劳仑衣普桑,认至将指点效则机,最你更枝。想极整月正进好志次回总般,段然取向使张规军证回,世市总李率英茄持伴。用阶千样响领交出,器程办管据家元写
+  \end{question}
+\end{latexexample}
+
+\examsetup{
+  question/index = 1,
+}
+
+
 \subsubsection{选择题} \label{subsubsec:参数-选择题}
 
 \begin{function}{choices}

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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/doc/xelatex/exam-zh/doc/exam-zh-doc-setup.tex	2022-08-12 21:11:04 UTC (rev 64109)
@@ -1,5 +1,6 @@
 \usepackage{xeCJKfntef, xpinyin}
 \usepackage{graphicx}
+\usepackage{zhlipsum}
 \usepackage{tabularray}
 \usepackage{../exam-zh-choices}
 \usepackage{../exam-zh-question}
@@ -31,7 +32,7 @@
 \title{\textcolor{MaterialIndigo800}{%
   \textbf{exam-zh: 高考试卷 \LaTeX \xpinyin[font=\sffamily,format=\color{MaterialIndigo800}]{模}{mu2}板}}}
 \author{李泽平,夏康玮,郭李军}
-\date{2022/08/11\quad v0.1.16%
+\date{2022/08/12\quad v0.1.17%
   \thanks{%
     \url{https://gitee.com/zepinglee/exam-zh}
   }

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

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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-chinese-english.sty	2022-08-12 21:11:04 UTC (rev 64109)
@@ -8,7 +8,7 @@
 
 \RequirePackage{expl3}
 
-\ProvidesExplPackage {exam-zh-chinese-english} {2022-08-11} {v0.1.16}
+\ProvidesExplPackage {exam-zh-chinese-english} {2022-08-12} {v0.1.17}
   {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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-choices.sty	2022-08-12 21:11:04 UTC (rev 64109)
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-choices} {2022-08-11} {v0.1.16}
+\ProvidesExplPackage {exam-zh-choices} {2022-08-12} {v0.1.17}
   {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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-font.sty	2022-08-12 21:11:04 UTC (rev 64109)
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-font} {2022-08-11} {v0.1.16}
+\ProvidesExplPackage {exam-zh-font} {2022-08-12} {v0.1.17}
   {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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-question.sty	2022-08-12 21:11:04 UTC (rev 64109)
@@ -9,7 +9,7 @@
 \RequirePackage{expl3}
 \RequirePackage{xparse}
 
-\ProvidesExplPackage {exam-zh-question} {2022-08-11} {v0.1.16}
+\ProvidesExplPackage {exam-zh-question} {2022-08-12} {v0.1.17}
   {exam-zh question module}
 
 
@@ -120,7 +120,8 @@
     combine-fillin-args .tl_set:N = \l__examzh_question_combine_fillin_args_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_question_label_align_tl \l_keys_choice_tl },
+    hang .bool_set:N = \l__examzh_question_hang_bool,
   }
 
 \keys_set:nn { exam-zh / question }
@@ -134,7 +135,8 @@
     bottom-sep          = .25em plus .25em minus .1em ,
     label               = \arabic*.,
     combine-fillin      = false,
-    label-align         = right
+    label-align         = right,
+    hang                = true
   }
 
 
@@ -221,10 +223,10 @@
       {
         % 用 group 是为了防止 combine-fillin 的 type 影响了环境里面的 fillin 的type
         \group_begin:
-          \dim_gset:Nn \topsep    { 0pt }
-          \dim_gset:Nn \partopsep { 0pt }
-          \dim_gset:Nn \itemsep   { 0pt }
-          \dim_gset:Nn \parsep    { 0pt }
+          \dim_gset:Nn \topsep       { 0pt }
+          \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 的选取出来
@@ -237,8 +239,20 @@
               \bool_if:NTF \l__examzh_question_combine_fillin_bool
                 {
                   % 如果 combine 的话就和 question 一样的缩进
-                  \dim_gset:Nn \leftmargin { 6em } 
-                  \dim_gset:Nn \itemindent { 0pt }
+                  \bool_if:NTF \l__examzh_question_hang_bool
+                    { \dim_gset:Nn \itemindent { 0em } }
+                    { \dim_gset:Nn \itemindent { 2em } }
+                  \bool_if:NTF \l__examzh_question_combine_fillin_bool
+                    {
+                      \bool_if:NTF \l__examzh_question_hang_bool
+                        { \dim_gset:Nn \leftmargin { 6em } }
+                        { \dim_gset:Nn \leftmargin { 4em } }
+                    }
+                    {
+                      \bool_if:NTF \l__examzh_question_hang_bool
+                        { \dim_gset:Nn \leftmargin { 2em } }
+                        { \dim_gset:Nn \leftmargin { 0em } }
+                    }
                 }
                 {
                   \dim_gset:Nn \leftmargin { 0pt }
@@ -247,16 +261,20 @@
             }
             {
               % 选择和填空题是悬挂效果
+              \bool_if:NTF \l__examzh_question_hang_bool
+                { \dim_gset:Nn \itemindent { 0em } }
+                { \dim_gset:Nn \itemindent { 2em } }
               \bool_if:NTF \l__examzh_question_combine_fillin_bool
-                % {
-                  % \str_case:VnF \l__examzh_question_label_align_tl
-                    % {
-                      % { left } { \dim_set:Nn \leftmargin { 8em } }
-                    % }
+                {
+                  \bool_if:NTF \l__examzh_question_hang_bool
                     { \dim_gset:Nn \leftmargin { 6em } }
-                % }
-                { \dim_gset:Nn \leftmargin { 2em } }
-              \dim_set:Nn \itemindent { 0pt }
+                    { \dim_gset:Nn \leftmargin { 4em } }
+                }
+                {
+                  \bool_if:NTF \l__examzh_question_hang_bool
+                    { \dim_gset:Nn \leftmargin { 2em } }
+                    { \dim_gset:Nn \leftmargin { 0em } }
+                }
             }
           \dim_gset_eq:NN \listparindent \itemindent
         \group_end:
@@ -1157,7 +1175,7 @@
   {
     \dim_set_eq:NN \l_tmpb_dim \linegoal
     % 比较 \l__examzh_fillin_F_width_dim 和 linegoal
-    \dim_compare:nNnTF { \l__examzh_fillin_F_width_dim } > { \linegoal }
+    \dim_compare:nNnTF { \l__examzh_fillin_F_width_dim } > { \l_tmpb_dim }
       {
         % 超过 linegoal 就排一段 linegoal,然后 \l__examzh_fillin_F_width_dim 减去 linegoal 长度
         % \dim_set:NV \l_tmpa_dim \linegoal

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	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh-symbols.sty	2022-08-12 21:11:04 UTC (rev 64109)
@@ -8,7 +8,7 @@
 
 \RequirePackage{expl3}
 
-\ProvidesExplPackage {exam-zh-symbols} {2022-08-11} {v0.1.16}
+\ProvidesExplPackage {exam-zh-symbols} {2022-08-12} {v0.1.17}
   {exam-zh symbols module}
 
 \RequirePackage { tikz }

Modified: trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls	2022-08-12 21:10:47 UTC (rev 64108)
+++ trunk/Master/texmf-dist/tex/latex/exam-zh/exam-zh.cls	2022-08-12 21:11:04 UTC (rev 64109)
@@ -6,7 +6,7 @@
 
 \NeedsTeXFormat{LaTeX2e}[2017/04/15]
 \RequirePackage{expl3}
-\ProvidesExplClass {exam-zh} {2022-08-11} {v0.1.16} {LaTeX template for Chinese exam}
+\ProvidesExplClass {exam-zh} {2022-08-12} {v0.1.17} {LaTeX template for Chinese exam}
 
 % 检查 LaTeX2e kernel 版本
 \msg_new:nnn { exam-zh } { latex-too-old }



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