summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/babel-contrib/greek/README.md2
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html35
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst23
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.dtx128
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.pdfbin549488 -> 549976 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-athnum.pdfbin178616 -> 178616 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-case-changing.tex61
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.pdfbin463920 -> 466409 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.tex46
-rw-r--r--macros/xetex/latex/exam-zh/CHANGELOG.md34
-rw-r--r--macros/xetex/latex/exam-zh/README.md2
-rw-r--r--macros/xetex/latex/exam-zh/doc/back/main-changelog.tex1
-rw-r--r--macros/xetex/latex/exam-zh/doc/back/package.tex2
-rw-r--r--macros/xetex/latex/exam-zh/doc/body/introduction.tex8
-rw-r--r--macros/xetex/latex/exam-zh/doc/body/usage.tex24
-rw-r--r--macros/xetex/latex/exam-zh/doc/exam-zh-doc-setup.tex7
-rw-r--r--macros/xetex/latex/exam-zh/doc/exam-zh-doc.pdfbin1149933 -> 1595118 bytes
-rw-r--r--macros/xetex/latex/exam-zh/doc/exam-zh-doc.tex18
-rw-r--r--macros/xetex/latex/exam-zh/doc/figures/xdyy-qrcode.pngbin0 -> 457054 bytes
-rw-r--r--macros/xetex/latex/exam-zh/examples/example-multiple.pdfbin169880 -> 160183 bytes
-rw-r--r--macros/xetex/latex/exam-zh/examples/example-single.pdfbin144619 -> 134468 bytes
-rw-r--r--macros/xetex/latex/exam-zh/examples/example-single.tex2
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-chinese-english.sty2
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-choices.sty4
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-font.sty2
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-question.sty185
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-symbols.sty4
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh-textfigure.sty6
-rw-r--r--macros/xetex/latex/exam-zh/tex/exam-zh.cls26
29 files changed, 484 insertions, 138 deletions
diff --git a/macros/latex/contrib/babel-contrib/greek/README.md b/macros/latex/contrib/babel-contrib/greek/README.md
index ce85bc77bd..d98c68be1a 100644
--- a/macros/latex/contrib/babel-contrib/greek/README.md
+++ b/macros/latex/contrib/babel-contrib/greek/README.md
@@ -4,7 +4,7 @@ babel-greek
Comprehensive support for the Greek language and script with
[Babel](https://ctan.org/pkg/babel).
-**Version**: 1.13.1
+**Version**: 1.13.2
**Copyright**: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
© 2013 - 2023 Günter Milde.
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
index 26648f07c8..2faaa5d067 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="dcterms.rights" content="© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 – 2023 Günter Milde." />
<title>babel-greek</title>
@@ -308,8 +308,8 @@ p img, p video, figure img, figure video {
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* .. _CSS3: https://www.w3.org/Style/CSS/ */
-/* Note: */
-/* This style sheet is provisional: */
+/* Note: */
+/* This style sheet is provisional: */
/* the API is not settled and may change with any minor Docutils version. */
@@ -648,7 +648,8 @@ math .boldsymbol {
font-weight: bold;
}
mstyle.mathscr, mi.mathscr {
- font-family: STIX;
+ font-family: STIX, XITSMathJax_Script, rsfs10,
+ "Asana Math", Garamond, cursive;
}
/* Adaptive page layout */
@@ -793,7 +794,7 @@ mstyle.mathscr, mi.mathscr {
<p class="subtitle" id="babel-support-for-the-greek-language-and-script">Babel support for the Greek language and script</p>
<dl class="docinfo">
<dt class="version">Version<span class="colon">:</span></dt>
-<dd class="version">1.13.1 (<a class="reference internal" href="#changelog">changelog</a>)</dd>
+<dd class="version">1.13.2 (<a class="reference internal" href="#changelog">changelog</a>)</dd>
<dt class="copyright">Copyright<span class="colon">:</span></dt>
<dd class="copyright">© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
© 2013 – 2023 Günter Milde.</dd>
@@ -834,27 +835,27 @@ Document authors can select between the <em>monotonic</em>
<section id="files">
<h2><a class="toc-backref" href="#toc-entry-1" role="doc-backlink">Files</a></h2>
<dl class="simple">
+<dt><a class="reference external" href="athnum.dtx">athnum.dtx</a></dt>
+<dd><p>Athenian (Attic, Herodianic, or acrophonic) Numerals. [<a class="reference external" href="athnum.pdf">athnum.pdf</a>]</p>
+</dd>
<dt><a class="reference external" href="babel-greek.dtx">babel-greek.dtx</a></dt>
<dd><p>Source of the language definition file <span class="docutils literal">greek.ldf</span> for use with <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a>.
[<a class="reference external" href="babel-greek.pdf">babel-greek.pdf</a>]</p>
</dd>
-<dt><a class="reference external" href="athnum.dtx">athnum.dtx</a></dt>
-<dd><p>Athenian (Attic, Herodianic, or acrophonic) Numerals. [<a class="reference external" href="athnum.pdf">athnum.pdf</a>]</p>
+<dt><a class="reference external" href="babel-greek.ins">babel-greek.ins</a></dt>
+<dd><p><a class="reference external" href="https://ctan.org/pkg/docstrip">DocStrip</a> batch file.</p>
</dd>
<dt><a class="reference external" href="grmath.dtx">grmath.dtx</a></dt>
<dd><p>Greek log-like Operators. [<a class="reference external" href="grmath.pdf">grmath.pdf</a>]</p>
</dd>
-<dt><a class="reference external" href="babel-greek.ins">babel-greek.ins</a></dt>
-<dd><p><a class="reference external" href="https://ctan.org/pkg/docstrip">DocStrip</a> batch file.</p>
+<dt>test-*.tex</dt>
+<dd><p>Documented test samples.
+[<a class="reference external" href="test-greek.pdf">test-greek.pdf</a>, <a class="reference external" href="test-greeknum.pdf">test-greeknum.pdf</a>, <a class="reference external" href="test-athnum.pdf">test-athnum.pdf</a>]</p>
</dd>
<dt><a class="reference external" href="usage.tex">usage.tex</a></dt>
<dd><p>Description of the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin transliteration</a> and the <a class="reference internal" href="#greek-numerals">Greek numerals</a>.
[<a class="reference external" href="usage.pdf">usage.pdf</a>]</p>
</dd>
-<dt>test-*.tex</dt>
-<dd><p>Documented test samples.
-[<a class="reference external" href="test-greek.pdf">test-greek.pdf</a>, <a class="reference external" href="test-greeknum.pdf">test-greeknum.pdf</a>, <a class="reference external" href="test-athnum.pdf">test-athnum.pdf</a>]</p>
-</dd>
</dl>
</section>
<section id="requirements">
@@ -1389,6 +1390,14 @@ Use LICR macros instead of the Latin transliteration.</p></li>
<li><p><a class="reference external" href="athnum.dtx">athnum.dtx</a> 2.0.1: Fix behaviour in math mode.</p></li>
</ul>
</dd>
+<dt>1.13.2 (2023-06-01)</dt>
+<dd><ul class="simple">
+<li><p>Warn of unsupported (or misspelled) “modifiers”
+(code contributed by Javier Bezos).</p></li>
+<li><p>Fix upcasing of text using the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin transliteration</a>:
+drop accents with <span class="docutils literal">\DeclareUppercaseMapping</span> (<a class="reference external" href="https://www.latex-project.org/news/latex2e-news/ltnews37.pdf">new in LaTeX 2023</a>).</p></li>
+</ul>
+</dd>
</dl>
</section>
<section id="references">
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
index 08bc93633b..73f921de32 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
@@ -3,7 +3,7 @@ babel-greek
Babel support for the Greek language and script
===============================================
-:Version: 1.13.1 (changelog_)
+:Version: 1.13.2 (changelog_)
:Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
© 2013 -- 2023 Günter Milde.
@@ -26,21 +26,21 @@ Babel support for the Greek language and script
Files
-----
+`<athnum.dtx>`_
+ Athenian (Attic, Herodianic, or acrophonic) Numerals. [`<athnum.pdf>`_]
`<babel-greek.dtx>`_
Source of the language definition file ``greek.ldf`` for use with Babel_.
[`<babel-greek.pdf>`_]
-`<athnum.dtx>`_
- Athenian (Attic, Herodianic, or acrophonic) Numerals. [`<athnum.pdf>`_]
-`<grmath.dtx>`_
- Greek log-like Operators. [`<grmath.pdf>`_]
`<babel-greek.ins>`_
DocStrip_ batch file.
-`<usage.tex>`_
- Description of the `LGR Latin transliteration`_ and the `Greek numerals`_.
- [`<usage.pdf>`_]
+`<grmath.dtx>`_
+ Greek log-like Operators. [`<grmath.pdf>`_]
test-\*.tex
Documented test samples.
[`<test-greek.pdf>`_, `<test-greeknum.pdf>`_, `<test-athnum.pdf>`_]
+`<usage.tex>`_
+ Description of the `LGR Latin transliteration`_ and the `Greek numerals`_.
+ [`<usage.pdf>`_]
Requirements
@@ -401,6 +401,11 @@ Changelog
1.13.1 (2023-03-17)
- Don't use text command in math mode with "keep-semicolon".
- `athnum.dtx`_ 2.0.1: Fix behaviour in math mode.
+1.13.2 (2023-06-01)
+ - Warn of unsupported (or misspelled) "modifiers"
+ (code contributed by Javier Bezos).
+ - Fix upcasing of text using the `LGR Latin transliteration`_:
+ drop accents with ``\DeclareUppercaseMapping`` (`new in LaTeX 2023`_).
.. _babel/4303: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4303
.. _babel/4305: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4305
@@ -409,6 +414,8 @@ Changelog
.. _LaTeX issue 987: https://github.com/latex3/latex2e/issues/987
.. _default font encoding for Unicode engines:
https://www.latex-project.org/news/latex2e-news/ltnews26.pdf
+.. _new in LaTeX 2023:
+ https://www.latex-project.org/news/latex2e-news/ltnews37.pdf
References
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
index 0eb7071284..7cf57237f7 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
@@ -26,7 +26,7 @@
% and covered by LPPL is defined by the unpacking script (babel-greek.ins)
% which is part of the package.
% \fi
-% \CheckSum{1648}
+% \CheckSum{1675}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -37,7 +37,7 @@
%<code>\ProvidesLanguage{greek}
%\fi
%\ProvidesFile{babel-greek.dtx}
- [2023/03/17 1.13.1 Greek support for the babel system]
+ [2023-06-01 1.13.2 Greek support for the babel system]
%\iffalse
%% File `babel-greek.dtx'
%% Greek language Definition File
@@ -200,13 +200,6 @@
% \languageattribute{greek}{ancient}\end{verbatim}
% sets the document language to \emph{ancient} Greek.
%
-% Both attributes may also be used as modifiers as in
-% \begin{verbatim}
-% \usepackage[greek.polutoniko,english]{babel}\end{verbatim}
-% and similarly
-% \begin{verbatim}
-% \usepackage[greek.ancient,english]{babel}\end{verbatim}
-%
% The \hyperref[sec:keep-semicolon]{\Lopt{keep-semicolon}} language
% attribute (new in babel-greek 1.13) ensures that a SEMICOLON character (;)
% can be used as input for the similar looking Greek question mark
@@ -217,19 +210,22 @@
%
% \subsection{Modifiers \label{sec:modifiers}}
%
-% Modifiers cannot be set with |\languageattribute|.
-% Misspelled modifiers are ignored without warning!
+% All language attributes may also be used as modifiers, e.g.
+% \begin{verbatim}
+% \usepackage[greek.polutoniko,english]{babel}\end{verbatim}
+% In addition, there are two modifiers that cannot be set with
+% |\languageattribute|.
%
% \changes{babel-greek-1.12}{2023/03/04}{
% New modifiers \Lopt{local-LGR-fixes} and \Lopt{no-LGR-fixes}.}
%
% Some workarounds for the non-standard LGR font encoding may have
% serious side-effects.
-% The \Lopt{local-LGR-fixes} modifier restricts the re-definitions
-% in section~\ref{sec:lgr-redefinitions} to text parts using the Greek
-% language.
-% The \Lopt{no-LGR-fixes} modifier disables them completely.
-% You may try, e.g.,
+% The \hyperref[sec:lgr-redefinitions]{\Lopt{local-LGR-fixes}} modifier
+% restricts the re-definitions in section~\ref{sec:lgr-redefinitions}
+% to text parts using the Greek language.
+% The \hyperref[sec:lgr-redefinitions]{\Lopt{no-LGR-fixes}} modifier
+% disables them completely. You may try, e.g.,
% \begin{verbatim}
% \usepackage[greek.local-LGR-fixes,english]{babel}\end{verbatim}
% as a last ressort if the workarounds make a document uncompilable
@@ -510,26 +506,18 @@
% The |polutoniko| language attribute selects the ``polytonic'' spelling.
%
% We use an auxiliary function for the setup part used with several
-% attributes.
-% This code adds the expansion of |\extraspolutonikogreek| to
-% |\extrasgreek| to set up support for multi-accented characters
-% and hyphenation patterns for the polytonic orthography.
+% language attributes:
+% Add the expansion of |\extraspolutonikogreek| to |\extrasgreek|
+% to set up support for multi-accented characters and
+% hyphenation patterns for the polytonic orthography
+% and use polytonic spelling for auto-strings (captions and month names).
+% More code is added later (cf. section~\ref{sec:character-codes}).
% \begin{macrocode}
\def\bbl@greek@setup@polytonic{%
\expandafter\addto\expandafter\extrasgreek
- \expandafter{\extraspolutonikogreek}%
-% \end{macrocode}
-% It also uses polytonic spelling for auto-strings
-% (captions and month names) and changes the expansion of the ~ character
-% from ``protected space'' to ``self-insert'' if the |\greekfontencoding|
-% is LGR (for use as perispomeni in the Latin transliteration).
-% \begin{macrocode}
+ \expandafter{\extraspolutonikogreek}%
\let\captionsgreek\captionspolutonikogreek
\let\gr@month\gr@polutoniko@month
- \def\bbl@tempa{LGR}
- \ifx\greekfontencoding\bbl@tempa
- \declare@shorthand{greek}{~}{\bbl@greek@tilde}
- \fi
}
% \end{macrocode}
% Now declare the option. For backwards compatibility,
@@ -624,6 +612,27 @@
}
% \end{macrocode}
%
+% \subsection{Report unsupported modifiers}
+%
+% \changes{babel-greek-1.13.2}{2023-06-01}{Warn of unsupported modifiers.}
+%
+% Test for unsupported (or misspelled) \hyperref[sec:modifiers]{modifiers}
+% (code contributed by Javier Bezos).
+% \begin{macrocode}
+\def\bbl@greek@modifiers{,polutoniko,polytonic,ancient,keep-semicolon,}
+\addto\bbl@greek@modifiers{local-LGR-fixes,no-LGR-fixes,}
+\ifx\BabelModifiers\relax\else
+ \bbl@foreach\BabelModifiers{%
+ \@expandtwoargs\in@{,#1,}{\bbl@greek@modifiers}
+ \ifin@\else
+ \bbl@warning
+ {Unknown/misspelled modifier '#1' in '\CurrentOption'.
+ See "babel-greek.pdf" for valid modifiers.}
+ \fi}%
+\fi
+
+% \end{macrocode}
+%
% \subsection{Font setup \label{sec:font-setup}}
%
% \subsubsection{Greek font encoding \label{sec:greekfontencoding}}
@@ -914,7 +923,7 @@
% default Greek font encoding (cf.\ section~\ref{sec:greekfontencoding}).
%
% As an emergency measure, the \Lopt{local-LGR-fixes} or \Lopt{no-LGR-fixes}
-% modifiers (cf.\ section \ref{sec:modifiers}) can be used to restrict
+% \hyperref[sec:modifiers]{modifiers} can be used to restrict
% the ``roman'' redefinitions to text parts using the Greek language or skip
% them completely.
%
@@ -1495,18 +1504,25 @@
% \end{macro}
%
%
-% \subsection{Character codes}
+% \subsection{Character codes \label{sec:character-codes}}
%
% Greek letters drop diacritics (eccept dialytika and sub-iota) in
% UPPERCASE. This is not cared for by the Unicode standard.
-% The file \file{greek-euenc.def} from \pkg{greek-fontenc}
+%
+% Up to the June 2022 LaTeX release, this could be corrected by
+% defining |\lccode| and |\uccode| values. The June 2023 release introduced
+% the |\DeclareUppercaseMapping| command as a replacement configuration
+% option.
+%
+% The file \file{tuenc-greek.def} from \pkg{greek-fontenc}
% contains the required |\lccode| and |\uccode| corrections from the
% \pkgref{xgreek} package by Apostolos Syropoulos. It is loaded if the
% Greek font encoding is TU (i.e. with XeTeX/LuaTeX),
% see section~\ref{load-greek-font-encoding-definitions}.
%
-% If the Greek font encoding is LGR, character code changes are done here
-% because they must be restricted to text parts using the LGR encoding.
+% If the Greek font encoding is LGR, configuration is done here because
+% character code changes must be restricted to text parts using the
+% LGR encoding.
% \changes{greek-1.5}{2013/06/21}{Support XeTeX/LuaTeX.}
% \changes{babel-greek-1.09d}{2015/07/06}{uc-/lccode corrections from xgreek
% are now in greek-euenc.def (the polyglossia version has bugs).}
@@ -1587,13 +1603,11 @@
\lccode223=244% GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
}
% \end{macrocode}
-%
-% In order to drop diacritics (eccept dialytika and sub-iota) in
-% UPPERCASE also with the ``input ligatures'' the |\uccode| of the
-% relevant characters is set to a dummy character.
-% This is only done, if LaTeX is older than 2022/06/01 because
-% the |\MakeUppercase| implementation introduced in this version ignores
-% uccodes and fails with the ``dummy'' character 0x9f.
+% Drop diacritics (except dialytika and sub-iota) in UPPERCASE also with
+% ``input ligatures''. (The optional ``locale'' argument |[el]| restricts
+% this change to Greek text parts.)
+% If LaTeX is older than 2022/06/01, set the |\uccode| of the
+% relevant characters to a dummy character instead.
% \changes{greek-1.1b}{1997/03/06}{Added setting of \cs{uccode}s
% (after \file{kdgreek.sty})}
% \changes{greek-1.1e}{1997/10/12}{Added uppercase code for special
@@ -1612,7 +1626,19 @@
% because other languages might make the caret active.}
% \changes{babel-greek-1.12}{2023/03/04}{
% Only change uccodes if LaTeX is older than 2022/06/01.}
+% \changes{babel-greek-1.13.2}{2023-06-01}{
+% Use \cs{DeclareUppercaseMapping} to drop diacritics.}
% \begin{macrocode}
+ \ifdefined\DeclareUppercaseMapping % new in 2023
+ \DeclareUppercaseMapping[el]{"1FBE}{\prosgegrammeni}%
+ \DeclareUppercaseMapping[el]{"0027}{}% '
+ \addto\bbl@greek@setup@polytonic{
+ \DeclareUppercaseMapping[el]{"003C}{}% <
+ \DeclareUppercaseMapping[el]{"003E}{}% >
+ \DeclareUppercaseMapping[el]{"0060}{}% `
+ \DeclareUppercaseMapping[el]{"007E}{}% ~
+ }
+ \fi
% fallback for for LaTeX versions older than 2020-10-01
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2022/06/01}%
@@ -1630,7 +1656,7 @@
\babel@savevariable{\uccode`\`}\uccode`\`=159%
}
% \end{macrocode}
-% To avoid \pkg{inputenc} errors if the tilde is used as perispomeni
+% To avoid errors if the tilde is used as perispomeni
% (in polytonic or ancient Greek), we need to declare an expansion for
% the ``dummy'' character~0x9f = 159.\footnote{
% Since UTF-8 became the default encoding (cf.\
@@ -1676,7 +1702,7 @@
\DeclareTextCompositeCommand{\`}{LGR}{^^9f}{\LGR@accdropped}
% \end{macrocode}
% If Unicode fonts are loaded together with LGR, we must also care for
-% |\"'| and |\"`| in TU, because the \" is kept when upcasing.
+% |\"'| and |\"`| in TU, because the |\"| is kept when upcasing.
% \begin{macrocode}
\ifdefined\UnicodeEncodingName % set by XeTeX/LuaTeX
\DeclareTextCompositeCommand{\"}{TU}{^^9f}{\accdialytika}
@@ -1689,10 +1715,7 @@
% In polytonic and ancient Greek, we change its meaning to allow
% using |~| in the Latin transliteration of characters with perispomeni.
% As the perispomeni is not required with monotonic Greek, this is
-% only done for the variants ``polutoniko'' and ``ancient''
-% (in |\extraspolutonikogreek|).
-%
-% Let the tilde character expand to a tilde with category code 12.
+% only done for the variants ``polutoniko'' and ``ancient''.
% \changes{greek-1.0c}{1997/02/19}{Added command}
% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with
% \cs{catcode 12}.}
@@ -1700,10 +1723,13 @@
% active during the definition of \cs{greek@tilde}}
% \changes{greek-1.4}{2013/05/17}{Do not re-define the tilde accent macro:
% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.}
-% \changes{babel-greek-1.13}{2023/03/15}{Renamed from \cs{greek@tilde}.
-% Simplify definition.}
+% \changes{babel-greek-1.13}{2023/03/15}{
+% Renamed from \cs{greek@tilde}. Simplify definition.}
% \begin{macrocode}
\DeclareTextSymbol{\bbl@greek@tilde}{LGR}{126}
+ \addto\bbl@greek@setup@polytonic{
+ \declare@shorthand{greek}{~}{\bbl@greek@tilde}
+ }
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
index 3da9b8a926..0a2586bb5c 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
index f76f2c8e06..badf0226a5 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex b/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
index e5cc0d15e5..50eaf650ea 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
@@ -24,7 +24,8 @@
%
\usepackage[greek,english]{babel} % babel-greek
% \usepackage[greek,english,provide=*]{babel} % Babel's Greek "ini"
-\languageattribute{greek}{polutoniko} % "modern" polytonic Greek
+% \languageattribute{greek}{polutoniko} % "modern" polytonic Greek
+\languageattribute{greek}{ancient}
\usepackage[unicode,colorlinks,linkcolor=blue]{hyperref}
@@ -112,7 +113,8 @@ MakeLowercase:
The lowercase of \langGreek{Σ} is the «auto-sigma»
(\verb|\textautosigma|): \langGreek{ΣΣ $\mapsto$ \MakeLowercase{ΣΣ}}.
Add a ZWNJ or use the \verb|\noboundary| macro to prevent conversion to
-final sigma: \langGreek{\MakeLowercase{ΣΣ‌}}.
+final sigma: \langGreek{\MakeLowercase{ΣΣ‌}} (works only with "old"
+(pre-2022) \verb|\MakeLowercase|).
\subsection{Greek extended}
@@ -314,7 +316,7 @@ MakeLowercase:
\textpi{} \textrho{} \textfinalsigma{} \textsigma{} \texttau{}
\textupsilon{} \textphi{} \textchi{} \textpsi{} \textomega{}
\accdialytika\textiota{} \accdialytika\textupsilon{}
- \acctonos\textomicron{} \acctonos\textupsilon{} \acctonos\textomega{} \\
+ \acctonos\textomicron{} \acctonos\textupsilon{} \acctonos\textomega{} ␣\\
ϐ ϑ ␣ ␣ ␣ ϕ ϖ ␣ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ \\
\textbetasymbol{} \textthetasymbol{} ␣ ␣ ␣ \textphisymbol{}
@@ -343,6 +345,40 @@ MakeLowercase:
\MakeLowercase{\GreekAndCoptic}
\end{quote}
+\subsubsection{symbol variants}
+
+\newcommand{\symbolvariants}{
+ \textbeta \textvarbeta \textbetasymbol ϐ
+ \textepsilon \textvarepsilon \textepsilonsymbol ϵ
+ \texttheta \textvartheta \textthetasymbol ϑ
+ \textTheta \textvarTheta \textThetasymbol ϴ
+ \textkappa \textvarkappa \textkappasymbol ϰ
+ \textpi \textvarpi \textpisymbol ϖ
+ \textrho \textvarrho \textrhosymbol ϱ
+ \textphi \textvarphi \textphisymbol ϕ
+}
+
+No case change (letter, ``var''-letter, letter-``symbol'', literal symbol)
+\begin{quote}
+ \selectlanguage{greek}
+ \symbolvariants
+\end{quote}
+%
+MakeUppercase selects the matching capital lette
+\begin{quote}
+ \selectlanguage{greek}
+ \MakeUppercase{\symbolvariants}
+\end{quote}
+%
+MakeLowercase select the lowercase letter (not the symbol)
+\begin{quote}
+ \selectlanguage{greek}
+ \MakeLowercase{\textBeta Β \textEpsilon Ε
+ \textTheta Θ \textThetasymbol \textvarTheta ϴ
+ \textKappa Κ \textPi Π \textRho Ρ \textPhi Φ}
+\end{quote}
+
+
\subsection{Greek extended}
@@ -943,7 +979,7 @@ Every second line is input as Latin transliteration:
\renewcommand{\GreekAndCoptic}{%
ͺ ; ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
- \lgrfont{ | ? \: \: ' "' 'A ; 'E 'H 'I \:'O \:'U 'W} \\
+ \lgrfont{ | ? \: \: ' "' 'A ; 'E 'H 'I \: 'O \: 'U 'W} \\
ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
\lgrfont{'"i A B G D E Z H J I K L M N X O} \\
Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
@@ -1025,7 +1061,7 @@ variant is \emph\GreekLanguageVariant.
ῠ ῡ ῢ ΰ ␣ ␣ ῤ ῥ ῦ ῧ Ὺ Ύ Ῥ ῭ ΅ ` \\
\lgrfont{\u{u} \=u `"u '"u \: \: >r <r ~u ~"u `U 'U <R `" '" ` } \\
␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ \\
- \lgrfont{ \: \: `w| w| 'w| \: ~w ~w| `O 'O `W 'W W| ' < }
+ \lgrfont{\: \: `w| w| 'w| \: ~w ~w| `O 'O `W 'W W| ' < }
}
\begin{quote}
@@ -1055,6 +1091,21 @@ dialytika \verb|"~ "` "'| appears as apostrophe, as a single \verb|"| stands
for an apostrophe in the LGR transliteration if followed by a space or empty
character.
+Side-effect of mapping `,',~, <, and > to the "empty" char for accent
+dropping: the characters vanish if used stand-alone
+(also with the ``old'' MakeUppercase):
+\begin{quote}
+ \selectlanguage{greek}
+ ` ' ~ < > → \MakeUppercase{` ' ~ < >}
+ ``x'' <<y>> → \MakeUppercase{``x'' <<y>>}
+\end{quote}
+
+Workaround: use literal typographical quote characters:
+\begin{quote}
+ \selectlanguage{greek}
+ ‘x’ «y» → \MakeUppercase{‘x’ «y»}
+\end{quote}
+
MakeLowercase:
\begin{quote}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
index 0f4879f944..50235b0c51 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
index a2c59ed48e..f46b1db526 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -162,7 +162,7 @@ definitions):
Change script with \cs{ensuregreek}: |\ensuregreek{δοῦλος}|.
Change language with \cs{foreignlanguage}:
- |\foreignlanguage{greek}{δοῦλος}|.
+ |\foreignlanguage{greek}{δοῦλος}|.
Change language with \cs{selectlanguage}:
|\selectlanguage{greek}δοῦλος\selectlanguage{english}|.
@@ -660,6 +660,50 @@ letters as macro or via the Latin transliteration.
With the current (2023/02/10) \cs{MakeUppercase}, it works for literal
Unicode input and named accents. The \cs{uccode} changes are ignored.
+
+\subsection{Iota subscript vs. iota adscript}
+
+Pre-composed capital letters with \emph{mute iota} decompose to the base
+letter and COMBINING GREEK YPOGEGRAMMENI (U+0345) even if they are named
+... WITH [... AND] PROSGEGRAMMENI for ``historic reasons''.%
+\footnote{cf. \href{https://opoudjis.net/unicode/unicode_adscript.html}
+ {Nick Nicholas `Titlecase and Adscripts'}}
+Accordingly, the ``canonical'' LICR for capital letters with mute iota
+is the base character LICR followed by \verb|\ypogegrammeni|.
+
+Compare letters followed by \verb|\prosgegrammeni| and
+\verb|\ypogegrammeni| with the pre-composed characters and with
+character + literal GREEK YPOGEGRAMMENI.
+
+prosgegrammeni:
+\begin{quotation}
+ \selectlanguage{greek}
+ \newcommand{\alphapros}{\textalpha\prosgegrammeni α\prosgegrammeni{} αι /
+ \textAlpha\prosgegrammeni Α\prosgegrammeni{} ᾼΑι /
+ \accpsili\textAlpha\prosgegrammeni Ἀ\prosgegrammeni{} ᾈἈι}
+
+ \phantom{MakeUppercase} \alphapros
+
+ \ensureascii{MakeUppercase} \MakeUppercase{\alphapros}
+
+ \ensureascii{MakeLowercase} \MakeLowercase{\alphapros}
+\end{quotation}
+
+ypogegrammeni:
+\begin{quotation}
+ \selectlanguage{greek}
+ \newcommand{\alphaypo}{\textalpha\ypogegrammeni α\ypogegrammeni{} ᾳ /
+ \textAlpha\ypogegrammeni Α\ypogegrammeni{} ᾼ /
+ \accpsili\textAlpha\ypogegrammeni Ἀ\ypogegrammeni{} ᾈ}
+
+ \phantom{MakeUppercase} \alphaypo
+
+ \ensureascii{MakeUppercase} \MakeUppercase{\alphaypo}
+
+ \ensureascii{MakeLowercase} \MakeLowercase{\alphaypo}
+\end{quotation}
+
+
\subsection{Changed uccode/lccode values for LGR}
LGR encoded fonts define ligatures for characters with diacritics. To enable
diff --git a/macros/xetex/latex/exam-zh/CHANGELOG.md b/macros/xetex/latex/exam-zh/CHANGELOG.md
index 1fb88d27ec..384d067eb5 100644
--- a/macros/xetex/latex/exam-zh/CHANGELOG.md
+++ b/macros/xetex/latex/exam-zh/CHANGELOG.md
@@ -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
diff --git a/macros/xetex/latex/exam-zh/README.md b/macros/xetex/latex/exam-zh/README.md
index 786d845d0c..9fdc5f820c 100644
--- a/macros/xetex/latex/exam-zh/README.md
+++ b/macros/xetex/latex/exam-zh/README.md
@@ -11,6 +11,7 @@ In exam-zh, you can
- 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 @@ Issues and pull requests are welcome: [issues]( https://gitee.com/xkwxdyy/exam-z
- 作者:Zeping Lee
- 维护者:Kangwei Xia, Lijun Guo
- 授权:[LaTeX Project Public License 1.3c](https://www.latex-project.org/lppl.txt)
+- QQ 用户交流群:652500180
本项目提供了一个中国高考试卷样式的 LaTeX 模板,旨在帮助中小学教师更方便地使用 LaTeX。模板具有以下特性:
diff --git a/macros/xetex/latex/exam-zh/doc/back/main-changelog.tex b/macros/xetex/latex/exam-zh/doc/back/main-changelog.tex
index 381bbf0b13..f3a51e79e1 100644
--- a/macros/xetex/latex/exam-zh/doc/back/main-changelog.tex
+++ b/macros/xetex/latex/exam-zh/doc/back/main-changelog.tex
@@ -7,4 +7,5 @@
\item 2022.4 开发字体模块
\item 2022.6 开发密封线、草稿纸、评分框
\item 2022.7 增加语文英语题型
+ \item 2022.8 开发图文排版模版
\end{itemize} \ No newline at end of file
diff --git a/macros/xetex/latex/exam-zh/doc/back/package.tex b/macros/xetex/latex/exam-zh/doc/back/package.tex
index d12f085d58..109b44244d 100644
--- a/macros/xetex/latex/exam-zh/doc/back/package.tex
+++ b/macros/xetex/latex/exam-zh/doc/back/package.tex
@@ -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}:插图
diff --git a/macros/xetex/latex/exam-zh/doc/body/introduction.tex b/macros/xetex/latex/exam-zh/doc/body/introduction.tex
index e072c02f8b..c843772466 100644
--- a/macros/xetex/latex/exam-zh/doc/body/introduction.tex
+++ b/macros/xetex/latex/exam-zh/doc/body/introduction.tex
@@ -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
diff --git a/macros/xetex/latex/exam-zh/doc/body/usage.tex b/macros/xetex/latex/exam-zh/doc/body/usage.tex
index f796821936..29adeaf5a2 100644
--- a/macros/xetex/latex/exam-zh/doc/body/usage.tex
+++ b/macros/xetex/latex/exam-zh/doc/body/usage.tex
@@ -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}
diff --git a/macros/xetex/latex/exam-zh/doc/exam-zh-doc-setup.tex b/macros/xetex/latex/exam-zh/doc/exam-zh-doc-setup.tex
index d44f20d8a6..9a1f2a6844 100644
--- a/macros/xetex/latex/exam-zh/doc/exam-zh-doc-setup.tex
+++ b/macros/xetex/latex/exam-zh/doc/exam-zh-doc-setup.tex
@@ -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
}
}
diff --git a/macros/xetex/latex/exam-zh/doc/exam-zh-doc.pdf b/macros/xetex/latex/exam-zh/doc/exam-zh-doc.pdf
index 9eea3d0481..2ae39ae7a5 100644
--- a/macros/xetex/latex/exam-zh/doc/exam-zh-doc.pdf
+++ b/macros/xetex/latex/exam-zh/doc/exam-zh-doc.pdf
Binary files differ
diff --git a/macros/xetex/latex/exam-zh/doc/exam-zh-doc.tex b/macros/xetex/latex/exam-zh/doc/exam-zh-doc.tex
index e9362101e3..8a5b804084 100644
--- a/macros/xetex/latex/exam-zh/doc/exam-zh-doc.tex
+++ b/macros/xetex/latex/exam-zh/doc/exam-zh-doc.tex
@@ -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}
diff --git a/macros/xetex/latex/exam-zh/doc/figures/xdyy-qrcode.png b/macros/xetex/latex/exam-zh/doc/figures/xdyy-qrcode.png
new file mode 100644
index 0000000000..38737c8a3b
--- /dev/null
+++ b/macros/xetex/latex/exam-zh/doc/figures/xdyy-qrcode.png
Binary files differ
diff --git a/macros/xetex/latex/exam-zh/examples/example-multiple.pdf b/macros/xetex/latex/exam-zh/examples/example-multiple.pdf
index 36f483c744..967799ad5f 100644
--- a/macros/xetex/latex/exam-zh/examples/example-multiple.pdf
+++ b/macros/xetex/latex/exam-zh/examples/example-multiple.pdf
Binary files differ
diff --git a/macros/xetex/latex/exam-zh/examples/example-single.pdf b/macros/xetex/latex/exam-zh/examples/example-single.pdf
index a49160b31e..dd0226e183 100644
--- a/macros/xetex/latex/exam-zh/examples/example-single.pdf
+++ b/macros/xetex/latex/exam-zh/examples/example-single.pdf
Binary files differ
diff --git a/macros/xetex/latex/exam-zh/examples/example-single.tex b/macros/xetex/latex/exam-zh/examples/example-single.tex
index f57cd8d346..4a9e7e3033 100644
--- a/macros/xetex/latex/exam-zh/examples/example-single.tex
+++ b/macros/xetex/latex/exam-zh/examples/example-single.tex
@@ -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
}
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-chinese-english.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-chinese-english.sty
index 5ac358950d..2e84afa5c6 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-chinese-english.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-chinese-english.sty
@@ -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 }
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-choices.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-choices.sty
index 07a4f106ae..f564fdff66 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-choices.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-choices.sty
@@ -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
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-font.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-font.sty
index a63484a7df..71320f5305 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-font.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-font.sty
@@ -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 }
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-question.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-question.sty
index dd9d76609e..40dde06024 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-question.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-question.sty
@@ -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@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,18 +291,43 @@
\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
\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 }
- \vspace { \l__examzh_solution_top_sep_skip }
\keys_set:nn { exam-zh / solution } {#1}
+ \vspace { \l__examzh_solution_top_sep_skip }
% 放在这是使得 \examsetup 设置 qedsymbol 可以放在正文区
\cs_set_eq:NN \qedsymbol \l__examzh_solution_qedsymbol_tl
\bool_if:NTF \l__examzh_solution_show_bool
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-symbols.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-symbols.sty
index 8d46aa977f..4997a0d292 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-symbols.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-symbols.sty
@@ -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}
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh-textfigure.sty b/macros/xetex/latex/exam-zh/tex/exam-zh-textfigure.sty
index f42e3ec739..ccefefae71 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh-textfigure.sty
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh-textfigure.sty
@@ -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
diff --git a/macros/xetex/latex/exam-zh/tex/exam-zh.cls b/macros/xetex/latex/exam-zh/tex/exam-zh.cls
index 12e450141d..2959abe67f 100644
--- a/macros/xetex/latex/exam-zh/tex/exam-zh.cls
+++ b/macros/xetex/latex/exam-zh/tex/exam-zh.cls
@@ -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@lastpage \__examzh_relax:
+% { \int_set:Nn \l__examzh_tmp_int { 0 } }
+% { \int_set:Nn \l__examzh_tmp_int { \lastpage@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@lastpage \__examzh_relax:
+ \bool_lazy_or:nnTF
+ { \cs_if_eq_p:NN \lastpage@lastpage \__examzh_relax: }
+ { \str_if_eq_p:ee \lastpage@lastpage {??} }
{ \int_set:Nn \l__examzh_tmp_int { 0 } }
{ \int_set:Nn \l__examzh_tmp_int { \lastpage@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 }