summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-15 03:01:12 +0000
committerNorbert Preining <norbert@preining.info>2023-11-15 03:01:12 +0000
commitf5460c92605f1b3b17448b27ce53375157c3e4b1 (patch)
treec02171bfdb42a95c39a65edd35f227ae61c8de72 /macros/latex
parente20928a0f9f4a7faa8bb21915e761e11e34f04ff (diff)
CTAN sync 202311150301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/litesolution/License415
-rw-r--r--macros/latex/contrib/litesolution/README.md19
-rw-r--r--macros/latex/contrib/litesolution/doc/figures/HDU.pdfbin0 -> 22462 bytes
-rw-r--r--macros/latex/contrib/litesolution/doc/figures/cover1.pngbin0 -> 481466 bytes
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution-demo.tex85
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution-doc.tex241
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.pdfbin0 -> 699357 bytes
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.tex29
-rw-r--r--macros/latex/contrib/litesolution/tex/litesolution.cls432
-rw-r--r--macros/latex/contrib/postnotes/CHANGELOG.md13
-rw-r--r--macros/latex/contrib/postnotes/README.md4
-rw-r--r--macros/latex/contrib/postnotes/postnotes-code.pdfbin849779 -> 819390 bytes
-rw-r--r--macros/latex/contrib/postnotes/postnotes-code.tex5
-rw-r--r--macros/latex/contrib/postnotes/postnotes-doc.pdfbin177635 -> 203205 bytes
-rw-r--r--macros/latex/contrib/postnotes/postnotes-doc.tex164
-rw-r--r--macros/latex/contrib/postnotes/postnotes.dtx247
-rw-r--r--macros/latex/contrib/postnotes/postnotes.ins10
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.pdfbin740983 -> 766861 bytes
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.sty118
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.tex109
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdfbin0 -> 408693 bytes
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex365
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdfbin399589 -> 399623 bytes
-rw-r--r--macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex5
-rw-r--r--macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty546
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin648032 -> 647774 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin705592 -> 705523 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex2
-rw-r--r--macros/latex/contrib/zref-check/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/zref-check/README.md4
-rw-r--r--macros/latex/contrib/zref-check/zref-check-code.pdfbin745358 -> 699477 bytes
-rw-r--r--macros/latex/contrib/zref-check/zref-check-code.tex19
-rw-r--r--macros/latex/contrib/zref-check/zref-check-doc.pdfbin453465 -> 419021 bytes
-rw-r--r--macros/latex/contrib/zref-check/zref-check-doc.tex17
-rw-r--r--macros/latex/contrib/zref-check/zref-check.dtx97
-rw-r--r--macros/latex/contrib/zref-check/zref-check.ins10
-rw-r--r--macros/latex/contrib/zref-clever/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/zref-clever/README.md4
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.pdfbin1271363 -> 1218402 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.tex5
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.pdfbin345511 -> 344423 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.tex28
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.dtx512
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.ins10
-rw-r--r--macros/latex/contrib/zref-vario/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/zref-vario/README.md4
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario-code.pdfbin649524 -> 594590 bytes
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario-code.tex5
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario-doc.pdfbin149693 -> 148094 bytes
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario-doc.tex14
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario.dtx108
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario.ins10
55 files changed, 3029 insertions, 679 deletions
diff --git a/macros/latex/contrib/litesolution/License b/macros/latex/contrib/litesolution/License
new file mode 100644
index 0000000000..842cf85e3c
--- /dev/null
+++ b/macros/latex/contrib/litesolution/License
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2008 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % https://www.latex-project.org/lppl.txt
+ % and version 1.3c or later is part of all distributions of LaTeX
+ % version 2008 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
diff --git a/macros/latex/contrib/litesolution/README.md b/macros/latex/contrib/litesolution/README.md
new file mode 100644
index 0000000000..a5120787f3
--- /dev/null
+++ b/macros/latex/contrib/litesolution/README.md
@@ -0,0 +1,19 @@
+# The `LiteSolution` document
+
+
+Modules of `LiteSolution` provide the following supports:
+
+
+**Welcome to pull requests
+[here](https://github.com/xiamyphys/LiteSolution).**
+
+## License
+
+This work may be distributed and/or modified under the conditions of the
+[LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
+either version 1.3c of this license or (at your option) any later version.
+
+This work has the LPPL maintenance status `maintained`.
+
+The Current Maintainer of this work is
+[Mingyu Xia](https://www.ctan.org/author/xia-my). \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/figures/HDU.pdf b/macros/latex/contrib/litesolution/doc/figures/HDU.pdf
new file mode 100644
index 0000000000..3fe790b9ee
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/figures/HDU.pdf
Binary files differ
diff --git a/macros/latex/contrib/litesolution/doc/figures/cover1.png b/macros/latex/contrib/litesolution/doc/figures/cover1.png
new file mode 100644
index 0000000000..e4e9e35789
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/figures/cover1.png
Binary files differ
diff --git a/macros/latex/contrib/litesolution/doc/litesolution-demo.tex b/macros/latex/contrib/litesolution/doc/litesolution-demo.tex
new file mode 100644
index 0000000000..8b9552eb9f
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/litesolution-demo.tex
@@ -0,0 +1,85 @@
+\chapter{A Sample for \pkg{LiteSolution} Template}
+\fancyhead[L]{\color{H6}\kaishu\faIcon{atom}\;2022年\titlelogo{https://sci.hdu.edu.cn}{HDU}「普通物理2」期中试题解析}
+\fancyhead[R]{\color{H6}\kaishu\rightmark\,}
+
+\section{选填题(共15分)}
+\begin{choice}{D}[波的能量]
+ 一平面简谐波在弹性媒介中传播,在媒质质元从最大位移处回到平衡位置的过程中
+ \begin{tasks}(2)
+ \task 它的势能转换成动能
+ \task 它的动能转换成势能
+ \task 它从相邻的一段质元获得能量,其能量逐渐增加
+ \task 它把能量传给相邻的一段质元,其能量逐渐减小
+ \end{tasks}
+\end{choice}
+\begin{solution}*
+ 波在传播过程中介质质元振动的动能和势能同时变化.\sokka{C}
+\end{solution}
+
+\begin{choice}{D}[双缝干涉]
+ 在双缝干涉实验中,两缝间距离为$d$,双缝与屏幕之间的距离为$D$($D\gg d$).波长为$\lambda$的平行单色光垂直照射到双缝上,屏幕上干涉条纹中相邻暗纹之间的距离是
+ \begin{tasks}(4)
+ \task $\frac{2\lambda D}{d}$
+ \task $\frac{\lambda d}{D}$
+ \task $\frac{dD}{\lambda}$
+ \task $\frac{\lambda D}{d}$
+ \end{tasks}
+\end{choice}
+\begin{solution}*
+ 由明纹公式$x=k\lambda D/d$得暗纹间距$\Delta x=\lambda D/d$.\sokka{D}
+\end{solution}
+
+\begin{problem}[简谐振动的合成][3]
+ 一个质点同时参与两个在同一直线上的简谐振动:$x_1=4\cos{\ab(2t+\frac{\pi}{6})},\ x_2=2\cos{\ab(2t-\frac{\pi}{6})}$.该质点合振动的振幅大小为\ans{$2\sqrt{7}$}.
+\end{problem}
+\begin{solution}*
+ $A=\sqrt{A_1^2+A_2^2+2A_1A_2\cos{\Delta\varphi}}=2\sqrt{7}$.
+\end{solution}
+
+\begin{problem}[多普勒效应][6]
+ 一辆运动的警车发出警铃声音频率为$f_s=1400\mathrm{Hz}$,从左向右移动,速度大小为$70\mathrm{m/s}$. 一个观察者从右向左移动,速度大小为$10\mathrm{m/s}$,空气中的声速$u=340\mathrm{m/s}$.观察者与警车相遇前后,听到警铃的频率分别为\ans{$1814.8\mathrm{Hz}$,$1126.8\mathrm{Hz}$}.
+\end{problem}
+\begin{solution}*
+ $f_1=\frac{340+10}{340-70}\times 1400\mathrm{Hz}\approx 1814.8\mathrm{Hz},\ f_2=\frac{340-10}{340+70}\times 1400\mathrm{Hz}\approx 1126.8\mathrm{Hz}$.
+\end{solution}
+
+\section{计算题(共20分)}
+\begin{problem}[简谐振动][10]
+ 一个质量为$1\mathrm{kg}$的物块沿$x$轴做简谐振动,振幅为$10\mathrm{cm}$,最大速度$2\times 10^{-2}\mathrm{m/s}$.在时间$t=4\mathrm{s}$时,物块位于$5\mathrm{cm}$.求
+ \begin{enumerate}
+ \item 简谐运动的周期和最大加速度.
+ \item 简谐运动的位移方程.
+ \end{enumerate}
+\end{problem}
+\begin{solution}
+ \begin{enumerate}
+ \item 由$v_{\max}=\omega,\ T=\frac{2\pi}{\omega}$得$T=10\pi\mathrm{s},\ \omega=0.2\mathrm{s}^{-1},\ a_{\max}=\omega^2A=4\times 10^{-3}\mathrm{m/s}^2$.\point{4}
+ \item $t=4\mathrm{s}$时$x=\frac{1}{2}A,\ v<0$,所以此时相位$\varphi=\frac{\pi}{3}$.故位移方程为\point{2}
+ \[x=0.1\cos{\ab[0.2\ab(t-4)]+\frac{\pi}{3}}=0.1\cos{\ab(0.2t+0.079\pi)}\eqno\point{4}\]
+ \end{enumerate}
+\end{solution}
+
+\begin{problem}[牛顿环][10]
+ 空气中,使用波长为$480\mathrm{nm}$平行单色光观察牛顿环.在反射光中测得某一明环的直径为$4.74\mathrm{mm}$,在它外面第$10$个明环的直径为$7.24\mathrm{mm}$.求
+\begin{enumerate}
+ \item 平凸透镜的曲率半径.
+ \item 直径为$4.74\mathrm{mm}$明环的条纹级数$k$.
+ \item 假设把整个装置放入水中($n=1.33$),原直径为$4.74\mathrm{mm}$明环的新直径.
+\end{enumerate}
+\end{problem}
+\begin{solution}
+\begin{enumerate}
+ \item $R=\ab(r_{k+10}^2-r_k^2)/10\lambda=1.56\mathrm{m}$.\point{4}
+ \item 由$r_k=\sqrt{\frac{2k-1}{2}\lambda R}$得$k=\frac{r_k^2}{\lambda R}+\frac{1}{2}=8$.\point{3}
+ \item 由于光在介质中的波长与折射率成反比,所以此时$d_k^{\prime}=\frac{d_k}{\sqrt{n}}=4.11\mathrm{mm}$.\point{3}
+\end{enumerate}
+\end{solution}
+
+\section{计算题\! $^\dagger$(共15分)}
+
+\begin{problem}[弹簧振子][15]
+ 一个质量为$m=1\mathrm{kg}$的盘子刚性连接竖直悬挂的轻弹簧下端,弹簧的劲度系数为$k=90\mathrm{N/m}$.盘子在竖直方向做简谐运动,振幅$A=10.0\mathrm{cm}$.现有一个质量$m_2=1\mathrm{kg}$的物体自由落下掉在盘上,没有反弹.当\textbf{盘子位于向上最大位移处},盘子与物体发生碰撞,物体从开始自由自由落体发生处,距离为$h=20\mathrm{cm}$,假设碰撞瞬间完成.求碰撞后盘子和物体组成的系统,它的振动周期、振幅和振动能量.
+\end{problem}
+\begin{solution}*
+ Answer omitted.
+\end{solution} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/litesolution-doc.tex b/macros/latex/contrib/litesolution/doc/litesolution-doc.tex
new file mode 100644
index 0000000000..304406769f
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/litesolution-doc.tex
@@ -0,0 +1,241 @@
+\chapter{The \pkg{LiteSolution} Template}
+\fancyhead[L]{\,\color{H7}\href{https://github.com/xiamyphys/litesolution}{\faIcon{github}\;\leftmark}}
+\fancyhead[R]{\color{H7}\rightmark\,}
+
+\centerline{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
+\ddmmyyyydate
+\centerline{\mailto{xiamyphys@gmail.com}}
+\centerline{\today,\quad Version 1.0a}
+
+This is the document for \pkg{LiteSolution} template, which provides a lite design of the solution of test paper.
+
+Some designs of this template currently only support \textbf{Simplified Chinese (Mainland)}. If necessary, you can change some Chinese characters to the language you want in the \verb|*.cls| file.
+
+\section{Introduction}
+\subsection{The purpose of this template}
+This template provides a lite and fresh template, and mainly used for typesetting solutions of final, textbooks' and other exercises. This template is developed based on \href{https://www.ctan.org/pkg/elegantbook}{\pkg*{ElegantBook}} and \href{https://github.com/Azure1210/VividBooK}{\pkg*{VividBooK}}, ported and improved the chapter design module code of \href{https://www.overleaf.com/latex/templates/the-legrand-orange-book-template-english/jtctyfmnpppc}{The Legrand Orange Book}. I'd like to express my gratitude to the template authors above for their previous work.
+
+If you meet bugs when using this template, or you have better suggestions or ideas, or you want to participate in the development of the template or other templates by me, welcome to contact via email \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}.
+
+Also, you can join my \textsf\LaTeX{} Template Discussion \href{https://qm.qq.com/q/OnHzbNvVAG}{QQ Group: 760570712} to communicate with me and get the insider preview edition of the template.
+
+\subsection{Loading \pkg{LiteSolution} and its modes}
+
+Update all the packages to the latest version or switch to portable version instead by implementing the commands
+\begin{verbatim}
+ tlmgr update --self
+ tlmgr update --all
+ tlmgr update --self --all --reinstall-forcibly-removed
+\end{verbatim}
+
+To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my TEX distribution?}
+
+Save the file \verb|litesolution.cls| to your project's root directory, and then create a \verb|.tex| file, just input the command \verb|\documentclass{litesolution}| on the first line.
+
+The template provides 3 modes, \mode{answer}, \mode{mtpro2} and \mode{counter}. Just add the options of the modes you want separately in the square bracket of the command \verb|\documentclass[options]{litesolution}| in your \verb|.tex| file.
+
+\section{Modes of \pkg{LiteSolution}}
+\subsection{The \mode{answer} mode}
+This mode has two options, \mode{ans} and \mode{noans}, which can show and hide answers respectively. After you choose the \mode{noans}, the contents in the environment \cmd{solution}, the command \cmd{ans} and the answers in the multiple choice questions will all become the same color as the pagecolor. So the area that originally contained the answer will be replaced by an area of the same blank size. You can generate exams without answers and solutions by enabling \mode{noans}.
+
+\subsection{The \mode{mtpro2} mode}
+If you've installed the \emph{Mathtime Pro 2 Lite} font in your computer, then you can use this mode to change the math font.
+
+\subsection{The \mode{counter}}
+This mode has two options, \mode{separate} and \mode{continuous}, which can make the page counter between chapters be remaked or continuous.The page numbers between each test question will be continuous when you use the \mode{continuous} mode or the page number of each test question will start from 1 when you use the \mode{separate}.
+
+
+\section{Commands of \pkg{LiteSolution}}
+\subsection{The \cmd{chapterimage} command}
+\begin{verbatim}
+ \chapterimage{cover1.png}
+\end{verbatim}
+This command can assign the title background image for each subsequent chapter.
+
+\subsection{The \cmd{chapterfont} command}
+This command can assign the title font for each subsequent chapter, if you do not use this command, the title font will be \emph{songti} in Chinese and \emph{Libertinus} in English.
+
+\subsection{The \cmd{ans} command}
+This command can underlines the answer and changes the color of the answer to \textcolor{1号色}{Blue Sapphire}.
+
+\paragraph{If mode \mode{noans} is enabled, the answer will disappear, leaving only a horizontal line the same width as the answer.}
+
+\subsection{The \cmd{watermark} command}
+\begin{verbatim}
+ \watermark{ctanlion.pdf}
+\end{verbatim}
+
+This command can add watermark to the document.
+
+\subsection{Other customer commands}
+In order to facilitate input, the following commands are scheduled. You can add others in the \verb|*.cls| file as you like.
+\vskip1em
+\begin{center}
+ \begin{tabular}{l|l|l|l|l|l}
+ \toprule
+ Command & Output & Command & Output & Command & Output\\
+ \midrule
+ \verb|\titlelogo{#1}{#2}| & Add emoji with link in text & \verb|\point{#1}| & Add score & \verb|\i| & $\mathrm{i}$\\
+ \hline
+ \verb|\sokka{#1}| & 故本题选择\#1项 & \verb|\d| & $\mathrm{d}$ & \verb|\e| & $\mathrm{e}$\\
+ \bottomrule
+ \end{tabular}
+\end{center}
+
+\section{Environments of \pkg{LiteSolution}}
+\subsection{The \cmd{choice} environment}
+There're two variables in this envrionment. The first one is the answer of the choice problem, the second one is the keywords of this choice problem and it's optional.
+
+\begin{tcblisting}{sidebyside}
+\begin{choice}{D}[Keywords]
+If you want to add choice and keywords.
+\begin{tasks}(2) % 2 choices per line
+ \task This is choice A \task This is choice B
+ \task This is choice C \task This is choice D
+\end{tasks}
+\end{choice}
+\begin{choice}{D}
+If you want to add choice only.
+\begin{tasks}(4) % 4 choices per line
+ \task Chc A \task Chc B \task Chc C \task Chc D
+\end{tasks}
+\end{choice}
+\end{tcblisting}
+
+\begin{paracol}{2}
+ \begin{choice}{D}[Gaussian theory]
+ $A$和$B$为两个均匀带电球体,$A$带电荷$+q$,$B$带电荷$-q$,作一与$A$...
+ \begin{tasks}(2)
+ \task 通过$S$面的电场强度... \task 通过$S$面的电场强度...
+ \task 通过$S$面的电场强度... \task 通过$S$面的电场强度...
+ \end{tasks}
+ \end{choice}
+ \switchcolumn
+ \centering\vfill
+ \begin{tikzpicture}
+ \draw [thick] (0,0) circle (0.8);
+ \draw [thick] (0,0) circle (1.2);
+ \draw [thick] (2.4,0) circle (0.8);
+ \draw [thick] (0,0)--(0.85,0.85);
+ \node [anchor=east] at (0,0) {$A$};
+ \node [anchor=north] at (0,0) {$+q$};
+ \node [anchor=east] at (0.566,0.566) {$r$};
+ \node [anchor=south] at (0.85,0.85) {$S$};
+ \node [anchor=south] at (2.4,0) {$-q$};
+ \end{tikzpicture}
+ \vfill
+\end{paracol}
+\begin{verbatim}
+\begin{paracol}{2}
+\begin{choice}{D}[Gaussian theory]
+ $A$和$B$为两个均匀带电球体,$A$带电荷$+q$,$B$带电荷$-q$,作一与$A$...
+ \begin{tasks}(2)
+ \task 通过$S$面的电场强度... \task 通过$S$面的电场强度...
+ \task 通过$S$面的电场强度... \task 通过$S$面的电场强度...
+ \end{tasks}
+\end{choice}
+\switchcolumn\centering\vfill\tikz{...}\vfill
+\end{paracol}
+\end{verbatim}
+
+\subsection{The \cmd{problem} environment}
+Sightly different from the cmd{choice} environment: the two variables are points and keywords, and the question number counter is shared with the multiple-choice question number counter.
+\begin{tcblisting}{sidebyside}
+ \begin{problem}[Keywords][5]
+ If you want to add keywords and points.
+ \end{problem}
+ \begin{problem}
+ If you want to add none.
+ \end{problem}
+ \begin{problem}[Keywords]
+ If you want to add keywords only.
+ \end{problem}
+ \begin{problem}*[][5]
+ If you want to add points only.
+ \end{problem}
+\end{tcblisting}
+
+\begin{paracol}{2}
+\begin{problem}[Gaussian theory \& Field strength][6]
+ 一均匀带电直导线长为$d$,电荷线密度为$+\lambda$.过导线中点$O$作一半径为$R$($R>\frac{d}{2}$)的球面$S$,$P$为带电直导线的延长线与球面$S$的交点. 则通过该球面的电场强度通量$\Phi_e=$\ans{$\frac{\lambda d}{\varepsilon_0}$},带电直线的延长线与球面交点$P$处的电场强度的大小为\ans{$\frac{\lambda d}{4\pi\varepsilon_0(R^2-d^2/4)}$},方向\ans{沿矢径$\boldsymbol{OP}$}.
+ \end{problem}
+\switchcolumn\centering
+\vfill
+\begin{tikzpicture}[scale=0.83]
+ \draw (0,0) circle (2);
+ \draw [thick,->] (-2,0)--(0,0)--(1,1.732);
+ \node [anchor=east] at (-2,0) {$P$};
+ \filldraw (-2,0) circle (0.05);
+ \node [anchor=west] at (0.5,0.866) {$R$};
+ \filldraw [pattern=north east lines] (-0.8,-0.1)--(-0.8,0.1)--(0.8,0.1)--(0.8,-0.1)--cycle;
+ \draw [thick,|<-] (-0.8,-0.3)--(-0.25,-0.3);
+ \draw [thick,|<-] (0.8,-0.3)--(0.25,-0.3);
+ \node at (0,-0.3) {$L$};
+\end{tikzpicture}
+\vfill
+\end{paracol}
+\begin{verbatim}
+\begin{paracol}{2}
+ \begin{problem}[Gaussian theory \& Field strength][6]
+ 一均匀带电直导线长为$d$,电荷线密度为$+\lambda$,过导线中点$O$...
+ 场强大小\ans{$\frac{\lambda d}{4\pi\varepsilon_0(R^2-d^2/4)}$}...
+ \end{problem}
+\switchcolumn\centering\vfill\tikz{...}\vfill
+\end{paracol}
+\end{verbatim}
+
+\subsection{The \cmd{note} environment}
+\begin{tcblisting}{sidebyside}
+\begin{note}
+ Please note that...
+\end{note}
+\end{tcblisting}
+
+\subsection{The \cmd{solution} environment}
+\begin{tcblisting}{sidebyside}
+\begin{solution}
+ This is the answer for the problem.
+\end{solution}
+\end{tcblisting}
+
+If a star (*) is added after the \verb|\begin{solution}|, then the content will follow the
+\begin{tcblisting}{sidebyside}
+\begin{solution}*
+ This is the answer for the problem.
+\end{solution}
+\end{tcblisting}
+
+\paragraph{If mode \mode{noans} is enabled, the solution will disappear, leaving only a blank box with the same height as the solution, and the name of the box will change to \emph{\textcolor{1号色}{\textbf{\faIcon{ban} 答案隐藏}}}.}
+
+\newpage
+\section{Version History}
+This template is used to type the mid-term and final exam solutions of \emph{College Physics}. Initially, I used the \href{https://www.ctan.org/pkg/elegantbook}{ElegantBook} template for layout, however, it's no longer be maintained since January 1st, 2023, so I trun to use the \href{https://github.com/Azure1210/VividBooK}{\pkg*{VividBooK}} instead. But this template is too bloated and some functions \& designs need to be redesigned, so I started developing \pkg{LiteSolution}.
+
+\textsf{\bfseries Version 0.1a} was finished developing on 29 June, 2023 and released on \href{https://mp.weixin.qq.com/s/kd4StYk3XybhNQZkAfoY6A}{\faIcon{weixin} WeChat Public Account: 物理问题作} with the name \emph{FreshSolution}. This version redesigned the \cmd{exercise} environment and the \cmd{solution} environment in terms of designs and functions, and improvements have been made to the design of the chapterimage part.
+
+\textsf{\bfseries Version 0.1b} was finished developing on 6 July, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3553.html}{LaTeX Studio} (Xiaoshan, Hangzhou) and \href{http://xhslink.com/YBuuuw}{Xiaohongshu}, where won the favor of many people. This version has added the global option to make the page number be remaked or continuous between chapters, and command \cmd{watermark} has been added in this version.
+
+\textsf{\bfseries Version 1.0a} was finished developing on 15 November, 2023. This version has redesigned the \cmd{chapterimage} part, \cmd{choice} and replaced the \cmd{exercise} environment with the \cmd{problem} environment.
+
+\datechange{06/07/2023}{Version 0.1b}
+\begin{itemize}
+ \item Support page number remaking between chapters.
+ \item Added \cmd{watermark} command.
+\end{itemize}
+
+\datechange{15/11/2023}{Version 1.0a}
+\begin{itemize}
+ \item Redesigned the \cmd{chapterimage} part, include the layout and the code.
+ \item Redesigned the \cmd{choice} and \cmd{solution} environment, keywords become optional and supports star (*) key.
+ \item Replaced the \cmd{exercise} environment with the \cmd{problem} environment, supports adding only keywords or points.
+ \item Added the \cmd{note} environment and some customer commands.
+\end{itemize}
+
+\subsection*{Future Plans}
+\begin{itemize}
+ \item Plan to integrate the color management of \href{https://www.ctan.org/pkg/elegantbook}{\pkg*{ElegantBook}}.
+ \item Plan to integrate the chapter design of \href{https://www.ctan.org/pkg/elegantbook}{\pkg*{ElegantBook}} into the star (*) key value of this template \cmd{chapter}.
+ \item Plan to add the \mode{dark} mode to this template to make the text color light while make the page color dark to protect eyesight.
+ \item Plan to change the \verb|*.cls| file to a block code design to make it easier for subsequent developers to maintain or modify.
+ \item ......
+\end{itemize} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.pdf b/macros/latex/contrib/litesolution/doc/litesolution.pdf
new file mode 100644
index 0000000000..e0e1069c47
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/litesolution.pdf
Binary files differ
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.tex b/macros/latex/contrib/litesolution/doc/litesolution.tex
new file mode 100644
index 0000000000..fa923440ad
--- /dev/null
+++ b/macros/latex/contrib/litesolution/doc/litesolution.tex
@@ -0,0 +1,29 @@
+\documentclass{litesolution}
+\usepackage[level]{datetime}
+
+% document setup
+\makeatletter
+\def\@pkg#1{\texorpdfstring{\href{https://www.ctan.org/pkg/#1}{\textcolor{pkgcolor}{\textsf{#1}}}}{“#1”}}
+\def\s@pkg#1{\texorpdfstring{\textcolor{pkgcolor}{\textsf{#1}}}{“#1”}}
+\DeclareRobustCommand\pkg{\@ifstar\s@pkg\@pkg}
+\def\mode#1{\texorpdfstring{\textcolor{moducolor}{\textsf{#1}}}{“#1”}}
+\def\cmd#1{\texorpdfstring{\textcolor{cmdcolor}{\textsf{#1}}}{“#1”}}
+\def\datechange#1#2{%
+ \noindent{\makebox[\textwidth][r]{\color{H7}\rule{1.15\textwidth}{.4pt}}}
+ \noindent\makebox[0pt][r]{\makebox[-3em][r]{\small\textbf{\textcolor{H7}{#1}}}\;\;}{\sffamily Update: \ignorespaces#2}}
+\makeatother
+\setmainfont{Libertinus Serif}
+\setsansfont{Libertinus Sans}
+\setmonofont{NotoSansMono}[
+ Scale=MatchLowercase,
+ Extension=.ttf,
+ UprightFont=*-Light,
+ BoldFont=*-Medium
+]
+
+\begin{document}
+
+\chapterimage{cover1.png}
+\input{litesolution-doc.tex}
+\input{litesolution-demo.tex}
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/tex/litesolution.cls b/macros/latex/contrib/litesolution/tex/litesolution.cls
new file mode 100644
index 0000000000..e5db1b85fa
--- /dev/null
+++ b/macros/latex/contrib/litesolution/tex/litesolution.cls
@@ -0,0 +1,432 @@
+%% ************************************************************************************************************
+%% ****************************************************** *
+%% * This work may be distributed and/or modified under * * ***** * * *
+%% * the conditions of the LaTeX Project Public License * * ** * * *** * * *
+%% * http://www.latex-project.org/lppl.txt * * * ** * ***** * *
+%% * either version 1.3c of this license or any later * * * ** * ***** * *
+%% * version. * * * ** * * * * *
+%% ****************************************************** ***** ** * * *** * * *
+%% start of file `litesolution.cls'. *
+%% Copyright 2023 LiteLaTeX (xiamyphys@gmail.com) *
+%% available at https://github.com/xiamyphys/LiteSolution *
+%% Thanks https://github.com/ElegantLaTeX/ElegantBook, https://github.com/Azure1210/VividBooK *
+%% !Mode:: "TeX:UTF-8" *
+%% ************************************************************************************************************
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{litesolution}[15/11/2023 v1.0a LiteSolution document class]
+\RequirePackage{kvoptions}
+\RequirePackage{etoolbox}
+\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
+\newcommand{\ekv}[1]{\kvsetkeys{LITE}{#1}}
+% ---- 全局选项
+\DeclareStringOption[ans]{answer}
+\DeclareVoidOption{ans}{\ekv{answer=ans}}
+\DeclareVoidOption{noans}{\ekv{answer=noans}}
+
+\DeclareStringOption[separate]{counter}
+\DeclareVoidOption{separate}{\ekv{counter=separate}}
+\DeclareVoidOption{continuous}{\ekv{counter=continuous}}
+
+\DeclareStringOption{math}
+\DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}}
+
+% ----- Default Options -----
+\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}}
+\ProcessKeyvalOptions*\relax
+% \ProcessOptions*\relax
+\LoadClass[a4paper,oneside]{book}
+
+\RequirePackage{extarrows}% 长等号
+\RequirePackage{fixdif,derivative}% 微分算子修复
+\RequirePackage{physics2}
+\usephysicsmodule{ab,ab.legacy,braket,nabla.legacy}
+\RequirePackage{qrcode}
+\qrset{link, height=4em}
+
+\RequirePackage[e]{esvect}% 矢量箭头
+\RequirePackage{setspace}
+\RequirePackage{bbm}% 花体字
+\RequirePackage{dutchcal}% 花体字2
+\RequirePackage{mathrsfs}% 花体字3
+\RequirePackage{csquotes}% 引号
+\RequirePackage{tasks}% 选择题
+\settasks{label=\color{normalcolor}\Alph*.}
+
+\definecolor{pkgcolor}{Hsb}{103,.8,.5}
+\definecolor{moducolor}{Hsb}{290,.8,.5}
+\definecolor{cmdcolor}{Hsb}{188,.8,.5}
+\definecolor{filecolor}{Hsb}{207,.6,.7}
+\definecolor{H1}{Hsb}{349,.8,.8}% 海棠紅 (Hangzhou MTR L 1 )
+\definecolor{H2}{Hsb}{23, .8,.8}% 丹桂橙 (Hangzhou Metro 2 )
+\definecolor{H3}{Hsb}{48, .8,.8}% 柠檬黄 (Hangzhou Metro 3 )
+\definecolor{H4}{Hsb}{103,.8,.8}% 香樟绿 (Hangzhou Metro 4 )
+\definecolor{H5}{Hsb}{188,.8,.8}% 青藍色 (Hangzhou MTR L 5 )
+\definecolor{H6}{Hsb}{207,.8,.8}% 海洋蓝 (Hangzhou Metro 6 )
+\definecolor{H7}{Hsb}{290,.8,.8}% 浪漫紫 (Hangzhou Metro 7 )
+\RequirePackage{hyperref}
+\hypersetup{colorlinks,urlcolor=H1,linkcolor=H2,filecolor=filecolor,pdfstartview=FitH,pdfview=FitH,pdfcreator=XeTeX output}
+
+\RequirePackage[letterpaper,margin=0.75in,headheight=0.25in,headsep=0.2in,footskip=0.2in]{geometry}
+
+\RequirePackage{indentfirst,comment}
+% fontsetting
+\ifdefstring{\LITE@math}{mtpro2}{
+ \let\Bbbk\relax
+ \RequirePackage[lite]{mtpro2}
+}{\relax}
+
+\RequirePackage[UTF8,scheme=plain]{ctex}
+\def\chapterfont#1{
+ \setCJKfamilyfont{chapterfont}{#1}[Extension =.ttf]
+ \gdef\@chapterfont{#1}
+}
+
+\setcounter{tocdepth}{1}
+
+\PassOptionsToPackage{no-math}{fontspec}
+\PassOptionsToPackage{quiet}{fontspec}
+\RequirePackage[no-math]{fontspec}
+
+\AfterEndPreamble{
+ \setlength\parindent{2\ccwd}}
+
+%% 章节以及页脚图形
+\RequirePackage{xcolor}
+\RequirePackage{silence}
+
+ \definecolor{backgroundcolor}{HTML}{F8F7E9}
+ \definecolor{headrulecolor}{HTML}{640125}
+ \pagecolor{backgroundcolor!20}
+ \definecolor{1号色}{HTML}{4D5AAF} %
+ \definecolor{2号色}{HTML}{006E54} %
+
+ \ifdefstring{\LITE@answer}{ans}{
+ \definecolor{solutioncolor}{HTML}{0F2350} %
+ \newcommand{\solutionname}{\faIcon{check-square} 分析与解}
+}{\relax}
+\ifdefstring{\LITE@answer}{noans}{
+ \definecolor{solutioncolor}{HTML}{FEFEFB} %
+ \definecolor{solutionbg}{RGB}{130,73,71} %
+ \newcommand{\solutionname}{\faIcon{ban} 答案隐藏}
+}{\relax}
+
+ \definecolor{normalcolor}{HTML}{000000} %
+
+% ----- box -----
+%% 章节设置
+\RequirePackage[center,pagestyles]{titlesec}
+\RequirePackage[title,titletoc,header]{appendix}
+
+\newcommand{\notename}{\faIcon{snowflake} 注意}
+\renewcommand*{\proofname}{证明}
+\newcommand{\problemname}{\faIcon{pen-square} 题目} % 题目=习题
+
+\newcommand{\remarkname}{注}
+\renewcommand*{\date}[8]{
+ \vspace{-0.5em}\color{normalcolor}
+ \begin{minipage}{0.64\textwidth}
+ \begin{multicols}{2}
+ \textbf{考试时间}:\kaishu #1
+
+ \textbf{\songti 课程编号}:\kaishu #3
+
+ \textbf{\songti 任课教师}:\kaishu #2
+
+ \textbf{\songti 解析制作}:\kaishu #4
+ \end{multicols}
+ \end{minipage}
+ \hfill
+ \begin{minipage}{0.15\textwidth}
+ \centering
+ #5
+
+ \vskip1ex\scriptsize\textbf{#6}
+ \end{minipage}
+ \hfill
+ \begin{minipage}{0.15\textwidth}
+ \centering
+ #7
+
+ \vskip1ex\scriptsize\textbf{#8}
+ \end{minipage}
+ \vspace{-0.5em}
+}
+
+\RequirePackage[most]{tcolorbox}
+\tcbuselibrary{breakable}
+\tcbset{
+ common/.style={
+ blanker,breakable,
+ left=3mm,
+ toprule=.3em,
+ bottomrule=.3em,
+ bottomtitle=.75\baselineskip,
+ fonttitle=\bfseries
+ }
+}
+\newcounter{prob}[chapter]
+\setcounter{prob}{1}
+\renewcommand{\theprob}{\arabic{prob}}
+
+\NewDocumentEnvironment{choice}{m o}{
+ \refstepcounter{prob}
+ \IfNoValueTF{#2}
+ {
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\bfseries\color{2号色}{\problemname}\theprob\hfill【\quad\color{solutioncolor} #1 \color{2号色}\quad 】,
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\bfseries\color{2号色}{\problemname}\theprob\hfill\color{2号色}\faIcon{tag}~#2\qquad【\quad\color{solutioncolor} #1 \color{2号色}\quad 】,
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }
+ \rmfamily\color{normalcolor}}{\end{tcolorbox}}
+
+\NewDocumentEnvironment{problem}{s o o}{
+ \refstepcounter{prob}
+ \IfBooleanTF{#1}{
+ \def\tagname{\relax}
+ }{
+ \def\tagname{\hfill\faIcon{tag}}
+ }
+ \IfNoValueTF{#3}{
+ \IfNoValueTF{#2}{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\color{2号色}{\problemname} \theprob,
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\color{2号色}{\problemname} \theprob\tagname~#2,
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }
+ }{
+ \IfNoValueTF{#2}{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\color{2号色}{\problemname} \theprob(本题#3分),
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{2号色},
+ title=\color{2号色}{\problemname} \theprob(本题#3分)\tagname~#2,
+ coltitle=2号色,
+ colupper=normalcolor,
+ collower=normalcolor
+ ]
+ }
+ }
+ \rmfamily\color{normalcolor}}{\end{tcolorbox}}
+
+\newcommand{\noting}[1]{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{orange},
+ coltitle=orange,
+ ]%
+ {\textbf{\color{orange}\notename}}
+ \kaishu\color{normalcolor}#1\end{tcolorbox}}
+
+\newenvironment{note}{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{orange},
+ title=\textbf{\color{orange}\notename},
+ coltitle=2号色,
+ ]
+ \kaishu\color{normalcolor}}{\end{tcolorbox}}
+
+\definecolor{second}{RGB}{226,106,106} %
+\newenvironment{proof}{
+ \par\noindent\bfseries\songti{\color{second}\proofname\;}
+ \color{black!90}\fangsong}{
+ \hfill\ensuremath{\square}
+ \par}
+
+\NewDocumentEnvironment{solution}{s}{
+ \IfBooleanTF{#1}{
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{1号色},
+ coltitle=1号色
+ ]
+ \textcolor{1号色}{\textbf{\solutionname}}
+ }
+ {
+ \begin{tcolorbox}[
+ common,
+ borderline west={1.5pt}{0mm}{1号色},
+ title=\textcolor{1号色}{\textbf{\solutionname}},
+ coltitle=1号色,
+ colupper=solutioncolor,
+ collower=solutioncolor
+ ]}%
+ \kaishu\color{solutioncolor}}{\end{tcolorbox}}
+
+\RequirePackage{enumerate}
+% list/itemize/enumerate setting
+\RequirePackage[shortlabels,inline]{enumitem}
+\setlist{nolistsep,leftmargin=1.5em}
+
+\RequirePackage{graphicx}
+\graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
+\RequirePackage{bm}% 数学加粗
+\RequirePackage{pdfpages}
+\RequirePackage{esint}% 面积分
+\RequirePackage{wrapstuff}% 图文绕排
+\RequirePackage{booktabs}
+\RequirePackage{paracol}
+\columnratio{0.67}
+\RequirePackage{multicol,multirow}
+
+\RequirePackage{fancyvrb}
+%%中文结构名字
+
+%绘图
+\RequirePackage{tikz} %% load tikz without tikz
+\usetikzlibrary{intersections,decorations.markings,spy,arrows,shapes,fadings,mindmap,shapes.arrows,shapes.symbols,tikzmark,shapes.geometric,graphs,decorations.pathmorphing,through,arrows.meta,shapes.misc,decorations.shapes,angles,backgrounds,calc,math,decorations,decorations.pathreplacing,fit,quotes,shadows,positioning,patterns,shadings}
+\tikzset{>=stealth,line cap=round,line join=round}
+\RequirePackage{pgfplots}
+\pgfplotsset{compat=1.9}
+%电路图绘制
+\RequirePackage{circuitikz}
+\ctikzset{logic ports=ieee,logic ports/scale=0.6,fill=backgroundcolor}
+
+\newcommand*{\eitemi}{\tikz \draw [baseline, ball color=1号色,draw=none] circle (2pt);}
+\newcommand*{\eitemii}{\tikz \draw [baseline, fill=1号色,draw=none,circular drop shadow] circle (2pt);}
+\newcommand*{\eitemiii}{\tikz \draw [baseline, fill=1号色,draw=none] circle (2pt);}
+\setlist[enumerate,1]{label=\color{1号色}\arabic*.}
+\setlist[enumerate,2]{label=\color{1号色}(\alph*).}
+\setlist[enumerate,3]{label=\color{1号色}\Roman*.}
+\setlist[enumerate,4]{label=\color{1号色}\Alph*.}
+\setlist[itemize,1]{label={\eitemi}}
+\setlist[itemize,2]{label={\eitemii}}
+\setlist[itemize,3]{label={\eitemiii}}
+
+\def\thesection{\arabic{section}}
+\titleformat{\section}[hang]{\bfseries}{
+ \Large\bfseries\heiti{\color{1号色}\thesection.}\enspace}{1pt}{%
+ \color{1号色}\Large\bfseries\filright}
+\titleformat{\subsection}[hang]{\bfseries}{
+ \large\bfseries\color{1号色}\thesubsection\enspace}{1pt}{%
+ \color{1号色}\large\bfseries\filright}
+\titleformat{\subsubsection}[hang]{\bfseries}{
+ \large\bfseries\color{1号色}\thesubsubsection\enspace}{1pt}{%
+ \color{1号色}\large\bfseries\filright}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%chapter图片定制开始%%%%%%%%%%%%%%%
+\def\chapterimage{\gdef\@chapterimage}
+\def\@makechapterhead#1{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \fill [fill=backgroundcolor,opacity=0.2] (current page.north west) rectangle +(\paperwidth,-\paperwidth/13*6);
+ \node[scope fading=south,anchor=north,inner sep=0pt] at (current page.north) {\includegraphics[width=\paperwidth]{\@chapterimage}};
+ \draw [line width=2pt,2号色!40] ($(current page.north west)-(0,3.5/13*\paperwidth)$) -- ($(current page.north east)-(0,3.5/13*\paperwidth)$);
+ \draw [line width=2pt,2号色!40] ($(current page.north west)-(0,4.5/13*\paperwidth)$) -- ($(current page.north east)-(0,4.5/13*\paperwidth)$);
+ \fill [backgroundcolor!40,opacity=0.5] ($(current page.north west)-(0,3.5/13*\paperwidth)$) rectangle +(\paperwidth,-\paperwidth/13);
+ \node at ($(current page.north west)-(-0.5*\paperwidth,4/13*\paperwidth)$) {\ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi\huge\bfseries\color{normalcolor}#1~\color{2号色}\faIcon{feather-alt}};
+ \end{tikzpicture}\par
+ \vspace{3.5\paperwidth/13}
+ \thispagestyle{plain}
+ \fancypagestyle{plain}{
+ \fancyhead{} % 页眉清空
+ \def\headrulewidth{0pt} % 去页眉线
+ }
+ \ifdefstring{\LITE@counter}{separate}{
+ \setcounter{page}{1}
+ }{\relax}
+}
+\def\@makeschapterhead#1{
+ \centering
+ \ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi\huge\bfseries\color{normalcolor}#1\normalsize
+ \thispagestyle{plain}
+ \fancypagestyle{plain}{
+ \fancyhead{} % 页眉清空
+ \def\headrulewidth{0pt} % 去页眉线
+ }
+ \ifdefstring{\LITE@counter}{separate}{
+ \setcounter{page}{1}
+ }{\relax}
+}
+%%%%%%%%%%%chapter图片定制结束%%%%%%%%%%%%%%%
+
+\newcommand{\watermark}[1]{\RequirePackage{wallpaper}\CenterWallPaper{0.5}{#1}}
+%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{ulem}
+\RequirePackage{fancyhdr}
+\RequirePackage{fontawesome5}
+
+\fancyhf{}
+
+\fancyfoot[C]{\color{1号色}\sout{\hbox to 0.4\textwidth{}}\quad\faIcon{chevron-left}\;第~\color{normalcolor}{\sffamily\thepage}\color{1号色}~页\;\faIcon{chevron-right}\quad\sout{\hbox to 0.4\textwidth{}}}
+\fancyfoot[L]{\color{1号色}{$\boldsymbol{\cdot}$}}
+\fancyfoot[R]{\color{1号色}{$\boldsymbol{\cdot}$}}
+
+\renewcommand{\headrule}{\color{headrulecolor}\hrule width\textwidth}
+\pagestyle{fancy}
+
+\renewcommand{\sectionmark}[1]{\markright{#1}{}}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%[第三方定制]%%%%%%%%%%%%%%%%%%%%%
+\def\e{\mathrm{e}}
+\def\i{\mathrm{i}}
+\newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
+\newcommand\sokka[1]{故本题选择 \textbf{#1} 项.}
+\newcommand\ans[1]{\underline{\color{solutioncolor}\ #1\ }}
+\newcommand\length[4]{
+\node (a) at ($0.5*($#2+#1$)$) {#3};
+\draw [->|] ($0.5*($#2+#1+#4$)$) -- #2;
+\draw [->|] ($0.5*($#2+#1-#4$)$) -- #1;}
+\newcommand\cdotfill{\leavevmode\cleaders\hb@xt@.44em{\hss$\cdot$\hss}\hfill\kern\z@}
+\newcommand{\point}[1]{\cdotfill\texttt{(#1pt)}}
+\setstretch{1.5}
+\AtBeginDocument{\everymath{\displaystyle}}
+
+\makeatletter
+\protected\def\titlelogo#1#2{
+ \leavevmode@ifvmode
+ \lower\dimexpr\f@size\p@*1/10\hbox{\href{#1}{\includegraphics[height={\f@size\p@}]{#2}}}
+ }
+\makeatother
+
+\usepackage{listings,dirtree}
+\lstdefinestyle{TeX}{
+ language = [LaTeX]TeX,
+ texcsstyle = *\color{H7},
+ numbers = none,
+ basicstyle = {\small\color{H6}\tt},
+ mathescape = false,
+ breaklines = true,
+ columns = fixed,
+ keywordstyle = \color{H3},
+ commentstyle = \color{darkgray},
+ tabsize = 2,
+ keywords = {chapter,choice,problem,solution,enumerate}
+} \ No newline at end of file
diff --git a/macros/latex/contrib/postnotes/CHANGELOG.md b/macros/latex/contrib/postnotes/CHANGELOG.md
index fda5f61173..c364fc150a 100644
--- a/macros/latex/contrib/postnotes/CHANGELOG.md
+++ b/macros/latex/contrib/postnotes/CHANGELOG.md
@@ -1,6 +1,17 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.2.6...HEAD)
+## [Unreleased](https://github.com/gusbrs/postnotes/compare/v0.2.7...HEAD)
+
+## [v0.2.7](https://github.com/gusbrs/postnotes/compare/v0.2.6...v0.2.7) (2023-11-14)
+
+### Added
+- Provide `\pnidnextnote`, with usage example in the manual.
+- User manual example for section splitting using section redefinition.
+
+### Changed
+- Don't use `expl3` public scratch temporary variables.
+- Prefer `e-type` expansion.
+- Require 2023-11-01 LaTeX kernel.
## [v0.2.6](https://github.com/gusbrs/postnotes/compare/v0.2.5...v0.2.6) (2023-08-21)
diff --git a/macros/latex/contrib/postnotes/README.md b/macros/latex/contrib/postnotes/README.md
index b6b5f0334e..6b730c27e6 100644
--- a/macros/latex/contrib/postnotes/README.md
+++ b/macros/latex/contrib/postnotes/README.md
@@ -2,8 +2,8 @@
**Endnotes for LaTeX**
-Author: Gustavo Barros
-Maintainer: Gustavo Barros
+Author: gusbrs
+Maintainer: gusbrs
`postnotes` is an endnotes package for LaTeX. Its user interface provides
means to print multiple sections of notes along the document, and to subdivide
diff --git a/macros/latex/contrib/postnotes/postnotes-code.pdf b/macros/latex/contrib/postnotes/postnotes-code.pdf
index d4a78a2cfe..5d44313222 100644
--- a/macros/latex/contrib/postnotes/postnotes-code.pdf
+++ b/macros/latex/contrib/postnotes/postnotes-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/postnotes/postnotes-code.tex b/macros/latex/contrib/postnotes/postnotes-code.tex
index 67aff57582..6cc43c80af 100644
--- a/macros/latex/contrib/postnotes/postnotes-code.tex
+++ b/macros/latex/contrib/postnotes/postnotes-code.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "postnotes".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files postnotes.dtx,
% postnotes.ins,
diff --git a/macros/latex/contrib/postnotes/postnotes-doc.pdf b/macros/latex/contrib/postnotes/postnotes-doc.pdf
index 62ee64468b..e2fa275f3a 100644
--- a/macros/latex/contrib/postnotes/postnotes-doc.pdf
+++ b/macros/latex/contrib/postnotes/postnotes-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/postnotes/postnotes-doc.tex b/macros/latex/contrib/postnotes/postnotes-doc.tex
index 3d29f76a69..4848fa7cb2 100644
--- a/macros/latex/contrib/postnotes/postnotes-doc.tex
+++ b/macros/latex/contrib/postnotes/postnotes-doc.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "postnotes".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files postnotes.dtx,
% postnotes.ins,
@@ -64,10 +63,7 @@
\hypersetup{hidelinks}
\usepackage{zref-clever}
-\zcsetup{
- cap,
- countertype = { pnexample = example } ,
-}
+\zcsetup{cap}
\usepackage{zref-titleref}
\usepackage{zref-check}
@@ -79,13 +75,24 @@
\chapter ,
\@mkboth ,
\@textsuperscript ,
+ \thechapter ,
\AddToHook ,
+ \AddToHookNext ,
\counterwithin ,
\tableofcontents ,
\ExplSyntaxOn ,
\ExplSyntaxOff ,
\NewDocumentCommand ,
+ \RenewDocumentCommand ,
+ \NewCommandCopy ,
+ \IfBooleanTF ,
+ \IfNoValueTF ,
\tl_if_eq:NNTF ,
+ \tl_new:N ,
+ \tl_gset:Nv ,
+ \prop_new:N ,
+ \prop_gput:NeV ,
+ \prop_item:NV ,
\bool_case:nF ,
\str_if_eq_p:ee ,
\prg_replicate:nn ,
@@ -113,6 +120,7 @@
\pnthesection ,
\pnthechapternextnote ,
\pnthesectionnextnote ,
+ \pnidnextnote ,
\pnhdpagefirst ,
\pnhdpagelast ,
\pnhdchapfirst ,
@@ -123,6 +131,10 @@
\pnhdnamelast ,
\mypnheader ,
\demochapter ,
+ \origlatexchapter ,
+ \l_postnotes_note_id_tl ,
+ \g_my_currentname_tl ,
+ \g_my_names_prop ,
}
}
\lstset{
@@ -139,22 +151,15 @@
\lstnewenvironment{pnexample}[1][]{%
\renewcommand{\lstlistingname}{Example}%
\renewcommand*\theHlstlisting{ht.\thelstlisting}%
+ \zcsetup{countertype={lstlisting=example}}%
\lstset{#1}%
+ \stepcounter{pnexample}%
\setcounter{lstlisting}{\value{pnexample}}%
}{}
\lstnewenvironment{pnsnippet}[1][]{%
\renewcommand{\lstlistingname}{Example}%
\lstset{#1}%
}{}
-\ExplSyntaxOn
-\makeatletter
-\lst@AddToHook { PreInit }
- {
- \cs_if_exist:cT { c@ \lstenv@name }
- { \exp_args:Nx \refstepcounter { \lstenv@name } }
- }
-\makeatother
-\ExplSyntaxOff
\setlength{\marginparsep}{2\labelsep}
@@ -168,18 +173,17 @@
\title{%
The \pkg{postnotes} package%
- \thanks{This file describes \fileversion, released \filedate.}%
\texorpdfstring{\\{}\medskip{}}{ - }%
User manual%
\texorpdfstring{\medskip{}}{}%
}
\author{%
- Gustavo Barros%
- \thanks{\url{https://github.com/gusbrs/postnotes}}%
-}
+ \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+ \url{https://github.com/gusbrs/postnotes}\\
+ \url{https://www.ctan.org/pkg/postnotes}}{gusbrs}}
-\date{\filedate}
+\date{Version \fileversion\ -- \filedate}
\maketitle
@@ -505,7 +509,7 @@ is typeset. For details on how to use these variables, see
\DescribeOption{exp} %
By default, \cs{postnotesection} stores its \meta{text} argument with ``no
manipulation''. The \opt{exp} option allows one to fully expand
-(\texttt{x}-type expansion) \meta{text} in place before storing it. It is a
+(\texttt{e}-type expansion) \meta{text} in place before storing it. It is a
boolean option, and the option given with no value is equivalent to
\texttt{exp=true}.
@@ -536,6 +540,7 @@ generic ``add to''.
\DescribeMacro{\pnthesection} %
\DescribeMacro{\pnthechapternextnote} %
\DescribeMacro{\pnthesectionnextnote} %
+\DescribeMacro{\pnidnextnote} %
Just like with \cs{postnote}, the contents of \cs{postnotesection} are not
expanded in place, but rather stored with ``no manipulation'' to be typeset
later at \cs{printpostnotes}. For this reason, some contextual information is
@@ -560,6 +565,7 @@ the value of \cs{thechapter} at the point the ``next note'' is placed (a
\cs{postnote}, that is), the first in the chapter, and already inside it, thus
with an expected value of the \texttt{chapter} counter. Similarly,
\cs{pnthesectionnextnote} contains the value of \cs{thesection} for the ``next
+note''. \cs{pnidnextnote}, in turn, stores the Id number of the ``next
note''. Of course, the ``next note'' variables are \emph{proxies}, but they
are meant to support the automation of the subdivision of the notes through
the use of \texttt{before} hooks to the document's sectioning commands, in
@@ -622,10 +628,14 @@ by means of \cs{counterwithin*}. Note that the call to \cs{chapter*} inside
\cs{tableofcontents} does not generate a spurious notes section at
\cs{printpostnotes} (as long as you don't place a note in a sectioning command
with no short argument, which you shouldn't do anyway). But what if we have,
-among mostly numbered chapters, an ocasional unnumbered one?
-\cs{pnthechapternextnote} wouldn't possibly work in this case. Since
-immediately successive calls to \cs{postnotesection} override the previous
-ones, it is straightforward to just manually adjust the exception:
+among mostly numbered chapters, an ocasional unnumbered one?\footnote{The
+ example here counts on the lucky circumstance of having only a single
+ initial unnumbered section. But, in general, if that's not the case,
+ \cs{counterwithin*} is insufficient and the resetting of the
+ \texttt{postnote} counter at unnumbered sections most be handled somehow
+ else.} \cs{pnthechapternextnote} wouldn't possibly work in this case.
+Since immediately successive calls to \cs{postnotesection} override the
+previous ones, it is straightforward to just manually adjust the exception:
\begin{pnexample}[caption={Fine-tuning automation},label={ex:sect:fine-auto}]
\documentclass{book}
@@ -649,6 +659,108 @@ Boo.\postnote{Boo note.}
\end{document}
\end{pnexample}
+If one wants to use section names/titles, the technique above (of using
+something similar to \cs{pnthechapternextnote}) is less useful, since if the
+first note in the section occurs within a subsection we would lose the
+information of interest. So we have a little more work to do in this case.
+\zcref{ex:sect:names} uses the \texttt{cmd/chapter/before} hook to store the
+value of \cs{@currentlabelname} in a dedicated variable after the next call to
+\cs{NR@gettitle} (presuming the use of \pkg{nameref}, through \pkg{hyperref}).
+We then store the value of this variable for each note using the
+\texttt{postnotes/note/store} hook and the note's Id number
+\cs{l_postnotes_note_id_tl}. Finally we can retrieve this stored value using
+\cs{pnidnextnote} inside \cs{postnotesection}. Indeed, this example is also
+meant to illustrate the general technique for storing/restoring variables of
+interest for this purpose.
+
+\begin{pnexample}[caption={Section names},label={ex:sect:names}]
+\documentclass{book}
+\usepackage{postnotes}
+\ExplSyntaxOn
+\tl_new:N \g_my_currentname_tl
+\prop_new:N \g_my_names_prop
+\AddToHook{cmd/chapter/before}{
+ \AddToHookNext{cmd/NR@gettitle/after}{
+ \tl_gset:Nv \g_my_currentname_tl { @currentlabelname } } }
+\AddToHook{postnotes/note/store}{
+ \prop_gput:NeV \g_my_names_prop
+ { \l_postnotes_note_id_tl } \g_my_currentname_tl }
+\AddToHook{cmd/chapter/before}{
+ \postnotesection{
+ \section*{Notes~to~\prop_item:NV \g_my_names_prop \pnidnextnote}}}
+\ExplSyntaxOff
+\counterwithin*{postnote}{chapter}
+\usepackage{hyperref}
+\begin{document}
+\chapter*{Introduction}
+Intro.\postnote{Intro note.}
+\chapter{First chapter}
+Foo.\postnote{Foo note.}
+Bar.\postnote{Bar note.}
+\chapter{Second chapter}
+Baz.\postnote{Baz note.}
+Boo.\postnote{Boo note.}
+\printpostnotes
+\end{document}
+\end{pnexample}
+
+While \pkg{postnotes} goes through great lengths to avoid tampering with
+sectioning commands, the fact that in general we cannot use \texttt{cmd} hooks
+after \cs{chapter} or \cs{section} does complicate things. And
+\zcref{ex:sect:names} is indeed a good illustration of how a supposedly simple
+task can become quite convoluted if we are not allowed to observe the
+variables of interest \emph{after} the sectioning commands. However, things
+are quite different from the perspective of a user, considering the problem at
+the document level. In this case, the definition of the sectioning commands
+is known, and unique, so that it may make sense to use of the traditional
+technique of storing the definition of the sectioning command, and then
+redefining it to do what it used to, plus something
+else.\footnote{\username{egreg} commonly applies the technique for the same
+ purpose in answers using \pkg{endnotes} at TeX.SX. For example:
+ \url{https://tex.stackexchange.com/a/62425},
+\url{https://tex.stackexchange.com/a/109566}, and
+\url{https://tex.stackexchange.com/a/85001}. But things are somewhat simpler
+with \pkg{postnotes}, since there's no need to handle the case of sections
+with no notes, given that empty \cs{postnotesection}s are already skipped.}
+In which case, we can set \cs{postnotesection}s with full generality and
+flexibility.
+
+\begin{pnexample}[caption={Redefining sections},label={ex:sect:redefined}]
+\documentclass{book}
+\usepackage{postnotes}
+\counterwithin*{postnote}{chapter}
+\NewCommandCopy\origlatexchapter\chapter
+\RenewDocumentCommand{\chapter}{som}{%
+ \IfBooleanTF{#1}{%
+ \origlatexchapter*{#3}%
+ \setcounter{postnote}{0}%
+ \postnotesection{\section*{Notes to ``#3''}}%
+ }{%
+ \IfNoValueTF{#2}{%
+ \origlatexchapter{#3}%
+ }{%
+ \origlatexchapter[#2]{#3}%
+ }%
+ \postnotesection{\section*{Notes to chapter \pnthechapter}}%
+ }%
+}
+\usepackage{hyperref}
+\begin{document}
+\chapter*{Introduction}
+Intro.\postnote{Intro note.}
+\chapter{First chapter}
+Foo.\postnote{Foo note.}
+Bar.\postnote{Bar note.}
+\chapter{Second chapter}
+Baz.\postnote{Baz note.}
+Boo.\postnote{Boo note.}
+\printpostnotes
+\end{document}
+\end{pnexample}
+
+Things could easily get fancier, of course. But that's the basic structure.
+
+
\section{Headers}
\zlabel{sec:headers}
diff --git a/macros/latex/contrib/postnotes/postnotes.dtx b/macros/latex/contrib/postnotes/postnotes.dtx
index 5a32a17963..58f00e6cdb 100644
--- a/macros/latex/contrib/postnotes/postnotes.dtx
+++ b/macros/latex/contrib/postnotes/postnotes.dtx
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "postnotes".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files postnotes.dtx,
% postnotes.ins,
@@ -95,18 +94,17 @@
%
% \title{^^A
% The \pkg{postnotes} package^^A
-% \thanks{This file describes \fileversion, released \filedate.}^^A
% \texorpdfstring{\\{}\medskip{}}{ - }^^A
% Code documentation^^A
% \texorpdfstring{\medskip{}}{}^^A
% }
%
% \author{^^A
-% Gustavo Barros^^A
-% \thanks{\url{https://github.com/gusbrs/postnotes}}^^A
-% }
+% \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+% \url{https://github.com/gusbrs/postnotes}\\
+% \url{https://www.ctan.org/pkg/postnotes}}{gusbrs}}
%
-% \date{\filedate}
+% \date{Version \fileversion\ -- \filedate}
%
% \maketitle
%
@@ -134,11 +132,12 @@
% simplifies the relation with \pkg{hyperref} (\texttt{ltnews35},
% \texttt{hyperref-linktarget}): the provision of \cs{MakeLinkTarget} and the
% definition by the kernel of the starred version of \cs{ref}, which we can
-% use regardless of \pkg{hyperref} being loaded. So we require the 2022-06-01
-% kernel or newer.
+% use regardless of \pkg{hyperref} being loaded. Finally, since we followed
+% the move to \texttt{e}-type expansion, to play safe we require the
+% 2023-11-01 kernel or newer.
%
% \begin{macrocode}
-\def\postnotes@required@kernel{2022-06-01}
+\def\postnotes@required@kernel{2023-11-01}
\NeedsTeXFormat{LaTeX2e}[\postnotes@required@kernel]
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{\postnotes@required@kernel}
@@ -153,11 +152,28 @@
%
%
% \begin{macrocode}
-\ProvidesExplPackage {postnotes} {2023-08-21} {0.2.6}
+\ProvidesExplPackage {postnotes} {2023-11-14} {0.2.7}
{Endnotes for LaTeX}
% \end{macrocode}
%
%
+% \begin{macro}
+% {
+% \l_@@_tmpa_tl ,
+% \l_@@_tmpb_tl ,
+% \l_@@_tmpa_seq ,
+% \l_@@_tmpa_box ,
+% }
+% Temporary scratch variables.
+% \begin{macrocode}
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\seq_new:N \l_@@_tmpa_seq
+\box_new:N \l_@@_tmpa_box
+% \end{macrocode}
+% \end{macro}
+%
+%
% \section{Data}
%
%
@@ -196,11 +212,11 @@
{
\prop_new:c { \@@_data_name:e {#1} }
\prop_gput:cnn { \@@_data_name:e {#1} } { type } { note }
- \prop_gput:cnx { \@@_data_name:e {#1} } { mark }
+ \prop_gput:cne { \@@_data_name:e {#1} } { mark }
{ \l_@@_mark_tl }
- \prop_gput:cnx { \@@_data_name:e {#1} } { counter }
+ \prop_gput:cne { \@@_data_name:e {#1} } { counter }
{ \int_use:N \c@postnote }
- \prop_gput:cnx { \@@_data_name:e {#1} } { sortnum }
+ \prop_gput:cne { \@@_data_name:e {#1} } { sortnum }
{
\bool_if:NTF \l_@@_manual_sortnum_bool
{ \fp_use:N \l_@@_sort_num_fp }
@@ -208,16 +224,16 @@
}
\cs_if_exist:cT { chapter }
{
- \prop_gput:cnx { \@@_data_name:e {#1} }
+ \prop_gput:cne { \@@_data_name:e {#1} }
{ thechapter } { \thechapter }
}
- \prop_gput:cnx { \@@_data_name:e {#1} } { thesection }
+ \prop_gput:cne { \@@_data_name:e {#1} } { thesection }
{ \thesection }
- \prop_gput:cnx { \@@_data_name:e {#1} } { pnsectname }
+ \prop_gput:cne { \@@_data_name:e {#1} } { pnsectname }
{ \g_@@_section_name_tl }
- \prop_gput:cnx { \@@_data_name:e {#1} } { pnsectid }
+ \prop_gput:cne { \@@_data_name:e {#1} } { pnsectid }
{ \int_use:N \g_@@_sectid_int }
- \prop_gput:cnx { \@@_data_name:e {#1} } { multibool }
+ \prop_gput:cne { \@@_data_name:e {#1} } { multibool }
{ \bool_to_str:N \l_@@_maybe_multi_bool }
\prop_gput:cnn { \@@_data_name:e {#1} } { content } {#2}
\UseHook { postnotes/note/store }
@@ -239,14 +255,14 @@
\prop_gput:cnn { \@@_data_name:e {#1} } { type } { section }
\cs_if_exist:cT { chapter }
{
- \prop_gput:cnx { \@@_data_name:e {#1} }
+ \prop_gput:cne { \@@_data_name:e {#1} }
{ thechapter } { \thechapter }
}
- \prop_gput:cnx { \@@_data_name:e {#1} } { thesection }
+ \prop_gput:cne { \@@_data_name:e {#1} } { thesection }
{ \thesection }
\prop_gput:cnn { \@@_data_name:e {#1} } { content } {#2}
}
-\cs_generate_variant:Nn \@@_store_section:nn { nx }
+\cs_generate_variant:Nn \@@_store_section:nn { ne }
% \end{macrocode}
% \end{macro}
%
@@ -290,7 +306,7 @@
% \end{syntax}
% \begin{macrocode}
\tl_const:Nn \c_@@_ref_prefix_tl { postnote@r }
-\cs_new_protected:Npx \post@note #1#2
+\cs_new_protected:Npe \post@note #1#2
{ \exp_not:N \@newl@bel { \c_@@_ref_prefix_tl } {#1} {#2} }
% \end{macrocode}
% \end{macro}
@@ -303,7 +319,7 @@
{
\legacy_if:nT { @filesw }
{
- \iow_now:Nx \@mainaux
+ \iow_now:Ne \@mainaux
{ \token_to_str:N \providecommand \token_to_str:N \post@note [2]{} }
}
}
@@ -311,7 +327,7 @@
{
\legacy_if:nT { @filesw }
{
- \iow_now:Nx \@partaux
+ \iow_now:Ne \@partaux
{ \token_to_str:N \providecommand \token_to_str:N \post@note [2]{} }
}
}
@@ -345,13 +361,13 @@
}
\cs_new_protected:Npn \@@_set_mark_page_label:n #1
{ \@@_set_label:nn { mark@ #1 } { \thepage } }
-\cs_generate_variant:Nn \@@_set_mark_page_label:n { x }
+\cs_generate_variant:Nn \@@_set_mark_page_label:n { e }
\cs_new_protected:Npn \@@_set_text_page_label:n #1
{ \@@_set_label:nn { text@ #1 } { \int_use:N \c@page } }
-\cs_generate_variant:Nn \@@_set_text_page_label:n { x }
+\cs_generate_variant:Nn \@@_set_text_page_label:n { e }
\cs_new_protected:Npn \@@_set_print_page_label:n #1
{ \@@_set_label:nn { print@ #1 } { \int_use:N \c@page } }
-\cs_generate_variant:Nn \@@_set_print_page_label:n { x }
+\cs_generate_variant:Nn \@@_set_print_page_label:n { e }
% \end{macrocode}
% \end{macro}
%
@@ -373,7 +389,7 @@
{ \tl_set:Nv #1 { \c_@@_ref_prefix_tl @ #2 } }
{ \tl_clear:N #1 }
}
-\cs_generate_variant:Nn \@@_get_pageref:Nn { Nx }
+\cs_generate_variant:Nn \@@_get_pageref:Nn { Ne }
\cs_new:Npn \@@_extract_pageref:n #1
{
\cs_if_exist:cTF { \c_@@_ref_prefix_tl @ #1 }
@@ -646,9 +662,10 @@
% \begin{macrocode}
maketextmark =
{
- \hbox_set:Nn \l_tmpa_box { \@textsuperscript { \normalfont ##1 } }
- \skip_horizontal:n { - \box_wd:N \l_tmpa_box }
- ##2 \box_use:N \l_tmpa_box ##3
+ \hbox_set:Nn \l_@@_tmpa_box
+ { \@textsuperscript { \normalfont ##1 } }
+ \skip_horizontal:n { - \box_wd:N \l_@@_tmpa_box }
+ ##2 \box_use:N \l_@@_tmpa_box ##3
} ,
} ,
style / pagenote .meta:n =
@@ -893,19 +910,19 @@
\tl_if_empty:NT \l_@@_mark_tl
{
\stepcounter { postnote }
- \tl_set:Nx \l_@@_mark_tl { \thepostnote }
+ \tl_set:Ne \l_@@_mark_tl { \thepostnote }
}
- \seq_gput_right:Nx \g_@@_queue_seq
+ \seq_gput_right:Ne \g_@@_queue_seq
{ \l_postnotes_note_id_tl }
\UseHook { postnotes/note/begin }
\cs_set:Npn \@currentcounter { postnote }
- \cs_set:Npx \@currentlabel { \p@postnote \l_@@_mark_tl }
+ \cs_set:Npe \@currentlabel { \p@postnote \l_@@_mark_tl }
\MakeLinkTarget* { postnote. \l_postnotes_note_id_tl .mark }
- \@@_set_mark_page_label:x { \l_postnotes_note_id_tl }
+ \@@_set_mark_page_label:e { \l_postnotes_note_id_tl }
\@@_set_user_labels:
\bool_if:NF \l_@@_nomark_bool
{
- \@@_typeset_mark:xV
+ \@@_typeset_mark:eV
{ \l_postnotes_note_id_tl } \l_@@_mark_tl
}
\@@_store:nn { \l_postnotes_note_id_tl } {#2}
@@ -990,12 +1007,12 @@
\bool_if:NTF \l_@@_print_plain_mark_stepcounter_bool
{
\stepcounter { postnote }
- \tl_set:Nx \l_@@_mark_tl { \thepostnote }
+ \tl_set:Ne \l_@@_mark_tl { \thepostnote }
}
{
\group_begin:
\int_incr:N \c@postnote
- \exp_args:NNNx
+ \exp_args:NNNe
\group_end:
\tl_set:Nn \l_@@_mark_tl { \thepostnote }
}
@@ -1037,14 +1054,14 @@
{ \@@_make_mark:nnn {#2} { } { } }
}
}
-\cs_generate_variant:Nn \@@_typeset_mark:nn { xV }
+\cs_generate_variant:Nn \@@_typeset_mark:nn { eV }
\tl_new:N \l_@@_saved_spacefactor_tl
\cs_new_protected:Npn \@@_typeset_mark_wrapper:n #1
{
\mode_leave_vertical:
\mode_if_horizontal:T
{
- \tl_set:Nx \l_@@_saved_spacefactor_tl { \the\spacefactor }
+ \tl_set:Ne \l_@@_saved_spacefactor_tl { \the\spacefactor }
\nobreak
}
#1
@@ -1151,11 +1168,11 @@
\group_begin:
\int_gincr:N \g_@@_sectid_int
\int_gincr:N \g_@@_note_id_int
- \seq_gput_right:Nx \g_@@_queue_seq { \l_postnotes_note_id_tl }
+ \seq_gput_right:Ne \g_@@_queue_seq { \l_postnotes_note_id_tl }
\tl_gclear:N \g_@@_section_name_tl
\keys_set:nn { postnotes/section } {#1}
\bool_if:NTF \l_@@_section_exp_bool
- { \@@_store_section:nx { \l_postnotes_note_id_tl } {#2} }
+ { \@@_store_section:ne { \l_postnotes_note_id_tl } {#2} }
{ \@@_store_section:nn { \l_postnotes_note_id_tl } {#2} }
\group_end:
}
@@ -1202,12 +1219,14 @@
% \pnthechapternextnote ,
% \pnthesectionnextnote ,
% \pnthepage ,
+% \pnidnextnote ,
% }
% User facing variables, aimed at making available some of the notes' and
% sections' metadata for the user at specific contexts.
% \begin{macrocode}
\tl_new:N \pnthechapter
\tl_new:N \pnthesection
+\tl_new:N \pnidnextnote
\tl_new:N \pnthechapternextnote
\tl_new:N \pnthesectionnextnote
\tl_new:N \pnthepage
@@ -1360,6 +1379,7 @@
\@@_prop_get:nnN
{ \l_postnotes_print_note_id_tl }
{ thesection } \pnthesection
+ \tl_set:NV \pnidnextnote \l_@@_print_note_id_next_tl
\@@_prop_get:nnN
{ \l_@@_print_note_id_next_tl }
{ thechapter } \pnthechapternextnote
@@ -1382,13 +1402,13 @@
\tl_if_eq:NnF \l_@@_print_type_prev_tl { note }
{
\bool_if:NTF \l_@@_print_as_list_bool
- { \exp_args:Nx \begin { \l_@@_print_env_tl } }
+ { \exp_args:Ne \begin { \l_@@_print_env_tl } }
{ \group_begin: }
\l_@@_print_format_tl
}
\group_begin:
\UseHook { postnotes/print/note/begin }
- \@@_get_pageref:Nx \pnthepage
+ \@@_get_pageref:Ne \pnthepage
{ mark@ \l_postnotes_print_note_id_tl }
\@@_prop_get:nnN
{ \l_postnotes_print_note_id_tl }
@@ -1402,13 +1422,13 @@
\cs_set:Npn \@currentcounter { postnotetext }
\int_set:Nn \c@postnotetext
{ \l_@@_print_counter_tl }
- \cs_set:Npx \@currentlabel
+ \cs_set:Npe \@currentlabel
{ \p@postnote \l_@@_print_mark_tl }
\@@_text_mark_wrapper:n
{
\MakeLinkTarget*
{ postnote. \l_postnotes_print_note_id_tl .text }
- \@@_set_text_page_label:x
+ \@@_set_text_page_label:e
{ \l_postnotes_print_note_id_tl }
\@@_typeset_text_mark:eV
{ \l_postnotes_print_note_id_tl }
@@ -1438,7 +1458,7 @@
\tl_if_eq:NnF \l_@@_print_type_next_tl { note }
{
\bool_if:NTF \l_@@_print_as_list_bool
- { \exp_args:Nx \end { \l_@@_print_env_tl } }
+ { \exp_args:Ne \end { \l_@@_print_env_tl } }
{ \group_end: }
% \end{macrocode}
% Ensure \cs{par} at the end of \cs{printopostnotes} (see
@@ -1548,19 +1568,19 @@
\cs_new_protected:Npn \@@_verify_multipass:N #1
{
\group_begin:
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\seq_map_inline:Nn #1
{
- \@@_prop_get:nnN {##1} { multibool } \l_tmpa_tl
- \tl_if_eq:NnTF \l_tmpa_tl { true }
+ \@@_prop_get:nnN {##1} { multibool } \l_@@_tmpa_tl
+ \tl_if_eq:NnTF \l_@@_tmpa_tl { true }
{
\cs_if_exist:cT
{ \c_@@_ref_prefix_tl @ mark@ ##1 }
- { \seq_put_right:Nn \l_tmpa_seq {##1} }
+ { \seq_put_right:Nn \l_@@_tmpa_seq {##1} }
}
- { \seq_put_right:Nn \l_tmpa_seq {##1} }
+ { \seq_put_right:Nn \l_@@_tmpa_seq {##1} }
}
- \seq_gset_eq:NN #1 \l_tmpa_seq
+ \seq_gset_eq:NN #1 \l_@@_tmpa_seq
\group_end:
}
% \end{macrocode}
@@ -1578,19 +1598,20 @@
\group_begin:
\seq_gsort:Nn #1
{
- \@@_prop_get:nnN {##1} { pnsectid } \l_tmpa_tl
- \@@_prop_get:nnN {##2} { pnsectid } \l_tmpb_tl
- \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl
+ \@@_prop_get:nnN {##1} { pnsectid } \l_@@_tmpa_tl
+ \@@_prop_get:nnN {##2} { pnsectid } \l_@@_tmpb_tl
+ \tl_if_eq:NNTF \l_@@_tmpa_tl \l_@@_tmpb_tl
{
- \@@_prop_get:nnN {##1} { type } \l_tmpa_tl
- \@@_prop_get:nnN {##2} { type } \l_tmpb_tl
+ \@@_prop_get:nnN {##1} { type } \l_@@_tmpa_tl
+ \@@_prop_get:nnN {##2} { type } \l_@@_tmpb_tl
\bool_lazy_and:nnTF
- { \str_if_eq_p:Vn \l_tmpa_tl { note } }
- { \str_if_eq_p:Vn \l_tmpb_tl { note } }
+ { \str_if_eq_p:Vn \l_@@_tmpa_tl { note } }
+ { \str_if_eq_p:Vn \l_@@_tmpb_tl { note } }
{
- \@@_prop_get:nnN {##1} { sortnum } \l_tmpa_tl
- \@@_prop_get:nnN {##2} { sortnum } \l_tmpb_tl
- \fp_compare:nNnTF { \l_tmpa_tl } > { \l_tmpb_tl }
+ \@@_prop_get:nnN {##1} { sortnum } \l_@@_tmpa_tl
+ \@@_prop_get:nnN {##2} { sortnum } \l_@@_tmpb_tl
+ \fp_compare:nNnTF
+ { \l_@@_tmpa_tl } > { \l_@@_tmpb_tl }
{ \sort_return_swapped: }
{ \sort_return_same: }
}
@@ -1763,7 +1784,7 @@
\tl_clear:N \l_@@_prev_mark_name_tl
\seq_map_inline:Nn #1
{
- \exp_args:Nx \tl_if_eq:nnT
+ \exp_args:Ne \tl_if_eq:nnT
{ \@@_prop_item:nn {##1} { type } }
{ note }
{
@@ -1802,16 +1823,16 @@
% \begin{macrocode}
\tl_if_empty:NF \l_@@_prev_text_page_tl
{
- \prop_gput:Nxx \g_@@_header_page_last_prop
+ \prop_gput:Nee \g_@@_header_page_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_page_tl }
- \prop_gput:Nxx \g_@@_header_chap_last_prop
+ \prop_gput:Nee \g_@@_header_chap_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_chap_tl }
- \prop_gput:Nxx \g_@@_header_sect_last_prop
+ \prop_gput:Nee \g_@@_header_sect_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_sect_tl }
- \prop_gput:Nxx \g_@@_header_name_last_prop
+ \prop_gput:Nee \g_@@_header_name_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_name_tl }
}
@@ -1819,16 +1840,16 @@
%
% Set `first' values for current page, based on the current note ID.
% \begin{macrocode}
- \prop_gput:Nxx \g_@@_header_page_first_prop
+ \prop_gput:Nee \g_@@_header_page_first_prop
{ \l_@@_curr_text_page_tl }
{ \@@_extract_pageref:n { mark@ ##1 } }
- \prop_gput:Nxx \g_@@_header_chap_first_prop
+ \prop_gput:Nee \g_@@_header_chap_first_prop
{ \l_@@_curr_text_page_tl }
{ \@@_prop_item:nn {##1} { thechapter } }
- \prop_gput:Nxx \g_@@_header_sect_first_prop
+ \prop_gput:Nee \g_@@_header_sect_first_prop
{ \l_@@_curr_text_page_tl }
{ \@@_prop_item:nn {##1} { thesection } }
- \prop_gput:Nxx \g_@@_header_name_first_prop
+ \prop_gput:Nee \g_@@_header_name_first_prop
{ \l_@@_curr_text_page_tl }
{ \@@_prop_item:nn {##1} { pnsectname } }
% \end{macrocode}
@@ -1863,16 +1884,16 @@
% \begin{macrocode}
\tl_if_empty:NF \l_@@_prev_text_page_tl
{
- \prop_gput:Nxx \g_@@_header_page_last_prop
+ \prop_gput:Nee \g_@@_header_page_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_page_tl }
- \prop_gput:Nxx \g_@@_header_chap_last_prop
+ \prop_gput:Nee \g_@@_header_chap_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_chap_tl }
- \prop_gput:Nxx \g_@@_header_sect_last_prop
+ \prop_gput:Nee \g_@@_header_sect_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_sect_tl }
- \prop_gput:Nxx \g_@@_header_name_last_prop
+ \prop_gput:Nee \g_@@_header_name_last_prop
{ \l_@@_prev_text_page_tl }
{ \l_@@_prev_mark_name_tl }
}
@@ -1905,52 +1926,56 @@
{
\group_begin:
\prop_get:NnNTF \g_@@_header_page_first_prop
- {#1} \l_tmpa_tl
- { \tl_gset:NV \pnhdpagefirst \l_tmpa_tl }
+ {#1} \l_@@_tmpa_tl
+ { \tl_gset:NV \pnhdpagefirst \l_@@_tmpa_tl }
{ \tl_gset:NV \pnhdpagefirst \g_@@_header_prev_last_page_tl }
\prop_get:NnNTF \g_@@_header_page_last_prop
- {#1} \l_tmpa_tl
+ {#1} \l_@@_tmpa_tl
{
- \tl_gset:NV \pnhdpagelast \l_tmpa_tl
- \tl_gset:NV \g_@@_header_prev_last_page_tl \l_tmpa_tl
+ \tl_gset:NV \pnhdpagelast \l_@@_tmpa_tl
+ \tl_gset:NV \g_@@_header_prev_last_page_tl
+ \l_@@_tmpa_tl
}
{ \tl_gset:NV \pnhdpagelast \g_@@_header_prev_last_page_tl }
\prop_get:NnNTF \g_@@_header_chap_first_prop
- {#1} \l_tmpa_tl
- { \tl_gset:NV \pnhdchapfirst \l_tmpa_tl }
+ {#1} \l_@@_tmpa_tl
+ { \tl_gset:NV \pnhdchapfirst \l_@@_tmpa_tl }
{ \tl_gset:NV \pnhdchapfirst \g_@@_header_prev_last_chap_tl }
\prop_get:NnNTF \g_@@_header_chap_last_prop
- {#1} \l_tmpa_tl
+ {#1} \l_@@_tmpa_tl
{
- \tl_gset:NV \pnhdchaplast \l_tmpa_tl
- \tl_gset:NV \g_@@_header_prev_last_chap_tl \l_tmpa_tl
+ \tl_gset:NV \pnhdchaplast \l_@@_tmpa_tl
+ \tl_gset:NV \g_@@_header_prev_last_chap_tl
+ \l_@@_tmpa_tl
}
{ \tl_gset:NV \pnhdchaplast \g_@@_header_prev_last_chap_tl }
\prop_get:NnNTF \g_@@_header_sect_first_prop
- {#1} \l_tmpa_tl
- { \tl_gset:NV \pnhdsectfirst \l_tmpa_tl }
+ {#1} \l_@@_tmpa_tl
+ { \tl_gset:NV \pnhdsectfirst \l_@@_tmpa_tl }
{ \tl_gset:NV \pnhdsectfirst \g_@@_header_prev_last_sect_tl }
\prop_get:NnNTF \g_@@_header_sect_last_prop
- {#1} \l_tmpa_tl
+ {#1} \l_@@_tmpa_tl
{
- \tl_gset:NV \pnhdsectlast \l_tmpa_tl
- \tl_gset:NV \g_@@_header_prev_last_sect_tl \l_tmpa_tl
+ \tl_gset:NV \pnhdsectlast \l_@@_tmpa_tl
+ \tl_gset:NV \g_@@_header_prev_last_sect_tl
+ \l_@@_tmpa_tl
}
{ \tl_gset:NV \pnhdsectlast \g_@@_header_prev_last_sect_tl }
\prop_get:NnNTF \g_@@_header_name_first_prop
- {#1} \l_tmpa_tl
- { \tl_gset:NV \pnhdnamefirst \l_tmpa_tl }
+ {#1} \l_@@_tmpa_tl
+ { \tl_gset:NV \pnhdnamefirst \l_@@_tmpa_tl }
{ \tl_gset:NV \pnhdnamefirst \g_@@_header_prev_last_name_tl }
\prop_get:NnNTF \g_@@_header_name_last_prop
- {#1} \l_tmpa_tl
+ {#1} \l_@@_tmpa_tl
{
- \tl_gset:NV \pnhdnamelast \l_tmpa_tl
- \tl_gset:NV \g_@@_header_prev_last_name_tl \l_tmpa_tl
+ \tl_gset:NV \pnhdnamelast \l_@@_tmpa_tl
+ \tl_gset:NV \g_@@_header_prev_last_name_tl
+ \l_@@_tmpa_tl
}
{ \tl_gset:NV \pnhdnamelast \g_@@_header_prev_last_name_tl }
\group_end:
}
-\cs_generate_variant:Nn \@@_set_headers_vars:n { x }
+\cs_generate_variant:Nn \@@_set_headers_vars:n { e }
% \end{macrocode}
% \end{macro}
%
@@ -1974,13 +1999,13 @@
\cs_new_protected:Npn \@@_set_headers_vars_next:
{
\bool_if:NT \g_@@_header_vars_next_bool
- { \@@_set_headers_vars:x { \int_eval:n { \c@page + 1 } } }
+ { \@@_set_headers_vars:e { \int_eval:n { \c@page + 1 } } }
}
\cs_new_protected:Npn \@@_set_headers_vars_first:
{
- \@@_set_print_page_label:x
+ \@@_set_print_page_label:e
{ \int_use:N \g_@@_print_postnotes_int }
- \@@_set_headers_vars:x
+ \@@_set_headers_vars:e
{
\@@_extract_pageref:e
{ print@ \int_use:N \g_@@_print_postnotes_int }
@@ -2101,11 +2126,11 @@
% \begin{macrocode}
\AddToHook { postnotes/note/store } [ postnotes ]
{
- \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } }
+ \prop_gput:cne { \@@_data_name:e { \l_postnotes_note_id_tl } }
{ biblatex@refsection } { \int_use:N \c@refsection }
- \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } }
+ \prop_gput:cne { \@@_data_name:e { \l_postnotes_note_id_tl } }
{ biblatex@refsegment } { \int_use:N \c@refsegment }
- \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } }
+ \prop_gput:cne { \@@_data_name:e { \l_postnotes_note_id_tl } }
{ biblatex@refcontextbool }
{ \iftoggle { blx@refcontext } { true } { false } }
\prop_gput:cnV { \@@_data_name:e { \l_postnotes_note_id_tl } }
@@ -2149,7 +2174,7 @@
\togglefalse { blx@refcontext }
\tl_clear:N \blx@refcontext@labelprefix
\tl_clear:N \blx@refcontext@labelprefix@real
- \tl_set:Nx \blx@refcontext@sortingtemplatename { \blx@sorting }
+ \tl_set:Ne \blx@refcontext@sortingtemplatename { \blx@sorting }
\tl_set:Nn \blx@refcontext@sortingnamekeytemplatename { global }
\tl_set:Nn \blx@refcontext@uniquenametemplatename { global }
\tl_set:Nn \blx@refcontext@labelalphanametemplatename { global }
@@ -2246,10 +2271,10 @@
\tl_new:N \g_@@_biblatex_prev_refsection_tl
\AddToHook { postnotes/print/begin } [ postnotes ]
{
- \tl_set:Nx \l_@@_biblatex_orig_refsection_tl
+ \tl_set:Ne \l_@@_biblatex_orig_refsection_tl
{ \int_use:N \c@refsection }
- \tl_gset:Nx \g_@@_biblatex_prev_refsection_tl
- \l_@@_biblatex_orig_refsection_tl
+ \tl_gset:Ne \g_@@_biblatex_prev_refsection_tl
+ { \l_@@_biblatex_orig_refsection_tl }
}
\AddToHook { postnotes/print/note/begin } [ postnotes ]
{
@@ -2379,9 +2404,9 @@
{
\AddToHook { postnotes/note/store } [ postnotes ]
{
- \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } }
+ \prop_gput:cne { \@@_data_name:e { \l_postnotes_note_id_tl } }
{ zref-check@abschap } { \int_use:N \c@zc@abschap }
- \prop_gput:cnx { \@@_data_name:e { \l_postnotes_note_id_tl } }
+ \prop_gput:cne { \@@_data_name:e { \l_postnotes_note_id_tl } }
{ zref-check@abssec } { \int_use:N \c@zc@abssec }
}
\AddToHook { postnotes/print/note/begin } [ postnotes ]
diff --git a/macros/latex/contrib/postnotes/postnotes.ins b/macros/latex/contrib/postnotes/postnotes.ins
index 08c592ad16..8cac7bab06 100644
--- a/macros/latex/contrib/postnotes/postnotes.ins
+++ b/macros/latex/contrib/postnotes/postnotes.ins
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "postnotes".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files postnotes.dtx,
% postnotes.ins,
@@ -50,7 +49,7 @@
This file was generated from file(s) of the LaTeX package "postnotes".
-Copyright (C) 2022-2023 Gustavo Barros
+Copyright (C) 2022-2023 gusbrs
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -63,8 +62,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-This work is "maintained" (as per LPPL maintenance status) by
- Gustavo Barros.
+This work is "maintained" (as per LPPL maintenance status) by gusbrs.
This work consists of the files postnotes.dtx,
postnotes.ins,
diff --git a/macros/latex/contrib/robust-externalize/robust-externalize.pdf b/macros/latex/contrib/robust-externalize/robust-externalize.pdf
index a00bc94b37..cb3a4071e7 100644
--- a/macros/latex/contrib/robust-externalize/robust-externalize.pdf
+++ b/macros/latex/contrib/robust-externalize/robust-externalize.pdf
Binary files differ
diff --git a/macros/latex/contrib/robust-externalize/robust-externalize.sty b/macros/latex/contrib/robust-externalize/robust-externalize.sty
index 75d55b268c..3bf14a9f95 100644
--- a/macros/latex/contrib/robust-externalize/robust-externalize.sty
+++ b/macros/latex/contrib/robust-externalize/robust-externalize.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{robust-externalize}[2.1 Cache anything (tikz, latex, python) in a robust, efficient and pure way.]
+\ProvidesPackage{robust-externalize}[2.2 Cache anything (tikz, latex, python) in a robust, efficient and pure way.]
% todo:
% change order argument replace from list, it is hard to read this way
@@ -20,6 +20,11 @@
%%%%%%%%%%% Utils %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ExplSyntaxOn
+\NewDocumentCommand{\robExtIfWindowsTF}{mm}{%
+ \sys_if_platform_windows:TF {#1}{#2}%
+}
+\ExplSyntaxOff
% Debug function: by default, do nothing
\def\robExtDebugMessage#1{}
@@ -81,6 +86,8 @@
\cs_generate_variant:Nn \robExt_set_hash_robust:Nn { cn }
\cs_generate_variant:Nn \robExt_set_hash_robust:Nn { cx }
+\NewDocumentCommand{\robExt@set@hash@robust}{mm}{\robExt_set_hash_robust:Nn #1 {#2}}
+
% Double the number of hashes... quite dirty but cannot find any solution or the user need to double it itself
%% See also https://tex.stackexchange.com/questions/695432/latex3-latex-doubles-the-number-of-hashes-when-storing-them-in-string/695460#695460
\NewDocumentCommand{\robExtStrSetDoubleHash}{mm}{
@@ -1658,11 +1665,11 @@ if __name__ == '__main__':
\tl_set_rescan:NnV \robExtUserInputCacheMe {} \l__robExt_placeholder___ROBEXT_MAIN_CONTENT_ORIG___str
\fi
\robExt@normalBraces\robExtUserInputCacheMe
- \expandafter\robExt@getfromstringA\robExtUserInputCacheMe\end
+ \expandafter\robExt@getfromstringA\robExtUserInputCacheMe\robExt@getfromstringA%\robExt@getfromstringA is added to know when to stop
}
% https://tex.stackexchange.com/questions/700834/efficiently-program-search-of-macro-in-string/700844
-\def\robExt@getfromstringA#1{\ifx#1\end \else
+\def\robExt@getfromstringA#1{\ifx#1\robExt@getfromstringA \else
%\ifcsname L:\string#1\endcsname \addto\listmacros{#1}\fi
\robExtLoadAutoForwardMacroConfig{#1}%
\expandafter\robExt@getfromstringA\fi
@@ -1746,11 +1753,78 @@ if __name__ == '__main__':
\robExtAutoForwardMacro{#1}[#3]
}
+\NewDocumentCommand{\NewExpandableDocumentCommandAutoForward}{mmO{}m}{
+ \NewExpandableDocumentCommand{#1}{#2}{#4}
+ \robExtAutoForwardMacro{#1}[#3]
+}
+
+\NewDocumentCommand{\RenewExpandableDocumentCommandAutoForward}{mmO{}m}{
+ \RenewExpandableDocumentCommand{#1}{#2}{#4}
+ \robExtAutoForwardMacro{#1}[#3]
+}
+
+\NewDocumentCommand{\ProvideExpandableDocumentCommandAutoForward}{mmO{}m}{
+ \ProvideExpandableDocumentCommand{#1}{#2}{#4}
+ \robExtAutoForwardMacro{#1}[#3]
+}
+
+\NewDocumentCommand{\DeclareExpandableDocumentCommandAutoForward}{mmO{}m}{
+ \DeclareExpandableDocumentCommand{#1}{#2}{#4}
+ \robExtAutoForwardMacro{#1}[#3]
+}
+
\NewDocumentCommand{\defAutoForward}{mO{}mO{}}{
\def#1#2{#3}
\robExtAutoForwardMacro{#1}[#4]
}
+% \robExtGenericAutoForward[tikz]{string to match}[additional style to run]{
+% code to run in cached file if string matches, and to always run in current folder if not using
+% the star version
+% }
+\ExplSyntaxOff
+\NewDocumentCommand{\robExtGenericAutoForward}{sO{latex}mO{}m}{%
+ \IfBooleanTF{#1}{}{#5}% We run the code right now
+ \robExt@set@hash@robust\zxTmpMacro{#5}%
+ \robExtConfigure{%
+ add to preset={#2}{%
+ if matches word={#3}{
+ command if externalization/.append code={
+ \expanded{%
+ \noexpand\robExtAddBeforePlaceholder*{__ROBEXT_MAIN_CONTENT__}{%
+ \expandonce{\zxTmpMacro}%
+ % #1%%
+ }%
+ }%
+ },#4%
+ }%
+ }%
+ }%
+}
+\let\genericAutoForward\robExtGenericAutoForward
+
+% uses "if matches" instead of "if matches word"
+\NewDocumentCommand{\robExtGenericAutoForwardStringMatch}{sO{latex}mO{}m}{%
+ \IfBooleanTF{#1}{}{#5}% We run the code right now
+ \robExt@set@hash@robust\zxTmpMacro{#5}%
+ \robExtConfigure{%
+ add to preset={#2}{%
+ if matches={#3}{
+ command if externalization/.append code={
+ \expanded{%
+ \noexpand\robExtAddBeforePlaceholder*{__ROBEXT_MAIN_CONTENT__}{%
+ \expandonce{\zxTmpMacro}%
+ % #1%%
+ }%
+ }%
+ },#4%
+ }%
+ }%
+ }%
+}
+\let\genericAutoForwardStringMatch\robExtGenericAutoForwardStringMatch
+\ExplSyntaxOn
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Automatically forward (regex-based)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2119,6 +2193,25 @@ if __name__ == '__main__':
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
command if externalization/.code={},
fw/.style={forward=#1},
+ run code before main content if externalization enabled/.code={\message{#1}},
+ % run code before main content if externalization enabled/.code={
+ % \message{aaa #1}
+ % \def\zx@tmp{#1}%
+ % \message{xxx}
+ % \show\zx@tmp%
+ % \scantokens{%
+ % \pgfkeysalso{
+ % command if externalization/.append code={%
+ % \expanded{%
+ % \noexpand\robExtAddBeforePlaceholder*{__ROBEXT_MAIN_CONTENT__}{%
+ % % \expandonce{\zx@tmp}%
+ % #1%%
+ % }%
+ % }%
+ % }%
+ % }%
+ % },
+ % },
forward/.style={%
command if externalization/.append code={%
\robExtGetCommandDefinitionInMacro{#1}%
@@ -2186,6 +2279,7 @@ if __name__ == '__main__':
load auto forward macro config/.code={\robExtLoadAutoForwardMacroConfig{#1}},
%% This will
if matches regex/.code 2 args={\robExtIfMatchesRegex{#1}{#2}},
+ if matches word/.code 2 args={\robExtIfMatchesString{#1}{#2}},
if matches/.code 2 args={\robExtIfMatchesString{#1}{#2}},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Run code before/after inclusion %%%
@@ -2216,6 +2310,13 @@ if __name__ == '__main__':
\gdef\robExt@compile@parallel@after{#1}%
},
compile in parallel after/.default=0,
+ disable compile in parallel/.code={\let\robExt@compile@parallel@after\undefined},
+ if windows/.code={%
+ \robExtIfWindowsTF{\pgfkeysalso{zx@tmp@key/.estyle={\unexpanded{#1}},zx@tmp@key}}{}%
+ },
+ if unix/.code={%
+ \robExtIfWindowsTF{}{\pgfkeysalso{zx@tmp@key/.estyle={\unexpanded{#1}},zx@tmp@key}}%
+ },
compile in parallel command/.store in=\robExt@compile@parallel@command,
% Different backends to compile in parallel
compile in parallel with gnu parallel/.style={
@@ -2223,15 +2324,14 @@ if __name__ == '__main__':
},
compile in parallel with gnu parallel/.default={200\%},
compile in parallel with xargs/.style={
- compile in parallel command={xargs -t -a '\jobname-\robExtAddPrefixName{compile-missing-figures.sh}' -I "{}" -P #1 \robExtParallelShell\space '{}'},
+ % Use " instead of ' as Windows does not consider ' as a valid surrounding for strings
+ compile in parallel command={xargs -t -I "{}" -P #1 \robExtParallelShell\space "{}" < "\jobname-\robExtAddPrefixName{compile-missing-figures.sh}"},
},
+ % With 0 it spawns as many shells at possible, i.e. it compiles all 200 pictures at the same time, making the
+ % system a laggy, and it is actually *slower* (2:05mn vs 1:15mn) than when using 16 threads.
compile in parallel with xargs/.default={16},
% By default, we compile with xargs and 16 processes:
compile in parallel with xargs,
- compile in parallel with rush/.style={
- compile in parallel command={rush -i "\jobname-\robExtAddPrefixName{compile-missing-figures.sh}" #1 "\robExtParallelShell\space '{}'"},
- },
- compile in parallel with rush/.default={},
}
\ExplSyntaxOn
@@ -2309,7 +2409,7 @@ if __name__ == '__main__':
\NewDocumentCommand{\robExtCacheMe}{O{}m}{%
{% Group
%% We store the input in a non-string element for efficiently implementing "auto forward"
- \def\robExtUserInputCacheMe{#2}
+ \edef\robExtUserInputCacheMe{\unexpanded{#2}}% \unexpanded is needed if the macro contains a #1
\pgfkeys{%
/robExt/.cd,%
set placeholder={__ROBEXT_MAIN_CONTENT_ORIG__}{#2},%
diff --git a/macros/latex/contrib/robust-externalize/robust-externalize.tex b/macros/latex/contrib/robust-externalize/robust-externalize.tex
index f02f525626..58d64342c5 100644
--- a/macros/latex/contrib/robust-externalize/robust-externalize.tex
+++ b/macros/latex/contrib/robust-externalize/robust-externalize.tex
@@ -94,7 +94,7 @@
{\Large\bfseries Cache anything (\tikzname, tikz-cd, python…),\\in a robust, efficient and pure way.}
\vspace{1em}
- {Léo Colisson \quad Version 2.1}\\[3mm]
+ {Léo Colisson \quad Version 2.2}\\[3mm]
{\href{https://github.com/leo-colisson/robust-externalize}{\texttt{github.com/leo-colisson/robust-externalize}}}
\end{center}
@@ -118,7 +118,7 @@ This library allows you to cache any language: not only \LaTeX{} documents and \
enable fallback to manual mode,
}
\end{verbatim}
-Then type something like this (note the |C| for |cached| at the end of |tikzpictureC|, see below to override the original command), and compile with |pdflatex -shell-escape yourfile.tex| (or \textcolor{red}{\textbf{read below if you do not want to use }}|-shell-escape|):
+Then type something like this (note the |C| for |cached| at the end of |tikzpictureC|, see below to override the original command), and compile with |pdflatex -shell-escape yourfile.tex| (or \textcolor{red}{\textbf{read below if you do not want to use }}|-shell-escape|\textcolor{red}{\textbf{ (note that overleaf enables shell-escape by default, and it not needed once all pictures are cached)}}):
\begin{codeexample}[width=0pt,vbox]
\robExtConfigure{
add to preset={tikz}{
@@ -2794,14 +2794,14 @@ but also with colors defined with |\colorlet|:
\node[fill=myviolet,yshift=-1cm]{B};
\end{tikzpictureC}
\end{codeexample}
-Note that using |if matches|, you can also automatically forward colors:
+Note that using |if matches word|, you can also automatically forward colors:
\begin{codeexample}[width=0pt]
\definecolor{myred}{HTML}{F01122}
\colorlet{myviolet}{blue!50!myred}
\colorlet{mypink}{pink!90!orange}
\robExtConfigure{
add to preset={tikz}{
- if matches={mypink}{forward color=mypink},
+ if matches word={mypink}{forward color=mypink},
},
}
\begin{tikzpictureC}
@@ -2846,6 +2846,7 @@ but since this is a bit long to type, we provide a shortcut:
\MyGreenNode[xshift=8cm]{but not if the (unused) MyNode is changed.}
\end{tikzpicture}
\end{codeexample}
+
\end{pgfmanualentry}
\begin{pgfmanualentry}
@@ -2872,7 +2873,13 @@ but since this is a bit long to type, we provide a shortcut:
\extractcommand\RenewDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
\extractcommand\ProvideDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
\extractcommand\DeclareDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
+ \extractcommand\NewExpandableDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
+ \extractcommand\RenewExpandableDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
+ \extractcommand\ProvideExpandableDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
+ \extractcommand\DeclareExpandableDocumentCommandAutoForward\marg{macro}\marg{arg spec}\opt{\oarg{additional style}}\marg{definition}\@@
\extractcommand\defAutoForward\marg{macro}\opt{\oarg{def-style arg spec}}\marg{macro}\opt{\oarg{additional style}}\@@
+ \extractcommand\genericAutoForward\opt{*}\opt{\oarg{preset}}\marg{string to match}\opt{\oarg{additional style}}\marg{code to execute}\@@
+ \extractcommand\genericAutoForwardStringMatch\opt{*}\opt{\oarg{preset}}\marg{string to match}\opt{\oarg{additional style in preset}}\opt{\oarg{additional style outside preset}}\marg{code to execute}\@@
\pgfmanualbody
\begin{verbatim}
\newcommandAutoForward{\macro}[nb args][default value]{def}[STYLE]
@@ -2885,7 +2892,57 @@ but since this is a bit long to type, we provide a shortcut:
\begin{verbatim}
\configIfMacroPresent{\macro}{forward=\macro,STYLE}
\end{verbatim}
- to automatically forward the macro if it is used. This works similarly for other commands (note that for |\defAutoForward|, you need to put the arguments in a bracket, like |\defAutoForward\myMacro[#1 and #2]{Hey #1, #2}| for |\def\myMacro#1 and #2{Hey #1, #2}|).
+ to automatically forward the macro if it is used. It is really practical to automatically define a macro and forward it:
+\begin{codeexample}[vbox]
+\cacheTikz
+\robExtConfigure{add to preset={tikz}{auto forward}}
+
+\newcommandAutoForward{\MyName}{\ding{164} Alice}[add to preamble={\usepackage{pifont}}]
+\newcommandAutoForward{\MyNode}[2][draw,thick]{\node[rounded corners,fill=green,#1]{\MyName: #2};}[
+ load auto forward macro config=\MyName
+]
+
+\begin{tikzpicture}
+ \MyNode{Recompiled only if MyNode is changed}
+ \MyNode[yshift=-1cm]{or if MyName is changed}
+\end{tikzpicture}
+\end{codeexample}
+
+ This works similarly for other commands (note that for |\defAutoForward|, you need to put the arguments in a bracket, like |\defAutoForward\myMacro[#1 and #2]{Hey #1, #2}| for |\def\myMacro#1 and #2{Hey #1, #2}|). |\genericAutoForward| and |\genericAutoForwardStringMatch| are a bit special (for now these two commands are alias, but only use the first one if the string is surrounded by non-letter characters as we plan to make that special case more efficient later as it uses internally |if matches word|), as it can be used to run any code assuming that |string to match| is present. For instance, you can use it to automatically forward the code that defines a new tikz style assuming |mystyle| is preset:
+\begin{codeexample}[width=0pt]
+\cacheTikz
+\genericAutoForward{mystyle}{
+ \tikzset{mystyle/.style={fill=#1!10!white,text=#1!50!black}}
+}
+
+\begin{tikzpicture}
+ \node[mystyle=green]{A};
+\end{tikzpicture}
+\end{codeexample}
+This will also run the code to define it in the current document (practical for instance if some pictures are not externalized), use the stared version of |\genericAutoForward| if you do not want to run the code in the current document. By default, the code is added to the |latex| preset, but you can choose another preset if you want using the optional option. The additional style might be specified to run other style if the matches is true. Note that you should be able to use definitions inside the code (a bug in v2.1 was making this code fail):
+\begin{codeexample}[width=0pt]
+\genericAutoForward{mystyle}{
+ \tikzset{mystyle/.style={fill=#1!10!white,text=#1!50!black}}
+}
+\newcommandAutoForward{\myName}{Alice}
+\robExtConfigure{
+ add to preset={tikz}{
+ auto forward, % not needed for genericAutoForward, but for newcommandAutoForward
+ if matches word={pmatrix}{add to preamble={\usepackage{amsmath}}}
+ }
+}
+
+\begin{tikzpicture}
+ \node[mystyle=green]{%
+ \def\hey#1{Hey #1 :)}% You can define macros inside the cached elements
+ \hey{Coucou \myName} %
+ $\begin{pmatrix}% Fixing a bug introduced in v2.1, we can also use macros
+ A & B\\
+ C & D\\
+ \end{pmatrix}$
+ };
+\end{tikzpicture}
+\end{codeexample}
\end{pgfmanualentry}
\begin{pgfmanualentry}
@@ -2915,10 +2972,11 @@ but since this is a bit long to type, we provide a shortcut:
\makeatletter%
\def\extrakeytext{style, }
\extractkey/robExt/if matches=\marg{string}\marg{style to apply}\@nil
+ \extractkey/robExt/if matches word=\marg{string}\marg{style to apply}\@nil
\extractkey/robExt/if matches regex=\marg{latex3 regex}\marg{style to apply}\@nil
\makeatother%
\pgfmanualbody
- Apply the corresponding style if the string (resp.\ regex in \LaTeX{}3 format) matches is matched in the content. The regex version can be more expressive, but is wayyy slower.
+ Apply the corresponding style if the string (resp.\ regex in \LaTeX{}3 format) matches is matched in the content. As of today, |if matches word| and |if matches| are equivalent, but I plan to make |if watches word| more efficient\footnote{Scaling with $O(s)$ instead of $O(sn)$, where $s$ is the size of the string typed in |cacheMe| and $n$ is the number of times |if matches| is used, for instance when replacing multiple strings.}, and make it only match words that are made of consecutive letters |[A-Za-z]|. The regex version can be more expressive, but is significantly slower (it can easily multiply by 2 the compilation time).
\begin{codeexample}[vbox]
\robExtConfigure{
add to preset={my python}{
@@ -3014,7 +3072,7 @@ Note that if you do not want to display the first cached file, you can use |do n
compile in parallel
}
\end{codeexample}
-will cause the cached elements to be compiled in parallel (this requires two compilations of the main project). For this to work out of the box, you need to have GNU |parallel| installed (on linux or Mac) or rush (\url{https://github.com/shenwei356/rush/}) on Windows. Typing |compile in parallel after=3| will start the compilation in parallel only if you have more than 3 new elements to compile, and compile the first 3 elements normally (useful when you work on one picture at a time since you do not need to compile twice the document).
+will cause the cached elements to be compiled in parallel (this requires two compilations of the main project). For this to work out of the box, you need to have |xargs| installed (on windows, install the lightweight GNU On Windows (Gow) \url{https://github.com/bmatzelle/gow} to get |xargs|). Typing |compile in parallel after=3| will start the compilation in parallel only if you have more than 3 new elements to compile, and compile the first 3 elements normally (useful when you work on one picture at a time since you do not need to compile twice the document).
\end{pgfmanualentry}
\begin{pgfmanualentry}
@@ -3023,7 +3081,6 @@ will cause the cached elements to be compiled in parallel (this requires two com
\extractkey/robExt/compile in parallel command=\marg{command to run}\@nil
\extractkey/robExt/compile in parallel with xargs=\opt{number threads} (default 16\%)\@nil
\extractkey/robExt/compile in parallel with gnu parallel=\opt{--jobs option} (default 200\%)\@nil
- \extractkey/robExt/compile in parallel with rush=\opt{additional options} (default )\@nil
\makeatother%
\pgfmanualbody
You can customize the compilation command to run via something like:
@@ -3034,7 +3091,7 @@ will cause the cached elements to be compiled in parallel (this requires two com
},
}
\end{codeexample}
-The other styles are predefined commands to compile with xargs (by default, already installed in linux, on Windows you can get it by installing the lightweight GNU On Windows (Gow) \url{https://github.com/bmatzelle/gow}), gnu parallel, or rush (\url{https://github.com/shenwei356/rush/}). You can use these commands directly like:
+The other styles are predefined commands to compile with xargs (by default, already installed in linux, on Windows you can get it by installing the lightweight GNU On Windows (Gow) \url{https://github.com/bmatzelle/gow}) or gnu parallel. You can use these commands directly like:
\begin{codeexample}[code only]
\robExtConfigure{
compile in parallel with gnu parallel
@@ -3048,6 +3105,24 @@ or use the optional parameter to configure the number of threads (xargs starts w
\end{codeexample}
\end{pgfmanualentry}
+\begin{pgfmanualentry}
+ \makeatletter%
+ \def\extrakeytext{style, }
+ \extractkey/robExt/if unix=\marg{style to run if running linux or unix}\@nil
+ \extractkey/robExt/if windows=\marg{style to run if windows}\@nil
+ \makeatother%
+ \pgfmanualbody
+ Since windows does not pack |xparse| by default, you might want to enable parallel compilation only in Linux/MacOs. This can be done using the above flags, like:
+\begin{codeexample}[code only]
+\robExtConfigure{
+ if unix={
+ compile in parallel
+ },
+}
+\end{codeexample}
+(note that |unix| is understood as ``non windows'', i.e.\ would run in Unix/Linux/MacOs)
+\end{pgfmanualentry}
+
NB: in version smaller than v2.1 (or if you prefer the manual method), you can instead run it in manual mode and use for instance GNU |parallel| (or any tool of you choice) to run all commands in the file |\jobname-robExt-compile-missing-figures.sh| in parallel. To do that:
\begin{itemize}
\item First add |\robExtConfigure{enable manual mode}| in your file
@@ -3948,7 +4023,9 @@ In order to know when to stop replacing placeholders earlier (i.e.\ without runn
\begin{itemize}
\item See how to deal with label, links and cite inside pictures (without disabling externalization). For label and links, I have a proof of concept, I ``just'' need to write it down. \url{https://tex.stackexchange.com/questions/695277/clickable-includegraphics-for-cross-reference-data}
\item Deal with remember picture
-\item Since externalizing is all about speed, it would be nice to do more benchmarks.
+\item Since externalizing is all about speed, it would be nice to do more benchmarks. But overall, it seems fairly optimized, at least when using the compiled presets.
+\item Add a way to forward tikz styles and/or arbitrary code.
+\item Create a more efficient/precise way to check if a word is present than string ``is in''. Indeed, for now for each color/... to export, we check if the string contains this word, which scales like $O(sn)$ where $s$ is the size of the string and $n$ is the number of colors etc to export. Instead, I'd like to run it in $O(s)$ by extracting all words a single time, and then checking if this word exists or not. This is not an issue for |\newcommandAutoforward|, but could be an issue when exporting many colors or |\genericAutoForward|.
\end{itemize}
\section{Acknowledgments}
@@ -3958,7 +4035,17 @@ I am deeply indebted to many users on \url{tex.stackexchange.com} that made the
\section{Changelog}
\begin{itemize}
-\item future v2.1 (master on github, not released yet on CTAN):
+\item Future v2.3 (master on github, not released yet on CTAN):
+\item v2.2
+ \begin{itemize}
+ \item v2.1 introduced two important bugs where hashes could not be used in a |\cacheMe| environment, and |auto forward| was not working if the string was containing an environment. This is fixed now.
+ \item Fix issue with |compile in parallel| on MacOs (xargs there is not GNU xargs and is missing |-a| option)
+ \item Added |*ExpandableDocumentCommandAutoForward|.
+ \item Added |\genericAutoForward| to forward arbitrary code.
+ \item Added |if windows| and |if unix| tests.
+ \item Added details on the future difference between |if matches| and |if matches word|.
+ \end{itemize}
+\item v2.1:
\begin{itemize}
\item Fix a bug when compiling the main document with lualatex or xelatex
\item Fix a bug when compiling a template that was not exporting dependencies
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf
new file mode 100644
index 0000000000..530ec3542d
--- /dev/null
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex
new file mode 100644
index 0000000000..9793f8c7e1
--- /dev/null
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc-fr.tex
@@ -0,0 +1,365 @@
+% !TeX TXS-program:compile = txs:///pdflatex
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{sim-os-menus}
+\usepackage{graphicx}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{hyperref}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+%\rhead{\sffamily\small\affloetalab[Legende]}
+\lfoot{\sffamily\small [sim-os-menus]}
+\rfoot{\sffamily\small - \thepage{} -}
+%\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.1}
+\def\TPdate{14/11/2023}
+\usepackage{soul}
+\sethlcolor{lightgray!25}
+\NewDocumentCommand\MontreCode{ m }{%
+ \hl{\vphantom{\texttt{pf}}\texttt{#1}}%
+}
+\usepackage[french]{babel}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{sim-os-menus [fr]}}\\
+ \\
+ {\LARGE Présenter un 'terminal', une 'visionneuse'} \\
+ {\LARGE ou un 'menu contextuel' comme sur un ordi.} \\
+ \\
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{tabular}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/sim-os-menus}} \\
+\end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\MenuContextuel[Police=\sffamily,ListeSeps={1,3/1/4/1/},ListeDecals={1,2,1,0}]{%
+ Menu1(>),Menu2,Menu3(>)(*),Menu4 §
+ SousMenuA(>),SousMenuB(>)(*) §
+ SousSousMenu1,SousSousMenu2,SousSousMenu3(>)(*),SousSousMenu4,SousSousMenu5(>) §
+ SSSSMa,SSSSMa(>)(*),SSSSMc §
+ OK(*),KO
+}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{TerminalUnix}[largeur=12cm,Align=center]{}
+test@DESKTOP:~$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TerminalUnix}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{VisionnIMG}[Largeur=12cm]{}
+\includegraphics[width=5cm]{example-image-b}
+\end{VisionnIMG}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{TerminalMac}[Largeur=14cm,Align=flush left]{}
+[test@server]$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TerminalMac}
+\end{tcolorbox}
+
+\vfill~
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+\hrule
+
+\vspace*{5mm}
+
+\section{Introduction}
+
+\subsection{Description}
+
+Avec ce packages, il est possible de créer un \og faux \fg{} terminal, ou un \og faux \fg{} menu contextuel, ou encore une \og fausse \fg{} visionneuse, comme sur un écran d'ordinateur !
+
+Les styles sont \textit{globalement} fixés, mais quelques personnalisations sont possibles.
+
+\subsection{Chargement}
+
+Pour charger le package, il suffit d'ajouter dans le préambule :
+
+\begin{quote}
+\begin{verbatim}
+\usepackage{sim-os-menus}
+\end{verbatim}
+\end{quote}
+
+Les packages utiles, et chargés sont :
+
+\begin{itemize}
+ \item \MontreCode{tikz} (avec \MontreCode{calc,positioning}), \MontreCode{pgf}, \MontreCode{pgffor} ;
+ \item \MontreCode{calc}, \MontreCode{fontawesome5} ;
+ \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{listofitems}, \MontreCode{xstring} ;
+ \item \MontreCode{settobox}, \MontreCode{tabularray} ;
+ \item \MontreCode{tcolorbox} (avec \MontreCode{breakable,fitting,skins,listings,listingsutf8,hooks}).
+\end{itemize}
+
+\vfill
+
+\subsection{Historique}
+
+\begin{quote}
+\begin{verbatim}
+0.1.1 : Ajout des commandes en [fr]
+0.1.0 : Version initiale
+\end{verbatim}
+\end{quote}
+
+\pagebreak
+
+\section{Les commandes disponibles}
+
+\subsection{Menu contextuel}
+
+Dans le but de créer un menu contextuel, la commande est :
+
+\begin{quote}
+\begin{verbatim}
+%----menu contextuel
+\MenuContextuel[clés]{liste des items}<options tikz>
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+ \item \MontreCode{CoulFond} := couleur du fond ;
+ \item \MontreCode{CoulSurlig} : = couleur du surlignage ;
+ \item \MontreCode{Arrondi} := booléen pour arrondir les coins (\MontreCode{true} par défaut) ;
+ \item \MontreCode{Police} := police pour les items (\MontreCode{\textbackslash normalsize\textbackslash normalfont} par défaut) ;
+ \item \MontreCode{CoulItems} := couleur(s) des items (\MontreCode{black} par défaut) ;
+ \item \MontreCode{MargeV} := marge verticale des lignes (\MontreCode{6pt} par défaut) ;
+ \item \MontreCode{MargeH} := marge horizontale des lignes (\MontreCode{12pt} par défaut) ;
+ \item \MontreCode{Fleche} := caractère pour la flèche (\MontreCode{\textbackslash faCaretRight} par défaut) ;
+ \item \MontreCode{ListeSeps} := liste des éventuels séparateurs (vide ou pour tous les niveaux !) ;
+ \item \MontreCode{ListeIcones} := liste des éventuelles icones (vide ou pour tous les niveaux/items !) ;
+ \item \MontreCode{ListeDecals} := liste des éventuels décalages verticaux pour les sous-menus (à partir du n°2, \ldots !) (vide ou pour tous les sous-niveaux !) ;
+ \item \MontreCode{Icones} := booléen pour afficher les icones (\MontreCode{false} par défaut) ;
+ \item \MontreCode{Barre} := booléen pour une petite barre verticale après les éventuelles icones small vertical bar with icons (\MontreCode{true} par défaut) ;
+ \item \MontreCode{Space} := espacement horizontal entre les sous-menus (\MontreCode{-0.125} par défaut).
+\end{itemize}
+
+\medskip
+
+L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à la liste des items, sous la forme :
+
+\smallskip
+
+\hfill\MontreCode{item1A,item1B,... § item2A,itemp2B,... § ...}\hfill~
+
+\begin{itemize}
+ \item si un item se termine par \MontreCode{(*)}, cela correspond au \textit{début} du sous-menu suivant (\underline{un seul} par niveau !) ;
+ \item si un item se termine par \MontreCode{(>)} (\underline{avant} un éventuel \MontreCode{(*)}), une \textit{flèche} est écrite à la fin de la ligne de l'item.
+\end{itemize}
+
+Une syntaxe correcte est fondamentale pour que le code présente correctement le menu contextuel !
+
+\vspace{5mm}
+
+Quelques conseils, du fait des \textsf{clés sensibles} \MontreCode{ListeIcones}, \MontreCode{ListeDecals} et \MontreCode{ListeSeps} :
+
+\begin{itemize}
+ \item \MontreCode{ListeIcones} doit avoir le même nombre d'éléments que le nombre de menus/items (avec des items vides possibles) ;
+ \item \MontreCode{ListeSeps} doit avoir le même nombre d'éléments que le nombre de niveaux (avec des niveaux vides possibles) ;
+ \item \MontreCode{ListeDecals} doit avoir le même nombre d'éléments que le nombre de sous-menus (Avec 0 si pas de décalage !).
+\end{itemize}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%style par défaut
+\MenuContextuel{Item1A(>),Item1B,Item1C(>)(*),Item1D § Item2A(*),Item2B(>),Item2C}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%style personnalisé
+\MenuContextuel[Arrondi=false,CoulFond=yellow,CoulSurlign=teal,%
+ ListeSeps={1,3/2},CoulItems={black/white},Icones,Espacement=0,%
+ ListeIcones={\faCut,\faIcon[regular]{copy},\faCopy,\faPaste / \faNotEqual}]
+ {Item1A(>)(*),Item1B,Item1C(>),Item1D § Item2A(*),Item2B(>),Item2C}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\MenuContextuel[Police=\sffamily,ListeSeps={1,3/1/4/1/},ListeDecals={1,2,1,0}]{%
+ Menu1(>),Menu2,Menu3(>)(*),Menu4 §
+ SousMenuA(>),SousMenuB(>)(*) §
+ SousSousMenu1,SousSousMenu2,SousSousMenu3(>)(*),SousSousMenu4,SousSousMenu5(>) §
+ SSSSMa,SSSSMa(>)(*),SSSSMc §
+ OK(*),KO
+}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Terminal}
+
+Pour créer un \og faux \fg{} terminal (Win/UNiX/Mac), les environnements sont :
+
+\begin{quote}
+\begin{verbatim}
+%----Terminal Windows
+\begin{TerminalWin}[clés]{options tcbox}
+ ...
+\end{TerminalWin}
+
+%----Terminal UNiX
+\begin{TerminalUnix}[clés]{options tcbox}
+ ...
+\end{TerminalUnix}
+
+%----Terminal OSX
+\begin{TerminalMac}[clés]{options tcbox}
+ ...
+\end{TerminalMac}
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+ \item \MontreCode{Titre} := titre du terminal (\MontreCode{Terminal Win/UNiX/Mac} par défaut) ;
+ \item \MontreCode{Align} := alignement horizontal (paragraphe) du terminal (\MontreCode{center} par défaut) ;
+ \item \MontreCode{Largeur} := largeur du terminal (\MontreCode{\textbackslash linewidth} par défaut) ;
+ \item \MontreCode{Icones} := booléen pour afficher des icones (\MontreCode{true} par défaut).
+\end{itemize}
+
+\medskip
+
+L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à des options spécifiques, à passer à la \textsf{tcolorbox}.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TerminalWin}{}
+Microsoft Windows [version 10.0.22000.493]
+(c) Microsoft Corporation. Tous droits réservés.
+C:\Users\test>ping ctan.org
+Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données :
+Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=37 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=39 ms TTL=51
+Statistiques Ping pour 5.35.249.60:
+Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
+Durée approximative des boucles en millisecondes :
+Minimum = 35ms, Maximum = 39ms, Moyenne = 36ms
+\end{TerminalWin}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TerminalUnix}[Align=flush right]{hbox}
+test@DESKTOP:~$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TerminalUnix}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TerminalMac}[Largeur=14cm,Align=flush left]{}
+[test@server]$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TerminalMac}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Visionneuses}
+
+Pour créer une \og fausse\fg{} visionneuse, les environnements sont :
+
+\begin{quote}
+\begin{verbatim}
+%----Visionneuse PDF
+\begin{VisionnPDF}[clés]{options tcbox}
+ ....
+\end{VisionnPDF}
+
+%----Visionneuse d'images
+\begin{VisionnIMG}[clés]{options tcbox}
+ ....
+\end{VisionnIMG}
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+ \item \MontreCode{Titre} := titre du terminal (\MontreCode{Terminal Win/UNiX/Mac} par défaut) ;
+ \item \MontreCode{Align} := alignement horizontal (paragraphe) de la visionneuse (\MontreCode{center} par défaut) ;
+ \item \MontreCode{AlignH} := alignement horizontal (du contenu) de la visionneuse (\MontreCode{center} par défaut) ;
+ \item \MontreCode{Largeur} := largeur de la visionneuse (\MontreCode{\textbackslash linewidth} par défaut) ;
+ \item \MontreCode{Icones} := booléen pour afficher des icones (\MontreCode{true} par défaut).
+\end{itemize}
+
+\medskip
+
+L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à des options spécifiques, à passer à la \textsf{tcolorbox}.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{VisionnPDF}{hbox}
+\fbox{\includegraphics[page=35,width=6cm]{ProfLycee-doc.pdf}}%
+\fbox{\includegraphics[page=36,width=6cm]{ProfLycee-doc.pdf}}
+\end{VisionnPDF}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{VisionnPDF}[Largeur=14cm,Icones=false]{}
+\fbox{\includegraphics[page=65,width=4.75cm]{ProfLycee-doc.pdf}}
+\end{VisionnPDF}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{VisionnIMG}[Icones=false]{hbox}
+\includegraphics[width=5cm]{example-image-b}
+\end{VisionnIMG}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{VisionnIMG}[Largeur=12cm]{}
+\includegraphics[width=3cm]{example-image}
+\end{VisionnIMG}
+\end{tcblisting}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
index d7e7c69c9b..6550a4c0d5 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
index 677a0883c5..229d363700 100644
--- a/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
+++ b/macros/latex/contrib/sim-os-menus/doc/sim-os-menus-doc.tex
@@ -23,8 +23,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{13/11/2023}
+\def\TPversion{0.1.1}
+\def\TPdate{14/11/2023}
\usepackage{soul}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
@@ -146,6 +146,7 @@ The package loads the packages :
\begin{quote}
\begin{verbatim}
+0.1.1 : French version of the commands
0.1.0 : Initial version
\end{verbatim}
\end{quote}
diff --git a/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty b/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
index 2271b338d0..01da065abb 100644
--- a/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
+++ b/macros/latex/contrib/sim-os-menus/tex/sim-os-menus.sty
@@ -2,8 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{sim-os-menus}[2023/11/13 0.1.0 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox]
-%0.1.0 Initial version
+\ProvidesPackage{sim-os-menus}[2023/11/14 0.1.1 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox (en of fr commands)]
+% 0.1.1 French version of the commands
+% 0.1.0 Initial version
%====PACKAGES
\RequirePackage{tikz,pgf,pgffor}
@@ -19,10 +20,12 @@
\RequirePackage{tcolorbox}
\tcbuselibrary{breakable,fitting,skins,listings,listingsutf8,hooks}
-%****CONTEXTMENU****
-%====USEFULL
+%====USEFULL DATA
+%****CONTEXTMENU
\definecolor{ColBackContextMenu}{HTML}{f0f0f0}%
\definecolor{ColHLContextMenu}{HTML}{90c8f6}%
+\definecolor{CoulFondMenuContext}{HTML}{f0f0f0}%
+\definecolor{CoulSurligMenuContext}{HTML}{90c8f6}%
\newlength{\ContMenOffsetIcon}\setlength{\ContMenOffsetIcon}{0pt}
\newlength{\ContMenOffsetArrow}\setlength{\ContMenOffsetArrow}{1em}
\newlength{\ContMenOffsetV}\setlength{\ContMenOffsetV}{6pt}
@@ -31,7 +34,100 @@
\newlength{\ContMenHgth}\newlength{\ContMenHgthTmp}
\newsavebox{\maboitemenucontext}
\newsavebox{\maboitelogomenucontext}
+%****TERMINAL
+\definecolor{Termmpurple}{RGB}{48,10,36}
+\definecolor{Termmgray}{RGB}{70,72,67}
+\definecolor{Termogray}{RGB}{148,147,141}
+\definecolor{Termoorange}{RGB}{233,101,56}
+\definecolor{Termterminal}{RGB}{80,78,70}
+\definecolor{Termlinux}{RGB}{0,39,51}
+\definecolor{Termwinblue}{HTML}{1883D7}
+\definecolor{Termosxgray}{HTML}{D8D6D9}
+\definecolor{Termosxgreen}{HTML}{1F8B36}
+\tcbset{StyleTermWindows/.style={%
+ enhanced,boxrule=1pt,arc=1pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=Termwinblue,colback=black,colbacktitle=white,colupper=white,coltitle=black,%
+ titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
+ fonttitle=\bfseries\small\sffamily
+ }
+}
+\newcommand\TermWinComm{%
+ \begin{tikzpicture}[thick,scale=0.66]
+ \draw (0,0.5em)--++(1em,0) ; \draw[rounded corners=0.05em] (2em,0) rectangle++ (0.8em,0.8em) ; \draw[rounded corners=0.05em] (2.2em,0.2em) rectangle++ (0.8em,0.8em) ; \draw (4em,1em)--(5em,0) (4em,0)--(5em,1em) ;
+ \end{tikzpicture}%
+}
+\newcommand{\TermUbuntuWhite}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[Termmgray] (0,0.25em) circle[radius=0.5em] ;
+ \end{tikzpicture}%
+}
+\newcommand{\TermUbuntuMin}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[color=Termogray!50!white] (0,0.25em) circle[radius=0.5em];
+ \draw[Termterminal](-0.35em,0.25em)--(0.35em,0.25em);
+ \end{tikzpicture}%
+}
+\newcommand{\TermUbuntuClose}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[color=Termoorange!70!white] (0,0.25em) circle[radius=0.5em];
+ \draw[Termterminal] (-0.32em,-0.07em)--(0.32em,0.57em);
+ \draw[Termterminal] (-0.32em,0.57em)--(0.32em,-0.07em);
+ \end{tikzpicture}%
+}
+\newcommand{\TermUbuntuMax}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[color=Termogray!50!white] (0,0.25em) circle[radius=0.5em];
+ \draw[Termterminal] (-0.32em,0.5em) rectangle (0.32em,0);
+ \end{tikzpicture}%
+}
+\tcbset{StyleTermUniX/.style={%
+ enhanced,boxrule=1pt,arc=4pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=Termmgray,colback=Termmpurple,colbacktitle=Termmgray,colupper=white,coltitle=white,%
+ titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
+ fonttitle=\bfseries\small\sffamily
+ }
+}
+\tcbset{StyleTermOSX/.style={%
+ enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=Termosxgray,colback=lightgray!15,colbacktitle=Termosxgray,colupper=black,coltitle=black,%
+ titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
+ fonttitle=\bfseries\small\sffamily
+ }
+}
+\newcommand{\TermOSXRed}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[red] (0,0.25em) circle[radius=0.45em] ;
+ \end{tikzpicture}%
+}
+\newcommand{\TermOSXOrange}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[orange] (0,0.25em) circle[radius=0.45em] ;
+ \end{tikzpicture}%
+}
+\newcommand{\TermOSXgreen}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[Termosxgreen] (0,0.25em) circle[radius=0.45em] ;
+ \end{tikzpicture}%
+}
+\newcommand{\TermOSXLG}{%
+ \begin{tikzpicture}[thick,anchor=base,baseline]
+ \filldraw[Termosxgray] (0,0.25em) circle[radius=0.45em] ;
+ \end{tikzpicture}%
+}
+%****VIEWERS
+\tcbset{StylePDFViewer/.style={%
+ enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=gray,colback=lightgray!5,colbacktitle=lightgray!15,colupper=black,coltitle=black,titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=0pt,fonttitle=\bfseries\small\sffamily
+ }
+}
+\tcbset{StyleIMGViewer/.style={%
+ enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
+ colframe=gray,colback=lightgray!5,colbacktitle=lightgray!15,colupper=black,coltitle=black,titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=0pt,fonttitle=\bfseries\small\sffamily
+ }
+}
+%----[ENGLISH COMMANDS]
+%****CONTEXTMENU****
%====KEYS
\defKV[ContextMenu]{%
ColBack=\def\ContMenColBack{#1},%
@@ -252,34 +348,9 @@
}
%****TERMINAL****
-%====COLORS
-\definecolor{Termmpurple}{RGB}{48,10,36}
-\definecolor{Termmgray}{RGB}{70,72,67}
-\definecolor{Termogray}{RGB}{148,147,141}
-\definecolor{Termoorange}{RGB}{233,101,56}
-\definecolor{Termterminal}{RGB}{80,78,70}
-\definecolor{Termlinux}{RGB}{0,39,51}
-\definecolor{Termwinblue}{HTML}{1883D7}
-\definecolor{Termosxgray}{HTML}{D8D6D9}
-\definecolor{Termosxgreen}{HTML}{1F8B36}
-
%====WINDOWS (OK)
-\tcbset{StyleTermWindows/.style={%
- enhanced,boxrule=1pt,arc=1pt,before skip=\baselineskip,after skip=\baselineskip,%
- colframe=Termwinblue,colback=black,colbacktitle=white,colupper=white,coltitle=black,%
- titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
- fonttitle=\bfseries\small\sffamily
- }
-}
-
\setKVdefault[TERMwin]{Title={Terminal Win},Align={center},Width={\linewidth}}
-\newcommand\TermWinComm{%
- \begin{tikzpicture}[thick,scale=0.66]
- \draw (0,0.5em)--++(1em,0) ; \draw[rounded corners=0.05em] (2em,0) rectangle++ (0.8em,0.8em) ; \draw[rounded corners=0.05em] (2.2em,0.2em) rectangle++ (0.8em,0.8em) ; \draw (4em,1em)--(5em,0) (4em,0)--(5em,1em) ;
- \end{tikzpicture}%
-}
-
\newcommand\TermWinTitle{%
\begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={X[l]r}}
{\footnotesize\faTerminal}~~\useKV[TERMwin]{Title} & \TermWinComm \\ %
@@ -297,39 +368,6 @@
}
%====LINUX (OK)
-\newcommand{\TermUbuntuWhite}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[Termmgray] (0,0.25em) circle[radius=0.5em] ;
- \end{tikzpicture}%
-}
-\newcommand{\TermUbuntuMin}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[color=Termogray!50!white] (0,0.25em) circle[radius=0.5em];
- \draw[Termterminal](-0.35em,0.25em)--(0.35em,0.25em);
- \end{tikzpicture}%
-}
-\newcommand{\TermUbuntuClose}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[color=Termoorange!70!white] (0,0.25em) circle[radius=0.5em];
- \draw[Termterminal] (-0.32em,-0.07em)--(0.32em,0.57em);
- \draw[Termterminal] (-0.32em,0.57em)--(0.32em,-0.07em);
- \end{tikzpicture}%
-}
-\newcommand{\TermUbuntuMax}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[color=Termogray!50!white] (0,0.25em) circle[radius=0.5em];
- \draw[Termterminal] (-0.32em,0.5em) rectangle (0.32em,0);
- \end{tikzpicture}%
-}
-
-\tcbset{StyleTermUniX/.style={%
- enhanced,boxrule=1pt,arc=4pt,before skip=\baselineskip,after skip=\baselineskip,%
- colframe=Termmgray,colback=Termmpurple,colbacktitle=Termmgray,colupper=white,coltitle=white,%
- titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
- fonttitle=\bfseries\small\sffamily
- }
-}
-
\setKVdefault[TERMnux]{Title={Terminal UNiX},Align={center},Width={\linewidth}}
\newcommand\TermNuxTitle{%
@@ -348,39 +386,7 @@
\endtcblisting%
}
-%OSX (OK)
-\tcbset{StyleTermOSX/.style={%
- enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
- colframe=Termosxgray,colback=lightgray!15,colbacktitle=Termosxgray,colupper=black,coltitle=black,%
- titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,%
- fonttitle=\bfseries\small\sffamily
- }
-}
-
-\newcommand{\TermOSXRed}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[red] (0,0.25em) circle[radius=0.45em] ;
- \end{tikzpicture}%
-}
-
-\newcommand{\TermOSXOrange}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[orange] (0,0.25em) circle[radius=0.45em] ;
- \end{tikzpicture}%
-}
-
-\newcommand{\TermOSXgreen}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[Termosxgreen] (0,0.25em) circle[radius=0.45em] ;
- \end{tikzpicture}%
-}
-
-\newcommand{\TermOSXLG}{%
- \begin{tikzpicture}[thick,anchor=base,baseline]
- \filldraw[Termosxgray] (0,0.25em) circle[radius=0.45em] ;
- \end{tikzpicture}%
-}
-
+%====OSX (OK)
\setKVdefault[TERMosx]{Title={Terminal Mac},Align={center},Width={\linewidth}}
\newcommand\TermOSXTitle{%
@@ -400,13 +406,7 @@
}
%****VIEWERS****
-%PDFVIEWER (OK)
-\tcbset{StylePDFViewer/.style={%
- enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
- colframe=gray,colback=lightgray!5,colbacktitle=lightgray!15,colupper=black,coltitle=black,titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=0pt,fonttitle=\bfseries\small\sffamily
- }
-}
-
+%====PDFVIEWER (OK)
\setKVdefault[PDFViewer]{Title={PDF Viewer},Align={center},Width={\linewidth},Halign={center},Icons=true}
\NewDocumentCommand\PDFVIewerTitle{ s }{%
@@ -433,13 +433,7 @@
\endtcolorbox%
}
-%IMGVIEWER (OK)
-\tcbset{StyleIMGViewer/.style={%
- enhanced,boxrule=1pt,arc=6pt,before skip=\baselineskip,after skip=\baselineskip,%
- colframe=gray,colback=lightgray!5,colbacktitle=lightgray!15,colupper=black,coltitle=black,titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=0pt,fonttitle=\bfseries\small\sffamily
- }
-}
-
+%====IMGVIEWER (OK)
\setKVdefault[IMGViewer]{Title={Image Viewer},Align={center},Width={\linewidth},Halign={center},Icons=true}
\NewDocumentCommand\IMGVIewerTitle{ s }{%
@@ -466,4 +460,338 @@
\endtcolorbox%
}
+%----[FRENCH COMMANDS]
+%****MENUCONTEXTUEL****
+%====KEYS
+\defKV[MenuContext]{%
+ CoulFond=\def\ContMenColBack{#1},%
+ CoulSurlig=\def\ContMenColHL{#1},%
+ Police=\def\ContMenuFonte{#1},%
+ MargeV=\setlength{\ContMenOffsetV}{#1},%
+ MargeH=\setlength{\ContMenOffset}{#1},
+ Fleche=\def\ContMenArrow{#1},%
+ ListeSeps=\xdef\ContMenSep{#1},%
+ ListeIcones=\xdef\ContMenIcons{#1},%
+ Espacement=\def\ContMenSpace{#1},%
+ CoulItems=\def\ContMenuColItems{#1},%
+ ListeDecals=\xdef\ContMenOffsets{#1}
+}
+
+\setKVdefault[MenuContext]{%
+ CoulFond=CoulFondMenuContext,%
+ CoulSurlig=CoulSurligMenuContext,%
+ Arrondi=true,%
+ Police=\normalsize\normalfont,%
+ MargeV=6pt,%
+ MargeH=12pt,%
+ Fleche=\faCaretRight,%
+ ListeSeps={},%
+ ListeIcones={},%
+ Icones=false,%
+ Barre=true,%
+ Espacement=-0.125,%
+ CoulItems=black,%
+ ListeDecals={}
+}
+
+%====MACRO
+\NewDocumentCommand\MenuContextuel{ O{} m D<>{} }{%
+ %clés
+ \useKVdefault[MenuContext]%
+ \setKV[MenuContext]{#1}%
+ \setsepchar{§/,}%
+ \readlist*\DonnesContMenu{#2}%
+ \IfEq{\ContMenSep}{}%
+ {}%
+ {
+ \setsepchar[.]{/.,}%
+ \readlist*\LstSepContMenu{\ContMenSep}%
+ }%
+ \IfEq{\ContMenIcons}{}%
+ {}%
+ {
+ \setsepchar[.]{/.,}%
+ \readlist*\LstIconsContMenu{\ContMenIcons}%
+ }%
+ \IfEq{\ContMenOffsets}{}%
+ {}%
+ {
+ \setsepchar{,}%
+ \readlist*\LstOffsetsContMenu{\ContMenOffsets}%
+ }%
+ %colors of items
+ \IfSubStr{\ContMenuColItems}{/}%
+ {%
+ \StrCut{\ContMenuColItems}{/}{\ContMenuColItemsE}{\ContMenuColItemsH}%
+ }%
+ {%
+ \xdef\ContMenuColItemsE{\ContMenuColItems}\xdef\ContMenuColItemsH{\ContMenuColItems}
+ }%
+ %height of lines
+ \sbox{\maboitemenucontext}{\ContMenuFonte qSÉ}%
+ \settoboxtotalheight{\ContMenHgthTmp}{\maboitemenucontext}%
+ \ifboolKV[MenuContext]{Icones}%
+ {%
+ \sbox{\maboitelogomenucontext}{\ContMenuFonte\faCreditCard}%
+ \settoboxwidth{\ContMenOffsetIcon}{\maboitelogomenucontext}%
+ }%
+ {%
+ \setlength{\ContMenOffsetIcon}{0pt}%
+ }%
+ \setlength{\ContMenHgth}{\ContMenHgthTmp+2\ContMenOffsetV}%
+ %environment
+ \begin{tikzpicture}[#3]
+ \ifboolKV[MenuContext]{Arrondi}%
+ {\tikzset{contextborder/.style={rounded corners=4pt}}}%
+ {\tikzset{contextborder/.style={}}}%
+ %--first node
+ \coordinate (I-1-1) at (0,0) ;%
+ %--levels one by one--
+ \foreach \niv in {1,...,\DonnesContMenulen}{%
+ \def\nivmun{\inteval{\niv-1}}%
+ \def\nivpun{\inteval{\niv+1}}%
+ \itemtomacro\DonnesContMenu[\niv]{\ContMenNivTmp}%
+ \setsepchar{,}\readlist*\ContMenLstItem{\ContMenNivTmp}%
+ %left nodes
+ \coordinate (I-\niv-2) at ($(I-\niv-1)+(0,{-\ContMenHgth})$) ;%
+ \xintifboolexpr{\ContMenLstItemlen >= 2}%
+ {%
+ \foreach \i in {2,...,\ContMenLstItemlen}{%
+ \xdef\j{\inteval{\i+1}}%
+ \coordinate (I-\niv-\j) at ($(I-\niv-\i)+(0,{-\ContMenHgth})$) ;%
+ }
+ }%
+ {}%
+ %width calculus
+ \itemtomacro\ContMenLstItem[1]{\itemtmp}%
+ \IfEndWith{\itemtmp}{(*)}{\StrGobbleRight{\itemtmp}{3}[\itemtmp]}{}%
+ \IfEndWith{\itemtmp}{(>)}{\StrGobbleRight{\itemtmp}{3}[\itemtmp]}{}%
+ \sbox{\maboitemenucontext}{\pgfinterruptpicture\ContMenuFonte\itemtmp\endpgfinterruptpicture}%
+ \settoboxwidth{\ContMenWdthTmp}{\maboitemenucontext}%
+ \xdef\tmplistwidth{\the\ContMenWdthTmp}%
+ \xintifboolexpr{\ContMenLstItemlen >= 2}%calul des autres si besoin
+ {%
+ \foreach \i in {2,...,\ContMenLstItemlen}{%
+ \itemtomacro\ContMenLstItem[\i]{\itemtmp}%
+ \IfEndWith{\itemtmp}{(*)}{\StrGobbleRight{\itemtmp}{3}[\itemtmp]}{}%
+ \IfEndWith{\itemtmp}{(>)}{\StrGobbleRight{\itemtmp}{3}[\itemtmp]}{}%
+ \sbox{\maboitemenucontext}{\pgfinterruptpicture\ContMenuFonte\itemtmp\endpgfinterruptpicture}%
+ \settoboxwidth{\ContMenWdthTmp}{\maboitemenucontext}%
+ \xdef\tmplistwidth{\tmplistwidth,\the\ContMenWdthTmp}%
+ }%
+ }%
+ {}%
+ \pgfmathsetlength{\ContMenWdth}{max(\tmplistwidth)}%
+ \setlength{\ContMenWdth}{\ContMenWdth+\ContMenOffsetIcon+2\ContMenOffset+\ContMenOffsetArrow}%calcul de la 1ère largeur
+ %boxes
+ \draw[contextborder,draw=none,fill=\ContMenColBack] (I-\niv-1) rectangle++ ({\ContMenWdth},{-\ContMenLstItemlen*\ContMenHgth}) ;
+ \ifboolKV[MenuContext]{Icones}%
+ {%
+ \ifboolKV[MenuContext]{Barre}{\draw[thick,white] ($(I-\niv-1)+({\ContMenOffset+\ContMenOffsetIcon-3pt},{-0.5\ContMenOffsetV})$) --++ (0,{-\ContMenLstItemlen*\ContMenHgth+\ContMenOffsetV}) ;}{}%
+ }%
+ {}%
+ %labels
+ \foreach \i in {1,...,\ContMenLstItemlen}{%
+ \itemtomacro\ContMenLstItem[\i]{\itemtmp}%
+ \IfEndWith{\itemtmp}{(*)}%
+ {%
+ \StrGobbleRight{\itemtmp}{3}[\itemtmp]%
+ %offset si delared ?
+
+ \IfEq{\ContMenOffsets}{}%
+ {%
+ \coordinate (I-\nivpun-1) at ($(I-\niv-\i)+({\ContMenWdth+\ContMenSpace\ContMenOffset},{0})$) ;
+ }%
+ {%
+ \xintifboolexpr{\niv < \DonnesContMenulen}%
+ {%
+ \itemtomacro\LstOffsetsContMenu[\niv]{\offsettmp}%
+ \coordinate (I-\nivpun-1) at ($(I-\niv-\i)+({\ContMenWdth+\ContMenSpace\ContMenOffset},{\offsettmp*\ContMenHgth})$) ;
+ }%
+ {}%
+ }%
+
+ \draw[contextborder,draw=none,fill=\ContMenColHL,fill opacity=0.65] ($(I-\niv-\i)+({0.25\ContMenOffset},{-0.5\ContMenOffsetV})$) rectangle++ ({\ContMenWdth-0.5\ContMenOffset},{-\ContMenHgth+\ContMenOffsetV}) ;
+ %test if char at the end
+ \IfEndWith{\itemtmp}{(>)}%
+ {%
+ \StrGobbleRight{\itemtmp}{3}[\itemtmp]%
+ \draw ($(I-\niv-\i)+(0,{-0.5*\ContMenHgth})$) node[inner sep=0pt,right={\ContMenOffset+\ContMenOffsetIcon},font=\ContMenuFonte,text=\ContMenuColItemsH] {\itemtmp} ;
+ \draw ($(I-\niv-\i)+({\ContMenWdth-0.5\ContMenOffset},{-0.5*\ContMenHgth})$) node[inner sep=0pt,left=0.25\ContMenOffset,font=\ContMenuFonte,text=\ContMenuColItemsH] {$\vcenter{\hbox{\ContMenArrow}}$} ;
+ }%
+ {%
+ \draw ($(I-\niv-\i)+(0,{-0.5*\ContMenHgth})$) node[inner sep=0pt,right={\ContMenOffset+\ContMenOffsetIcon},font=\ContMenuFonte,text=\ContMenuColItemsH] {\itemtmp} ;
+ }%
+ }%
+ {%
+ \IfEndWith{\itemtmp}{(>)}%
+ {%
+ \StrGobbleRight{\itemtmp}{3}[\itemtmp]%
+ \draw ($(I-\niv-\i)+(0,{-0.5*\ContMenHgth})$) node[inner sep=0pt,right={\ContMenOffset+\ContMenOffsetIcon},font=\ContMenuFonte] {\itemtmp} ;
+ \draw ($(I-\niv-\i)+({\ContMenWdth-0.5\ContMenOffset},{-0.5*\ContMenHgth})$) node[inner sep=0pt,left=0.25\ContMenOffset,font=\ContMenuFonte,text=\ContMenuColItemsE] {$\vcenter{\hbox{\ContMenArrow}}$} ;
+ }%
+ {%
+ \draw ($(I-\niv-\i)+(0,{-0.5*\ContMenHgth})$) node[inner sep=0pt,right={\ContMenOffset+\ContMenOffsetIcon},font=\ContMenuFonte,text=\ContMenuColItemsE] {\itemtmp} ;
+ }%
+ }%
+ }%
+ %border
+ \draw[contextborder,thick,\ContMenColBack!75!black] (I-\niv-1) rectangle++ ({\ContMenWdth},{-\ContMenLstItemlen*\ContMenHgth}) ;
+ %separators
+ \IfEq{\ContMenSep}{}%
+ {}%
+ {%
+ \itemtomacro\LstSepContMenu[\niv]{\lstsepniv}%
+ \IfEq{\lstsepniv}{}%
+ {}%
+ {%
+ \setsepchar{,}%
+ \readlist*\lstsepnivpos{\lstsepniv}
+ \foreachitem\sep\in\lstsepnivpos{\def\seppun{\inteval{\sep+1}}\draw[thick,\ContMenColBack!75!black] ($(I-\niv-\seppun)+({0.25\ContMenOffset},0)$) --++ ({\ContMenWdth-0.5\ContMenOffset},0) ;}%
+ }%
+ }%
+ %icons
+ \ifboolKV[MenuContext]{Icones}%
+ {%
+ \IfEq{\ContMenIcons}{}%
+ {}%
+ {%
+ \itemtomacro\LstIconsContMenu[\niv]{\lsticonsniv}%
+ \IfEq{\lsticonsniv}{}%
+ {}%
+ {%
+ \setsepchar{,}%
+ \readlist*\lsticonsnivpos{\lsticonsniv}%
+ \foreach \i in {1,...,\lsticonsnivposlen}{%
+ \itemtomacro\lsticonsnivpos[\i]{\icontmp}%
+ \itemtomacro\DonnesContMenu[\niv,\i]{\itemtmp}%
+ \IfEndWith{\itemtmp}{(*)}%
+ {%
+ \draw ($(I-\niv-\i)+({0.25\ContMenOffset+0.75\ContMenOffsetIcon},{-0.5*\ContMenHgth})$) node[scale=0.9,inner sep=0pt,font=\ContMenuFonte,text=\ContMenuColItemsH] {$\vcenter{\hbox{\icontmp}}$} ;
+ }%
+ {%
+ \draw ($(I-\niv-\i)+({0.25\ContMenOffset+0.75\ContMenOffsetIcon},{-0.5*\ContMenHgth})$) node[scale=0.9,inner sep=0pt,font=\ContMenuFonte,text=\ContMenuColItemsE] {$\vcenter{\hbox{\icontmp}}$} ;
+ }%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ }%
+ \end{tikzpicture}
+}
+
+%****TERMINAL****
+%====WINDOWS (OK)
+\setKVdefault[TERMINALwin]{Titre={Terminal Win},Align={center},Largeur={\linewidth}}
+
+\newcommand\TerminalWinTitle{%
+ \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={X[l]r}}
+ {\footnotesize\faTerminal}~~\useKV[TERMINALwin]{Titre} & \TermWinComm \\ %
+ \end{tblr}
+}
+
+\NewDocumentEnvironment{TerminalWin}{ O{} m }
+{%
+ \restoreKV[TERMINALwin]%
+ \setKV[TERMINALwin]{#1}%
+ \tcblisting{StyleTermWindows,{\useKV[TERMINALwin]{Align}},title={\TerminalWinTitle},listing only,listing engine=listings,listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},width={\useKV[TERMINALwin]{Largeur}},#2}
+}%
+{%
+ \endtcblisting%
+}
+
+%====LINUX (OK)
+\setKVdefault[TERMINALnux]{Titre={Terminal UNiX},Align={center},Largeur={\linewidth}}
+
+\newcommand\TerminalNuxTitle{%
+ \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={lX[c]r}}
+ \TermUbuntuWhite~~\TermUbuntuWhite~~\TermUbuntuWhite & \vphantom{p}\useKV[TERMINALnux]{Titre} & \TermUbuntuMin~~\TermUbuntuMax~~\TermUbuntuClose \\
+ \end{tblr}
+}
+
+\NewDocumentEnvironment{TerminalUnix}{ O{} m }
+{%
+ \restoreKV[TERMINALnux]%
+ \setKV[TERMINALnux]{#1}%
+ \tcblisting{StyleTermUniX,{\useKV[TERMINALnux]{Align}},title={\TerminalNuxTitle},listing only,listing engine=listings,listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},width={\useKV[TERMINALnux]{Largeur}},#2}
+}%
+{%
+ \endtcblisting%
+}
+
+%====OSX (OK)
+\setKVdefault[TERMINALosx]{Titre={Terminal Mac},Align={center},Largeur={\linewidth}}
+
+\newcommand\TerminalOSXTitle{%
+ \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={lX[c]r}}
+ \TermOSXRed~\TermOSXOrange~\TermOSXgreen & \vphantom{p}\useKV[TERMINALosx]{Titre} & \TermOSXLG~\TermOSXLG~\TermOSXLG \\
+ \end{tblr}
+}
+
+\NewDocumentEnvironment{TerminalMac}{ O{} m }
+{%
+ \restoreKV[TERMINALosx]%
+ \setKV[TERMINALosx]{#1}%
+ \tcblisting{StyleTermOSX,{\useKV[TERMINALosx]{Align}},title={\TerminalOSXTitle},listing only,listing engine=listings,listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},width={\useKV[TERMINALosx]{Largeur}},#2}
+}%
+{%
+ \endtcblisting%
+}
+
+%****VISIONNEUSES****
+%====PDFVIEWER (OK)
+\setKVdefault[PDFVisionn]{Titre={Visionneuse PDF},Align={center},Largeur={\linewidth},AlignH={center},Icones=true}
+
+\NewDocumentCommand\PDFVIewerTitre{ s }{%
+ \IfBooleanTF{#1}%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PDFVisionn]{Titre} && \faIcon[regular]{file-pdf} \\
+ \end{tblr}
+ }%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]l|[1pt]l|[1pt]l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[PDFVisionn]{Titre} & \faIcon[regular]{folder}~~\faPrint~~\faIcon{pencil-alt} & \faArrowLeft~~\faArrowRight & \faExpand~~\faIcon{expand-alt}~~\faIcon{expand-arrows-alt}&&\faIcon[regular]{file-pdf} \\
+ \end{tblr}
+ }%
+}
+
+\NewDocumentEnvironment{VisionnPDF}{ O{} m }
+{%
+ \restoreKV[PDFVisionn]%
+ \setKV[PDFVisionn]{#1}%
+ \tcolorbox[StylePDFViewer,{\useKV[PDFVisionn]{Align}},title={\ifboolKV[PDFVisionn]{Icones}{\PDFVIewerTitre}{\PDFVIewerTitre*}},width={\useKV[PDFVisionn]{Largeur}},halign={\useKV[PDFVisionn]{AlignH}},#2]
+}%
+{%
+ \endtcolorbox%
+}
+
+%====IMGVIEWER (OK)
+\setKVdefault[IMGVisionn]{Titre={Visionneuse d'images},Align={center},Largeur={\linewidth},AlignH={center},Icones=true}
+
+\NewDocumentCommand\IMGVIewerTitre{ s }{%
+ \IfBooleanTF{#1}%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[IMGVisionn]{Titre} && \faIcon[regular]{file-image} \\
+ \end{tblr}
+ }%
+ {%
+ \begin{tblr}{colsep=4pt,rowsep=0pt,width=\linewidth,colspec={l|[1pt]l|[1pt]l|[1pt]l|[1pt]X[c]|[1pt]c},cells={font=\footnotesize}}
+ \vphantom{p}\useKV[IMGVisionn]{Titre} & \faIcon[regular]{folder}~~\faPrint~~\faPen~~\faFillDrip~~\faBorderNone& \faArrowLeft~~\faArrowRight & \faExpand~~\faIcon{expand-alt}~~\faIcon{expand-arrows-alt}&&\faIcon[regular]{file-image} \\
+ \end{tblr}
+ }%
+}
+
+\NewDocumentEnvironment{VisionnIMG}{ O{} m }
+{%
+ \restoreKV[IMGVisionn]%
+ \setKV[IMGVisionn]{#1}%
+ \tcolorbox[StyleIMGViewer,{\useKV[IMGVisionn]{Align}},title={\ifboolKV[IMGVisionn]{Icones}{\IMGVIewerTitre}{\IMGVIewerTitre*}},width={\useKV[IMGVisionn]{Largeur}},halign={\useKV[IMGVisionn]{AlignH}},#2]
+}%
+{%
+ \endtcolorbox%
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 554c6ff609..b113b8d9d3 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.3.9] - 2023-11-14
+
+### Fixed
+- Rounding of values with no mantissa (see issue
+ [\#704](https://github.com/josephwright/siunitx/issues/704))
+
## [v3.3.8] - 2023-11-06
### Deprecated
@@ -2043,7 +2049,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.3.8...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.9...HEAD
+[v3.3.9]: https://github.com/josephwright/siunitx/compare/v3.3.8...v3.3.9
[v3.3.8]: https://github.com/josephwright/siunitx/compare/v3.3.7...v3.3.8
[v3.3.7]: https://github.com/josephwright/siunitx/compare/v3.3.6...v3.3.7
[v3.3.6]: https://github.com/josephwright/siunitx/compare/v3.3.5...v3.3.6
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 71cc89e478..34e9f85ef3 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-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index 04b302cf51..6397e3239f 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -2772,10 +2772,16 @@
}
\cs_new:Npn \@@_round:nnnnnnn #1#2#3#4#5#6#7
{
- \str_if_eq:nnTF {#4} { \empty }
- { \use:c { @@_round_ \l_@@_round_mode_tl :nnnnnnn } {#1} {#2} {#3} { } }
- { \use:c { @@_round_ \l_@@_round_mode_tl :nnnnnnn } {#1} {#2} {#3} {#4} }
- {#5} {#6} {#7}
+ \tl_if_blank:nTF { #3#4 }
+ {
+ \exp_not:n { {#1} {#2} { } { } {#5} {#6} {#7} }
+ }
+ {
+ \str_if_eq:nnTF {#4} { \empty }
+ { \use:c { @@_round_ \l_@@_round_mode_tl :nnnnnnn } {#1} {#2} {#3} { } }
+ { \use:c { @@_round_ \l_@@_round_mode_tl :nnnnnnn } {#1} {#2} {#3} {#4} }
+ {#5} {#6} {#7}
+ }
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index e2870e43e6..e4ba230584 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} {2023-11-06} {3.3.8}
+\ProvidesExplPackage {siunitx} {2023-11-14} {3.3.9}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 73faebb49e..9a3994d340 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 7b7221f66a..37da412751 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -1046,7 +1046,7 @@ color applied by \pkg{siunitx}.
\begin{table}
\caption{Detection of surrounding material in an \texttt{S} column.%
\label{tab:S:extras}}
- \begin{tabular}{@{}S[color = orange]@{}}
+ \begin{tabular}{@{}S@{}}
\toprule
{Some Values} \\
\midrule
diff --git a/macros/latex/contrib/zref-check/CHANGELOG.md b/macros/latex/contrib/zref-check/CHANGELOG.md
index 75b91e2d0a..11b857b0a3 100644
--- a/macros/latex/contrib/zref-check/CHANGELOG.md
+++ b/macros/latex/contrib/zref-check/CHANGELOG.md
@@ -1,6 +1,13 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.3.4...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.3.5...HEAD)
+
+## [v0.3.5](https://github.com/gusbrs/zref-check/compare/v0.3.4...v0.3.5) (2023-11-14)
+
+### Changed
+- Don't use `expl3` public scratch temporary variables.
+- Prefer `e-type` expansion.
+- Require 2023-11-01 LaTeX kernel.
## [v0.3.4](https://github.com/gusbrs/zref-check/compare/v0.3.3...v0.3.4) (2023-08-13)
diff --git a/macros/latex/contrib/zref-check/README.md b/macros/latex/contrib/zref-check/README.md
index 2b5febb76c..21a20eba68 100644
--- a/macros/latex/contrib/zref-check/README.md
+++ b/macros/latex/contrib/zref-check/README.md
@@ -2,8 +2,8 @@
**Flexible LaTeX cross-references with contextual checks based on zref**
-Author: Gustavo Barros
-Maintainer: Gustavo Barros
+Author: gusbrs
+Maintainer: gusbrs
`zref-check` provides an user interface for making LaTeX cross-references
flexibly, while allowing to have them checked for consistency with the
diff --git a/macros/latex/contrib/zref-check/zref-check-code.pdf b/macros/latex/contrib/zref-check/zref-check-code.pdf
index 73d1816b1d..e664b6c2b8 100644
--- a/macros/latex/contrib/zref-check/zref-check-code.pdf
+++ b/macros/latex/contrib/zref-check/zref-check-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-check/zref-check-code.tex b/macros/latex/contrib/zref-check/zref-check-code.tex
index 02cb8b5c82..fdf39a3487 100644
--- a/macros/latex/contrib/zref-check/zref-check-code.tex
+++ b/macros/latex/contrib/zref-check/zref-check-code.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-check".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-check.dtx,
% zref-check.ins,
@@ -63,16 +62,18 @@
\GetFileInfo{zref-check.sty}
\title{%
- The \pkg{zref-check} package implementation%
- \thanks{This file describes \fileversion, released \filedate.}%
+ The \pkg{zref-check} package%
+ \texorpdfstring{\\{}\medskip{}}{ - }%
+ Code documentation%
+ \texorpdfstring{\medskip{}}{}%
}
\author{%
- Gustavo Barros%
- \thanks{\url{https://github.com/gusbrs/zref-check}}%
-}
+ \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+ \url{https://github.com/gusbrs/zref-check}\\
+ \url{https://www.ctan.org/pkg/zref-check}}{gusbrs}}
-\date{\filedate}
+\date{Version \fileversion\ -- \filedate}
\maketitle
diff --git a/macros/latex/contrib/zref-check/zref-check-doc.pdf b/macros/latex/contrib/zref-check/zref-check-doc.pdf
index d6ba5308cb..95c0c5994b 100644
--- a/macros/latex/contrib/zref-check/zref-check-doc.pdf
+++ b/macros/latex/contrib/zref-check/zref-check-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-check/zref-check-doc.tex b/macros/latex/contrib/zref-check/zref-check-doc.tex
index 9d0205c571..4be8af4625 100644
--- a/macros/latex/contrib/zref-check/zref-check-doc.tex
+++ b/macros/latex/contrib/zref-check/zref-check-doc.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-check".
%
-% Copyright (C) 2021-2022 Gustavo Barros
+% Copyright (C) 2021-2022 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-check.dtx,
% zref-check.ins,
@@ -59,15 +58,17 @@
\title{%
The \pkg{zref-check} package%
- \thanks{This file describes \fileversion, released \filedate.}%
+ \texorpdfstring{\\{}\medskip{}}{ - }%
+ User manual%
+ \texorpdfstring{\medskip{}}{}%
}
\author{%
- Gustavo Barros%
- \thanks{\url{https://github.com/gusbrs/zref-check}}%
-}
+ \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+ \url{https://github.com/gusbrs/zref-check}\\
+ \url{https://www.ctan.org/pkg/zref-check}}{gusbrs}}
-\date{\filedate}
+\date{Version \fileversion\ -- \filedate}
\maketitle
diff --git a/macros/latex/contrib/zref-check/zref-check.dtx b/macros/latex/contrib/zref-check/zref-check.dtx
index c3a05b9990..438c89d2af 100644
--- a/macros/latex/contrib/zref-check/zref-check.dtx
+++ b/macros/latex/contrib/zref-check/zref-check.dtx
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-check".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-check.dtx,
% zref-check.ins,
@@ -70,9 +69,11 @@
%
% For the \texttt{chapter} and \texttt{section} checks, \pkg{zref-check} uses
% the new hook system in \pkg{ltcmdhooks}, which was released with the
-% 2021/06/01 \LaTeX{} kernel.
+% 2021/06/01 \LaTeX{} kernel. And, since we followed the move to
+% \texttt{e}-type expansion, to play safe we require the 2023-11-01 kernel or
+% newer.
% \begin{macrocode}
-\def\zrefcheck@required@kernel{2021-06-01}
+\def\zrefcheck@required@kernel{2023-11-01}
\NeedsTeXFormat{LaTeX2e}[\zrefcheck@required@kernel]
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{\zrefcheck@required@kernel}
@@ -87,7 +88,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-check} {2023-08-13} {0.3.4}
+\ProvidesExplPackage {zref-check} {2023-11-14} {0.3.5}
{Flexible cross-references with contextual checks based on zref}
% \end{macrocode}
%
@@ -168,16 +169,38 @@
%
% \section{Plumbing}
%
+% \subsection{Auxiliary}
+%
+% \begin{macro}
+% {
+% \l_@@_tmpa_tl ,
+% \l_@@_tmpb_tl ,
+% \g_@@_tmpa_tl ,
+% \l_@@_tmpa_int ,
+% \l_@@_tmpa_bool ,
+% \g_@@_tmpa_ior ,
+% }
+% Temporary scratch variables.
+% \begin{macrocode}
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \g_@@_tmpa_tl
+\int_new:N \l_@@_tmpa_int
+\bool_new:N \l_@@_tmpa_bool
+\ior_new:N \g_@@_tmpa_ior
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Messages}
%
-% \begin{macro}{\@@_message:nnnn, \@@_message:nnnx}
+% \begin{macro}{\@@_message:nnnn, \@@_message:nnne}
% \begin{macrocode}
\cs_new_protected:Npn \@@_message:nnnn #1#2#3#4
{
\use:c { msg_ \l_@@_msglevel_tl :nnnnn }
{ zref-check } {#1} {#2} {#3} {#4}
}
-\cs_generate_variant:Nn \@@_message:nnnn { nnnx }
+\cs_generate_variant:Nn \@@_message:nnnn { nnne }
% \end{macrocode}
% \end{macro}
%
@@ -594,37 +617,38 @@
% \end{variable}
%
% \begin{macrocode}
-\tl_gset:Nn \g_tmpa_tl { \c_sys_jobname_str .aux }
-\file_if_exist:nT { \g_tmpa_tl }
+\tl_gset:Nn \g_@@_tmpa_tl { \c_sys_jobname_str .aux }
+\file_if_exist:nT { \g_@@_tmpa_tl }
{
% \end{macrocode}
% Retrieve the information from the \file{.aux} file, and store it in a
% property list, so that the sequence can be retrieved in key-value fashion.
% \begin{macrocode}
- \ior_open:Nn \g_tmpa_ior { \g_tmpa_tl }
+ \ior_open:Nn \g_@@_tmpa_ior { \g_@@_tmpa_tl }
\group_begin:
- \int_zero:N \l_tmpa_int
- \tl_clear:N \l_tmpa_tl
- \tl_clear:N \l_tmpb_tl
- \bool_set_false:N \l_tmpa_bool
- \ior_map_variable:NNn \g_tmpa_ior \l_tmpa_tl
+ \int_zero:N \l_@@_tmpa_int
+ \tl_clear:N \l_@@_tmpa_tl
+ \tl_clear:N \l_@@_tmpb_tl
+ \bool_set_false:N \l_@@_tmpa_bool
+ \ior_map_variable:NNn \g_@@_tmpa_ior \l_@@_tmpa_tl
{
- \tl_map_variable:NNn \l_tmpa_tl \l_tmpb_tl
+ \tl_map_variable:NNn \l_@@_tmpa_tl \l_@@_tmpb_tl
{
- \tl_if_eq:NnTF \l_tmpb_tl { \zref@newlabel }
+ \tl_if_eq:NnTF \l_@@_tmpb_tl { \zref@newlabel }
{
% \end{macrocode}
% Found a \cs{zref@label}, signal it.
% \begin{macrocode}
- \bool_set_true:N \l_tmpa_bool
+ \bool_set_true:N \l_@@_tmpa_bool
}
{
- \bool_if:NTF \l_tmpa_bool
+ \bool_if:NTF \l_@@_tmpa_bool
{
- \bool_set_false:N \l_tmpa_bool
- \int_incr:N \l_tmpa_int
- \prop_gput:Nxx \g_@@_auxfile_lblseq_prop
- { \l_tmpb_tl } { \int_use:N \l_tmpa_int }
+ \bool_set_false:N \l_@@_tmpa_bool
+ \int_incr:N \l_@@_tmpa_int
+ \prop_gput:Nee \g_@@_auxfile_lblseq_prop
+ { \l_@@_tmpb_tl }
+ { \int_use:N \l_@@_tmpa_int }
}
{
% \end{macrocode}
@@ -632,7 +656,8 @@
% the loop and discard the rest of the line, to ensure no babel calls to
% \cs{catcode} in the \file{.aux} file get expanded. This also breaks the
% loop and discards the rest of the \cs{zref@newlabel} lines after we got the
-% label we wanted, since we reset \cs{l_tmpa_bool} in the \texttt{T} branch.
+% label we wanted, since we reset \cs{l_@@_tmpa_bool} in the \texttt{T}
+% branch.
% \begin{macrocode}
\tl_map_break:
}
@@ -640,7 +665,7 @@
}
}
\group_end:
- \ior_close:N \g_tmpa_ior
+ \ior_close:N \g_@@_tmpa_ior
}
% \end{macrocode}
%
@@ -778,7 +803,7 @@
{
\zref@ifrefcontainsprop {#1} {#2}
{
- \tl_set:Nx #3
+ \tl_set:Ne #3
{ \zref@extractdefault {#1} {#2} { \c_empty_tl } }
}
{
@@ -924,7 +949,7 @@
% Names of the labels for this zcheck call.
% \begin{macrocode}
\int_gincr:N \g_@@_id_int
- \tl_set:Nx \l_@@_checkbeg_tl
+ \tl_set:Ne \l_@@_checkbeg_tl
{ \@@_check_lblfmt:n { \g_@@_id_int } }
% \end{macrocode}
% Set checkbeg label.
@@ -950,7 +975,7 @@
! \l_@@_link_star_bool
}
{
- \exp_args:Nx \zrefcheck_get_astl:nnn
+ \exp_args:Ne \zrefcheck_get_astl:nnn
{ \l_@@_link_label_tl }
{ anchor } { \l_@@_link_anchor_tl }
\hyperlink { \l_@@_link_anchor_tl } {#4}
@@ -974,7 +999,7 @@
% \end{macrocode}
% Run the checks.
% \begin{macrocode}
- \@@_run_checks:nnx { \l_@@_zcheck_checks_seq }
+ \@@_run_checks:nne { \l_@@_zcheck_checks_seq }
{ \l_@@_zcheck_labels_seq } { \l_@@_checkbeg_tl }
\group_end:
}
@@ -1187,7 +1212,7 @@
}
\group_end:
}
-\cs_generate_variant:Nn \@@_run_checks:nnn { nnx }
+\cs_generate_variant:Nn \@@_run_checks:nnn { nne }
% \end{macrocode}
% \end{macro}
%
@@ -1331,7 +1356,7 @@
\l_@@_onpage_bool
}
{
- \@@_message:nnnx { double-check } {#1} {#2}
+ \@@_message:nnne { double-check } {#1} {#2}
{ \zref@extractdefault {#3} {page} {'unknown'} }
}
}
@@ -1339,7 +1364,7 @@
\bool_if:NTF \l_@@_empty_label_bool
{ \@@_message:nnnn { empty-label } {#1} { } { } }
{
- \@@_message:nnnx { check-failed } {#1} {#2}
+ \@@_message:nnne { check-failed } {#1} {#2}
{ \zref@extractdefault {#3} {page} {'unknown'} }
}
}
@@ -1929,7 +1954,7 @@
\cs_new_protected:Npn \zrefcheck_zcref_beg_label:
{
\int_gincr:N \g_@@_id_int
- \tl_set:Nx \l_@@_checkbeg_tl
+ \tl_set:Ne \l_@@_checkbeg_tl
{ \@@_check_lblfmt:n { \g_@@_id_int } }
\zref@labelbylist { \l_@@_checkbeg_tl } { zrefcheck-check }
}
@@ -1944,7 +1969,7 @@
}
\cs_new_protected:Npn \zrefcheck_zcref_run_checks_on_labels:n #1
{
- \@@_run_checks:nnx
+ \@@_run_checks:nne
{ \l_@@_zcheck_checks_seq } {#1} { \l_@@_checkbeg_tl }
}
% \end{macrocode}
@@ -1964,7 +1989,7 @@
\cs_new_protected:Npn \zrefcheck_zrefvario_label:
{
\int_gincr:N \g_@@_id_int
- \tl_set:Nx \l_@@_checkbeg_tl
+ \tl_set:Ne \l_@@_checkbeg_tl
{ \@@_check_lblfmt:n { \g_@@_id_int } }
\zref@labelbylist { \l_@@_checkbeg_tl } { zrefcheck-zrefvario }
}
diff --git a/macros/latex/contrib/zref-check/zref-check.ins b/macros/latex/contrib/zref-check/zref-check.ins
index e0511ea791..2207ce484c 100644
--- a/macros/latex/contrib/zref-check/zref-check.ins
+++ b/macros/latex/contrib/zref-check/zref-check.ins
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-check".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-check.dtx,
% zref-check.ins,
@@ -50,7 +49,7 @@
This file was generated from file(s) of the LaTeX package "zref-check".
-Copyright (C) 2021-2023 Gustavo Barros
+Copyright (C) 2021-2023 gusbrs
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -63,8 +62,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-This work is "maintained" (as per LPPL maintenance status) by
- Gustavo Barros.
+This work is "maintained" (as per LPPL maintenance status) by gusbrs.
This work consists of the files zref-check.dtx,
zref-check.ins,
diff --git a/macros/latex/contrib/zref-clever/CHANGELOG.md b/macros/latex/contrib/zref-clever/CHANGELOG.md
index a48047cdeb..c770811b3f 100644
--- a/macros/latex/contrib/zref-clever/CHANGELOG.md
+++ b/macros/latex/contrib/zref-clever/CHANGELOG.md
@@ -1,6 +1,13 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.2...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.3...HEAD)
+
+## [v0.4.3](https://github.com/gusbrs/zref-clever/compare/v0.4.2...v0.4.3) (2023-11-14)
+
+### Changed
+- Don't use `expl3` public scratch temporary variables.
+- Prefer `e-type` expansion.
+- Require 2023-11-01 LaTeX kernel.
## [v0.4.2](https://github.com/gusbrs/zref-clever/compare/v0.4.1...v0.4.2) (2023-08-14)
diff --git a/macros/latex/contrib/zref-clever/README.md b/macros/latex/contrib/zref-clever/README.md
index 0d7a610d5b..340408664b 100644
--- a/macros/latex/contrib/zref-clever/README.md
+++ b/macros/latex/contrib/zref-clever/README.md
@@ -2,8 +2,8 @@
**Clever LaTeX cross-references based on zref**
-Author: Gustavo Barros
-Maintainer: Gustavo Barros
+Author: gusbrs
+Maintainer: gusbrs
`zref-clever` provides a user interface for making LaTeX cross-references
which automates some of their typical features, thus easing their input in the
diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.pdf b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
index 0ff0e7173a..41da795ac7 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-code.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.tex b/macros/latex/contrib/zref-clever/zref-clever-code.tex
index ec9210dd67..5e5b84dd11 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-code.tex
+++ b/macros/latex/contrib/zref-clever/zref-clever-code.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-clever".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-clever.dtx,
% zref-clever.ins,
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
index 248321f082..c0ea22459a 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.tex b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
index 69584c2fb6..ca2baa3709 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.tex
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-clever".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-clever.dtx,
% zref-clever.ins,
@@ -156,29 +155,24 @@
\lstnewenvironment{zchowto}[1][]{%
\renewcommand{\lstlistingname}{How-to}%
\renewcommand*\theHlstlisting{ht.\thelstlisting}%
+ \zcsetup{countertype={lstlisting=zchowto}}%
\lstset{#1}%
+ \stepcounter{zchowto}%
\setcounter{lstlisting}{\value{zchowto}}%
}{}
\newcounter{zcworkaround}
\lstnewenvironment{zcworkaround}[1][]{%
\renewcommand{\lstlistingname}{Work-around}%
\renewcommand*\theHlstlisting{wa.\thelstlisting}%
+ \zcsetup{countertype={lstlisting=zcworkaround}}%
\lstset{#1}%
+ \stepcounter{zcworkaround}%
\setcounter{lstlisting}{\value{zcworkaround}}%
}{}
\lstnewenvironment{zcexample}[1][]{%
\renewcommand{\lstlistingname}{Example}%
\lstset{#1}%
}{}
-\ExplSyntaxOn
-\makeatletter
-\lst@AddToHook { PreInit }
- {
- \cs_if_exist:cT { c@ \lstenv@name }
- { \exp_args:Nx \refstepcounter { \lstenv@name } }
- }
-\makeatother
-\ExplSyntaxOff
\zcRefTypeSetup{zchowto}{
Name-sg = {How-to},
@@ -199,18 +193,17 @@
\title{%
The \pkg{zref-clever} package%
- \thanks{This file describes \fileversion, released \filedate.}%
\texorpdfstring{\\{}\medskip{}}{ - }%
User manual%
\texorpdfstring{\medskip{}}{}%
}
\author{%
- Gustavo Barros%
- \thanks{\url{https://github.com/gusbrs/zref-clever}}%
-}
+ \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+ \url{https://github.com/gusbrs/zref-clever}\\
+ \url{https://www.ctan.org/pkg/zref-clever}}{gusbrs}}
-\date{\filedate}
+\date{Version \fileversion\ -- \filedate}
\maketitle
@@ -2646,6 +2639,7 @@ were generously provided by (in chronological order):
% 2023-02-18: https://github.com/gusbrs/zref-clever/pull/14
% 2023-02-18: https://github.com/gusbrs/zref-clever/pull/15
% 2023-05-11: https://github.com/T-F-S/tcolorbox/issues/230
+ % 2023-11-09: https://github.com/gusbrs/zref-clever/issues/20
and Lars Madsen.
% 2023-07-24: https://chat.stackexchange.com/transcript/message/64039717#64039717
% and following discussion.
diff --git a/macros/latex/contrib/zref-clever/zref-clever.dtx b/macros/latex/contrib/zref-clever/zref-clever.dtx
index f14fb7601d..1a6e2ea44f 100644
--- a/macros/latex/contrib/zref-clever/zref-clever.dtx
+++ b/macros/latex/contrib/zref-clever/zref-clever.dtx
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-clever".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-clever.dtx,
% zref-clever.ins,
@@ -94,18 +93,17 @@
%
% \title{^^A
% The \pkg{zref-clever} package^^A
-% \thanks{This file describes \fileversion, released \filedate.}^^A
% \texorpdfstring{\\{}\medskip{}}{ - }^^A
% Code documentation^^A
% \texorpdfstring{\medskip{}}{}^^A
% }
%
% \author{^^A
-% Gustavo Barros^^A
-% \thanks{\url{https://github.com/gusbrs/zref-clever}}^^A
-% }
+% \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+% \url{https://github.com/gusbrs/zref-clever}\\
+% \url{https://www.ctan.org/pkg/zref-clever}}{gusbrs}}
%
-% \date{\filedate}
+% \date{Version \fileversion\ -- \filedate}
%
% \maketitle
%
@@ -143,15 +141,16 @@
% \url{https://github.com/latex3/latex2e/pull/699}). Second, the support for
% \cs{@currentcounter} has been improved, including \cs{footnote} and
% \pkg{amsmath} (by \contributor{Frank Mittelbach} and \contributor{Ulrike
-% Fischer} at \url{https://github.com/latex3/latex2e/issues/687}). Finally,
-% and critically, the new \texttt{label} hook introduced in the 2023-06-01
+% Fischer} at \url{https://github.com/latex3/latex2e/issues/687}).
+% Critically, the new \texttt{label} hook introduced in the 2023-06-01
% release, alongside the corresponding new hooks with arguments, just
% simplifies and improves label setting so much, by allowing \cs{zlabel} to be
% set with \cs{label}, that it is definitely a must for \pkg{zref-clever}, so
-% we require that too. Hence we make the cut at this latter kernel release.
+% we require that too. Finally, since we followed the move to \texttt{e}-type
+% expansion, to play safe we require the 2023-11-01 kernel or newer.
%
% \begin{macrocode}
-\def\zrefclever@required@kernel{2023-06-01}
+\def\zrefclever@required@kernel{2023-11-01}
\NeedsTeXFormat{LaTeX2e}[\zrefclever@required@kernel]
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{\zrefclever@required@kernel}
@@ -167,7 +166,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2023-08-14} {0.4.2}
+\ProvidesExplPackage {zref-clever} {2023-11-14} {0.4.3}
{Clever LaTeX cross-references based on zref}
% \end{macrocode}
%
@@ -537,6 +536,27 @@
% \end{macro}
%
%
+% \begin{macro}
+% {
+% \l_@@_tmpa_tl ,
+% \l_@@_tmpb_tl ,
+% \l_@@_tmpa_seq ,
+% \g_@@_tmpa_seq ,
+% \l_@@_tmpa_bool ,
+% \l_@@_tmpa_int ,
+% }
+% Temporary scratch variables.
+% \begin{macrocode}
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\seq_new:N \l_@@_tmpa_seq
+\seq_new:N \g_@@_tmpa_seq
+\bool_new:N \l_@@_tmpa_bool
+\int_new:N \l_@@_tmpa_int
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Messages}
%
%
@@ -1635,7 +1655,7 @@
{ \prg_return_false: }
}
\prg_generate_conditional_variant:Nnn
- \@@_language_if_declared:n { x } { T , F , TF }
+ \@@_language_if_declared:n { e } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1710,7 +1730,7 @@
\@@_language_if_declared:nTF {#2}
{
\tl_new:c { \@@_language_varname:n {#1} }
- \tl_gset:cx { \@@_language_varname:n {#1} }
+ \tl_gset:ce { \@@_language_varname:n {#1} }
{ \tl_use:c { \@@_language_varname:n {#2} } }
}
{ \msg_warning:nnn { zref-clever } { unknown-language-alias } {#2} }
@@ -1790,7 +1810,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_process_language_settings:
{
- \@@_language_if_declared:xTF
+ \@@_language_if_declared:eTF
{ \l_@@_ref_language_tl }
{
% \end{macrocode}
@@ -1812,7 +1832,7 @@
{
\tl_if_empty:NF \l_@@_ref_decl_case_tl
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ language-no-decl-ref }
{ \l_@@_ref_language_tl }
{ \l_@@_ref_decl_case_tl }
@@ -1829,7 +1849,7 @@
\seq_if_in:NVF \l_@@_lang_declension_seq
\l_@@_ref_decl_case_tl
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ unknown-decl-case }
{ \l_@@_ref_decl_case_tl }
{ \l_@@_ref_language_tl }
@@ -1854,7 +1874,7 @@
{
\tl_if_empty:NF \l_@@_ref_gender_tl
{
- \msg_warning:nnxxx { zref-clever }
+ \msg_warning:nneee { zref-clever }
{ language-no-gender }
{ \l_@@_ref_language_tl }
{ g }
@@ -1868,7 +1888,7 @@
\seq_if_in:NVF \l_@@_lang_gender_seq
\l_@@_ref_gender_tl
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ gender-not-declared }
{ \l_@@_ref_language_tl }
{ \l_@@_ref_gender_tl }
@@ -1894,14 +1914,14 @@
% \begin{macrocode}
\tl_if_empty:NF \l_@@_ref_decl_case_tl
{
- \msg_warning:nnxx { zref-clever } { unknown-language-decl }
+ \msg_warning:nnee { zref-clever } { unknown-language-decl }
{ \l_@@_ref_decl_case_tl }
{ \l_@@_ref_language_tl }
\tl_clear:N \l_@@_ref_decl_case_tl
}
\tl_if_empty:NF \l_@@_ref_gender_tl
{
- \msg_warning:nnxxx { zref-clever }
+ \msg_warning:nneee { zref-clever }
{ language-no-gender }
{ \l_@@_ref_language_tl }
{ g }
@@ -1989,18 +2009,18 @@
\@bsphack
\@@_language_if_declared:nT {#1}
{
- \seq_if_in:NxF
+ \seq_if_in:NeF
\g_@@_loaded_langfiles_seq
{ \tl_use:c { \@@_language_varname:n {#1} } }
{
- \exp_args:Nx \file_get:nnNTF
+ \exp_args:Ne \file_get:nnNTF
{
zref-clever-
\tl_use:c { \@@_language_varname:n {#1} }
.lang
}
{ \ExplSyntaxOn }
- \l_tmpa_tl
+ \l_@@_tmpa_tl
{
\tl_set:Nn \l_@@_setup_language_tl {#1}
\tl_clear:N \l_@@_setup_type_tl
@@ -2024,10 +2044,10 @@
}
\l_@@_lang_gender_seq
{ \seq_clear:N \l_@@_lang_gender_seq }
- \keys_set:nV { zref-clever/langfile } \l_tmpa_tl
- \seq_gput_right:Nx \g_@@_loaded_langfiles_seq
+ \keys_set:nV { zref-clever/langfile } \l_@@_tmpa_tl
+ \seq_gput_right:Ne \g_@@_loaded_langfiles_seq
{ \tl_use:c { \@@_language_varname:n {#1} } }
- \msg_info:nnx { zref-clever } { langfile-loaded }
+ \msg_info:nne { zref-clever } { langfile-loaded }
{ \tl_use:c { \@@_language_varname:n {#1} } }
}
{
@@ -2037,7 +2057,7 @@
% There is no point in trying to load it multiple times, if it was not found
% the first time, it won't be the next.
% \begin{macrocode}
- \seq_gput_right:Nx \g_@@_loaded_langfiles_seq
+ \seq_gput_right:Ne \g_@@_loaded_langfiles_seq
{ \tl_use:c { \@@_language_varname:n {#1} } }
}
}
@@ -2045,7 +2065,7 @@
\@esphack
\group_end:
}
-\cs_generate_variant:Nn \@@_provide_langfile:n { x }
+\cs_generate_variant:Nn \@@_provide_langfile:n { e }
% \end{macrocode}
% \end{macro}
%
@@ -2071,14 +2091,14 @@
{
\seq_if_empty:NTF \l_@@_lang_declension_seq
{
- \msg_info:nnxx { zref-clever } { language-no-decl-setup }
+ \msg_info:nnee { zref-clever } { language-no-decl-setup }
{ \l_@@_setup_language_tl } {#1}
}
{
\seq_if_in:NnTF \l_@@_lang_declension_seq {#1}
{ \tl_set:Nn \l_@@_lang_decl_case_tl {#1} }
{
- \msg_info:nnxx { zref-clever } { unknown-decl-case }
+ \msg_info:nnee { zref-clever } { unknown-decl-case }
{#1} { \l_@@_setup_language_tl }
\seq_get_left:NN \l_@@_lang_declension_seq
\l_@@_lang_decl_case_tl
@@ -2092,7 +2112,7 @@
{
\seq_if_empty:NTF \l_@@_lang_gender_seq
{
- \msg_info:nnxxx { zref-clever } { language-no-gender }
+ \msg_info:nneee { zref-clever } { language-no-gender }
{ \l_@@_setup_language_tl } { gender } {#1}
}
{
@@ -2102,13 +2122,13 @@
{ option-only-type-specific } { gender }
}
{
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\clist_map_inline:nn {#1}
{
\seq_if_in:NnTF \l_@@_lang_gender_seq {##1}
- { \seq_put_right:Nn \l_tmpa_seq {##1} }
+ { \seq_put_right:Nn \l_@@_tmpa_seq {##1} }
{
- \msg_info:nnxx { zref-clever }
+ \msg_info:nnee { zref-clever }
{ gender-not-declared }
{ \l_@@_setup_language_tl } {##1}
}
@@ -2138,7 +2158,7 @@
{ gender }
{ seq }
}
- \l_tmpa_seq
+ \l_@@_tmpa_seq
}
}
}
@@ -2461,14 +2481,14 @@
{ \l_@@_setup_language_tl } {#1} { seq }
}
{
- \seq_gclear:N \g_tmpa_seq
+ \seq_gclear:N \g_@@_tmpa_seq
\@@_opt_seq_gset_clist_split:Nn
- \g_tmpa_seq {##1}
+ \g_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
{
\int_compare_p:nNn
- { \seq_count:N \g_tmpa_seq } = { 4 }
+ { \seq_count:N \g_@@_tmpa_seq } = { 4 }
}
{
\@@_opt_seq_gset_eq:cN
@@ -2477,12 +2497,12 @@
{ \l_@@_setup_language_tl }
{#1} { seq }
}
- \g_tmpa_seq
+ \g_@@_tmpa_seq
}
{
- \msg_info:nnxx { zref-clever }
+ \msg_info:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \g_tmpa_seq }
+ {#1} { \seq_count:N \g_@@_tmpa_seq }
}
}
}
@@ -2494,14 +2514,14 @@
{ \l_@@_setup_type_tl } {#1} { seq }
}
{
- \seq_gclear:N \g_tmpa_seq
+ \seq_gclear:N \g_@@_tmpa_seq
\@@_opt_seq_gset_clist_split:Nn
- \g_tmpa_seq {##1}
+ \g_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
{
\int_compare_p:nNn
- { \seq_count:N \g_tmpa_seq } = { 4 }
+ { \seq_count:N \g_@@_tmpa_seq } = { 4 }
}
{
\@@_opt_seq_gset_eq:cN
@@ -2511,12 +2531,12 @@
{ \l_@@_setup_type_tl }
{#1} { seq }
}
- \g_tmpa_seq
+ \g_@@_tmpa_seq
}
{
- \msg_info:nnxx { zref-clever }
+ \msg_info:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \g_tmpa_seq }
+ {#1} { \seq_count:N \g_@@_tmpa_seq }
}
}
}
@@ -2999,8 +3019,8 @@
\bool_if:NTF \l_@@_typeset_range_bool
{
\group_begin:
- \bool_set_false:N \l_tmpa_bool
- \exp_args:Nxx \tl_if_eq:nnT
+ \bool_set_false:N \l_@@_tmpa_bool
+ \exp_args:Nee \tl_if_eq:nnT
{
\@@_extract_unexp:nnn
{#1} { externaldocument } { }
@@ -3012,7 +3032,7 @@
{
\tl_if_eq:NnTF \l_@@_ref_property_tl { page }
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{
\@@_extract_unexp:nnn
{#1} { zc@pgfmt } { }
@@ -3021,10 +3041,10 @@
\@@_extract_unexp:nnn
{#2} { zc@pgfmt } { }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{
\@@_extract_unexp:nnn
{#1} { zc@counter } { }
@@ -3034,7 +3054,7 @@
{#2} { zc@counter } { }
}
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{
\@@_extract_unexp:nnn
{#1} { zc@enclval } { }
@@ -3043,27 +3063,27 @@
\@@_extract_unexp:nnn
{#2} { zc@enclval } { }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
}
}
- \bool_if:NTF \l_tmpa_bool
+ \bool_if:NTF \l_@@_tmpa_bool
{
- \@@_extract_default:Nnvn \l_tmpb_tl
+ \@@_extract_default:Nnvn \l_@@_tmpb_tl
{#2} { l_@@_endrangeprop_tl } { }
}
{
\zref@ifrefcontainsprop
{#2} { \l_@@_ref_property_tl }
{
- \@@_extract_default:Nnvn \l_tmpb_tl
+ \@@_extract_default:Nnvn \l_@@_tmpb_tl
{#2} { l_@@_ref_property_tl } { }
}
- { \tl_set:Nn \l_tmpb_tl { zc@missingproperty } }
+ { \tl_set:Nn \l_@@_tmpb_tl { zc@missingproperty } }
}
\exp_args:NNNV
\group_end:
- \tl_set:Nn #3 \l_tmpb_tl
+ \tl_set:Nn #3 \l_@@_tmpb_tl
}
{
\@@_extract_default:Nnvn #3
@@ -3096,32 +3116,35 @@
{
\group_begin:
\UseHook { zref-clever/endrange-setup }
- \tl_set:Nx \l_tmpa_tl
+ \tl_set:Ne \l_@@_tmpa_tl
{
\@@_extract:nnn
{#1} { \l_@@_ref_property_tl } { }
}
- \tl_set:Nx \l_tmpb_tl
+ \tl_set:Ne \l_@@_tmpb_tl
{
\@@_extract:nnn
{#2} { \l_@@_ref_property_tl } { }
}
- \bool_set_false:N \l_tmpa_bool
- \bool_until_do:Nn \l_tmpa_bool
+ \bool_set_false:N \l_@@_tmpa_bool
+ \bool_until_do:Nn \l_@@_tmpa_bool
{
- \exp_args:Nxx \tl_if_eq:nnTF
- { \tl_head:V \l_tmpa_tl } { \tl_head:V \l_tmpb_tl }
+ \exp_args:Nee \tl_if_eq:nnTF
+ { \tl_head:V \l_@@_tmpa_tl }
+ { \tl_head:V \l_@@_tmpb_tl }
{
- \tl_set:Nx \l_tmpa_tl { \tl_tail:V \l_tmpa_tl }
- \tl_set:Nx \l_tmpb_tl { \tl_tail:V \l_tmpb_tl }
- \tl_if_empty:NT \l_tmpb_tl
- { \bool_set_true:N \l_tmpa_bool }
+ \tl_set:Ne \l_@@_tmpa_tl
+ { \tl_tail:V \l_@@_tmpa_tl }
+ \tl_set:Ne \l_@@_tmpb_tl
+ { \tl_tail:V \l_@@_tmpb_tl }
+ \tl_if_empty:NT \l_@@_tmpb_tl
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
\exp_args:NNNV
\group_end:
- \tl_set:Nn #3 \l_tmpb_tl
+ \tl_set:Nn #3 \l_@@_tmpb_tl
}
{ \tl_set:Nn #3 { zc@missingproperty } }
}
@@ -3153,38 +3176,41 @@
{
\group_begin:
\UseHook { zref-clever/endrange-setup }
- \tl_set:Nx \l_tmpa_tl
+ \tl_set:Ne \l_@@_tmpa_tl
{
\@@_extract:nnn
{#1} { \l_@@_ref_property_tl } { }
}
- \tl_set:Nx \l_tmpb_tl
+ \tl_set:Ne \l_@@_tmpb_tl
{
\@@_extract:nnn
{#2} { \l_@@_ref_property_tl } { }
}
- \bool_set_false:N \l_tmpa_bool
- \@@_is_integer_rgx:VTF \l_tmpa_tl
+ \bool_set_false:N \l_@@_tmpa_bool
+ \@@_is_integer_rgx:VTF \l_@@_tmpa_tl
{
- \@@_is_integer_rgx:VF \l_tmpb_tl
- { \bool_set_true:N \l_tmpa_bool }
+ \@@_is_integer_rgx:VF \l_@@_tmpb_tl
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
- { \bool_set_true:N \l_tmpa_bool }
- \bool_until_do:Nn \l_tmpa_bool
+ { \bool_set_true:N \l_@@_tmpa_bool }
+ \bool_until_do:Nn \l_@@_tmpa_bool
{
- \exp_args:Nxx \tl_if_eq:nnTF
- { \tl_head:V \l_tmpa_tl } { \tl_head:V \l_tmpb_tl }
+ \exp_args:Nee \tl_if_eq:nnTF
+ { \tl_head:V \l_@@_tmpa_tl }
+ { \tl_head:V \l_@@_tmpb_tl }
{
- \tl_set:Nx \l_tmpa_tl { \tl_tail:V \l_tmpa_tl }
- \tl_set:Nx \l_tmpb_tl { \tl_tail:V \l_tmpb_tl }
- \tl_if_empty:NT \l_tmpb_tl
- { \bool_set_true:N \l_tmpa_bool }
+ \tl_set:Ne \l_@@_tmpa_tl
+ { \tl_tail:V \l_@@_tmpa_tl }
+ \tl_set:Ne \l_@@_tmpb_tl
+ { \tl_tail:V \l_@@_tmpb_tl }
+ \tl_if_empty:NT \l_@@_tmpb_tl
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
\exp_args:NNNV
\group_end:
- \tl_set:Nn #3 \l_tmpb_tl
+ \tl_set:Nn #3 \l_@@_tmpb_tl
}
{ \tl_set:Nn #3 { zc@missingproperty } }
}
@@ -3199,42 +3225,48 @@
{
\group_begin:
\UseHook { zref-clever/endrange-setup }
- \tl_set:Nx \l_tmpa_tl
+ \tl_set:Ne \l_@@_tmpa_tl
{
\@@_extract:nnn
{#1} { \l_@@_ref_property_tl } { }
}
- \tl_set:Nx \l_tmpb_tl
+ \tl_set:Ne \l_@@_tmpb_tl
{
\@@_extract:nnn
{#2} { \l_@@_ref_property_tl } { }
}
- \bool_set_false:N \l_tmpa_bool
- \@@_is_integer_rgx:VTF \l_tmpa_tl
+ \bool_set_false:N \l_@@_tmpa_bool
+ \@@_is_integer_rgx:VTF \l_@@_tmpa_tl
{
- \@@_is_integer_rgx:VF \l_tmpb_tl
- { \bool_set_true:N \l_tmpa_bool }
+ \@@_is_integer_rgx:VF \l_@@_tmpb_tl
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
- { \bool_set_true:N \l_tmpa_bool }
- \bool_until_do:Nn \l_tmpa_bool
+ { \bool_set_true:N \l_@@_tmpa_bool }
+ \bool_until_do:Nn \l_@@_tmpa_bool
{
- \exp_args:Nxx \tl_if_eq:nnTF
- { \tl_head:V \l_tmpa_tl } { \tl_head:V \l_tmpb_tl }
+ \exp_args:Nee \tl_if_eq:nnTF
+ { \tl_head:V \l_@@_tmpa_tl }
+ { \tl_head:V \l_@@_tmpb_tl }
{
\bool_lazy_or:nnTF
- { \int_compare_p:nNn { \l_tmpb_tl } > { 99 } }
- { \int_compare_p:nNn { \tl_head:V \l_tmpb_tl } = { 0 } }
+ { \int_compare_p:nNn { \l_@@_tmpb_tl } > { 99 } }
{
- \tl_set:Nx \l_tmpa_tl { \tl_tail:V \l_tmpa_tl }
- \tl_set:Nx \l_tmpb_tl { \tl_tail:V \l_tmpb_tl }
+ \int_compare_p:nNn
+ { \tl_head:V \l_@@_tmpb_tl } = { 0 }
+ }
+ {
+ \tl_set:Ne \l_@@_tmpa_tl
+ { \tl_tail:V \l_@@_tmpa_tl }
+ \tl_set:Ne \l_@@_tmpb_tl
+ { \tl_tail:V \l_@@_tmpb_tl }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
- { \bool_set_true:N \l_tmpa_bool }
+ { \bool_set_true:N \l_@@_tmpa_bool }
}
\exp_args:NNNV
\group_end:
- \tl_set:Nn #3 \l_tmpb_tl
+ \tl_set:Nn #3 \l_@@_tmpb_tl
}
{ \tl_set:Nn #3 { zc@missingproperty } }
}
@@ -3485,7 +3517,7 @@
{ unknown-language-opt } {#1}
}
}
- \@@_provide_langfile:x
+ \@@_provide_langfile:e
{ \l_@@_ref_language_tl }
}
} ,
@@ -3674,7 +3706,7 @@
titleref .code:n =
{
% NOTE Option deprecated in 2022-04-22 for 0.3.0.
- \msg_warning:nnxx { zref-clever }{ option-deprecated } { titleref }
+ \msg_warning:nnee { zref-clever }{ option-deprecated } { titleref }
{ \iow_char:N\\usepackage\iow_char:N\{zref-titleref\iow_char:N\} }
} ,
}
@@ -3689,7 +3721,7 @@
vario .code:n =
{
% NOTE Option deprecated in 2022-04-22 for 0.3.0.
- \msg_warning:nnxx { zref-clever }{ option-deprecated } { vario }
+ \msg_warning:nnee { zref-clever }{ option-deprecated } { vario }
{ \iow_char:N\\usepackage\iow_char:N\{zref-vario\iow_char:N\} }
} ,
}
@@ -4121,21 +4153,24 @@
{ \@@_opt_varname_general:nn {#1} { seq } }
}
{
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\@@_opt_seq_set_clist_split:Nn
- \l_tmpa_seq {##1}
+ \l_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
- { \int_compare_p:nNn { \seq_count:N \l_tmpa_seq } = { 4 } }
+ {
+ \int_compare_p:nNn
+ { \seq_count:N \l_@@_tmpa_seq } = { 4 }
+ }
{
\@@_opt_seq_set_eq:cN
{ \@@_opt_varname_general:nn {#1} { seq } }
- \l_tmpa_seq
+ \l_@@_tmpa_seq
}
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \l_tmpa_seq }
+ {#1} { \seq_count:N \l_@@_tmpa_seq }
}
}
} ,
@@ -4229,7 +4264,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_zcsetup:n #1
{ \keys_set:nn { zref-clever/zcsetup } {#1} }
-\cs_generate_variant:Nn \@@_zcsetup:n { x }
+\cs_generate_variant:Nn \@@_zcsetup:n { e }
% \end{macrocode}
% \end{macro}
%
@@ -4459,24 +4494,27 @@
}
}
{
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\@@_opt_seq_set_clist_split:Nn
- \l_tmpa_seq {##1}
+ \l_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
- { \int_compare_p:nNn { \seq_count:N \l_tmpa_seq } = { 4 } }
+ {
+ \int_compare_p:nNn
+ { \seq_count:N \l_@@_tmpa_seq } = { 4 }
+ }
{
\@@_opt_seq_set_eq:cN
{
\@@_opt_varname_type:enn
{ \l_@@_setup_type_tl } {#1} { seq }
}
- \l_tmpa_seq
+ \l_@@_tmpa_seq
}
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \l_tmpa_seq }
+ {#1} { \seq_count:N \l_@@_tmpa_seq }
}
}
} ,
@@ -4596,14 +4634,14 @@
{
\seq_if_empty:NTF \l_@@_lang_declension_seq
{
- \msg_warning:nnxx { zref-clever } { language-no-decl-setup }
+ \msg_warning:nnee { zref-clever } { language-no-decl-setup }
{ \l_@@_setup_language_tl } {#1}
}
{
\seq_if_in:NnTF \l_@@_lang_declension_seq {#1}
{ \tl_set:Nn \l_@@_lang_decl_case_tl {#1} }
{
- \msg_warning:nnxx { zref-clever } { unknown-decl-case }
+ \msg_warning:nnee { zref-clever } { unknown-decl-case }
{#1} { \l_@@_setup_language_tl }
\seq_get_left:NN \l_@@_lang_declension_seq
\l_@@_lang_decl_case_tl
@@ -4617,7 +4655,7 @@
{
\seq_if_empty:NTF \l_@@_lang_gender_seq
{
- \msg_warning:nnxxx { zref-clever } { language-no-gender }
+ \msg_warning:nneee { zref-clever } { language-no-gender }
{ \l_@@_setup_language_tl } { gender } {#1}
}
{
@@ -4627,13 +4665,13 @@
{ option-only-type-specific } { gender }
}
{
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\clist_map_inline:nn {#1}
{
\seq_if_in:NnTF \l_@@_lang_gender_seq {##1}
- { \seq_put_right:Nn \l_tmpa_seq {##1} }
+ { \seq_put_right:Nn \l_@@_tmpa_seq {##1} }
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ gender-not-declared }
{ \l_@@_setup_language_tl } {##1}
}
@@ -4646,7 +4684,7 @@
{ gender }
{ seq }
}
- \l_tmpa_seq
+ \l_@@_tmpa_seq
}
}
} ,
@@ -4988,14 +5026,14 @@
{
\tl_if_empty:NTF \l_@@_setup_type_tl
{
- \seq_gclear:N \g_tmpa_seq
+ \seq_gclear:N \g_@@_tmpa_seq
\@@_opt_seq_gset_clist_split:Nn
- \g_tmpa_seq {##1}
+ \g_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
{
\int_compare_p:nNn
- { \seq_count:N \g_tmpa_seq } = { 4 }
+ { \seq_count:N \g_@@_tmpa_seq } = { 4 }
}
{
\@@_opt_seq_gset_eq:cN
@@ -5004,23 +5042,23 @@
{ \l_@@_setup_language_tl }
{#1} { seq }
}
- \g_tmpa_seq
+ \g_@@_tmpa_seq
}
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \g_tmpa_seq }
+ {#1} { \seq_count:N \g_@@_tmpa_seq }
}
}
{
- \seq_gclear:N \g_tmpa_seq
+ \seq_gclear:N \g_@@_tmpa_seq
\@@_opt_seq_gset_clist_split:Nn
- \g_tmpa_seq {##1}
+ \g_@@_tmpa_seq {##1}
\bool_lazy_or:nnTF
{ \tl_if_empty_p:n {##1} }
{
\int_compare_p:nNn
- { \seq_count:N \g_tmpa_seq } = { 4 }
+ { \seq_count:N \g_@@_tmpa_seq } = { 4 }
}
{
\@@_opt_seq_gset_eq:cN
@@ -5029,12 +5067,12 @@
{ \l_@@_setup_language_tl }
{ \l_@@_setup_type_tl } {#1} { seq }
}
- \g_tmpa_seq
+ \g_@@_tmpa_seq
}
{
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ refbounds-must-be-four }
- {#1} { \seq_count:N \g_tmpa_seq }
+ {#1} { \seq_count:N \g_@@_tmpa_seq }
}
}
} ,
@@ -5137,10 +5175,10 @@
% Ensure language file for reference language is loaded, if available. We
% cannot rely on \cs{keys_set:nn} for the task, since if the \opt{lang} option
% is set for \texttt{current}, the actual language may have changed outside
-% our control. \cs{@@_provide_langfile:x} does nothing if the language file
+% our control. \cs{@@_provide_langfile:e} does nothing if the language file
% is already loaded.
% \begin{macrocode}
- \@@_provide_langfile:x { \l_@@_ref_language_tl }
+ \@@_provide_langfile:e { \l_@@_ref_language_tl }
% \end{macrocode}
% Process language settings.
% \begin{macrocode}
@@ -5172,11 +5210,11 @@
% \begin{macrocode}
\tl_if_empty:NF \l_@@_zcref_note_tl
{
- \@@_get_rf_opt_tl:nxxN { notesep }
+ \@@_get_rf_opt_tl:neeN { notesep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
- \l_tmpa_tl
- \l_tmpa_tl
+ \l_@@_tmpa_tl
+ \l_@@_tmpa_tl
\l_@@_zcref_note_tl
}
% \end{macrocode}
@@ -5533,9 +5571,9 @@
=
{ \tl_head:N \l_@@_label_enclval_b_tl }
{
- \tl_set:Nx \l_@@_label_enclval_a_tl
+ \tl_set:Ne \l_@@_label_enclval_a_tl
{ \tl_tail:N \l_@@_label_enclval_a_tl }
- \tl_set:Nx \l_@@_label_enclval_b_tl
+ \tl_set:Ne \l_@@_label_enclval_b_tl
{ \tl_tail:N \l_@@_label_enclval_b_tl }
}
{
@@ -5943,15 +5981,15 @@
\bool_set_false:N \l_@@_type_first_refbounds_set_bool
% Get type block options (not type-specific).
- \@@_get_rf_opt_tl:nxxN { tpairsep }
+ \@@_get_rf_opt_tl:neeN { tpairsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_tpairsep_tl
- \@@_get_rf_opt_tl:nxxN { tlistsep }
+ \@@_get_rf_opt_tl:neeN { tlistsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_tlistsep_tl
- \@@_get_rf_opt_tl:nxxN { tlastsep }
+ \@@_get_rf_opt_tl:neeN { tlastsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_tlastsep_tl
@@ -6022,7 +6060,7 @@
{
\tl_if_eq:NnT \l_@@_label_type_a_tl { zc@missingtype }
{
- \msg_warning:nnx { zref-clever } { missing-type }
+ \msg_warning:nne { zref-clever } { missing-type }
{ \l_@@_label_a_tl }
}
\zref@ifrefcontainsprop
@@ -6030,7 +6068,7 @@
{ \l_@@_ref_property_tl }
{ }
{
- \msg_warning:nnxx { zref-clever } { missing-property }
+ \msg_warning:nnee { zref-clever } { missing-property }
{ \l_@@_ref_property_tl }
{ \l_@@_label_a_tl }
}
@@ -6040,91 +6078,91 @@
% options, once per type.
\int_compare:nNnT { \l_@@_label_count_int } = { 0 }
{
- \@@_get_rf_opt_tl:nxxN { namesep }
+ \@@_get_rf_opt_tl:neeN { namesep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_namesep_tl
- \@@_get_rf_opt_tl:nxxN { pairsep }
+ \@@_get_rf_opt_tl:neeN { pairsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_pairsep_tl
- \@@_get_rf_opt_tl:nxxN { listsep }
+ \@@_get_rf_opt_tl:neeN { listsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_listsep_tl
- \@@_get_rf_opt_tl:nxxN { lastsep }
+ \@@_get_rf_opt_tl:neeN { lastsep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_lastsep_tl
- \@@_get_rf_opt_tl:nxxN { rangesep }
+ \@@_get_rf_opt_tl:neeN { rangesep }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_rangesep_tl
- \@@_get_rf_opt_tl:nxxN { namefont }
+ \@@_get_rf_opt_tl:neeN { namefont }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_namefont_tl
- \@@_get_rf_opt_tl:nxxN { reffont }
+ \@@_get_rf_opt_tl:neeN { reffont }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_reffont_tl
- \@@_get_rf_opt_tl:nxxN { endrangefunc }
+ \@@_get_rf_opt_tl:neeN { endrangefunc }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_endrangefunc_tl
- \@@_get_rf_opt_tl:nxxN { endrangeprop }
+ \@@_get_rf_opt_tl:neeN { endrangeprop }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_endrangeprop_tl
- \@@_get_rf_opt_bool:nnxxN { cap } { false }
+ \@@_get_rf_opt_bool:nneeN { cap } { false }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_cap_bool
- \@@_get_rf_opt_bool:nnxxN { abbrev } { false }
+ \@@_get_rf_opt_bool:nneeN { abbrev } { false }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_abbrev_bool
- \@@_get_rf_opt_bool:nnxxN { rangetopair } { true }
+ \@@_get_rf_opt_bool:nneeN { rangetopair } { true }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_rangetopair_bool
- \@@_get_rf_opt_seq:nxxN { refbounds-first }
+ \@@_get_rf_opt_seq:neeN { refbounds-first }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_first_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-first-sg }
+ \@@_get_rf_opt_seq:neeN { refbounds-first-sg }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_first_sg_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-first-pb }
+ \@@_get_rf_opt_seq:neeN { refbounds-first-pb }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_first_pb_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-first-rb }
+ \@@_get_rf_opt_seq:neeN { refbounds-first-rb }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_first_rb_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-mid }
+ \@@_get_rf_opt_seq:neeN { refbounds-mid }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_mid_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-mid-rb }
+ \@@_get_rf_opt_seq:neeN { refbounds-mid-rb }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_mid_rb_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-mid-re }
+ \@@_get_rf_opt_seq:neeN { refbounds-mid-re }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_mid_re_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-last }
+ \@@_get_rf_opt_seq:neeN { refbounds-last }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_last_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-last-pe }
+ \@@_get_rf_opt_seq:neeN { refbounds-last-pe }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_last_pe_seq
- \@@_get_rf_opt_seq:nxxN { refbounds-last-re }
+ \@@_get_rf_opt_seq:neeN { refbounds-last-re }
{ \l_@@_label_type_a_tl }
{ \l_@@_ref_language_tl }
\l_@@_refbounds_last_re_seq
@@ -6188,7 +6226,7 @@
\bool_set_true:N \l_@@_type_first_refbounds_set_bool
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6211,7 +6249,7 @@
{
\int_compare:nNnTF { \l_@@_ref_count_int } < { 2 }
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6219,7 +6257,7 @@
}
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_lastsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6237,7 +6275,7 @@
% We know `range_beg_is_first_bool' is false, since this is
% the second element in the range, but the third or more in
% the type list.
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN
@@ -6250,7 +6288,7 @@
\l_@@_type_first_refbounds_set_bool
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6289,7 +6327,7 @@
\int_compare:nNnTF
{ \l_@@_ref_count_int } < { 2 }
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN
@@ -6298,7 +6336,7 @@
}
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_lastsep_tl
\@@_get_ref:VN
@@ -6320,7 +6358,7 @@
\l_@@_refbounds_first_pb_seq
\bool_set_true:N
\l_@@_type_first_refbounds_set_bool
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6328,14 +6366,14 @@
}
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
\l_@@_range_beg_label_tl
\l_@@_refbounds_mid_seq
}
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_lastsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6359,7 +6397,7 @@
\int_compare:nNnTF
{ \l_@@_ref_count_int } < { 2 }
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN
@@ -6373,7 +6411,7 @@
\l_@@_type_first_refbounds_set_bool
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_lastsep_tl
\@@_get_ref:VN
@@ -6390,7 +6428,7 @@
\l_@@_range_beg_label_tl
\l_@@_label_a_tl
\l_@@_range_end_ref_tl
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref_endrange:VVN
@@ -6400,7 +6438,7 @@
}
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6422,7 +6460,7 @@
\zref@ifrefundefined { \l_@@_type_first_label_tl }
{ }
{
- \msg_warning:nnx { zref-clever } { single-element-range }
+ \msg_warning:nne { zref-clever } { single-element-range }
{ \l_@@_type_first_label_type_tl }
}
}
@@ -6442,7 +6480,7 @@
% Test: `zc-typeset01.lvt': "Last of type: option range to pair"
\bool_if:NTF \l_@@_next_maybe_range_bool
{
- \tl_set:Nx \l_@@_typeset_queue_curr_tl
+ \tl_set:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_pairsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6465,7 +6503,7 @@
\l_@@_type_first_label_tl
\l_@@_label_a_tl
\l_@@_range_end_ref_tl
- \tl_set:Nx \l_@@_typeset_queue_curr_tl
+ \tl_set:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref_endrange:VVN
@@ -6475,7 +6513,7 @@
}
}
{
- \tl_set:Nx \l_@@_typeset_queue_curr_tl
+ \tl_set:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6504,14 +6542,14 @@
\bool_if:nTF
{ \l_@@_typeset_ref_bool && \l_@@_typeset_name_bool }
{
- \tl_put_left:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_left:Ne \l_@@_typeset_queue_curr_tl
{ \@@_get_ref_first: }
}
{
\bool_if:NTF \l_@@_typeset_ref_bool
{
% Test: `zc-typeset01.lvt': "Last of type: option typeset ref"
- \tl_put_left:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_left:Ne \l_@@_typeset_queue_curr_tl
{
\@@_get_ref:VN \l_@@_type_first_label_tl
\l_@@_type_first_refbounds_seq
@@ -6521,7 +6559,7 @@
\bool_if:NTF \l_@@_typeset_name_bool
{
% Test: `zc-typeset01.lvt': "Last of type: option typeset name"
- \tl_set:Nx \l_@@_typeset_queue_curr_tl
+ \tl_set:Ne \l_@@_typeset_queue_curr_tl
{
\bool_if:NTF \l_@@_name_in_link_bool
{
@@ -6554,7 +6592,7 @@
% typeset either "ref" or "name". Still, leave here a
% sensible fallback, equal to the behavior of "both".
% Test: `zc-typeset01.lvt': "Last of type: option typeset none"
- \tl_put_left:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_left:Ne \l_@@_typeset_queue_curr_tl
{ \@@_get_ref_first: }
}
}
@@ -6705,7 +6743,7 @@
{ 0 }
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6728,7 +6766,7 @@
}
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6740,7 +6778,7 @@
{ \l_@@_range_same_count_int } = { 1 }
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6774,7 +6812,7 @@
}
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6796,7 +6834,7 @@
}
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6805,7 +6843,7 @@
}
}
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -6825,7 +6863,7 @@
}
{
\int_incr:N \l_@@_ref_count_int
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_listsep_tl
\@@_get_ref:VN
@@ -6846,7 +6884,7 @@
\l_@@_range_beg_label_tl
\l_@@_label_a_tl
\l_@@_range_end_ref_tl
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref_endrange:VVN
@@ -6856,7 +6894,7 @@
}
}
{
- \tl_put_right:Nx \l_@@_typeset_queue_curr_tl
+ \tl_put_right:Ne \l_@@_typeset_queue_curr_tl
{
\exp_not:V \l_@@_rangesep_tl
\@@_get_ref:VN \l_@@_label_a_tl
@@ -7214,7 +7252,7 @@
{
\tl_if_empty:NF \l_@@_typeset_queue_curr_tl
{
- \msg_warning:nnx { zref-clever }
+ \msg_warning:nne { zref-clever }
{ nudge-plural-when-sg }
{ \l_@@_type_first_label_type_tl }
}
@@ -7230,7 +7268,7 @@
}
}
{
- \msg_warning:nnx { zref-clever }
+ \msg_warning:nne { zref-clever }
{ nudge-comptosing }
{ \l_@@_type_first_label_type_tl }
}
@@ -7239,7 +7277,7 @@
{ \l_@@_nudge_gender_bool }
{ ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
{
- \@@_get_rf_opt_seq:nxxN { gender }
+ \@@_get_rf_opt_seq:neeN { gender }
{ \l_@@_type_first_label_type_tl }
{ \l_@@_ref_language_tl }
\l_@@_type_name_gender_seq
@@ -7249,14 +7287,14 @@
{
\seq_if_empty:NTF \l_@@_type_name_gender_seq
{
- \msg_warning:nnxxx { zref-clever }
+ \msg_warning:nneee { zref-clever }
{ nudge-gender-not-declared-for-type }
{ \l_@@_ref_gender_tl }
{ \l_@@_type_first_label_type_tl }
{ \l_@@_ref_language_tl }
}
{
- \msg_warning:nnxxxx { zref-clever }
+ \msg_warning:nneeee { zref-clever }
{ nudge-gender-mismatch }
{ \l_@@_type_first_label_type_tl }
{ \l_@@_ref_gender_tl }
@@ -7299,7 +7337,7 @@
{
\tl_clear:N \l_@@_type_name_tl
\bool_set_true:N \l_@@_type_name_missing_bool
- \msg_warning:nnxx { zref-clever } { missing-name }
+ \msg_warning:nnee { zref-clever } { missing-name }
{ \l_@@_name_format_tl }
{ \l_@@_type_first_label_type_tl }
}
@@ -7359,7 +7397,7 @@
\tl_clear:N \l_@@_type_name_tl
\bool_set_true:N
\l_@@_type_name_missing_bool
- \msg_warning:nnxx { zref-clever }
+ \msg_warning:nnee { zref-clever }
{ missing-name }
{ \l_@@_name_format_tl }
{ \l_@@_type_first_label_type_tl }
@@ -7459,13 +7497,13 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_labels_in_sequence:nn #1#2
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{ \@@_extract_unexp:nnn {#1} { externaldocument } { } }
{ \@@_extract_unexp:nnn {#2} { externaldocument } { } }
{
\tl_if_eq:NnTF \l_@@_ref_property_tl { page }
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{ \@@_extract_unexp:nnn {#1} { zc@pgfmt } { } }
{ \@@_extract_unexp:nnn {#2} { zc@pgfmt } { } }
{
@@ -7487,11 +7525,11 @@
}
}
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{ \@@_extract_unexp:nnn {#1} { zc@counter } { } }
{ \@@_extract_unexp:nnn {#2} { zc@counter } { } }
{
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{ \@@_extract_unexp:nnn {#1} { zc@enclval } { } }
{ \@@_extract_unexp:nnn {#2} { zc@enclval } { } }
{
@@ -7514,7 +7552,7 @@
% and we should not even consider this is still a range. If they are equal,
% though, of course it is a range, and it is the same.
% \begin{macrocode}
- \exp_args:Nxx \tl_if_eq:nnT
+ \exp_args:Nee \tl_if_eq:nnT
{
\@@_extract_unexp:nvn {#1}
{ l_@@_ref_property_tl } { }
@@ -7586,7 +7624,7 @@
}
}
}
-\cs_generate_variant:Nn \@@_get_rf_opt_tl:nnnN { nxxN }
+\cs_generate_variant:Nn \@@_get_rf_opt_tl:nnnN { neeN }
% \end{macrocode}
% \end{macro}
%
@@ -7629,7 +7667,7 @@
}
}
}
-\cs_generate_variant:Nn \@@_get_rf_opt_seq:nnnN { nxxN }
+\cs_generate_variant:Nn \@@_get_rf_opt_seq:nnnN { neeN }
% \end{macrocode}
% \end{macro}
%
@@ -7672,7 +7710,7 @@
}
}
}
-\cs_generate_variant:Nn \@@_get_rf_opt_bool:nnnnN { nnxxN }
+\cs_generate_variant:Nn \@@_get_rf_opt_bool:nnnnN { nneeN }
% \end{macrocode}
% \end{macro}
%
@@ -7820,10 +7858,10 @@
% The \cls{memoir} document class has quite a number of cross-referencing
% related features, mostly dealing with captions, subfloats, and notes. It
% used to be the case that a good number of them where implemented in ways
-% which make difficult the use of \pkg{zref}, particularly \cs{zlabel}, short
-% of redefining the whole stuff ourselves. Problematic cases included: i)
-% side captions; ii) bilingual captions; iii) subcaption references; and iv)
-% footnotes, verbfootnotes, sidefootnotes, and pagenotes.
+% which made difficult the use of \pkg{zref}, particularly \cs{zlabel}.
+% Problematic cases included: i) side captions; ii) bilingual captions; iii)
+% subcaption references; and iv) footnotes, verbfootnotes, sidefootnotes, and
+% pagenotes.
%
% However, since then, the situation has much improved, given two main
% upstream changes: i) the kernel's new \texttt{label} hook with argument,
@@ -7919,7 +7957,7 @@
\bool_new:N \l_@@_amsmath_subequations_bool
\AddToHook { env / subequations / begin }
{
- \@@_zcsetup:x
+ \@@_zcsetup:e
{
counterresetby =
{
@@ -8012,7 +8050,7 @@
\@bsphack
\seq_map_inline:Nn #1
{
- \exp_args:Nx \tl_if_eq:nnTF
+ \exp_args:Ne \tl_if_eq:nnTF
{ \@@_extract_unexp:nnn {##1} { zc@type } { } }
{ equation }
{
@@ -8020,7 +8058,7 @@
{ \string \MT@newlabel {##1} }
}
{
- \exp_args:Nx \tl_if_eq:nnT
+ \exp_args:Ne \tl_if_eq:nnT
{ \@@_extract_unexp:nnn {##1} { zc@type } { } }
{ parentequation }
{
@@ -8063,7 +8101,7 @@
\bool_new:N \l_@@_breqn_dgroup_bool
\AddToHook { env / dgroup / begin }
{
- \@@_zcsetup:x
+ \@@_zcsetup:e
{
counterresetby =
{
@@ -8161,26 +8199,26 @@
{
\@@_if_package_loaded:nT { enumitem }
{
- \int_set:Nn \l_tmpa_int { 5 }
+ \int_set:Nn \l_@@_tmpa_int { 5 }
\bool_while_do:nn
{
\cs_if_exist_p:c
- { c@ enum \int_to_roman:n { \l_tmpa_int } }
+ { c@ enum \int_to_roman:n { \l_@@_tmpa_int } }
}
{
- \@@_zcsetup:x
+ \@@_zcsetup:e
{
counterresetby =
{
- enum \int_to_roman:n { \l_tmpa_int } =
- enum \int_to_roman:n { \l_tmpa_int - 1 }
+ enum \int_to_roman:n { \l_@@_tmpa_int } =
+ enum \int_to_roman:n { \l_@@_tmpa_int - 1 }
} ,
countertype =
- { enum \int_to_roman:n { \l_tmpa_int } = item } ,
+ { enum \int_to_roman:n { \l_@@_tmpa_int } = item } ,
}
- \int_incr:N \l_tmpa_int
+ \int_incr:N \l_@@_tmpa_int
}
- \int_compare:nNnT { \l_tmpa_int } > { 5 }
+ \int_compare:nNnT { \l_@@_tmpa_int } > { 5 }
{ \msg_info:nnn { zref-clever } { compat-package } { enumitem } }
}
}
diff --git a/macros/latex/contrib/zref-clever/zref-clever.ins b/macros/latex/contrib/zref-clever/zref-clever.ins
index 668d25788f..cb81bd0cbf 100644
--- a/macros/latex/contrib/zref-clever/zref-clever.ins
+++ b/macros/latex/contrib/zref-clever/zref-clever.ins
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-clever".
%
-% Copyright (C) 2021-2023 Gustavo Barros
+% Copyright (C) 2021-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-clever.dtx,
% zref-clever.ins,
@@ -50,7 +49,7 @@
This file was generated from file(s) of the LaTeX package "zref-clever".
-Copyright (C) 2021-2023 Gustavo Barros
+Copyright (C) 2021-2023 gusbrs
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -63,8 +62,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-This work is "maintained" (as per LPPL maintenance status) by
- Gustavo Barros.
+This work is "maintained" (as per LPPL maintenance status) by gusbrs.
This work consists of the files zref-clever.dtx,
zref-clever.ins,
diff --git a/macros/latex/contrib/zref-vario/CHANGELOG.md b/macros/latex/contrib/zref-vario/CHANGELOG.md
index ac681c2740..fd935e7a8c 100644
--- a/macros/latex/contrib/zref-vario/CHANGELOG.md
+++ b/macros/latex/contrib/zref-vario/CHANGELOG.md
@@ -1,6 +1,13 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.9...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.10...HEAD)
+
+## [v0.1.10](https://github.com/gusbrs/zref-vario/compare/v0.1.9...v0.1.10) (2023-11-14)
+
+### Changed
+- Don't use `expl3` public scratch temporary variables.
+- Prefer `e-type` expansion.
+- Require 2023-11-01 LaTeX kernel.
## [v0.1.9](https://github.com/gusbrs/zref-vario/compare/v0.1.8...v0.1.9) (2023-08-15)
diff --git a/macros/latex/contrib/zref-vario/README.md b/macros/latex/contrib/zref-vario/README.md
index a76d0b945c..51817bfb40 100644
--- a/macros/latex/contrib/zref-vario/README.md
+++ b/macros/latex/contrib/zref-vario/README.md
@@ -2,8 +2,8 @@
**Extended LaTeX page cross-references with varioref and zref-clever**
-Author: Gustavo Barros
-Maintainer: Gustavo Barros
+Author: gusbrs
+Maintainer: gusbrs
`zref-vario` offers a compatibility layer for `varioref` to be used alongside
`zref-clever`. It provides "`\z...`" counterparts to `varioref`'s main
diff --git a/macros/latex/contrib/zref-vario/zref-vario-code.pdf b/macros/latex/contrib/zref-vario/zref-vario-code.pdf
index a27a211487..27e2ec44e4 100644
--- a/macros/latex/contrib/zref-vario/zref-vario-code.pdf
+++ b/macros/latex/contrib/zref-vario/zref-vario-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-vario/zref-vario-code.tex b/macros/latex/contrib/zref-vario/zref-vario-code.tex
index d1774f8f21..050f6fc92c 100644
--- a/macros/latex/contrib/zref-vario/zref-vario-code.tex
+++ b/macros/latex/contrib/zref-vario/zref-vario-code.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-vario".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-vario.dtx,
% zref-vario.ins,
diff --git a/macros/latex/contrib/zref-vario/zref-vario-doc.pdf b/macros/latex/contrib/zref-vario/zref-vario-doc.pdf
index df0b0813a2..28e134ebe3 100644
--- a/macros/latex/contrib/zref-vario/zref-vario-doc.pdf
+++ b/macros/latex/contrib/zref-vario/zref-vario-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-vario/zref-vario-doc.tex b/macros/latex/contrib/zref-vario/zref-vario-doc.tex
index 0adfee69b2..d6187077b7 100644
--- a/macros/latex/contrib/zref-vario/zref-vario-doc.tex
+++ b/macros/latex/contrib/zref-vario/zref-vario-doc.tex
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-vario".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-vario.dtx,
% zref-vario.ins,
@@ -94,18 +93,17 @@
\title{%
The \pkg{zref-vario} package%
- \thanks{This file describes \fileversion, released \filedate.}%
\texorpdfstring{\\{}\medskip{}}{ - }%
User manual%
\texorpdfstring{\medskip{}}{}%
}
\author{%
- Gustavo Barros%
- \thanks{\url{https://github.com/gusbrs/zref-vario}}%
-}
+ \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+ \url{https://github.com/gusbrs/zref-vario}\\
+ \url{https://www.ctan.org/pkg/zref-vario}}{gusbrs}}
-\date{\filedate}
+\date{Version \fileversion\ -- \filedate}
\maketitle
diff --git a/macros/latex/contrib/zref-vario/zref-vario.dtx b/macros/latex/contrib/zref-vario/zref-vario.dtx
index 0be32b12bf..9e125cce76 100644
--- a/macros/latex/contrib/zref-vario/zref-vario.dtx
+++ b/macros/latex/contrib/zref-vario/zref-vario.dtx
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-vario".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-vario.dtx,
% zref-vario.ins,
@@ -89,18 +88,17 @@
%
% \title{^^A
% The \pkg{zref-vario} package^^A
-% \thanks{This file describes \fileversion, released \filedate.}^^A
% \texorpdfstring{\\{}\medskip{}}{ - }^^A
% Code documentation^^A
% \texorpdfstring{\medskip{}}{}^^A
% }
%
% \author{^^A
-% Gustavo Barros^^A
-% \thanks{\url{https://github.com/gusbrs/zref-vario}}^^A
-% }
+% \texorpdfstring{\texttt{gusbrs}\\[0.8em]
+% \url{https://github.com/gusbrs/zref-vario}\\
+% \url{https://www.ctan.org/pkg/zref-vario}}{gusbrs}}
%
-% \date{\filedate}
+% \date{Version \fileversion\ -- \filedate}
%
% \maketitle
%
@@ -127,19 +125,28 @@
%
%
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
+\def\zrefvario@required@kernel{2023-11-01}
+\NeedsTeXFormat{LaTeX2e}[\zrefvario@required@kernel]
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\IfFormatAtLeastTF{\zrefvario@required@kernel}
+ {}
+ {%
+ \PackageError{zref-vario}{LaTeX kernel too old}
+ {%
+ 'zref-vario' requires a LaTeX kernel \zrefvario@required@kernel\space or newer.%
+ }%
+ }%
% \end{macrocode}
%
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-vario} {2023-08-15} {0.1.9}
+\ProvidesExplPackage {zref-vario} {2023-11-14} {0.1.10}
{Extended LaTeX page cross-references with varioref and zref-clever}
% \end{macrocode}
%
%
-% Required packages. Note that \pkg{zref-clever} \texttt{v0.2.0-alpha}, from
-% 2022-01-28, requires a kernel 2021-11-15 or newer.
+% Required packages.
%
% \begin{macrocode}
\RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha
@@ -151,6 +158,19 @@
% in ways that break \pkg{zref-vario}.
%
%
+% \begin{macro}
+% {
+% \l_@@_tmpa_tl ,
+% \l_@@_tmpb_tl ,
+% }
+% Temporary scratch variables.
+% \begin{macrocode}
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+% \end{macrocode}
+% \end{macro}
+%
+%
% \section{Options}
%
% \subsection*{\cs{zvsetup}}
@@ -301,7 +321,7 @@
{ \@@_ref_opt_name_lang_tl:nn { zv_unknown_language } {#2} }
}
}
-\cs_generate_variant:Nn \@@_ref_opt_tl_get:nnN { xnN }
+\cs_generate_variant:Nn \@@_ref_opt_tl_get:nnN { enN }
\cs_new_protected:Npn \@@_ref_opt_cs_get:nnnN #1#2#3#4
{
\cs_if_exist:cTF
@@ -326,7 +346,7 @@
}
}
}
-\cs_generate_variant:Nn \@@_ref_opt_cs_get:nnnN { xnnN }
+\cs_generate_variant:Nn \@@_ref_opt_cs_get:nnnN { ennN }
% \end{macrocode}
% \end{macro}
%
@@ -393,7 +413,7 @@
{
\tl_set:Nn \l_@@_setup_language_tl {#1}
\keys_set:nn { zref-vario/langsetup } {#2}
- \seq_gput_right:Nx \g_@@_setup_languages_seq
+ \seq_gput_right:Ne \g_@@_setup_languages_seq
{ \@@_base_lang:n {#1} }
}
{ \msg_warning:nnn { zref-vario } { unknown-language-setup } {#1} }
@@ -593,49 +613,49 @@
{
reftextfaceafter =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextfaceafter } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextfacebefore =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextfacebefore } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextafter =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextafter } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextbefore =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextbefore } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextcurrent =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextcurrent } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextfaraway =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextfaraway } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextpagerange =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextpagerange } { \l_@@_ref_language_tl }
\zref@default
} ,
reftextlabelrange =
{
- \msg_warning:nnxx { zref-vario } { missing-string }
+ \msg_warning:nnee { zref-vario } { missing-string }
{ reftextlabelrange } { \l_@@_ref_language_tl }
\zref@default
} ,
@@ -654,10 +674,10 @@
{
\AddToHook { begindocument }
{
- \seq_if_in:NxF \g_@@_setup_languages_seq
+ \seq_if_in:NeF \g_@@_setup_languages_seq
{ \@@_base_lang:e { \l_@@_ref_language_tl } }
{
- \msg_warning:nnx { zref-vario } { language-not-setup }
+ \msg_warning:nne { zref-vario } { language-not-setup }
{ \l_@@_ref_language_tl }
}
}
@@ -787,47 +807,47 @@
\cs_set_eq:NN \vref@pagenum \@@_vref_pagenum:Nn
\cs_set_eq:NN \vrefpagenum \@@_vrefpagenum:Nn
\cs_set_eq:NN \vref@label \@@_vref_label:n
- \@@_ref_opt_tl_get:xnN
+ \@@_ref_opt_tl_get:enN
{ \l_@@_ref_language_tl }
{ reftextfaceafter }
\reftextfaceafter
- \@@_ref_opt_tl_get:xnN
+ \@@_ref_opt_tl_get:enN
{ \l_@@_ref_language_tl }
{ reftextfacebefore }
\reftextfacebefore
- \@@_ref_opt_tl_get:xnN
+ \@@_ref_opt_tl_get:enN
{ \l_@@_ref_language_tl }
{ reftextafter }
\reftextafter
- \@@_ref_opt_tl_get:xnN
+ \@@_ref_opt_tl_get:enN
{ \l_@@_ref_language_tl }
{ reftextbefore }
\reftextbefore
- \@@_ref_opt_tl_get:xnN
+ \@@_ref_opt_tl_get:enN
{ \l_@@_ref_language_tl }
{ reftextcurrent }
\reftextcurrent
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ reftextfaraway } { n }
\reftextfaraway
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ reftextpagerange } { nn }
\reftextpagerange
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ reftextlabelrange } { nn }
\reftextlabelrange
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ vrefformat } { nn }
\vrefformat
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ vrefrangeformat } { nnn }
\vrefrangeformat
- \@@_ref_opt_cs_get:xnnN
+ \@@_ref_opt_cs_get:ennN
{ \l_@@_ref_language_tl }
{ fullrefformat } { n }
\fullrefformat
@@ -899,9 +919,9 @@
{ \l_@@_with_vcheck_bool }
{
\zrefcheck_zrefvario_label:
- \vref@pagenum \l_tmpa_tl { \the\c@vrcnt @vr }
- \vrefpagenum \l_tmpb_tl {#1}
- \tl_if_eq:NNT \l_tmpa_tl \l_tmpb_tl
+ \vref@pagenum \l_@@_tmpa_tl { \the\c@vrcnt @vr }
+ \vrefpagenum \l_@@_tmpb_tl {#1}
+ \tl_if_eq:NNT \l_@@_tmpa_tl \l_@@_tmpb_tl
{
\zrefcheck_zrefvario_run_check_on_label:Vn
\l_@@_vcheck_tl {#1}
@@ -978,12 +998,12 @@
{ \l_@@_with_vcheck_bool }
{
\zrefcheck_zrefvario_label:
- \vrefpagenum \l_tmpa_tl {#1}
- \vrefpagenum \l_tmpb_tl {#2}
- \tl_if_eq:NNT \l_tmpa_tl \l_tmpb_tl
+ \vrefpagenum \l_@@_tmpa_tl {#1}
+ \vrefpagenum \l_@@_tmpb_tl {#2}
+ \tl_if_eq:NNT \l_@@_tmpa_tl \l_@@_tmpb_tl
{
- \vref@pagenum \l_tmpa_tl { \the\c@vrcnt @vr }
- \tl_if_eq:NNT \l_tmpa_tl \l_tmpb_tl
+ \vref@pagenum \l_@@_tmpa_tl { \the\c@vrcnt @vr }
+ \tl_if_eq:NNT \l_@@_tmpa_tl \l_@@_tmpb_tl
{
\zrefcheck_zrefvario_run_check_on_label:Vn
\l_@@_vcheck_tl {#1}
diff --git a/macros/latex/contrib/zref-vario/zref-vario.ins b/macros/latex/contrib/zref-vario/zref-vario.ins
index 211c1ff0b2..cb37ba5c3f 100644
--- a/macros/latex/contrib/zref-vario/zref-vario.ins
+++ b/macros/latex/contrib/zref-vario/zref-vario.ins
@@ -4,7 +4,7 @@
%
% This file is part of the LaTeX package "zref-vario".
%
-% Copyright (C) 2022-2023 Gustavo Barros
+% Copyright (C) 2022-2023 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -17,8 +17,7 @@
% version 2005/12/01 or later.
%
%
-% This work is "maintained" (as per LPPL maintenance status) by
-% Gustavo Barros.
+% This work is "maintained" (as per LPPL maintenance status) by gusbrs.
%
% This work consists of the files zref-vario.dtx,
% zref-vario.ins,
@@ -50,7 +49,7 @@
This file was generated from file(s) of the LaTeX package "zref-vario".
-Copyright (C) 2022-2023 Gustavo Barros
+Copyright (C) 2022-2023 gusbrs
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -63,8 +62,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-This work is "maintained" (as per LPPL maintenance status) by
- Gustavo Barros.
+This work is "maintained" (as per LPPL maintenance status) by gusbrs.
This work consists of the files zref-vario.dtx,
zref-vario.ins,