summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
committerNorbert Preining <norbert@preining.info>2024-03-16 03:02:08 +0000
commit966f9ba332e49c29e961cb86e08f97d70eda51f6 (patch)
treee111edb864721bb0dac9db16b4e41a8a489ea456 /macros/latex/contrib
parent12679ab7d3c2a210f4123163671b532b8b55d5f9 (diff)
CTAN sync 202403160302
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/cleveref-forward/cleveref-forward.sty2
-rw-r--r--macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.pdfbin65462 -> 65745 bytes
-rw-r--r--macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.tex18
-rw-r--r--macros/latex/contrib/currfile/README9
-rw-r--r--macros/latex/contrib/currfile/README.txt19
-rw-r--r--macros/latex/contrib/currfile/currfile.dtx38
-rw-r--r--macros/latex/contrib/currfile/currfile.pdfbin182606 -> 182848 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx8
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin608488 -> 608496 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex6
-rw-r--r--macros/latex/contrib/leaflet/leaflet-manual.pdfbin92539 -> 98080 bytes
-rw-r--r--macros/latex/contrib/leaflet/leaflet.dtx28
-rw-r--r--macros/latex/contrib/leaflet/leaflet.pdfbin247180 -> 292950 bytes
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.pdfbin1634655 -> 1634999 bytes
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.sty172
-rw-r--r--macros/latex/contrib/robust-externalize/robust-externalize.tex6
-rw-r--r--macros/latex/contrib/zref-clever/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.pdfbin1218402 -> 1217642 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.tex2
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.pdfbin344423 -> 344167 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.tex3
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.dtx43
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.ins4
23 files changed, 282 insertions, 84 deletions
diff --git a/macros/latex/contrib/cleveref-forward/cleveref-forward.sty b/macros/latex/contrib/cleveref-forward/cleveref-forward.sty
index c23612adc0..d966294234 100644
--- a/macros/latex/contrib/cleveref-forward/cleveref-forward.sty
+++ b/macros/latex/contrib/cleveref-forward/cleveref-forward.sty
@@ -13,7 +13,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage{cleveref-forward}
- {2024/02/25} {}
+ {2024/03/15} {}
{Forward-referencing functionality for cleveref}
\keys_define:nn { cleveref-forward }
diff --git a/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.pdf b/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.pdf
index 96eb808702..7c6cb6a31d 100644
--- a/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.pdf
+++ b/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.tex b/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.tex
index fec042a3a6..2fc25c6f5b 100644
--- a/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.tex
+++ b/macros/latex/contrib/cleveref-forward/demo/cleveref-forward-demo.tex
@@ -36,7 +36,7 @@
backgroundcolor = \color{code-background},
basewidth = .5em,
escapeinside = {(*}{*)},
- alsoletter = {_,:},
+ alsoletter = {_:},
% numbers = left,
% firstnumber = last,
numberstyle = \scriptsize\ttfamily,
@@ -114,7 +114,7 @@
}
-\title{Demonstration on the usage and configuration of \textquote{\textsf{cleveref-forward}}}
+\title{\textsc{demonstration on the usage and configuration of}\\[.3\baselineskip]\fbox{\textsf{cleveref-forward}}}
\author{}
\date{\today[only-year-month]}
@@ -122,7 +122,7 @@
\maketitle
-\section{With the default configuration}
+\section{Demonstration with the default configuration}
\subsection{Theorem-like environments}
@@ -137,7 +137,7 @@
Some proof that involves the \cref[used by]{lem:result} and the equations \labelcref[used by and on]{eq:Euler}, \labelcref[used by]{eq:1,eq:2} in the next section. Here, \lstinline|\restorelabel| makes sure that this \texttt{proof} environment is being recognized as the theorem itself.
\end{proof}
-\subsection{Equations}
+\subsection{Displayed equations}
By default, the forward referencing infomation is placed immediately after the equation.
@@ -159,7 +159,7 @@ It can also be used for some other types, such as items in \texttt{enumerate} li
\section{Specify a default option}
-If you wish to apply the mode \commandoption{used on}, or \commandoption{used by}, or \commandoption{used by and on} to all \lstinline|\cref| (and \lstinline|\labelcref|, etc.), you can use the package option \packageoption{default=}\meta{mode}. Then you don't need to write it everywhere. And if you wish to manually change this \meta{mode} somewhere, you can still specify it as the command option; and if you don't want the message to display for some references, you may also use the option \commandoption{no use} on the corresponding \lstinline|\label| to disable the related messages.
+If you wish to apply the mode \commandoption{used on}, or \commandoption{used by}, or \commandoption{used by and on} to all \lstinline|\cref| (and \lstinline|\labelcref|, etc.), you can use the package option \packageoption{default=}\meta{mode}. Then you don't need to write it everywhere. And if you wish to manually change this \meta{mode} somewhere, you can still specify it as the command option; and if you don't want the message to display for some references, you may also use the option \commandoption{no use} (or \commandoption{not use}) on the corresponding \lstinline|\label| to disable the related messages.
\section{Customizations}
@@ -490,17 +490,17 @@ When writing in some European languages, it is possible to specify the definite
\UseLanguage{English}
-\subsection{Regarding the customization}
+\subsection{Regarding the customization for languages with declensions}
If you wish to change the content of the messages in such cases, you might need to be careful about the definite article and declension involved. For example, in German, if you wish to change the text to \textquote{Erscheint in ... auf ...} (\emph{Appears in ... on ...}), you need to write:
\begin{code}
\SetUsedOnMessageText{Erscheint auf~#1.}
\SetUsedByMessageText{Erscheint #1.}
\SetUsedByAndOnMessageText{Erscheint #1 auf~#2.}
-\SetForwardReferenceRefForm{\crefthe[in,dat.]}
-\SetForwardReferencePagerefForm{\cpagerefthe[noun]}
+\SetForwardReferenceRefForm{\crefthe[in,(*\commandoption{dat.}*)]}
+\SetForwardReferencePagerefForm{\cpagerefthe[(*\commandoption{noun}*)]}
\end{code}
-which set the \lstinline|\cref| command to use the definite article \textquote{in} and the declension \textquote{Dativ}, and hide the definite article when using \lstinline|\cpageref|.
+which set the \lstinline|\cref| command to use the definite article \textquote{in} and the declension \textquote{Dativ} (via the command option \commandoption{dat.}), and hide the definite article when using \lstinline|\cpageref| (via the command option \commandoption{noun}). For more detailed usage of these commands, please refer to the documentation of the package \textsf{crefthe}.
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/currfile/README b/macros/latex/contrib/currfile/README
deleted file mode 100644
index 26eb70dd62..0000000000
--- a/macros/latex/contrib/currfile/README
+++ /dev/null
@@ -1,9 +0,0 @@
-LaTeX package 'currfile'
-~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
-Repository: https://github.com/MartinScharrer/currfile
-Issues: https://github.com/MartinScharrer/currfile/issues
-
-Provides macros holding the file name information (dir, base name, extension, full name and full path) for
-files read by LaTeX's \input and \include macros.
-
diff --git a/macros/latex/contrib/currfile/README.txt b/macros/latex/contrib/currfile/README.txt
new file mode 100644
index 0000000000..daa2fe60ff
--- /dev/null
+++ b/macros/latex/contrib/currfile/README.txt
@@ -0,0 +1,19 @@
+LaTeX package 'currfile'
+========================
+
+Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer@web.de>
+License: LaTeX Project Public License, v1.3c or later: http://www.latex-project.org/lppl.txt
+Repository: https://github.com/MartinScharrer/currfile
+Issues: https://github.com/MartinScharrer/currfile/issues
+
+Provides macros holding the file name information (dir, base name, extension, full name and full path) for files read by
+LaTeX's \input and \include macros.
+
+The package provides macros holding file name information (directory, base name, extension, full name and full path) for
+files read by LaTeX \input and \include macros; it uses the file hooks provided by the author's filehook. In
+particular, it restores the parent file name after the trailing \clearpage of an \included file; as a result, the macros
+may be usefully employed in the page header and footer of the last printed page of such a file.
+
+The depth of inclusion is made available, together with the "parent" (including file) and "parents" (all including files
+to the root of the tree).
+
diff --git a/macros/latex/contrib/currfile/currfile.dtx b/macros/latex/contrib/currfile/currfile.dtx
index 539c8dc728..991d1417c3 100644
--- a/macros/latex/contrib/currfile/currfile.dtx
+++ b/macros/latex/contrib/currfile/currfile.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
%%
-%% Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de>
+%% Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer@web.de>
%% ----------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -29,10 +29,10 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesFile{currfile.dtx}[%
%<=*DATE>
- 2022/10/10
+ 2024/03/14
%<=/DATE>
%<=*VERSION>
- v0.8
+ v1.0
%<=/VERSION>
DTX file for currfile package]
@@ -393,7 +393,16 @@
% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=currfile,prefix=currfile@}
-
+% \end{macrocode}
+%
+% Handle already loaded \pkg{currfile-abspath} package.
+% \begin{macrocode}
+\@ifpackageloaded{currfile-abspath}{%
+ \let\currfile@mainext\relax
+}{}%
+% \end{macrocode}
+%
+% \begin{macrocode}
\@ifpackageloaded{fink}{%
\DeclareStringOption[\fnk@mainext]{mainext}%
\DeclareStringOption[\fnk@maindir]{maindir}%
@@ -436,13 +445,28 @@
\currfile@realmainfilefalse
\fi
\fi
-
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+\@tempswafalse
\ifcurrfile@abspath
- \RequirePackage{currfile-abspath}
+ \@tempswatrue
\else
\ifcurrfile@realmainfile
- \RequirePackage{currfile-abspath}
+ \@tempswatrue
\fi\fi
+
+\if@tempswa
+ \endgroup
+ \@ifpackageloaded{currfile-abspath}{%
+ \PackageWarning{currfile}{Sub-package 'currfile-abspath' already loaded beforehand.
+ This might lead to wrong results when non-default options are used.}%
+ }{}%
+ \RequirePackage{currfile-abspath}
+\else
+ \endgroup
+\fi
% \end{macrocode}
%
%
diff --git a/macros/latex/contrib/currfile/currfile.pdf b/macros/latex/contrib/currfile/currfile.pdf
index 21c3c7f4b2..1d7ec3f6ed 100644
--- a/macros/latex/contrib/currfile/currfile.pdf
+++ b/macros/latex/contrib/currfile/currfile.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 98f5ddab46..2ce884d5f3 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/03/13}{2024ao}
+\ProvidesExplClass{easybook}{2024/03/15}{2024ap}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/03/13}{2024ao}
+\ProvidesExplPackage{easybase}{2024/03/15}{2024ap}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1852,7 +1852,7 @@
\captionsetup[table][bi-second]{name = Table}
}
\eb_at_begin_environment:nn
- { tabular,tabularx,longtblr,longtable }
+ { tabular,tabularx,longtable }
{ \setspread{\fp_use:N \l__eb_spread_table_fp} }
\UseTblrLibrary{booktabs}
@@ -2392,7 +2392,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/03/13}{2024ao}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/03/15}{2024ap}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index b053b576ac..2fe646ac7e 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 5ce75e40fa..104080059b 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024ao,
- date = 2024/03/13,
+ version = v2024ap,
+ date = 2024/03/15,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -1407,7 +1407,7 @@
\shortversion{v = 1.638,date = 2022/03/04,changes = 增加目录条目样式选项注册命令 \cs{RegisterTocName}。}
\shortversion{v = 1.644,date = 2022/03/10,changes = 增加浮动环境目录声明命令 \cs{DeclareFloatList} 配合 \pkg*{caption} 宏包。}
\shortversion{v = 1.682,date = 2022/05/01,changes = 将迷你页判断命令 \cs{notminipage} 改为被保护命令兼容 \pkg*{circledtext} 宏包。}
- \begin{version}[v = 2024ao,date = 2024/03/13]
+ \begin{version}[v = 2024ap,date = 2024/03/15]
\fixed
\item 修复图表等浮动环境题注目录中条目标签编号的计数器值显示错误问题。
\item 修复附录命令 \cs{appendix} 的可选参数设置英文目录中条目名字和编号失效的问题。
diff --git a/macros/latex/contrib/leaflet/leaflet-manual.pdf b/macros/latex/contrib/leaflet/leaflet-manual.pdf
index fcb4ae6761..50d29fa6e2 100644
--- a/macros/latex/contrib/leaflet/leaflet-manual.pdf
+++ b/macros/latex/contrib/leaflet/leaflet-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/leaflet/leaflet.dtx b/macros/latex/contrib/leaflet/leaflet.dtx
index 1e1ead3205..78e49bddc8 100644
--- a/macros/latex/contrib/leaflet/leaflet.dtx
+++ b/macros/latex/contrib/leaflet/leaflet.dtx
@@ -5,7 +5,7 @@
% (c) 2000 Walter Schmidt <w.a.schmidt@gmx.net>
% (c) 2002-2004 Rolf Niepraschk <Rolf.Niepraschk@gmx.de> and
% Hubert Gäßlein
-% (c) 2012-2020 Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
+% (c) 2012-2024 Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,14 +21,14 @@
%
% \iffalse
%<class>\ProvidesClass{leaflet}
-%<class> [2020/11/06 v2.1a LaTeX document class (JS,WaS,RN,HjG)]
+%<class> [2024/03/12 v2.1c LaTeX document class (JS,WaS,RN,HjG)]
%
%<*driver|manual>
%<driver>\def\filename{leaflet.dtx}
%<manual>\def\filename{leaflet-manual.tex}
-\def\fileversion{v2.1a} % change this when leaflet-manual changed, too.
-\def\filedate{2020/11/06}
-\def\docdate {2020/11/06} % change this when leaflet-manual changed, too.
+\def\fileversion{v2.1c} % change this when leaflet-manual changed, too.
+\def\filedate{2024/03/12}
+\def\docdate {2024/03/12} % change this when leaflet-manual changed, too.
%</driver|manual>
%<*driver>
\listfiles
@@ -51,7 +51,7 @@
%</driver>
% \fi
%
-% \CheckSum{1290}
+% \CheckSum{1291}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -605,6 +605,7 @@
\setlength{\labelwidth}{\leftmargin}
\addtolength{\labelwidth}{-\labelsep}
\pagestyle{empty}
+\AddToHook{cmd/maketitle/after}{\thispagestyle{empty}}%
\headheight\z@
\headsep\z@
\footskip\z@
@@ -831,11 +832,11 @@
% parameter |#1|. The starred version draws only the line.
% \begin{macrocode}
\newcommand*\CutLine{%
- \@ifstar{\@tempswatrue\LL@CutLine}{\@tempswafalse\LL@CutLine}}
+ \@ifstar{\@tempswafalse\LL@CutLine}{\@tempswatrue\LL@CutLine}}
\@onlypreamble\CutLine
\newcommand*\LL@CutLine[2][.]{%
\ifLL@combine
- \ifx\Scissors\@empty\@tempswatrue\fi
+ \ifx\Scissors\@empty\@tempswafalse\fi
\if .#1%
\def\@tempa{\dotfill}%
\else\if -#1%
@@ -845,7 +846,7 @@
\noexpand\AddToBackground{#2}{%
\noexpand\put(0,0){%
\noexpand\rotatebox{90}{\noexpand\makebox(\paperheight,0){%
- \noexpand\normalsize\@tempa\if@tempswa\else\noexpand\Scissors%
+ \noexpand\normalsize\@tempa\if@tempswa\noexpand\Scissors%
\@tempa\@tempa\noexpand\Scissors\@tempa\fi}}}}%
}%
\@tempb
@@ -1176,7 +1177,6 @@
\begin{document}
\maketitle
-\thispagestyle{empty}
%%\LARGE
@@ -1303,8 +1303,8 @@ third page.
\item
The macro |\CutLine| draws a vertical dotted line with
scissor symbols between the page indicated by its argument and the
-preceding one.
-The starred version omits the scissors symbols.
+preceding one. The optional parameter |[-]| changes the dotted line to a
+solid one. The starred version omits the scissors symbols.
\item
In case the text does not fit on six pages, a warning (or error,
@@ -1327,8 +1327,8 @@ The typeface to be used for the section headings is given by the macro
Both macros default to |\bfseries| and can be changed using
|\renewcommand*|.
-The horizontal and vertical and margins of the (small) pages
-default to 8\,mm and 11\,mm, respectively, and can be changed
+The horizontal and vertical margins of the (small) pages
+have the standard sizes 8 mm and 11 mm, respectively, and can be changed
using |\setmargins|, as explained above.
This may be useful, if the printing engine exhibits larger unprintable
margins.
diff --git a/macros/latex/contrib/leaflet/leaflet.pdf b/macros/latex/contrib/leaflet/leaflet.pdf
index 7eb81eb1cc..ae9e58bf75 100644
--- a/macros/latex/contrib/leaflet/leaflet.pdf
+++ b/macros/latex/contrib/leaflet/leaflet.pdf
Binary files differ
diff --git a/macros/latex/contrib/robust-externalize/robust-externalize.pdf b/macros/latex/contrib/robust-externalize/robust-externalize.pdf
index 92914f2833..afb803aa2c 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 5deeec6c84..a84155e474 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.8 Cache anything (tikz, latex, python) in a robust, efficient and pure way.]
+\ProvidesPackage{robust-externalize}[2024/03/15 v2.9 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
@@ -251,6 +251,7 @@
\msg_new:nnn {robExt}{enabled parallel no shell escape}{Warning:~you~enabled~parallel~compilation~but~shell-escape~is~disabled.}
\msg_new:nnn {robExt}{rerun because parallel}{Warning:~Compiling~all~missing~figures~in~parallel~with~"#1".~You~need~to~rerun~LaTeX~to~include~them.}
\msg_new:nnn {robExt}{gpgetvar recompilation needed}{Warning:~you~need~to~recompile~as~the~gpgetvar~variable~"#1"~does~not~exist~yet.}
+\msg_new:nnn {robExt}{warning res not defined}{Warning:~the~result~\\res{#1}~is~not~defined,~maybe~try~to~recompile..}
% dummy placeholders added if image is not present
\def\robExtImagePlaceholderIfManualMode{
@@ -857,7 +858,7 @@ if __name__ == '__main__':
\NewDocumentCommand{\robExtPlaceholderFromString}{smm}{
- \str_set_eq:cN { l__robExt_placeholder_#2_str } {#3}
+ \str_set_eq:cN { l__robExt_placeholder_#2_str } #3
\checkIfPlaceholderNameIsLegal{#2}
\IfBooleanTF {#1} {} {\robExtAddPlaceholderToList{#2}}
}
@@ -2808,6 +2809,9 @@ if __name__ == '__main__':
recompile/.code={\def\robExtForceRecompilation{}},
do not recompile/.code={\let\robExtForceRecompilation\undefined},
set compilation command/.code={\robExtSetCompilationCommand{#1}},
+ change source extension/.style={
+ add before placeholder/.expanded={__ROBEXT_COMPILATION_COMMAND__}{\robExtCp\space "__ROBEXT_SOURCE_FILE__" "__ROBEXT_OUTPUT_PREFIX__.#1" &&},
+ },
% like "set compilation command" but moves the "__ROBEXT_OUTPUT_PDF__-tmp" to "__ROBEXT_OUTPUT_PDF__" if
% there is no error.
set compilation command move if no error/.style={
@@ -3264,6 +3268,38 @@ if __name__ == '__main__':
}
\let\cacheMe\robExtCacheMe
+\ExplSyntaxOn
+%% #1: Arguments, #2: content to externalize
+\str_new:N \__robExt_tmp_contain_code_str
+\tl_new:N \__robExt_tmp_contain_code_tl
+\NewDocumentCommand{\robExtCacheMeCode}{O{}+v}{%
+ {% Group
+ %% We store the input in a non-string element for efficiently implementing "auto forward"
+ \edef\robExtUserInputCacheMe{\unexpanded{#2}}%
+ \tl_set:Nn \__robExt_tmp_contain_code_tl {#2}
+ \tl_replace_all:Nen \__robExt_tmp_contain_code_tl {\char_generate:nn{13}{12}} {^^J}
+ \str_set:Ne \__robExt_tmp_contain_code_str {\tl_to_str:e {\__robExt_tmp_contain_code_tl}}
+ %\str_show:N \__robExt_tmp_contain_code_str
+ %\tl_replace_all:Nnn \__robExt_tmp_contain_code_str {^^M} {b}
+ %\str_show:N \__robExt_tmp_contain_code_str
+ \pgfkeys{%
+ /robExt/.cd,%
+ %% This is needed notably if the cached elements are nested, like the include command uses itself a tikz
+ %% picture etc cached via \cacheTikz... It it hard to reset everything efficiently (like we might not
+ %% want to reset all compilation commands etc), so you can add here stuff that might need to be restored
+ %% later.
+ reset,
+ /utils/exec={\robExtPlaceholderFromString{__ROBEXT_MAIN_CONTENT_ORIG__}{\__robExt_tmp_contain_code_str}},
+ default~style,%
+ defaultPlaceholderFromCodeStyle,
+ #1,
+ }%
+ \robExtEvaluateCompileAndInclude%
+ }%
+}
+\let\cacheMeCode\robExtCacheMeCode
+\ExplSyntaxOff
+
%% #1: Arguments, #2: content to externalize
\NewDocumentEnvironment{RobExtCacheMe}{m+b}{%
\robExtCacheMe[#1]{#2}%
@@ -3748,6 +3784,138 @@ print_file.close()
\robExtCopyGroupPlaceholders{python print code result}{main}
\robExtRegisterGroupPlaceholders{python print code result}
+%%%%%%
+%%%%%% Group "python exec"
+%%%%%%
+
+\robExtClearGroupPlaceholders{main}
+
+% if we set res = XXX or res[""] = XXX it will print it by default, if we do instead res[42] = XXX
+% it will not load it. To make this easy to program, we create an element for the empty string,
+% this way we can always \res{} in the include command.
+
+\begin{RobExtPlaceholderFromCode}[remove spaces until=>]{__ROBEXT_PYTHON_EXEC_TEMPLATE__}
+ > def toMacro(x):
+ > if hasattr(x, '__toMacro'):
+ > return x.__toMacro()
+ > else:
+ > return str(x)
+ >
+ > __ROBEXT_PYTHON_EXEC_LIBRARY_CHANGES__
+ > __ROBEXT_PYTHON_EXEC_CUSTOM_TO_MACRO_DEF__
+ > # We create a special class extending dict to check if the user just did res[42] = xxx
+ > # or res = foo, as in that case we will just print the result directly.
+ > class DictToExportToMacros(dict):
+ > pass
+ > res = DictToExportToMacros()
+ > res[""] = ""
+ > __ROBEXT_PYTHON_EXEC_RES_EQUALITY____ROBEXT_MAIN_CONTENT_ORIG__
+ > if not isinstance(res, DictToExportToMacros):
+ > write_to_out(r"\gdef\robExtResMacro{" + toMacro(res) + r"}")
+ > else:
+ > for k in res:
+ > # We create a macro with csname to allow numbers in the name etc and parallel compilation
+ > write_to_out(r"\expandafter\gdef\csname robExtResMacro" + str(k) + r"\endcsname{" + toMacro(res[k]) + r"}")
+\end{RobExtPlaceholderFromCode}
+
+\robExtSetPlaceholder{__ROBEXT_PYTHON_EXEC_RES_EQUALITY__}{}
+\robExtSetPlaceholder{__ROBEXT_PYTHON_EXEC_LIBRARY_CHANGES__}{}
+\begin{RobExtPlaceholderFromCode}{__ROBEXT_PYTHON_EXEC_CUSTOM_TO_MACRO_DEF__}
+\end{RobExtPlaceholderFromCode}
+
+% Some macro always expect a number to work, and must be expandable
+\NewDocumentCommand{\robExtResForceNumber}{m}{%
+ \ifcsname robExtResMacro#1\endcsname%
+ \csname robExtResMacro#1\endcsname%
+ \else%
+ 404%
+ \fi%
+}
+
+\def\robExtNoResult#1{%
+ \textbf{??}%
+}
+\NewDocumentCommand{\robExtRes}{m}{%
+ \ifcsname robExtResMacro#1\endcsname%
+ \csname robExtResMacro#1\endcsname%
+ \else%
+ \msg_warning:nnx{robExt}{warning res not defined}{#1}%%
+ \robExtNoRes{#1}%
+ \fi%
+}
+\let\res\robExtRes
+
+\robExtConfigure{
+ new preset={python exec res}{
+ python,
+ % we do that so that custom include command does not pick the result from previous runs locally
+ /utils/exec={\let\robExtResMacro\undefined},
+ import placeholders={__ROBEXT_PYTHON_EXEC_CUSTOM_TO_MACRO_DEF__,__ROBEXT_PYTHON_EXEC_RES_EQUALITY__,__ROBEXT_PYTHON_EXEC_TEMPLATE__,__ROBEXT_PYTHON_EXEC_LIBRARY_CHANGES__},
+ custom include command={\robExtRes{}},
+ set placeholder={__ROBEXT_MAIN_CONTENT__}{__ROBEXT_PYTHON_EXEC_TEMPLATE__},
+ },
+ new preset={python exec}{
+ python exec res,
+ set placeholder={__ROBEXT_PYTHON_EXEC_RES_EQUALITY__}{res =},
+ },
+}
+
+\robExtCopyGroupPlaceholders{python exec}{main}
+\robExtRegisterGroupPlaceholders{python exec}
+
+%%%%%%
+%%%%%% Group "sage" and "sage res"
+%%%%%%
+
+\robExtClearGroupPlaceholders{main}
+
+\robExtSetPlaceholder{__ROBEXT_SAGE_EXEC__}{sage}
+
+% We need to overwrite some definitions as it adds a .sage in front automatically by default
+\begin{RobExtPlaceholderFromCode}[]{__ROBEXT_SAGE_EXEC_LIBRARY_CHANGES__}
+def get_filename_from_extension(extension):
+ '''
+ If you want to create a file with extension 'extension' (with the appropriate base name), this command
+ is for you. For instance get_filename_from_extension(".mp4") would return something like
+ robExt-somehash.mp4
+ the extension can also be like get_filename_from_extension("-out.tex") etc.
+ '''
+ return os.path.join(get_cache_folder(), "__ROBEXT_OUTPUT_PREFIX__" + extension)
+
+ROBEXT_PLOT_SAVE_FORMAT = "png"
+ROBEXT_PLOT_SAVE_OPTIONS = {}
+ROBEXT_PLOT_ID = 0
+
+def __plot_graphics_to_macro(self):
+ global ROBEXT_PLOT_SAVE_FORMAT
+ global ROBEXT_PLOT_ID
+ global ROBEXT_PLOT_SAVE_OPTIONS
+ filename = get_file_base() + f"plot-{ROBEXT_PLOT_ID}.{ROBEXT_PLOT_SAVE_FORMAT}"
+ self.save(filename, **ROBEXT_PLOT_SAVE_OPTIONS)
+ ROBEXT_PLOT_ID += 1
+ return filename
+
+sage.plot.graphics.Graphics.__toMacro = __plot_graphics_to_macro
+
+\end{RobExtPlaceholderFromCode}
+
+\robExtConfigure{
+ new preset={sage res}{
+ python exec res,
+ import placeholders={__ROBEXT_SAGE_EXEC__,__ROBEXT_SAGE_EXEC_LIBRARY_CHANGES__},
+ set placeholder={__ROBEXT_PYTHON_EXEC_LIBRARY_CHANGES__}{__ROBEXT_SAGE_EXEC_LIBRARY_CHANGES__},
+ % Sage expects the extension .sage
+ set compilation command={__ROBEXT_SAGE_EXEC__ "__ROBEXT_OUTPUT_PREFIX__.sage"},
+ change source extension=sage,
+ },
+ new preset={sage}{
+ sage res,
+ set placeholder={__ROBEXT_PYTHON_EXEC_RES_EQUALITY__}{res =},
+ },
+}
+
+\robExtCopyGroupPlaceholders{python exec}{main}
+\robExtRegisterGroupPlaceholders{python exec}
%%%%%%
%%%%%% Group "verbatim"
diff --git a/macros/latex/contrib/robust-externalize/robust-externalize.tex b/macros/latex/contrib/robust-externalize/robust-externalize.tex
index 049cfb5443..ca51191989 100644
--- a/macros/latex/contrib/robust-externalize/robust-externalize.tex
+++ b/macros/latex/contrib/robust-externalize/robust-externalize.tex
@@ -105,7 +105,7 @@
{\Large\bfseries Cache anything (\tikzname, tikz-cd, python…),\\in a robust, efficient and pure way.}
\vspace{1em}
- {Léo Colisson \quad Version 2.8}\\[3mm]
+ {Léo Colisson \quad Version 2.9}\\[3mm]
{\href{https://github.com/leo-colisson/robust-externalize}{\texttt{github.com/leo-colisson/robust-externalize}}}
\end{center}
@@ -4932,6 +4932,10 @@ Options > Configure TeXstudio > Editor > Replace tabs in text with spaces
\section{Changelog}
\begin{itemize}
+\item v2.9 (2024/03/15)
+ \begin{itemize}
+ \item Bug that may forbid the package to load has been fixed (you might encounter |ERROR: Missing = inserted for \ifnum|)
+ \end{itemize}
\item v2.8 (current master, not yet released):
\begin{itemize}
\item Fix a regression bug introduced in 2.7: |python print code and result| was adding a new line above the code printed. This is fixed now.
diff --git a/macros/latex/contrib/zref-clever/CHANGELOG.md b/macros/latex/contrib/zref-clever/CHANGELOG.md
index c770811b3f..89c3c1414c 100644
--- a/macros/latex/contrib/zref-clever/CHANGELOG.md
+++ b/macros/latex/contrib/zref-clever/CHANGELOG.md
@@ -1,6 +1,12 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.3...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.4...HEAD)
+
+## [v0.4.4](https://github.com/gusbrs/zref-clever/compare/v0.4.3...v0.4.4) (2024-03-14)
+
+### Changed
+- Use `\noeqref` instead of `mathtools`' internals to support `showonlyrefs`
+ option in `mathtools` compatibility module.
## [v0.4.3](https://github.com/gusbrs/zref-clever/compare/v0.4.2...v0.4.3) (2023-11-14)
diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.pdf b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
index 41da795ac7..4dd6a24efc 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 5e5b84dd11..8aebe70d6f 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 gusbrs
+% Copyright (C) 2021-2024 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
index c0ea22459a..9973f6d546 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 ca2baa3709..744732ade0 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.tex
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
@@ -2562,7 +2562,7 @@ of support for other packages were a valuable reference. Hence, the
accumulated experience of \pkg{cleveref} allowed for \pkg{zref-clever} to
start on a more solid foundation than would otherwise be the case.
-The long term efforts of the \LaTeX3 \cs{Team} around \pkg{expl3} and
+The long term efforts of the \LaTeX{} Project Team around \pkg{expl3} and
\pkg{xparse} have also left their marks in this package. By implementing
powerful tools and smoothing several regular programming tasks, they have
certainly reduced my entry barrier to \LaTeX{} programming and enabled me to
@@ -2640,6 +2640,7 @@ were generously provided by (in chronological order):
% 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
+ % 2024-01-20: https://github.com/gusbrs/zref-clever/pull/25
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 1a6e2ea44f..5767e6ab4f 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 gusbrs
+% Copyright (C) 2021-2024 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -166,7 +166,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2023-11-14} {0.4.3}
+\ProvidesExplPackage {zref-clever} {2024-03-14} {0.4.4}
{Clever LaTeX cross-references based on zref}
% \end{macrocode}
%
@@ -5231,7 +5231,7 @@
% \end{macrocode}
% Integration with \pkg{mathtools}.
% \begin{macrocode}
- \bool_if:NT \l_@@_mathtools_showonlyrefs_bool
+ \bool_if:NT \l_@@_mathtools_loaded_bool
{
\@@_mathtools_showonlyrefs:n
{ \l_@@_zcref_labels_seq }
@@ -8037,40 +8037,25 @@
% it's worth it.
%
% \begin{macrocode}
-\bool_new:N \l_@@_mathtools_showonlyrefs_bool
+\bool_new:N \l_@@_mathtools_loaded_bool
\@@_compat_module:nn { mathtools }
{
\@@_if_package_loaded:nT { mathtools }
{
- \MH_if_boolean:nT { show_only_refs }
+ \bool_set_true:N \l_@@_mathtools_loaded_bool
+ \cs_new_protected:Npn \@@_mathtools_showonlyrefs:n #1
{
- \bool_set_true:N \l_@@_mathtools_showonlyrefs_bool
- \cs_new_protected:Npn \@@_mathtools_showonlyrefs:n #1
+ \seq_map_inline:Nn #1
{
- \@bsphack
- \seq_map_inline:Nn #1
- {
- \exp_args:Ne \tl_if_eq:nnTF
- { \@@_extract_unexp:nnn {##1} { zc@type } { } }
- { equation }
- {
- \protected@write \@auxout { }
- { \string \MT@newlabel {##1} }
- }
- {
- \exp_args:Ne \tl_if_eq:nnT
- { \@@_extract_unexp:nnn {##1} { zc@type } { } }
- { parentequation }
- {
- \protected@write \@auxout { }
- { \string \MT@newlabel {##1} }
- }
- }
- }
- \@esphack
+ \tl_set:Ne \l_@@_tmpa_tl
+ { \@@_extract_unexp:nnn {##1} { zc@type } { } }
+ \bool_lazy_or:nnT
+ { \str_if_eq_p:Vn \l_@@_tmpa_tl { equation } }
+ { \str_if_eq_p:Vn \l_@@_tmpa_tl { parentequation } }
+ { \noeqref {##1} }
}
- \msg_info:nnn { zref-clever } { compat-package } { mathtools }
}
+ \msg_info:nnn { zref-clever } { compat-package } { mathtools }
}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/zref-clever/zref-clever.ins b/macros/latex/contrib/zref-clever/zref-clever.ins
index cb81bd0cbf..17e4599190 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 gusbrs
+% Copyright (C) 2021-2024 gusbrs
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -49,7 +49,7 @@
This file was generated from file(s) of the LaTeX package "zref-clever".
-Copyright (C) 2021-2023 gusbrs
+Copyright (C) 2021-2024 gusbrs
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this