summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-05 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2021-06-05 03:00:55 +0000
commit4e703bdd2f304028698cd4ab92b0dda0b95a95a8 (patch)
treeeb585fb7163ef4f11c18dfd7e958f24881232885 /macros/latex
parenta5ae129f3aa3a3a0aeaa21c55b75a1d543fe4111 (diff)
CTAN sync 202106050300
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/acrotex/README.md7
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.pdfbin2255476 -> 2259587 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.tex71
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.pdfbin999995 -> 1000084 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.tex2
-rw-r--r--macros/latex/contrib/acrotex/examples/jquiztst.pdfbin126756 -> 358366 bytes
-rw-r--r--macros/latex/contrib/acrotex/examples/jquiztst.tex26
-rw-r--r--macros/latex/contrib/acrotex/examples/jtxttst.pdfbin320860 -> 320578 bytes
-rw-r--r--macros/latex/contrib/acrotex/examples/webeqtst.pdfbin331712 -> 497831 bytes
-rw-r--r--macros/latex/contrib/acrotex/examples/webeqtst.tex6
-rw-r--r--macros/latex/contrib/acrotex/exerquiz.dtx211
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx47
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin315318 -> 315303 bytes
-rw-r--r--macros/latex/contrib/kdpbook/DEPENDS.txt11
-rw-r--r--macros/latex/contrib/kdpbook/README.md34
-rw-r--r--macros/latex/contrib/kdpbook/images/signature.pdfbin0 -> 7256 bytes
-rw-r--r--macros/latex/contrib/kdpbook/images/volume-1.pdfbin0 -> 8540 bytes
-rw-r--r--macros/latex/contrib/kdpbook/images/volume-2.pdfbin0 -> 6504 bytes
-rw-r--r--macros/latex/contrib/kdpbook/images/volume-3.pdfbin0 -> 7156 bytes
-rw-r--r--macros/latex/contrib/kdpbook/images/volume-4.pdfbin0 -> 6723 bytes
-rw-r--r--macros/latex/contrib/kdpbook/kdpcover.cls161
-rw-r--r--macros/latex/contrib/kdpbook/kdpcover.pdfbin0 -> 104845 bytes
-rw-r--r--macros/latex/contrib/kdpbook/kdpcover.tex82
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md11
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1447170 -> 1482618 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-complex.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx-emulation.dtx15
-rw-r--r--macros/latex/contrib/siunitx/siunitx-table.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin607150 -> 634770 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex28
-rw-r--r--macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdfbin64821 -> 66197 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/externalize.pdfbin29626 -> 29246 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdfbin27159 -> 26848 bytes
-rw-r--r--macros/latex/contrib/todonotes/todonotes.dtx85
-rw-r--r--macros/latex/contrib/todonotes/todonotes.pdfbin318360 -> 336972 bytes
37 files changed, 658 insertions, 159 deletions
diff --git a/macros/latex/contrib/acrotex/README.md b/macros/latex/contrib/acrotex/README.md
index e64297bc82..0b8915e7ff 100644
--- a/macros/latex/contrib/acrotex/README.md
+++ b/macros/latex/contrib/acrotex/README.md
@@ -1,6 +1,6 @@
The AcroTeX eDucation Bundle (AeB)
Author: D. P. Story
-Dated: 2021-05-15
+Dated: 2021-05-29
AeB contains the following:
@@ -19,6 +19,11 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eforms
(including insdljs and dljslib).
+What's New (2021-05-29)
+ exerquiz: Internal changes to Begin Quiz and End Quiz actions to
+ support eq-pin2corr package. Exerquiz now tracks duplication quiz names.
+ Shift-Begin Quiz now clears the quiz without initializing it.
+
What's New (2021-05-15)
exerquiz: Some bug fixes.
Defined the new insertAt key of the \bChoices command. See
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.pdf b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
index 1e187364ec..d107b43e59 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.pdf
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.tex b/macros/latex/contrib/acrotex/doc/aeb_man.tex
index 0969156c5e..9276c3cfdb 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.tex
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.tex
@@ -243,10 +243,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2021/05/15}
+\version{2021/05/29}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2021/05/15}
+\prepared{2021/05/29}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -4030,7 +4030,7 @@ this option.
\textsf{pdftex} does not (normally) produce a dvi file.
%\subsection{The \texttt{nodljs} Option}\label{sss:nodljs}
-\subsection{Options passed through to the \tops{\protect\pkg}{}{insdljs} package}
+\subsection{Options passed through to the \tops{\protect\pkg}{}{insdljs} package}\label{ss:passthru}
The following options are passed through to \pkg{insdljs}: \opt{nodljs},
\opt{exercisesonly} (same as \opt{nodljs}), \opt{execJS}, and \opt{usealtadobe}.
@@ -6166,7 +6166,7 @@ Prior to the short quiz below, the following command was executed
\sqTurnOffAlerts %\sqCorrections
\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
-\begin{shortquiz*}[KublaKhan3]
+\begin{shortquiz*}[KublaKhan4]
Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
\begin{answers}{4}
\Ans1 True & \Ans0 False
@@ -6526,15 +6526,22 @@ page~\pageref{sss:exampltextfield}.
In addition to the options listed in the section \ref{sq:opts}, page \pageref*{sq:opts}, the following is
designed for quizzes.
-\subsubsection{The option
-\tops{\protect\texttt{noquiz\-solutions}}{noquizsolutions}}\label{sss:noquizsolutions}
+\subsubsection{The
+\tops{\protect\texttt{noquizsolutions}}{noquizsolutions} option}\label{sss:noquizsolutions}
-For online quizzing, where results are stored in some way (database,
-e-mail, text file) the presence of the solutions in the same file as the
-questions is a breach in security of the quiz. Using the
-\texttt{noquizsolutions} removes the solutions to a \texttt{quiz} and
-\texttt{shortquiz} from the document under construction.
+For online quizzing, where results are stored in some way (database, e-mail,
+text file) the presence of the solutions in the same file as the questions is
+a breach in security of the quiz. Using the \texttt{noquizsolutions} removes
+the solutions to a \texttt{quiz} and \texttt{shortquiz} from the document
+under construction. In the case of \env{quiz} environments, any
+\cs{CorrAnsButton} command placed in the quiz \emph{is not typeset} into the document.
+\subsubsection{The
+\tops{\protect\texttt{allowanswers}}{allowanswers} option}\label{sss:allowanswers}
+
+This option is effective only when the \texttt{noquizsolutions} option is
+also taken. When present in the option list, any \cs{CorrAnsButton} command
+\emph{is typeset} into the document.
\subsection{The \texttt{answers} Environment}\label{answersQuiz}
@@ -6551,22 +6558,21 @@ is
\newtopic The \anglemeta{dest}, an optional argument, is a name used to create a hypertext jump to
the solution; it has two forms: \texttt{[\meta{named\_dest}]}, an explicit
-``named destination.''; and the \texttt{*}-form, \textsf{exerquiz} automatically
-generates the name. Use \meta{named\_dest} when you want to refer to a solution
-in another part of the document; otherwise, use \texttt{*}, for convenience.
-
-If either the \texttt{[\meta{named\_dest}]} or \texttt{*} is used, a
-\texttt{solution} environment should follow.
-
-\newtopic The \meta{num\_cols} is the number of columns to
-typeset the answers in. When \meta{num\_cols} is 1, the answers are set
-in a list environment; otherwise, a tabular environment is used. In the latter case,
-the usual table syntax is used. (Use \texttt{\&} to separate columns, and \verb!\\! to
-terminate a row.)
-
-\newtopic The \cs{Ans} command has one required argument, a 1 to mark that this
-answer is a correct answer, and a 0 to mark that this answer is not true. \cs{Ans}
-also has an optional argument to pass partial points rewarded for a wrong answer.
+``named destination.''; and the star-form (\texttt{*}), \pkg{exerquiz}
+automatically generates the name. Use \meta{named\_dest} when you want to
+refer to a solution in another part of the document; otherwise, use
+\texttt{*}, for convenience. If either the \texttt{[\meta{named\_dest}]} or
+\texttt{*} is used, a \texttt{solution} environment should follow.
+
+\newtopic The \meta{num\_cols} argument is the number of columns to
+typeset the answers in. When \meta{num\_cols} is 1, the answers are set in a
+list environment; otherwise, a tabular environment is used. In the latter
+case, the usual table syntax is used: use \texttt{\&} to separate columns,
+and \verb!\\! to terminate a row.
+
+\newtopic The \cs{Ans} command has one required argument, a 1 to mark the choice
+as correct, and a 0 to mark it as incorrect. \cs{Ans} also has an optional
+argument to pass partial points rewarded for a wrong answer.
\newtopic This environment is illustrated extensively in this section. See also the
\texttt{manswers} environment, \Nameref{manswersQuiz}, for posting questions with multiple
@@ -6781,7 +6787,7 @@ restores the next multiple choice/selection question back to the default determi
by the quiz environment (\texttt{quiz} versus \texttt{quiz*}), or as set by the
\cs{quiztype} command.
-\subsubsection{The BeginQuiz and EndQuiz Form Buttons}\label{sss:FormButton}
+\subsubsection{The \tops{\protect\uif}{}{Begin Quiz} and \tops{\protect\uif}{}{End Quiz} Form Buttons}\label{sss:FormButton}
The default setup the \texttt{quiz} environment is to have
hypertext links for the `Begin Quiz' and `End Quiz'. You can also
@@ -6791,6 +6797,9 @@ Prior to your quiz, use the following code, if desired.
\useBeginQuizButton
\useEndQuizButton
\end{Verbatim}
+Clicking the \uif{Begin Quiz} button clears all fields in the quiz and initializes it for the user
+to respond to each question. Shift-clicking the \uif{Begin Quiz} button clears all fields, but does not
+initialize the quiz.
\useBeginQuizButton\useEndQuizButton
%\makeatletter
@@ -6825,8 +6834,10 @@ is 100\%.
\noindent The commands \cs{useBeginQuizButton} and \cs{useEndQuizButton} each
have an optional argument that can be used to modify the appearance
of the buttons.
-\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\useBeginQuizButton[\textColor{0 0 1}]
+!makebox[0pt](!textsf(or)!hskip!amtIndent)
+\useBeginQuizButton[\textColor{blue}] %!textsf( if xcolor package is loaded)
\end{Verbatim}
\noindent would create a `Begin Quiz' button with blue text for the button label.
@@ -11602,7 +11613,7 @@ Sameshima)\\
used with \pkg{web}\\
\hyperref[sss:preview]{preview} & shows the outline of all form fields
in the dvi previewer \\
-\hyperref[sss:nodljs]{nodljs} & turns off the insertion of DLJS \\
+\hyperref[ss:passthru]{nodljs} & turns off the insertion of DLJS \\
%\hyperref[sss:acrobativ]{acrobativ} & equivalent to \texttt{nodljs}\\
\hyperref[sss:noquizzes]{exercisesonly} & if document has only exercises, no doc level JS needed\\
%\hyperref[sss:debug]{debug} & this option is passed on to the \texttt{insdljs} package\\
diff --git a/macros/latex/contrib/acrotex/doc/eformman.pdf b/macros/latex/contrib/acrotex/doc/eformman.pdf
index ef8900e6de..e34de8e677 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.pdf
+++ b/macros/latex/contrib/acrotex/doc/eformman.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/eformman.tex b/macros/latex/contrib/acrotex/doc/eformman.tex
index bc47220543..de094e1492 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.tex
+++ b/macros/latex/contrib/acrotex/doc/eformman.tex
@@ -82,7 +82,7 @@
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2021/05/15},
+ prepared={2021/05/29},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
diff --git a/macros/latex/contrib/acrotex/examples/jquiztst.pdf b/macros/latex/contrib/acrotex/examples/jquiztst.pdf
index 7d18e4ebfe..39f0d58d02 100644
--- a/macros/latex/contrib/acrotex/examples/jquiztst.pdf
+++ b/macros/latex/contrib/acrotex/examples/jquiztst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/examples/jquiztst.tex b/macros/latex/contrib/acrotex/examples/jquiztst.tex
index eba2884dd7..2ed93b3192 100644
--- a/macros/latex/contrib/acrotex/examples/jquiztst.tex
+++ b/macros/latex/contrib/acrotex/examples/jquiztst.tex
@@ -25,7 +25,7 @@ Department of Mathematics}
% Uncomment the lines below to create buttons
% for "Begin Quiz", "End Quiz" instead of links
-%\useBeginQuizButton[\textColor{blue}]
+\useBeginQuizButton[\textColor{blue}]
\useEndQuizButton[\textColor{blue}]
% Uncomment this line to require the student
@@ -126,19 +126,19 @@ of $x$ is expected will, no doubt, result in missed problem.
For fill-in questions, if the document author so wishes, answers
and (optionally) solutions can be provided. The author provides
-an ``Ans'' button. This button is visible for a \texttt{shortquiz}
+an `\textsf{Ans}' button. This button is visible for a \texttt{shortquiz}
and hidden for a \texttt{quiz}.
-For a \texttt{shortquiz}, the ``Ans'' button can be clicked at
+For a \texttt{shortquiz}, the `\textsf{Ans}' button can be clicked at
anytime. In the case of a \texttt{quiz}, after a \texttt{quiz} has
-been completed, the hidden ``Ans'' buttons appear. Click on the
+been completed, the hidden `\textsf{Ans}' buttons appear. Click the
button to get an answer to the problem.
-Concerning solutions. If the ``Ans'' button has a green boundary,
+Concerning solutions. If the `\textsf{Ans}' button has a green boundary,
that means that question has a solution. Performing a
-\texttt{Shift-Click} on the ``Ans'' button causes the viewer to
+\textsf{Shift-Clicking} the `\textsf{Ans}' button causes the viewer to
jump to the solution. For multiple choice questions, the boundary
-for the correct answer is colored green as well. Click on the
+for the correct answer is colored green as well. \textsf{Click} the
answer field to jump to the solution.
Solutions to a \texttt{quiz} can be protected from prying eyes
@@ -150,9 +150,9 @@ brief discussion.
\noindent\textcolor{blue}{\textbf{Example:}} Consider the following sample question.
Practice by typing in the answer:
-\js{2*x^3*(x^4+1)^(-1/2)}.
+\js{2*x^3*(x^4+1)^(-1/2)}.
-You can also type \js{2x^3(x^4+1)^(-1/2)} since the
+You can also type \js{2x^3(x^4+1)^(-1/2)} since the
\texttt{ImplMulti} option is taken with the \textsf{dljslib} package.
\medskip
@@ -187,9 +187,9 @@ operator, try modifying the answer using \js{sqrt}.
%response using the correct syntax.
Problem \#2 illustrates how to define a problem with a variable
-other than the default $x$. Click on the ``Ans'' button to get
-answers, shift-click on ``Ans'' buttons that have a green boundary
-to get a solution.
+other than the default $x$. \textsf{Click} the `\textsf{Ans}' button to get the
+answer, \textsf{shift-click} the `\textsf{Ans}' button that have a green boundary
+to get the solution.
\begin{shortquiz*}[answer] Answer each of the following. Passing is 100\%.
@@ -241,7 +241,7 @@ and is protected by the \texttt{\string\NoPeeking}
command. First, browse the solutions at the end
of the file, when you encounter a solution protected by
\texttt{\string\NoPeeking}, see what happens.
-Click on the ``Ans'' button to get answers, shift-click on ``Ans''
+Click on the `\textsf{Ans}' button to get answers, shift-click on `\textsf{Ans}'
buttons that have a green boundary to get a solution.
\NoPeeking % or put in preamble
diff --git a/macros/latex/contrib/acrotex/examples/jtxttst.pdf b/macros/latex/contrib/acrotex/examples/jtxttst.pdf
index 8638f825f2..9af5055e92 100644
--- a/macros/latex/contrib/acrotex/examples/jtxttst.pdf
+++ b/macros/latex/contrib/acrotex/examples/jtxttst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.pdf b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
index 9007fa24b2..bffc715f5e 100644
--- a/macros/latex/contrib/acrotex/examples/webeqtst.pdf
+++ b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.tex b/macros/latex/contrib/acrotex/examples/webeqtst.tex
index 7f3e8c7f0d..2e3c59b907 100644
--- a/macros/latex/contrib/acrotex/examples/webeqtst.tex
+++ b/macros/latex/contrib/acrotex/examples/webeqtst.tex
@@ -456,8 +456,8 @@ is 100\%.
\CA{TeX} % Button text
\RC{Users} % rollover text
\AC{Group} % pushed text
- \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text
- \W{1}\S{I} % border width 1, inset button
+ \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text
+ \W{1}\S{I} % border width 1, inset button
]{qzTeXc}
\section{Objective-Style Questions}
@@ -465,7 +465,7 @@ is 100\%.
It is possible to pose objective-style questions (fill-in-the-blank). The
demo file for this style question is called
\href{http://www.math.uakron.edu/~dpstory/acrotex/examples/html/jquiztst.pdf}{jquiztst.pdf}
-(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click on the link to
+(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click the link to
review this demo file.
\end{document}
diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx
index 3890683a5c..8dc8ce02c5 100644
--- a/macros/latex/contrib/acrotex/exerquiz.dtx
+++ b/macros/latex/contrib/acrotex/exerquiz.dtx
@@ -22,7 +22,7 @@
%<randomize>\ProvidesFile{aebrandom.def}
%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
%<template>\ProvidesFile{template.def}
-%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/05/15 v8.8 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/05/29 v8.8.2 %
%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
%<driver> Exerquiz documentation driver file (dps)]
%<aebjs> Exerquiz document level JavaScript (dps)]
@@ -181,6 +181,15 @@
% No solutions for quizzes (shortquiz and quiz environments).
% \begin{macrocode}
\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
+% \end{macrocode}
+% \leavevmode\IndexOpt{allowanswers}^^A
+% Only effective when \texttt{noquizsolutions} option is in force. Normally, the \uif{Correct} control
+% (\cs{CorrAnsButton}) does not appear; if \texttt{answersallowed} is also specified,
+% the \cs{CorrAnsButton} does appear.
+% \changes{v8.8.1}{2021/05/21}{Added the \string\texttt{allowanswers} key}
+% \begin{macrocode}
+\DeclareOption{allowanswers}{\eq@answersallowedtrue}
+\newif\ifeq@answersallowed \eq@answersallowedfalse
%</package>
%<*package|eqexam>
% \end{macrocode}
@@ -4179,6 +4188,7 @@ if (typeof !oField=="undefined")
% for the associated quiz. This field has \uif{Format} code (\cs{qzIDFmt}), and the \app{Reader} will
% execute this code when the page is opened. The code creates a new array \texttt{aQuizzesInDoc}, if needed,
% and adds this quiz to the list of quizzes in the doc. Refer to \cs{qzIDFmt} above.
+% \changes{v8.8.2}{2021/05/29}{Check for dupl short-quiz names}
% \begin{macrocode}
\def\qz@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
\S{S}\textSize{0}\Ff{\FfReadOnly}
@@ -4186,7 +4196,14 @@ if (typeof !oField=="undefined")
%</package>
%<*package|eqexam>
\let\eqQuizType\relax
-\def\@@shortquiz[#1]{%\begingroup
+\def\@@shortquiz[#1]{\csarg % dps5-29
+ \ifx{SQName-#1}\relax
+ \csarg\gdef{SQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The short-quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{SQName-#1}{0}%
+ \fi
\gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
\edef\tmp@Exp{\noexpand\g@addto@macro\noexpand
\ListOfSQuizNames{,#1}}\tmp@Exp
@@ -4791,9 +4808,17 @@ if (typeof !oField=="undefined")
% quizzes in the document.
% \changes{v7.8l}{2017/07/29}{Added \string\cs{ListOfQuizNames} and
% \string\cs{ListOfSQuizNames}}
+% \changes{v8.8.2}{2021/05/29}{Check for dupl quiz names}
% \begin{macrocode}
\let\ListOfQuizNames\@empty
-\def\@quiz*#1#2{%
+\def\@quiz*#1#2{\csarg % dps5-29
+ \ifx{QzName-#2}\relax
+ \csarg\gdef{QzName-#2}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#2' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{QzName-#2}{0}%
+ \fi
% \end{macrocode}
% (06/08/10) The next two lines initialize the macros for registering the
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
@@ -4947,37 +4972,53 @@ if (typeof !oField=="undefined")
% isSubmitted and initializeWith to the quiz object.}
%\changes{v8.6.1}{2020/12/30}{Changed the comparison method for \string\cs{priorInitQuiz} and
% \string\cs{postInitQuiz} to reflect their \string\cs{newcommand} definition.}
+%\changes{v8.8.1}{2021/05/21}{Added a gateway into \string\cs{@initQuiz}}
+% \begin{macrocode}
+\begingroup
+ \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+ \gdef\jsLB<{>\gdef\jsRB<}>
+\endgroup
+% \end{macrocode}
+% (2021/05/21) Added a gate keeper into \uif{Begin Quiz}. Normally, all code
+% passes through, but this can be modified by redefining \DescribeMacro\BeginQuizG@te
+% \cs{BeginQuizG@te}; restore any changes with \DescribeMacro\restorBeginQuiz
+% \cs{restorBeginQuiz}.
% \begin{macrocode}
+\newcommand{\BeginQuizG@te}{if (true)}
+\def\Norm@lBeginQuiz{if (true)}
+\def\restorBeginQuiz{\let\BeginQuizG@te\Norm@lBeginQuiz}
\newcommand\@initQuiz{%
- var\eqSP\curr@quiz=new Object();\jsR
- lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
- \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
- \curr@quiz.Grp={};%
- \ifx\defaultColorJSLoc\@empty\else\jsR
- \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
- \ifx\rghtColorJSLoc\@empty\else\jsR
- \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
- \ifx\wrngColorJSLoc\@empty\else\jsR
- \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
- \ifx\partialColorJSLoc\@empty\else\jsR
- \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
- \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
- \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
- \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
- \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
- \ifx\corrAnsSymbJSLoc\@empty\else\jsR
- \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
- \ifx\eqGradeScaleLoc\@empty\else\jsR
- \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
- \ifx\eqCorrLocalChoiceFully\@empty\else\jsR
- \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
- \if$\priorInitQuiz$\else\jsR\priorInitQuiz\fi\jsR
- InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
- \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
- \jsR\curr@quiz.isSubmitted=true;\fi
- \jsR\curr@quiz.initializeWith=%
- 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
- \if$\postInitQuiz$\else\jsR\postInitQuiz\fi%
+ \BeginQuizG@te\space\jsLB\jsR\jsT
+ var\eqSP\curr@quiz=new Object();\jsR\jsT
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR\jsT
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR\jsT
+ \curr@quiz.Grp={};%
+ \ifx\defaultColorJSLoc\@empty\else\jsR\jsT
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR\jsT
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR\jsT
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\jsR\jsT
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR\jsT
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\eqCorrLocalChoiceFully\@empty\else\jsR\jsT
+ \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
+ \if$\priorInitQuiz$\else\jsR\jsT\priorInitQuiz\fi\jsR\jsT
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
+ \ifx\eq@CGI\@empty\jsR\jsT\curr@quiz.isSubmitted=false;\else
+ \jsR\jsT\curr@quiz.isSubmitted=true;\fi
+ \jsR\jsT\curr@quiz.initializeWith=%
+ 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
+ \if$\postInitQuiz$\else\jsR\jsT\postInitQuiz\fi\jsR
+ \jsRB
}
% \end{macrocode}
% The following is the \env{defineJS} version of \cs{@initQuiz}. This is experiemental
@@ -5103,40 +5144,65 @@ if (typeof !oField=="undefined")
\every@ButtonField\every@BeginQuizButton}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\eq@EndQuizButton}
-% The `End Quiz' code
+% \DescribeMacro\EndQuizG@te is an entry point in the \uif{End Quiz} action
+% that, if redefined, allows the document author to intercept the end of the quiz
+% code and insert alternate code lines; perhaps giving the student one last chance
+% to change his/her quiz before submittal. A document author may redefine \cs{EndQuizLastChance}
+% for one quiz, then change the \cs{eQzBtnActns} code by back to its default by expanding
+% \DescribeMacro\restoreEndQuiz\cs{restoreEndQuiz} after the quiz. See the DTX of the
+% package \pkg{eq-pin2corr} for an example of redefining \cs{EndQuizLastChance}.
+% The default definition is to ``pass-thru'' with no action.
+% \changes{v8.8.1}{2021/05/21}{\string\cs{EndQuizG@te} defined as part
+% of \string\cs{eQzBtnActns}}
+% \begin{macrocode}
+\newcommand{\EndQuizG@te}{if (true)}
+\def\Norm@lEndQuiz{if (true)}
+\def\restoreEndQuiz{\let\EndQuizG@te\Norm@lEndQuiz}
+% \end{macrocode}
+% \begin{macro}{\eQzBtnActns}
+% The `End Quiz' JavaScript action code
+% \changes{v8.8.1}{2021/05/21}{Modified \string\cs{eQzBtnActns} to allow more
+% customizations by inserting \string\cs{EndQuizLastChance} into the code}
% \begin{macrocode}
\begin{defineJS}[\makeesc\*\makecmt\%]{\eQzBtnActns}
if (!isQuizInitialized("*curr@quiz"))
eqAppAlert(InitMsg("*bqlabelISO"),3);
else {
if (*minQuizResp(*thequestionno)&&_ModalNotOn){
- *curr@quiz.PtValues=new Array(*pointValuesArray);
- ProbType=[*ptypeArray];%
+% \end{macrocode}
+% Insert one last chance.
+% \begin{macrocode}
+ *EndQuizG@te {
+ *curr@quiz.PtValues=new Array(*pointValuesArray);
+ ProbType=[*ptypeArray];%
*if@inclkey
- *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
+ *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
% \end{macrocode}
% (2021/02/17) Pass a fourth argument to \texttt{DisplayQuizResults()}, its default
% value is \texttt{bDisplaySilent=false}, but can be changed locally
% to \texttt{true}. When \texttt{bDisplaySilent=true}, \texttt{DisplayQuizResults()}
-% does not write its results to any field (Score Field, Points Field, etc.).
+% does not write its results to any field (\uif{Score Field}, \uif{Points Field}, etc.).
% \changes{v8.6.4}{2021/02/17}{We pass
% a new \texttt{bDisplaySilent} argument to \texttt{DisplayQuizResults} for ``silent reporting''}
% \begin{macrocode}
- DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
+ DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
*thequestionno,bDisplaySilent);
- bDisplaySilent=false;
- var h=this.getField("ScoreData.*curr@quiz");
- h.value=Score+";"+NQuestions+";"%
+ bDisplaySilent=false;
+ var h=this.getField("ScoreData.*curr@quiz");
+ h.value=Score+";"+NQuestions+";"%
+ptScore+";"+NPointTotal;%
*ifx*eq@submitURL*empty*else
- *eq@submitURL*fi%
+ *eq@submitURL*fi%
*if$*postSubmitQuiz$*else
- *postSubmitQuiz*fi
- resetQuiz("*curr@quiz");
+ *postSubmitQuiz*fi
+ resetQuiz("*curr@quiz");
+ }
}
}
\end{defineJS}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\def\EndQuizButtonDefaults{%
\CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
\BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
@@ -5144,6 +5210,9 @@ else {
\A{\JS{\eQzBtnActns}}}
\newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{%
\textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{2bp}{2bp}}}
+% \end{macrocode}
+% \begin{macro}{\eq@EndQuizButton}
+% \begin{macrocode}
\newcommand\eq@EndQuizButton[1][]{%
\ifx\eq@CGI\@empty
\let\eq@submitURL\@empty
@@ -7998,9 +8067,17 @@ updateTally("*oField.*thequestionno");*fi%
% of this question. This name is used to define the macro \cmd{\oField} which is used
% by support macros. The \texttt{shortquiz} environment can also be used for
% single/multiple questions as well.
+% \changes{v8.8.2}{2021/05/29}{Check for dupl oQuestion names}
% \begin{macrocode}
\let\oqpriorhook\@empty
-\newenvironment{oQuestion}[1]{%
+\newenvironment{oQuestion}[1]{\csarg % dps5-29
+ \ifx{oQName-#1}\relax
+ \csarg\gdef{oQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{oQName-#1}{0}%
+ \fi
% \end{macrocode}
% (06/08/10) The next two lines initialize the macros for registering the
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
@@ -9606,7 +9683,7 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
\def\processJSfunc{#3}\ifx\@qzsolndest\@empty\let\JST\@empty\else
\let\JST\jsT\fi % dps17
- \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \ifx\eq@ProcRespIntervals\g@processJSfunc
\let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
% \end{macrocode}
% When the response function is \texttt{ProcRespIntervals}, there may be unbalanced parentheses, we'll
@@ -9621,7 +9698,15 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
\else\noexpand\BC{\solution@Color}\fi
\noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
- \ifeq@noquizsolutions\else % dps17 (\let\rpl\eq@rpl)
+% \end{macrocode}
+% (2021/05/21) Code to support the \texttt{allowanswers} option. When the options \texttt{noquizsolutions}
+% and \texttt{allowanswers} are both specified, the \cs{CorrAnsButton} is typeset.
+% Normally, when \texttt{noquizsolutions} is specified, \cs{CorrAnsButton} not typeset.
+% \begin{macrocode}
+ \let\eq@insertFld\eq@YES
+ \ifeq@noquizsolutions\let\eq@insertFld\eq@NO
+ \ifeq@answersallowed\let\eq@insertFld\eq@YES\fi\fi
+ \ifx\eq@insertFld\eq@YES
\mbox{\let\rpl\eq@rpl
\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
{\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
@@ -12434,7 +12519,16 @@ function InitializeQuiz(qtfield,mark) {
if (!isQuizInitialized(qtfield)&&!isAQuizUnfinished()) return null;
neutralizeQuizzes();
ProcessIt = false;
- aQuizControl[qtfield] = 1;
+% aQuizControl[qtfield] = 1;
+% \end{macrocode}
+% (2021/05/29) Pressing \uif{Shift-Begin Quiz} will clear the quiz,
+% but not initialize for another quiz.
+% \changes{v8.8.1}{2021/05/25}{Shift-Begin Quiz clears the quiz, but does
+% not initialize the quiz.}
+% \begin{macrocode}
+ if (arguments.length>2)
+ aQuizControl[qtfield] = arguments[2]; // 0 or 1 designed for 0
+ else aQuizControl[qtfield] = (event.shift)?0:1; // dps5-25
this.resetForm(["ScoreField." + qtfield,"mc."+qtfield,
"obj."+qtfield,"mck."+qtfield,"Ans."+qtfield,
"PointsField."+qtfield,"PercentField."+qtfield,
@@ -12453,7 +12547,7 @@ function InitializeQuiz(qtfield,mark) {
% Oa.Sys already creates a readonly field for the solutions, we don't want
% to mess with that.
% \begin{macrocode}
- if (arguments.length<3) {
+ if (arguments.length<4) {
f = this.getField("obj." + qtfield);
if ( f != null ) f.readonly = false;
}
@@ -12584,12 +12678,14 @@ function GrpRight( a, nProb, qtfield )
for ( var i=1; i <= l; i++) prod *= !!a[i];
return prod;
}
-function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
-{
+function DisplayQuizResults(qtfield,nPointTotal,nQuestions) {
Score = 0; ptScore = 0;
NPointTotal=nPointTotal; NQuestions=nQuestions;
- for (var i=1; i < RightWrong.length; i++)
- {
+% \end{macrocode}
+% If \texttt{RightWrong} is undefined, set length = 0 (dps5-24)
+% \begin{macrocode}
+ var l=(typeof RightWrong=="undefined")?0:RightWrong.length;
+ for (var i=1; i < l; i++) {
if ( (typeof RightWrong[i] == "object" ) && %
( RightWrong[i][0] == "grp" ) ) {
// grouped question
@@ -12853,7 +12949,8 @@ display.visible:display.hidden;
var rbmuname = a[i].name.replace(re,"rbmarkup\.");
var oRBMarkup = this.getField(rbmuname);
var bRBMU = ( oRBMarkup != null );
- if ( RightWrong[probno] == 1 ) {
+ if ( (typeof RightWrong!="undefined") && % // dps5-24
+(RightWrong[probno] == 1) ) {
a[i].strokeColor = rightColor;
if (bRBMU) {
oRBMarkup.textColor=rightColor;
@@ -12921,7 +13018,9 @@ display.visible:display.hidden;
if ( h != null ) break;
}
var g = f.getArray();
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ if (typeof ProbDist == "undefined" ) var qpts=0; // dps5-24
+ else
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
if ( !negPointsMarkupAllowed && (qpts < 0) ) qpts=0;
g[0].value = qpts + (( qpts == 1 ) ? " \eqptLabel\space"
: " \eqptsLabel");
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7d5517c918..c1a4a44dc4 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -23,12 +23,12 @@
%
% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
-% \changes{v1.25r}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
-% \changes{v1.25r}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
+% \changes{v1.25s}{2021/05/03}{取消附带的示例文件,可查看历史版本及其它来源的使用样例。}
+% \changes{v1.25s}{2021/06/02}{将模块的代码独立出来为 \pkg{easybase} 宏包,适用于 \CTeX 文档类。}
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/06/03\hskip\ccwd\relax v1.25r\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/06/04\hskip\ccwd\relax v1.25s\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -134,7 +134,7 @@
% \end{syntax}
% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25r}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \changes{v1.25s}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
@@ -184,7 +184,7 @@
% \tn{listoflstlistings*+}\oarg{键值列表}
% \end{syntax}
% \tn{listoffigures} 命令输出图片目录,\tn{listoftables} 输出表格目录,\tn{listoflstlistings} 输出代码目录。带有星号的目录命令不将标题添加进主文档目录,带有+号的目录命令可以使当前标题编号。\tn{tableofcontents+} 与其它命令不同是用于输出双语目录,需要与双语目录标题命令 \tn{bichapter} 等或设置图片、表格和代码等英文目录的标题配合使用,附加代码是中文与英文目录之间的代码,可以插入文本和换页命令等。目录的键值列表选项如下
-% \changes{v1.25r}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
+% \changes{v1.25s}{2021/05/05}{命令 \tn{tableofcontents} 可以输出双语目录。}
% \end{function}
%
% \begin{function}{multoc,columns,title,format,aftertitle,pagestyle,book,article}
@@ -201,7 +201,7 @@
% 在书籍模式且 \opt{book} 选项开启或者文章模式的情况下,\opt{format} 用于设置目录标题的格式,\opt{aftertitle} 选项的代码将被插入到目录标题内容之后,\opt{pagestyle} 是目录标题所在页的页面格式,除此之外还支持 \opt{ctexset/chapter} 或 \opt{ctexset/section} 所有的章节标题样式选项。\opt{book} 选项使目录标题按照 chapter 级别输出,\opt{article} 选项使目录标题按照 section 级别输出,默认为 chapter 级别。
% \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
% \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题键值。}
-% \changes{v1.25r}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
+% \changes{v1.25s}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。}
% \end{function}
%
% \subsubsection{标题命令}
@@ -217,7 +217,7 @@
% 双语目录的标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录,这个功能是为国内一些大学的学位论文模板的要求设计,在一般情况和英文模式下不需要使用。
%
% 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \tn{chapter*} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文标题,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。双语目录的格式是一致的,共享使用 \tn{tocset} 的设置,英文目录的章级别标题名及编号的修改方式如下
-% \changes{v1.25r}{2021/05/05}{增加与双语目录配合的标题命令。}
+% \changes{v1.25s}{2021/05/05}{增加与双语目录配合的标题命令。}
% \end{function}
%
% \begin{function}{biname,binmuber}
@@ -317,7 +317,7 @@
% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
% \changes{v1.23}{2021/03/19}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
% \changes{v1.24}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。}
-% \changes{v1.25r}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
+% \changes{v1.25s}{2021/05/06}{模块名 \opt{link} 改为 \opt{refset},\opt{link} 作为兼容性保留。}
% \end{function}
%
% \begin{optdesc}
@@ -374,7 +374,7 @@
% \ding{229} 以上选项路径为 \opt{subfont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
% \changes{v1.23}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-% \changes{v1.25r}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
+% \changes{v1.25s}{2021/05/31}{其它字体模块名由 \opt{elsefont} 改为 \opt{subfont},并增加数学字体的选项 \opt{subfont/math}。}
% \end{function}
%
% \begin{optdesc}
@@ -399,7 +399,7 @@
% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
% \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
% \changes{v1.24}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。}
-% \changes{v1.25r}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
+% \changes{v1.25s}{2021/05/12}{取消 \opt{bib-loadpkg} 选项,由是否设置参考文献数据库来决定载入宏包。}
% \end{function}
%
% \begin{optdesc}
@@ -605,7 +605,7 @@
% 上面几个选项用于设置脚注格式,\opt{fnparskip} 和 \opt{fnparindent} 选项仅在 \opt{fnhang = true} 时有效。\opt{fnhang} 用于将脚注设置为悬挂缩进的格式,\opt{fnmark-pos} 选项设置脚注编号的位置,正常文本或是上标形式。\opt{fnmark-num} 选项设置脚注编号的格式,默认为原生样式 \opt{plain},还可以改为 \opt{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
%
% \opt{fnmark-form} 是脚注标记的格式,在此设置字体命令会覆盖 \opt{subfont/footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注编号,一般配合 \opt{fnmark-num = plain} 使用。\opt{afterfnmark} 是脚注标记后的代码,一般用于设置标记与文本间的距离。
-% \changes{v1.25r}{2021/05/12}{增加脚注样式设置选项。}
+% \changes{v1.25s}{2021/05/12}{增加脚注样式设置选项。}
% \end{function}
%
% \subsection{目录样式}
@@ -624,7 +624,7 @@
% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令,带有加号的 \opt{format+} 选项用于在已有的格式命令后附加内容。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。
% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
% \changes{v1.24}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。}
-% \changes{v1.25r}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
+% \changes{v1.25s}{2021/05/14}{可以分别设置图片、表格和代码目录的格式。}
% \end{function}
%
% \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberLine}
@@ -709,7 +709,7 @@
% \tn{end}\marg{环境名}
% \end{syntax}
% \pkg{tabularray} 是一个较新的宏包,不仅提供了 \pkg{tabularx}、\pkg{multirow}、和 \pkg{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。目前除了表头斜线以及跨页功能存在不足,其它方面已满足对表格绝大多数格式的需求,具体用法可见宏包的说明文档。
-% \changes{v1.25r}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
+% \changes{v1.25s}{2021/05/17}{使用功能更便捷齐全的 \pkg{tabularray} 宏包设置表格样式。}
% \end{function}
%
% \subsection{列表}
@@ -873,7 +873,7 @@
% \tn{qtyrange}\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}
% \end{syntax}
% \pkg{siunitx} 宏包的 \tn{num} 命令可以输出以科学计数法表示的数值,单位格式化命令 \tn{unit} 包含文字项目(例如字母或数字)时,使用 . 和 \~{} 放置在单元乘积中间,并使用 \_ 和 \^{} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。而 \tn{qty} 命令可用来输出带有单位的量,\tn{qtyrange} 可以输出带有范围和单位的量。
-% \changes{v1.25r}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
+% \changes{v1.25s}{2021/05/18}{\pkg{siunitx} 宏包 v3.0.0 更新后用法改变,修改相关配置选项。}
% \end{function}
%
% \begin{ctexexam}
@@ -1011,7 +1011,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/06/03}{1.25r}{beta}
+\ProvidesExplClass{easybook}{2021/06/04}{1.25s}{beta}
\bool_set_false:N \l__eb_compile_draft_bool
\bool_set_false:N \l__eb_title_newline_bool
@@ -1255,7 +1255,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/06/03}{1.25r}{beta}
+\ProvidesExplPackage{easybase}{2021/06/04}{1.25s}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1324,7 +1324,7 @@
\clist_map_inline:nn
{
{ svgnames } { xcolor },
- { stable } { footmisc },
+ { stable,bottom } { footmisc },
{ normalem } { ulem },
{ protrusion = false } { microtype },
{ list = off } { bicaption },
@@ -2410,16 +2410,14 @@
\skip_set:Nn \floatsep { 12pt plus 2pt minus 2pt }
\skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt }
\skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt }
-\skip_set:Nn \dbltextfloatsep { 16pt plus 2pt minus 4pt }
-\skip_set:Nn \@fpsep { 8pt plus 2.0fil }
\skip_set:Nn \multicolsep { 10pt plus 4pt minus 3pt }
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{8}
-\tl_gset:Nn \textfraction { 0.18 }
-\tl_gset:Nn \topfraction { 0.85 }
-\tl_gset:Nn \bottomfraction { 0.65 }
-\tl_gset:Nn \floatpagefraction { 0.60 }
+\tl_gset:Nn \textfraction { 0.15 }
+\tl_gset:Nn \topfraction { 0.8 }
+\tl_gset:Nn \bottomfraction { 0.8 }
+\tl_gset:Nn \floatpagefraction { 0.9 }
\tl_gset:Nn \ULthickness { 0.75pt }
\allowdisplaybreaks[4]
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
@@ -2755,7 +2753,7 @@
{
standard~jigsaw,
nobeforeafter,tcbox~raise~base,
- top = 1.25rt,bottom = 1.25rt,left = 1.25rt,right = 1.25rt,
+ top = 1.25st,bottom = 1.25st,left = 1.25st,right = 1.25st,
boxrule = 0.75pt,arc = 1pt,
colback = #1,opacityback = 0.12,colframe = #1,#3
}{#2}
@@ -3069,6 +3067,7 @@
\labelformat{chapter}{\CTEXthechapter}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
+\cs_if_free:NT \bibname { \cs_set_eq:NN \bibname \refname }
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{
\keys_set_known:nn { ctex }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index f6612969e9..58e5a92952 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/DEPENDS.txt b/macros/latex/contrib/kdpbook/DEPENDS.txt
new file mode 100644
index 0000000000..2be9f7df5e
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/DEPENDS.txt
@@ -0,0 +1,11 @@
+hard shellesc
+hard xkeyval
+hard anyfontsize
+hard tikz
+hard microtype
+hard xifthen
+hard xcolor
+hard graphicx
+hard setspace
+hard geometry
+hard textpos
diff --git a/macros/latex/contrib/kdpbook/README.md b/macros/latex/contrib/kdpbook/README.md
new file mode 100644
index 0000000000..5c5765b4fc
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/README.md
@@ -0,0 +1,34 @@
+[![make](https://github.com/yegor256/kdpcover/actions/workflows/make.yml/badge.svg)](https://github.com/yegor256/kdpcover/actions/workflows/make.yml)
+[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/kdpcover/blob/master/LICENSE.txt)
+
+This LaTeX class I use to format covers for [my books](https://www.yegor256.com/books.html),
+which I sell [on Amazon](https://www.amazon.com/Yegor-Bugayenko/e/B01AM1QMDK).
+The problem this class solves is [the necessity](https://kdp.amazon.com/en_US/help/topic/G201953020)
+to change the size of the cover PDF respectfully
+to the number of pages in the book — the bigger
+the book, the larger must be the cover. The provided class makes necessary
+calculations on-fly, using the `qpdf` took from GhostScript. Obviously,
+you need to have it installed. Also, you must
+run `pdflatex` with the `--shell-escape` option, in order to allow LaTeX to run `qpdf`.
+
+First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+from [CTAN](https://ctan.org/pkg/kdpcover)
+and then use in the preamble:
+
+```tex
+\documentclass[pdf=my-book.pdf]{kdpcover}
+\begin{document}
+% Here you print the cover as you with, but I recommend
+% you to use the commands available in the class, such as:
+\putSpine{my book, vol. 1}
+\putAuthor{Yegor Bugayenko}
+\end{document}
+```
+
+The full example and all commands are available in the `kdpcover.tex` file.
+
+If you want to contribute yourself, make a fork, then create a branch,
+then run `make` in the root directory.
+It should compile everything without errors. If not, submit an issue and wait.
+Otherwise, make your changes and then run `make` again. If the build is
+still clean, submit a pull request.
diff --git a/macros/latex/contrib/kdpbook/images/signature.pdf b/macros/latex/contrib/kdpbook/images/signature.pdf
new file mode 100644
index 0000000000..af185666b2
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/images/signature.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/images/volume-1.pdf b/macros/latex/contrib/kdpbook/images/volume-1.pdf
new file mode 100644
index 0000000000..8ccf53f517
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/images/volume-1.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/images/volume-2.pdf b/macros/latex/contrib/kdpbook/images/volume-2.pdf
new file mode 100644
index 0000000000..4dd3c14199
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/images/volume-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/images/volume-3.pdf b/macros/latex/contrib/kdpbook/images/volume-3.pdf
new file mode 100644
index 0000000000..a554387e49
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/images/volume-3.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/images/volume-4.pdf b/macros/latex/contrib/kdpbook/images/volume-4.pdf
new file mode 100644
index 0000000000..a2d12b0d43
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/images/volume-4.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/kdpcover.cls b/macros/latex/contrib/kdpbook/kdpcover.cls
new file mode 100644
index 0000000000..91603e47bf
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/kdpcover.cls
@@ -0,0 +1,161 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{kdpcover}[2021/06/04 0.1.0 Cover for KDP book]
+\LoadClass{article}
+
+\newcommand*\kdppages{100}
+\newlength\kdpxsize
+\newlength\kdpysize
+
+\RequirePackage{shellesc}
+\RequirePackage{xkeyval}
+\DeclareOptionX{6x9}{
+ \setlength\kdpxsize{6in}
+ \setlength\kdpysize{9in}
+}
+\DeclareOptionX{pages}{\renewcommand*\kdppages{#1}}
+\makeatletter\newcommand{\kdpexec}[3][1=]{%
+ \begingroup
+ \let\%\@percentchar
+ \let\{\@charlb
+ \let\}\@charrb
+ \ShellEscape{#3 > #2}%
+ \endgroup%
+ \ifthenelse{\isempty{#1}}{\input{#2}}{}%
+}\makeatother
+\makeatletter\let\primitiveinput\@@input\makeatother%
+\DeclareOptionX{pdf}{
+ \kdpexec[noprint]{totalpages.exc}{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
+ \renewcommand{\kdppages}{\primitiveinput totalpages.exc }
+}
+\ProcessOptionsX\relax
+
+\RequirePackage{anyfontsize}
+\RequirePackage{tikz}
+\RequirePackage[letterspace=-50]{microtype}
+\RequirePackage{xifthen}
+\RequirePackage{xcolor}
+\RequirePackage{graphicx}
+\RequirePackage{setspace}
+ \setstretch{1.2}
+% The height of the page is 9 inches plus 0.125 "bleed" on top and
+% on the bottom.
+% Check this doc: https://kdp.amazon.com/en_US/help/topic/G201953020
+\newlength\kdpheight
+\setlength\kdpheight{0.125in + \kdpysize + 0.125in}
+% The width is 6 inches plus 0.125 "bleed" on each side. The width of the
+% "spine" depends on the amount of pages in the book. Also, there is a
+%
+\newlength\kdpwidth
+\setlength\kdpwidth{0.125in + \kdpxsize + 0.0025in * \kdppages + \kdpxsize + 0.125in}
+\RequirePackage{geometry}
+ \geometry{paperwidth=\kdpwidth,paperheight=\kdpheight,left=0pt,right=0pt,top=0pt,bottom=0pt}
+\RequirePackage[absolute]{textpos}
+ \TPGrid{16}{16}
+
+\newcommand\putSpine[2]{
+ \begin{textblock}{2.4}[0.5,0](8,0)
+ \begin{tikzpicture}
+ \node [rectangle, inner sep=0em, fill=black, minimum width=2.4\TPHorizModule, minimum height=16\TPVertModule] at (0,0) {};
+ \end{tikzpicture}
+ \end{textblock}
+ \begin{textblock}{1}[0.5,0](8,2)
+ \begin{tikzpicture}
+ \node [color=white, inner sep=0cm, outer sep=0cm, rotate=270, minimum height=\TPHorizModule] at (0,0) {
+ \Large #1
+ };
+ \end{tikzpicture}
+ \end{textblock}
+ \begin{textblock}{2.4}[0.5,1](8,14)
+ \centerline{\includegraphics[width=0.32in]{#2}}
+ \end{textblock}
+}
+
+\newcommand\putPicture[1]{
+ \begin{textblock}{4}(10,2)
+ \includegraphics[width=\textwidth]{#1}
+ \end{textblock}
+}
+
+\newcommand\putVolume[1]{
+ \begin{textblock}{2}[1,1](15,14)
+ \raggedleft
+ \includegraphics[height=0.4in]{images/volume-#1}
+ \end{textblock}
+}
+
+\newcommand\putPrice[1]{
+ \begin{textblock}{4}[0,1](1,2)
+ \small #1
+ \end{textblock}
+}
+
+\newcommand\putBack[1]{
+ \begin{textblock}{5}[0,0](1,3)
+ \small #1
+ \end{textblock}
+}
+
+\newcommand\putTitle[1]{
+ \begin{textblock}{5}(10,9)
+ \fontsize{32}{32}\selectfont #1
+ \end{textblock}
+}
+
+\newcommand\putAuthor[1]{
+ \begin{textblock}{4}(10,10)
+ \large by #1
+ \end{textblock}
+}
+
+\newcommand\putTLDR[1]{
+ \begin{textblock}{5}(10,11)
+ TL;DR #1
+ \end{textblock}
+}
+
+\newcommand\putVersion[1]{
+ \begin{textblock}{4}[0,1](10,14)
+ #1
+ \quad
+ \kdpexec[]{date.exc}{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}
+ \end{textblock}
+}
+
+\newcommand\putCopyright[2]{
+ \begin{textblock}{4}[0,1](1,14)
+ \small (c)
+ #1 #2
+ \end{textblock}
+}
+
+\AtBeginDocument{
+ \ttfamily%
+ \raggedright%
+ \setlength\parindent{0pt}%
+ \setlength\parskip{0pt}%
+ \interfootnotelinepenalty=10000
+}
+
+\endinput
diff --git a/macros/latex/contrib/kdpbook/kdpcover.pdf b/macros/latex/contrib/kdpbook/kdpcover.pdf
new file mode 100644
index 0000000000..7c9f844d5a
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/kdpcover.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpbook/kdpcover.tex b/macros/latex/contrib/kdpbook/kdpcover.tex
new file mode 100644
index 0000000000..ef2c073d60
--- /dev/null
+++ b/macros/latex/contrib/kdpbook/kdpcover.tex
@@ -0,0 +1,82 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\documentclass[pages=200,6x9]{kdpcover}
+\begin{document}
+% Here we put the vertical black spine line with two white elements
+% inside: the text at the top and the logo at the bottom. Make sure
+% the text is short enough so that it doesn't touch the logo. It's
+% a good practice to mention the volume number at the end of the text,
+% if you have more than one volume, e.g. "my book, vol. 1". I suggest
+% using small caps in the text only.
+\putSpine{kdpcover, a LaTeX class for KDP books}{./images/signature}
+
+% This one prints the volume picture. It is intentionally made large,
+% in order to make it obvious.
+\putVolume{1}
+
+% Here we print the version and it will also add the date of the latest
+% Git commit in the current directory. If it's not a Git repository,
+% the date won't be printed.
+\putVersion{0.1.0}
+
+% This prints the price, which is a good practice to mention, I believe.
+\putPrice{\$0.00}
+
+% This one prints the copyright short message with the year and the
+% name of the autor.
+\putCopyright{\the\year}{Yegor Bugayenko}
+
+% Here we print the title of the book
+\putTitle{kdpcover}
+
+% Here we print the author.
+\putAuthor{Yegor Bugayenko}
+
+% Here we print the TL;DR paragraph, which summarizies the message
+% of the entire book.
+\putTLDR{I use this LaTeX class to design covers for my books published
+by Kindle Direct Publishing; you also can do it, provided you like the layout and the style.}
+
+% The picture.
+\putPicture{cactus.pdf}
+
+% This is the text on the back of the book, which usually I suggest
+% to omit and keep the back empty and white.
+\putBack{
+ You need to either specify the number of pages
+ in your PDF book, or provide the path to the PDF.
+ In the latter case, the pages will be counted using
+ "qpdf," which has to be installed:
+ \newline\newline
+ \char`\\documentclass[pages=200,pdf=book.pdf]\string{kdpcover\string}\newline
+ \char`\\begin\string{document\string}\newline
+ \char`\\putSpine\string{my book\string}\newline
+ \char`\\end\string{document\string}
+ \newline\newline
+ See the file "kdpcover.tex" for a full example with all
+ available commands and class options.
+ \newline\newline
+ Even more details you can find on GitHub:\newline
+ https://github.com/yegor256/kdpcover
+}
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 6cde2cdc72..10450afb9c 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,14 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.10]
+
+### Changed
+- Documenation improvements
+
+### Fixed
+- Incompatibility with REVTeX (issue #469)
+
## [v3.0.9]
### Changed
@@ -1343,7 +1351,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.9...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.10...HEAD
+[v3.0.10]: https://github.com/josephwright/siunitx/compare/v3.0.9...v3.0.10
[v3.0.9]: https://github.com/josephwright/siunitx/compare/v3.0.8...v3.0.9
[v3.0.8]: https://github.com/josephwright/siunitx/compare/v3.0.7...v3.0.8
[v3.0.7]: https://github.com/josephwright/siunitx/compare/v3.0.6...v3.0.7
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 3c20dfb0f6..123afd32cf 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-complex.dtx b/macros/latex/contrib/siunitx/siunitx-complex.dtx
index 87c1b684ef..1a81054a5c 100644
--- a/macros/latex/contrib/siunitx/siunitx-complex.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-complex.dtx
@@ -412,7 +412,7 @@
% \item All of the number was before the complex root: |#2| will
% be empty and we need to check |#1| fully to split out the two
% parts
-% \item The input has a a real part with the complex part starting
+% \item The input has a real part with the complex part starting
% with the root symbol: just the last token needs to be separated.
% \end{itemize}
% \begin{macrocode}
diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
index 3d2e0370f1..cc60aa85e8 100644
--- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
@@ -478,7 +478,7 @@
{ print-unity-mantissa }
\l_keys_value_tl
} ,
- retain-unity-mantisa .default:n = true ,
+ retain-unity-mantissa .default:n = true ,
retain-zero-exponent .code:n =
{
\@@_option_deprecated:nnV
@@ -1013,12 +1013,13 @@
%
% Units that have been removed: to avoid issues, we mark them as deprecated.
% \begin{macrocode}
-\msg_new:nnnn { siunitx } { unit-deprecated }
- { Unit~macro~#1~has~been~deprecated~in~this~release. }
+\msg_new:nnn { siunitx } { unit-deprecated }
{
+ Unit~macro~#1~has~been~deprecated~in~this~release. \\ \\
The~BIPM~have~removed~this~unit~from~the~SI~Brochure.~
- You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit
- in~your~source.
+ You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit\ %
+ in~your~source. The~current~definition~is\\ \\
+ \token_to_str:N \DeclareSIUnit \{ #2 \}
}
\cs_gset_protected:Npn \@@_tmp:w #1#2
{
@@ -1031,8 +1032,8 @@
{
\exp_not:N \bool_gset_true:N
\exp_not:c { g_@@_unit_warning_ \token_to_str:N #1 _bool }
- \msg_warning:nnn { siunitx } { unit-deprecated }
- { \token_to_str:N #1 }
+ \msg_warning:nnnn { siunitx } { unit-deprecated }
+ { \token_to_str:N #1 } {#2}
}
#2
}
diff --git a/macros/latex/contrib/siunitx/siunitx-table.dtx b/macros/latex/contrib/siunitx/siunitx-table.dtx
index 269015d857..137c2e18d6 100644
--- a/macros/latex/contrib/siunitx/siunitx-table.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-table.dtx
@@ -185,7 +185,7 @@
% would allow space for one digit in the integer part, two in the decimal
% part and three in the exponent part. Signs can be allowed for using any
% valid input sign, so for example |+1.2 \pm 1.2| would allow for a sign,
-% a number with one integer and two decimal digits and a uncertainty of
+% a number with one integer and two decimal digits and an uncertainty of
% the same size.
% \end{function}
%
@@ -445,12 +445,22 @@
\l_@@_after_tl
}
}
+% \end{macrocode}
+% To cover the use of REV\TeX{}, we need to allow for the insertion of
+% \cs{array@row@rst} into cell content: that explodes inside
+% \cs{protected@edef}. We use the classical solution of making locally
+% equal to \cs{scan_stop:}.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_collect_end:n #1
{
\str_if_eq:eeTF { \exp_not:n {#1} }
{ { \@@_collect_end_aux:n {#1} } }
{ \tl_set:Nn }
- { \protected@edef }
+ {
+ \cs_if_exist:NT \array@row@rst
+ { \cs_set_eq:NN \array@row@rst \scan_stop: }
+ \protected@edef
+ }
\l_@@_collect_tl {#1}
}
\cs_new:Npn \@@_collect_end_aux:n #1
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 782ac23dcf..01f85be714 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -1276,7 +1276,7 @@
% To deal properly with literal formatting, we have to worry about super-
% and subscript markers. That can be complicated as they could come anywhere
% in the input: we handle that by iterating through the input and picking
-% them out. This avoids any issue with loosing braces for mid-input scripts.
+% them out. This avoids any issue with losing braces for mid-input scripts.
% We also have to deal with fractions, hence needing a series of nested
% loops and a change of separator.
% \begin{macrocode}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index cd0c5ca2c9..d6f8821495 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-06-01} {3.0.9}
+\ProvidesExplPackage {siunitx} {2021-06-04} {3.0.10}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 356fee236b..426815f99c 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 86db9afa6c..360a395e6f 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -1171,7 +1171,7 @@ when printing: the standard font setting is upright mid-weight roman
In math mode, the font used by \LaTeX{} is \enquote{invariant}, and this is
reflected in the options available. With the standard settings, in math mode
printing uses the standard math font and version (weight). The option
-\opt{propagate-math-font} may be used to apply the a prevailing math font
+\opt{propagate-math-font} may be used to apply the prevailing math font
to the printed material. The setting \opt{reset-math-version} controls
whether the math version is reset or not. Note that math version is typically
used to set \enquote{bold math} but may also be used for other effects, for
@@ -2904,6 +2904,9 @@ this means that
\item Complex values need to be given using the dedicated command
\cs{complexnum}.
\end{itemize}
+The option \opt{round-integer-to-decimal = false} has been removed, and whilst
+there is not a direct replacement, users are likely to find that \opt{round-pad
+= false} offers the desired outcome.
A new approach has been taken to providing non-Latin symbols for use in
units: these are now handled directly where needed, for example in the
@@ -3025,6 +3028,25 @@ When the \pkg{physics} package is loaded before \pkg{siunitx}, the command
\section{Hints for using \pkg{siunitx}}
+\subsection{Adjusting \cs{litre} and \cs{liter}%
+ \label{sec:hint:litre}}
+
+As detailed earlier, the unit macros \cs{litre} and \cs{liter} are both
+available for litres. With the standard settings, \cs{liter} is defined as
+\begin{LaTeXdemo}[code only]
+ \DeclareSIUnit\liter{\litre}
+\end{LaTeXdemo}
+meaning that \cs{litre} is the \enquote{canonical} unit. This follows the same
+relationship as exists between \cs{metre} and \cs{meter}.
+
+In contrast to metres, however, there is more likelihood of users wishing to
+adjust the appearance of litres: both \enquote{\unit{l}} and \enquote{\unit{L}}
+are commonly used. The recommended approach to adjustment is to re-declare
+the \cs{litre} macro, as \cs{liter} will follow automatically.
+\begin{LaTeXdemo}[code only]
+ \DeclareSIUnit\liter{l}
+\end{LaTeXdemo}
+
\subsection{Ensuring text or math output%
\label{sec:hint:text-math}}
@@ -3485,7 +3507,7 @@ It is often convenient to have a pre-defined set of useful units available
without needing to copy the full set of definitions into each source file. At
the same time, it is important that such sources do show that they are using
units not defined by the core part of \pkg{siunitx}. The most straight-forward
-way to acheive this is to create a separate file, for example
+way to achieve this is to create a separate file, for example
\texttt{siunitx-local-units.tex}, and place it in your local \TeX{} tree
(usually \verb|~/texmf/tex/latex/| on Linux, \verb|~/Library/texmf/tex/latex/|
on macOS or \verb|C:\Users\<name>\texmf\tex\latex| on Windows). This can then
@@ -3647,7 +3669,7 @@ unit raised to the appropriate power: \qtyproduct[product-units = power]{2 x
potentially-confusing and is not encouraged.
Care must be taken when writing ranges of numbers. For purely numerical values,
-it is common to use a en-dash to show a range, for example \enquote{see pages
+it is common to use an en-dash to show a range, for example \enquote{see pages
1--5}. On the other hand, physical quantities could be misinterpret as negative
values if written in this way. As the quantity is a single mathematical entity,
writing the values with an en-dash followed by a single unit is also incorrect.
diff --git a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
index 1bf726bc39..055636b008 100644
--- a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
+++ b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/externalize.pdf b/macros/latex/contrib/todonotes/examples/externalize.pdf
index f22dec514d..09cbb36711 100644
--- a/macros/latex/contrib/todonotes/examples/externalize.pdf
+++ b/macros/latex/contrib/todonotes/examples/externalize.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
index 3f3dc73c5e..84f5b07aa3 100644
--- a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
+++ b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/todonotes.dtx b/macros/latex/contrib/todonotes/todonotes.dtx
index 0ca23696c6..9bea77d925 100644
--- a/macros/latex/contrib/todonotes/todonotes.dtx
+++ b/macros/latex/contrib/todonotes/todonotes.dtx
@@ -20,14 +20,14 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{todonotes}
%<*package>
- [2021/04/26 v1.1.4 Todonotes source and documentation.]
+ [2021/06/04 v1.1.5 Todonotes source and documentation.]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{wrapfig}
\usepackage[colorlinks, linkcolor=black, urlcolor=blue]{hyperref}
-\usepackage[colorinlistoftodos, loadshadowlibrary]{todonotes}[2021/04/26]
+\usepackage[colorinlistoftodos, loadshadowlibrary]{todonotes}[2021/06/04]
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{soul}
@@ -45,7 +45,7 @@
%</driver>
% \fi
%
-% \CheckSum{731}
+% \CheckSum{734}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -209,6 +209,10 @@
% globally available.}
% \changes{1.1.4}{2021/04/26}{Fix issue 51 by avoid loading the tikz shadows
% library by default.}
+% \changes{1.1.5}{2021/06/04}{Fix issue 54 related to additional spacing around todos with
+% shadows. Actually use the tickmarkheight option as suggested by
+% José Francisco Loff library by default. Described a workaround for using
+% the standalone document class.}
% \GetFileInfo{todonotes.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -808,7 +812,7 @@
% |\let\marginpar\oldmarginpar|
%
%
-% \subsubsection{todos in math and floating environments}
+% \subsubsection{Todos in math and floating environments}
% It is not possible to insert todonotes into math environments or
% floating environments like \verb!figure! or \verb!table!.
% By replacing the marginpar command with a marginnote this
@@ -835,6 +839,26 @@
% \end{verbatim}
%
%
+% \subsubsection{Conflict between marginpar and the standalone class}
+%
+% The \verb!standalone! document class is not compatible with the
+% \verb!\marginpar! command, which is used in the todonotes package
+% to insert contents in the side margins.
+% A workaround is to replace the \verb!\marginpar! with \verb!\marginnote!.
+% This is demonstrated here:
+% \begin{verbatim}
+% \documentclass[crop=false]{standalone}
+% \usepackage{todonotes}
+% \usepackage{marginnote}
+% \let\marginpar\marginnote
+% \begin{document}
+% Lorem ipsum
+% \todo{Bug}
+% \end{document}
+% \end{verbatim}
+%
+%
+%
% \subsection{Things to improve}
% This is a list of things I consider to improve sometime in the
% future. It have not been done yet as I lack the time or skills to
@@ -1240,6 +1264,36 @@
% \end{verbatim}
%
%
+% \subsubsection{Adding color coded levels of todos}
+%
+% Sometimes it can be beneficial to be able to distinguish
+% between different types of todos.
+% For this I would suggest the following approach:
+% \begin{verbatim}
+% \newcommand{\todoerror}[2][]{\todo[color=red!70, #1]{#2}}
+% \newcommand{\todowarn}[2][]{\todo[color=orange, #1]{#2}}
+% \newcommand{\todoremark}[2][]{\todo[color=yellow!80!black, #1]{#2}}
+% \newcommand{\todohint}[2][]{\todo[color=green!20, #1]{#2}}
+% \newcommand{\tododone}[2][]{\todo[color=blue!50, #1]{#2}}
+%
+% \todoerror[inline]{Testing}
+% \todoremark{Testing}
+% \todowarn[inline]{Testing}
+% \todohint{Testing}
+% \tododone[disable]{Testing}
+% \end{verbatim}
+%
+% \newcommand{\todoerror}[2][]{\todo[color=red!70, #1]{#2}}
+% \newcommand{\todowarn}[2][]{\todo[color=orange, #1]{#2}}
+% \newcommand{\todoremark}[2][]{\todo[color=yellow!80!black, #1]{#2}}
+% \newcommand{\todohint}[2][]{\todo[color=green!20, #1]{#2}}
+% \newcommand{\tododone}[2][]{\todo[color=blue!50, #1]{#2}}
+%
+% \todoerror[inline]{Testing}
+% \todoremark{Testing}
+% \todowarn[inline]{Testing}
+% \todohint{Testing}
+% \tododone[disable]{Testing}
%
%
%
@@ -1253,7 +1307,7 @@
%
% Identifies the package and loads the packages dependences.
% \begin{macrocode}
-\ProvidesPackage{todonotes}[2018/11/22]
+\ProvidesPackage{todonotes}[2021/06/04]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{xcolor}
@@ -1272,7 +1326,7 @@
\newcommand{\@todonotes@textcolor}{black}
\newcommand{\@todonotes@linecolor}{orange}
\newcommand{\@todonotes@bordercolor}{black}
-\newcommand{\@todonotes@tickmarkheight}{0cm}
+\newcommand{\@todonotes@tickmarkheight}{unused value}
\newcommand{\@todonotes@textwidth}{\marginparwidth}
\newcommand{\@todonotes@textsize}{\normalsize}
\newcommand{\@todonotes@figwidth}{\linewidth}
@@ -1463,8 +1517,9 @@ prior to loading the todonotes package.} \else\fi%
% Make the height of the line start marking as
% an option.
% \begin{macrocode}
-\define@key{todonotes.sty}%
- {tickmarkheight}{\renewcommand{\@todonotes@tickmarkheight}{#1}}
+\newcommand{\@todonotes@defaulttickmarkheight}{0cm}
+\define@key{todonotes.sty}{tickmarkheight}{%
+ \renewcommand{\@todonotes@defaulttickmarkheight}{#1}}%
% \end{macrocode}
% Set whether short captions given as arguments to the todo command
% should be included in the inserted todonote.
@@ -1490,11 +1545,11 @@ prior to loading the todonotes package.} \else\fi%
\newif\if@todonotes@shadowlibraryloaded
\@todonotes@shadowlibraryloadedfalse
\DeclareOptionX{loadshadowlibrary}{%
- \usetikzlibrary{shadows}%
- \@todonotes@shadowlibraryloadedtrue}
+ \usetikzlibrary{shadows}%
+ \@todonotes@shadowlibraryloadedtrue}
\newcommand{\@todonotes@shadowenabledbydefault}{noshadow}
\DeclareOptionX{shadow}{%
- \renewcommand{\@todonotes@shadowenabledbydefault}{shadow}}
+ \renewcommand{\@todonotes@shadowenabledbydefault}{shadow}}
% \end{macrocode}
% Add option for the default width of the figure inserted with
% |\missingfigure|.
@@ -1665,7 +1720,7 @@ prior to loading the todonotes package.} \else\fi%
backgroundcolor=\@todonotes@backgroundcolor,%
textcolor=\@todonotes@textcolor,%
bordercolor=\@todonotes@bordercolor,%
- tickmarkheight=0cm,%
+ tickmarkheight=\@todonotes@defaulttickmarkheight,%
nofancyline,%
nodisable,%
noinline,%
@@ -1741,9 +1796,9 @@ prior to loading the todonotes package.} \else\fi%
general shadow={shadow xshift=0.5ex, shadow yshift=-0.5ex,%
opacity=1,fill=black!50}]%
\else%
-\PackageWarning{todonotes}{Trying to put a shadow below a todonote,
- but the loadshadowlibrary option was not given when loading
- the todonotes package}
+\PackageWarning{todonotes}{Trying to put a shadow below a todonote,%
+ but the loadshadowlibrary option was not given when loading%
+ the todonotes package}%
\tikzstyle{notestyle} = [notestyleraw]%
\fi%
\else%
diff --git a/macros/latex/contrib/todonotes/todonotes.pdf b/macros/latex/contrib/todonotes/todonotes.pdf
index ea1dc3e6b0..3ef4000da6 100644
--- a/macros/latex/contrib/todonotes/todonotes.pdf
+++ b/macros/latex/contrib/todonotes/todonotes.pdf
Binary files differ