diff options
author | Norbert Preining <norbert@preining.info> | 2023-08-25 03:00:47 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-08-25 03:00:47 +0000 |
commit | ba73c7edc85ac1310d82920c5f432993f8a9af23 (patch) | |
tree | 46730fefd96488c7fb8ccd7a65e2af40e037dc95 /macros | |
parent | fa4f3dd7e8be851df6afdaf4658fe87e1738a6c4 (diff) |
CTAN sync 202308250300
Diffstat (limited to 'macros')
33 files changed, 570 insertions, 270 deletions
diff --git a/macros/generic/expex-acro/README.md b/macros/generic/expex-acro/README.md index b1ef6962b4..5bafc46b16 100644 --- a/macros/generic/expex-acro/README.md +++ b/macros/generic/expex-acro/README.md @@ -1,6 +1,6 @@ # expex-acro This package is a small wrapper for the excellent [expex](https://ctan.org/pkg/expex), adding ways to define, use, and summarize glossing abbreviations. It also provides commands to refer to examples, as well as some inline formatting commands commonly used in linguistics. -e-mail: florianmatter@gmail.com +e-mail: fmatter@mailbox.org Released under the LaTeX Project Public License v1.3c or later, see [https://www.latex-project.org/lppl.txt](https://www.latex-project.org/lppl.txt).
\ No newline at end of file diff --git a/macros/generic/expex-acro/expex-acro.dtx b/macros/generic/expex-acro/expex-acro.dtx index e5d5d5d9f2..6eda6ef051 100644 --- a/macros/generic/expex-acro/expex-acro.dtx +++ b/macros/generic/expex-acro/expex-acro.dtx @@ -16,7 +16,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01] %<package>\ProvidesPackage{expex-acro} -%<package> [2022/05/17 v0.0.2 ] +%<package> [2023/08/23 v0.0.3 ] %<*package> %</package> %<*driver> @@ -47,6 +47,7 @@ %\CheckSum{0} +%\changes{v0.0.3}{2023/08/23}{More versatile exref command in LaTeX label mode; removed underscores from abbreviations.} %\changes{v0.0.2}{2022/05/17}{Options for predefined abbreviations and exref modes.} %\changes{v0.0.1}{2022/04/28}{Initial release} @@ -144,7 +145,7 @@ To use \LaTeX{} |\label|s: %\RenewDocumentCommand{\exref}{ o m }{ % \IfValueTF{#1} {(\ref{#2}#1)}{(\ref{#2})}} % The alternative is to use the usual \LaTeX{} |\label| commands in your examples, like |\label{ex:1}| in \exref{ex:1} above. -% The corresponding usage is |\exref|\oarg{range}\marg{id}. +% The corresponding usage is |\exref|\oarg{range}\oarg{id2}\marg{id}. % In this mode, one can directly refer to subexamples: % \iffalse %<*example> @@ -155,7 +156,7 @@ To use \LaTeX{} |\label|s: % \iffalse %</example> % \fi -%The optional argument is simply inserted after the mandatory argument; ranges of subexamples can be done this way. +%The first optional argument is simply inserted after the mandatory argument; ranges of subexamples can be done this way. % \iffalse %<*example> % \fi @@ -165,6 +166,7 @@ To use \LaTeX{} |\label|s: % \iffalse %</example> % \fi +% The second optional argument is interpreted as the start of an example range, ending with the mandatory argument. %\section{Glossing abbreviations}\label{sec:abbrevs} %\textsf{expex-acro} loads the \textsf{acro} package for defining glossing abbreviations, displaying them in running text, and printing a list of the ones used. %\subsection{Package options} @@ -582,8 +584,8 @@ or \DeclareAcronym{rep}{short=rep,long=repetitive,short-format=\scshape} \DeclareAcronym{resum}{short=resum,long=resumptive,short-format=\scshape} \DeclareAcronym{rev}{short=rev,long=reversative,short-format=\scshape} -\DeclareAcronym{s_a_}{short=S\textsubscript{A},long=S~marked~like~A,short-format=\scshape} -\DeclareAcronym{s_p_}{short=S\textsubscript{P},long=S~marked~like~P,short-format=\scshape} +\DeclareAcronym{sa}{short=S\textsubscript{A},long=S~marked~like~A,short-format=\scshape} +\DeclareAcronym{sp}{short=S\textsubscript{P},long=S~marked~like~P,short-format=\scshape} \DeclareAcronym{sap}{short=sap,long=speech~act~participant,short-format=\scshape} \DeclareAcronym{sem}{short=sem,long=semelfactive,short-format=\scshape} \DeclareAcronym{seq}{short=seq,long=sequential,short-format=\scshape} @@ -633,11 +635,20 @@ or } } } { - \ProvideDocumentCommand{\exref}{ o m }{ + \ProvideDocumentCommand{\exref}{ o o m }{ \IfValueTF{#1} { - (\ref{#2}#1) + \IfValueTF{#2} { + (\ref{#3}-\ref{#2}#1) + }{ + (\ref{#3}#1) + } }{ - (\ref{#2}) + \IfValueTF{#2} { + (\ref{#3}-\ref{#2}) + }{ + (\ref{#3}) + } + } } diff --git a/macros/generic/expex-acro/expex-acro.pdf b/macros/generic/expex-acro/expex-acro.pdf Binary files differindex 6f14251f81..99a1da51c7 100644 --- a/macros/generic/expex-acro/expex-acro.pdf +++ b/macros/generic/expex-acro/expex-acro.pdf diff --git a/macros/generic/witharrows/witharrows-french.pdf b/macros/generic/witharrows/witharrows-french.pdf Binary files differindex 3ed2d0f411..9b545653f4 100644 --- a/macros/generic/witharrows/witharrows-french.pdf +++ b/macros/generic/witharrows/witharrows-french.pdf diff --git a/macros/generic/witharrows/witharrows-french.tex b/macros/generic/witharrows/witharrows-french.tex index 4e81cb1194..12837ba201 100644 --- a/macros/generic/witharrows/witharrows-french.tex +++ b/macros/generic/witharrows/witharrows-french.tex @@ -99,7 +99,7 @@ l'instruction habituelle : |\usepackage{witharrows}|. \medskip Les flèches sont tracées avec Tikz et donc \textbf{plusieurs compilations peuvent être nécessaires}.\footnote{Si - vous utilisez Overleaf, Overleaf effectue automatiquement le nombre de compilations nécessaire.} + vous utilisez Overleaf, Overleaf effectue automatiquement un nombre de compilations suffisant (en utilisant |latexmk|).} \bigskip Cette extension fournit un environnement |{WithArrows}| pour construire des alignements d'équations @@ -1924,15 +1924,32 @@ l'abscisse de la marge droite de la boîte de composition courante (en prenant e L'extension \pkg{witharrows} fournit une commande |\WithArrowsNewStyle| pour définir des styles d'une manière similaire aux «styles» de Tikz. +\smallskip La commande |\WithArrowsNewStyle| prend deux arguments obligatoires. Le premier est le nom du style et le second est une liste de couples clé-valeur. La portée -de la definition ainsi faite par |\WithArrowsNewStyle| est le groupe TeX courant. - +de la definition ainsi faite par |\WithArrowsNewStyle| est le groupe TeX courant.\footnote{On rappelle que, en + particulier, tout environnement LaTeX est un groupe TeX.} +\smallskip Le style peut être utilisé comme une clé au niveau du document (avec |\WithArrowsOptions|), au niveau d'un environnement (via les arguments optionnels) ou bien encore dans une autre commande |\WithArrowsNewStyle|. +\smallskip Pour un exemple d'utilisation, voir p.~\pageref{example-WithArrowsRightX}. + +\bigskip +Il n'existe pas de style pour les flèches individuelles. Néanmoins, il reste possible de définir de nouvelles +commandes s'appuyant sur la commande |\Arrow|. Par exemple : + +\begin{Verbatim} +\newcommand{\ThickArrow}{\Arrow[tikz=thick]} +\end{Verbatim} + +Cette nouvelle commande |\ThickArrow| garde la possibilité\footnote{Dans la version de \pkg{witharrows} pour LaTeX + mais pas dans la version pour plain-TeX.} d'accepter des clés entre crochets. On peut écrire +|\ThickArrow[jump=2]| car en fait, |\Arrow[tikz=thick][jump=2]| est une syntaxe autorisée pour la commande |\Arrow| +(on peut mettre un nombre arbitraire d'arguments optionnels entre crochets après la commande |\Arrow|). + \bigskip \subsection{La clé right-overlap} diff --git a/macros/generic/witharrows/witharrows.dtx b/macros/generic/witharrows/witharrows.dtx index 80573b1d6f..6f6ea4bf0e 100644 --- a/macros/generic/witharrows/witharrows.dtx +++ b/macros/generic/witharrows/witharrows.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{2.8a} -\def\myfiledate{2023/02/14} +\def\myfileversion{2.8b} +\def\myfiledate{2023/08/24} % % %<*batchfile> @@ -119,7 +119,7 @@ version 2005/12/01 or later. % \medskip % The arrows are drawn with Tikz and that's why \textbf{several compilations may % be necessary}.\footnote{If you use Overleaf, Overleaf will do automatically -% the right number of compilations.} +% a number compilations sufficient (by using |latexmk|).} % % \bigskip % This package provides an environment |{WithArrows}| to construct alignments of @@ -1999,17 +1999,36 @@ version 2005/12/01 or later. % The extension \pkg{witharrows} provides a command |\WithArrowsNewStyle| to % define styles in a way similar to the ``styles'' of Tikz. % +% \smallskip % The command |\WithArrowsNewStyle| takes two mandatory arguments. The first is % the name of the style and the second is a list of key-value pairs. The scope -% of the definition done by |\WithArrowsNewStyle| is the current TeX scope. +% of the definition done by |\WithArrowsNewStyle| is the current TeX +% scope.\footnote{We recall that, in particular, every LaTeX environment is a +% TeX group.} % +% \smallskip % The style can be used as a key at the document level (with % |\WithArrowsOptions|) or at the environment level (in the optional arguments % of |{WithArrows}| and |{DispWithArrows}|). The style can also be used in % another command |\WithArrowsNewStyle|. % +% \smallskip % For an example of use, see p.~\pageref{example-WithArrowsRightX}. % +% \bigskip +% At this time, there is no style for indivual arrows. However, it's, of course, +% possible to define new commands based upton the command |\Arrow|. For example : +% +% \begin{Verbatim} +% \newcommand{\ThickArrow}{\Arrow[tikz=thick]} +% \end{Verbatim} +% +% This new command |\ThickArrow| still accepts options between square brackets. +% It's possible to write |\ThickArrow[jump=2]| because, in fact, +% |\Arrow[tikz=thick][jump=2]| is an allowed syntax for the command |\Arrow| +% (it's possible to put an arbitrary number of optional arguments between square +% brackets after |\Arrow|). +% % \subsection{The key right-overlap} % % \colorbox{yellow!50}{\textbf{New 2.8}} @@ -2687,7 +2706,7 @@ version 2005/12/01 or later. % \bigskip % First, \pkg{tikz} and some Tikz libraries are loaded before the % |\ProvidesExplPackage|. They are loaded this way because |\usetikzlibrary| in -% |expl3| code fails.\footnote{cf. +% |L3| code fails.\footnote{cf. % |tex.stackexchange.com/questions/57424/using-of-usetikzlibrary-in-an-expl3-package-fails|} % % @@ -2699,7 +2718,8 @@ version 2005/12/01 or later. \input tikz.tex \input expl3-generic.tex %</plain-TeX> -\usetikzlibrary{arrows.meta,bending} +\usetikzlibrary{arrows.meta} +\usepgfmodule{bending} % https://texnique.fr/osqa/questions/12199 % \end{macrocode} % % \bigskip @@ -2908,6 +2928,56 @@ version 2005/12/01 or later. %</LaTeX> % \end{macrocode} % +% \bigskip +% \subsection{Collecting options} +% +% The following technic allows to create user commands with the ability to put +% an arbitrary number of |[|\textsl{list of (key=val)}|]| after the name of the +% command. +% +% \medskip +% \emph{Exemple} :\par\nobreak +% +% |\@@_collect_options:n { \F } [x=a,y=b] [z=c,t=d] { arg }| +% +% will be transformed in :\quad |\F{x=a,y=b,z=c,t=d}{arg}| +% +% \smallskip +% Therefore, by writing : |\def\G{\@@_collect_options:n{\F}}|, +% +% the command |\G| takes in an arbitrary number of optional arguments between +% square brackets. +% +% \bigskip +% \begin{macrocode} +%<*LaTeX> +\cs_new_protected:Npn \@@_collect_options:n #1 + { + \peek_meaning:NTF [ + { \@@_collect_options:nw { #1 } } + { #1 { } } + } +% \end{macrocode} +% +% \bigskip +% We use |\NewDocumentCommand| in order to be able to allow nested brackets +% within the argument between |[| and |]|. +% \begin{macrocode} +\NewDocumentCommand \@@_collect_options:nw { m r[] } + { \@@_collect_options:nn { #1 } { #2 } } + +\cs_new_protected:Npn \@@_collect_options:nn #1 #2 + { + \peek_meaning:NTF [ + { \@@_collect_options:nnw { #1 } { #2 } } + { #1 { #2 } } + } + +\cs_new_protected:Npn \@@_collect_options:nnw #1#2[#3] + { \@@_collect_options:nn { #1 } { #2 , #3 } } +%</LaTeX> +% \end{macrocode} +% % % % \bigskip @@ -2918,33 +2988,6 @@ version 2005/12/01 or later. \cs_generate_variant:Nn \seq_set_split:Nnn { N x x } % \end{macrocode} % -% \medskip -% We create booleans in order to know if some packages are loaded. For example, -% for the package \pkg{amsmath}, the boolean is called -% |\c_@@_amsmath_loaded_bool|.\footnote{It's not possible to use -% |\@ifpackageloaded| in the core of the functions because |\@ifpackageloaded| -% is available only in the preamble.} -% \begin{macrocode} -\AtBeginDocument - { - \clist_map_inline:nn - { - amsmath, amsthm, autonum, cleveref, hyperref, mathtools, showlabels, - typedref, unicode-math - } - { - \bool_new:c { c_@@_#1_loaded_bool } -%<*LaTeX> - \@ifpackageloaded { #1 } - { \bool_set_true:c { c_@@_#1_loaded_bool } } - { } -%</LaTeX> -%<*plain-TeX> - \bool_set_false:c { c_@@_#1_loaded_bool } -%</plain-TeX> - } - } -% \end{macrocode} % % \bigskip % We define a command |\@@_sort_seq:N| which will sort a sequence. @@ -2953,15 +2996,10 @@ version 2005/12/01 or later. { \seq_sort:Nn #1 { - \int_compare:nNnTF - { - \tex_strcmp:D - { \str_lower_case:n { ##1 } } - { \str_lower_case:n { ##2 } } - } - > 0 - \sort_return_swapped: + \str_compare:eNeTF + { \str_lowercase:n { ##1 } } < { \str_lowercase:n { ##2 } } \sort_return_same: + \sort_return_swapped: } } % \end{macrocode} @@ -3060,9 +3098,26 @@ version 2005/12/01 or later. remember~picture , overlay , name~prefix = wa - \l_@@_prefix_str - + } , + @@_standard_arrow / .style = + { + @@_standard , + every~path / .style = WithArrows / arrow } } % \end{macrocode} +% The following line is a security when using |xelatex| and RTL language (cf. +% question~683570 on TeX StackExchange). +% \begin{macrocode} +\sys_if_engine_xetex:T + { + \tikzset + { + @@_standard_arrow / .append~style = + { every~node / .append~style = { text = . } } + } + } +% \end{macrocode} % % \bigskip % We also define a style for the tips of arrow. The final user of the extension @@ -3112,7 +3167,7 @@ version 2005/12/01 or later. %<*LaTeX> \AtBeginDocument { - \bool_if:NTF \c_@@_amsmath_loaded_bool + \IfPackageLoadedTF { amsmath } { \seq_put_right:Nn \l_@@_options_WithArrowsOptions_seq { subequations } \seq_put_right:Nn \l_@@_options_DispWithArrows_seq { subequations } @@ -3128,9 +3183,7 @@ version 2005/12/01 or later. % % Nevertheless, we want the extension \pkg{witharrows} available without % \pkg{amsmath}. That's why we give a definition of |\spread@equation| if -% \pkg{amsmath} is not loaded (we put the code in the hook |begindocument| -% because the flag |\c_@@_amsmath_loaded_bool| is itself set in the hook -% |begindocument|). +% \pkg{amsmath} is not loaded. % \begin{macrocode} { %</LaTeX> @@ -3558,20 +3611,19 @@ version 2005/12/01 or later. % The following list of the (left) extensible delimiters of LaTeX is only for % the validation of the key |replace-left-brace-by|. % \begin{macrocode} -\clist_new:N \c_@@_extensible_delimiters_clist -\clist_set:Nn \c_@@_extensible_delimiters_clist +\clist_new:N \c_@@_ext_delimiters_clist +\clist_set:Nn \c_@@_ext_delimiters_clist { ., \{, (, [, \lbrace, \lbrack, \lgroup, \langle, \lmoustache, \lceil, \lfloor } %<*LaTeX> \AtBeginDocument { - \bool_lazy_or:nnT - \c_@@_amsmath_loaded_bool - { \use:c { c_@@_unicode-math_loaded_bool } } - { - \clist_put_right:Nn \c_@@_extensible_delimiters_clist { \lvert, \lVert } - } + \bool_set_false:N \l_tmpa_bool + \IfPackageLoadedTF { amsmath } { \bool_set_true:N \l_tmpa_bool } { } + \IfPackageLoadedTF { unicode-math } { \bool_set_true:N \l_tmpa_bool } { } + \bool_if:NT \l_tmpa_bool + { \clist_put_right:Nn \c_@@_ext_delimiters_clist { \lvert, \lVert } } } %</LaTeX> % \end{macrocode} @@ -3601,7 +3653,7 @@ version 2005/12/01 or later. % must test whether the package \pkg{amsmath} is loaded. % \begin{macrocode} subequations .code:n = - \bool_if:NTF \c_@@_amsmath_loaded_bool + \IfPackageLoadedTF { amsmath } { \bool_set_true:N \l_@@_subequations_bool } { \@@_error:n { amsmath~not~loaded } @@ -3631,7 +3683,7 @@ version 2005/12/01 or later. { \tl_set:Nx \l_tmpa_tl { \tl_head:n { #1 } } \clist_if_in:NVTF - \c_@@_extensible_delimiters_clist + \c_@@_ext_delimiters_clist \l_tmpa_tl { \tl_set:Nn \l_@@_replace_left_brace_by_tl { #1 } } { \@@_error:n { Bad~value~for~replace~brace~by } } @@ -4025,7 +4077,9 @@ version 2005/12/01 or later. % \medskip % \begin{macrocode} %<*LaTeX> -\NewDocumentCommand \@@_Arrow { O { } m ! O { } } +\cs_new_protected:Npn \@@_Arrow + { \@@_collect_options:n { \@@_Arrow_i } } +\NewDocumentCommand \@@_Arrow_i { m m ! O { } } %</LaTeX> %<*plain-TeX> \cs_new_protected:Npn \@@_Arrow @@ -4102,7 +4156,7 @@ version 2005/12/01 or later. % % \item The label of the arrow (it's also a token list): % \begin{macrocode} - \prop_put:Nnn \l_tmpa_prop { label } { #2 } + \prop_put:Nnn \l_tmpa_prop { label } { #2 } % \end{macrocode} % % \item The number of the line where the command |\Arrow| is issued in the TeX @@ -4175,7 +4229,12 @@ version 2005/12/01 or later. \cs_if_exist:NT \tikz@library@external@loaded { \tikzset { external / export = false } } % \end{macrocode} -% +% +% \bigskip +% \begin{macrocode} + \tikzset { arrows = [ flex ] } % https://texnique.fr/osqa/questions/12199 +% \end{macrocode} +% % \bigskip % The token list |\l_@@_name_str| will contain the potential name of the % environment (given with the option |name|). This name will be used to create @@ -4505,7 +4564,7 @@ version 2005/12/01 or later. % The command |\@@_set_qedhere:| will do a redefinition of |\qedhere| in each % cell of the last column. % \begin{macrocode} - \bool_if:NT \c_@@_amsthm_loaded_bool \@@_set_qedhere: + \IfPackageLoadedTF { amsmath } { \@@_set_qedhere: } { } } %</LaTeX> } @@ -4986,19 +5045,20 @@ version 2005/12/01 or later. % Then, an action done by \pkg{hyperref} in its redefinition of % |\refstepcounter|. % \begin{macrocode} - \bool_if:NT \c_@@_hyperref_loaded_bool + \IfPackageLoadedTF { hyperref } { - % the following line is probably useless (2022/05/16) + % the following line is probably pointless (2022/05/16) % \str_set:Nn \This@name { equation } \hyper@refstepcounter { equation } } + { } % \end{macrocode} % Then, an action done by \pkg{cleveref} in its redefinition of % |\refstepcounter|. The package \pkg{cleveref} creates in the |aux| file a % command |\cref@currentlabel| similar to |\@currentlabel| but with more % informations. % \begin{macrocode} - \bool_if:NT \c_@@_cleveref_loaded_bool + \IfPackageLoadedTF { cleveref } { \cref@constructprefix { equation } \cref@result \protected@edef \cref@currentlabel @@ -5012,6 +5072,7 @@ version 2005/12/01 or later. \p@equation \g_tmpa_tl } } + { } % \end{macrocode} % Now, we can issue the command |\label| (some packages may have redefined % |\label|, for example \pkg{typedref}) for each item in the sequence of the @@ -5219,7 +5280,7 @@ version 2005/12/01 or later. % environment). % \begin{macrocode} %<*LaTeX> - \bool_if:nT \c_@@_mathtools_loaded_bool + \IfPackageLoadedTF { mathtools } { \MH_if_boolean:nT { show_only_refs } { @@ -5232,19 +5293,22 @@ version 2005/12/01 or later. \MH_set_boolean_T:n { show_only_refs } } } + { } % \end{macrocode} % % An action done by \pkg{typedref} in its redefinition of |\refstepcounter|. The % command |\sr@name| is a prefix added to the name of the label by the % redefinition of |\label| done by \pkg{typedref}. % \begin{macrocode} - \bool_if:NT \c_@@_typedref_loaded_bool { \str_set:Nn \sr@name { equation } } + \IfPackageLoadedTF { typedref } + { \str_set:Nn \sr@name { equation } } + { } % \end{macrocode} % % The command |\intertext@| is a command of \pkg{amsmath} which loads the % definition of |\intertext|. % \begin{macrocode} - \bool_if:NT \c_@@_amsmath_loaded_bool \intertext@ + \IfPackageLoadedTF { amsmath } { \intertext@ } { } %</LaTeX> \exp_args:No \tl_if_novalue:nF { #1 } { \tl_set:Nn \l_@@_left_brace_tl { #1 } } \@@_pre_halign:n { #2 } @@ -5513,8 +5577,9 @@ version 2005/12/01 or later. % the environment). % \begin{macrocode} %<*LaTeX> - \bool_if:nT \c_@@_mathtools_loaded_bool + \IfPackageLoadedTF { mathtools } { \MH_if_boolean:nT { show_only_refs } \MT_showonlyrefs_true: } + { } \bool_if:NTF \l_@@_in_label_or_minipage_bool { \c_math_toggle_token @@ -5617,7 +5682,7 @@ version 2005/12/01 or later. \tl_if_empty:NF \l_@@_tag_tl { \@@_error:nn { Multiple~tags } { #2 } } \clist_set:Nn \l_@@_tags_clist { all } - \bool_if:nT \c_@@_mathtools_loaded_bool + \IfPackageLoadedTF { mathtools } { \MH_if_boolean:nT { show_only_refs } { @@ -5625,6 +5690,7 @@ version 2005/12/01 or later. { \clist_clear:N \l_@@_tags_clist } } } + { } \tl_set:Nn \l_@@_tag_tl { #2 } \bool_set:Nn \l_@@_tag_star_bool { #1 } % \end{macrocode} @@ -5634,8 +5700,12 @@ version 2005/12/01 or later. % |\@eqnnum|.\footnote{There are two versions of |@eqnnum|, a standard version % and a version for the option |leqno|.} % \begin{macrocode} - \bool_if:nT { #1 && ! \bool_if_p:N \c_@@_amsmath_loaded_bool } - { \@@_error:n { tag*~without~amsmath } } + \bool_if:nT { #1 } + { + \IfPackageLoadedTF { amsmath } + { } + { \@@_error:n { tag*~without~amsmath } } + } } } % \end{macrocode} @@ -5653,12 +5723,12 @@ version 2005/12/01 or later. { \seq_if_empty:NF \l_@@_labels_seq { - \bool_if:NTF \c_@@_cleveref_loaded_bool + \IfPackageLoadedTF { cleveref } { \@@_error:n { Multiple~labels~with~cleveref } } { \@@_error:n { Multiple~labels } } } \seq_put_right:Nn \l_@@_labels_seq { #1 } - \bool_if:nT \c_@@_mathtools_loaded_bool + \IfPackageLoadedTF { mathtools } { \MH_if_boolean:nT { show_only_refs } { @@ -5667,12 +5737,14 @@ version 2005/12/01 or later. { \clist_clear:N \l_@@_tags_clist } } } - \bool_if:nT \c_@@_autonum_loaded_bool + { } + \IfPackageLoadedTF { autonum } { \cs_if_exist:cTF { autonum@#1Referenced } { \clist_set:Nn \l_@@_tags_clist { all } } { \clist_clear:N \l_@@_tags_clist } } + { } } } % \end{macrocode} @@ -6333,10 +6405,7 @@ version 2005/12/01 or later. %<*plain-TeX> \tikzpicture %</plain-TeX> - [ - @@_standard , - every~path / .style = WithArrows / arrow - ] + [ @@_standard_arrow ] % \end{macrocode} % You keep track of the bounding box because we want to compute the total width % of the arrow (with the label) for the arrows of type |over| and also for the @@ -7329,7 +7398,7 @@ version 2005/12/01 or later. % \begin{macrocode} \@@_msg_new:nn { Incompatible~options a} { - Incompatible~options. + Incompatible~options.\\ You~try~to~use~the~option~'\l_keys_key_str'~but~ this~option~is~incompatible~or~redundant~with~the~option~ '\l_@@_previous_key_str'~set~in~the~same~command~ @@ -7345,7 +7414,7 @@ version 2005/12/01 or later. % \begin{macrocode} \@@_msg_new:nnn { Arrow~not~in~last~column } { - Bad~use~of~\l_@@_string_Arrow_for_msg_str. + Bad~use~of~\l_@@_string_Arrow_for_msg_str.\\ You~should~use~the~command~\l_@@_string_Arrow_for_msg_str\ only~in~the~last~column~(column~\int_use:N\l_@@_nb_cols_int)~ in~the~row~\int_use:N \g_@@_line_int\ @@ -7448,8 +7517,8 @@ version 2005/12/01 or later. Normally,~we~can't~use~the~command~\token_to_str:N\label\ twice~in~a~line~of~the~environment~\{\l_@@_type_env_str\}. \\ However,~you~can~go~on.~ - \bool_if:NT \c_@@_showlabels_loaded_bool - { However,~only~the~last~label~will~be~shown~by~showlabels.~ } + \IfPackageLoadedTF { showlabels } + { However,~only~the~last~label~will~be~shown~by~showlabels.~ } { } If~you~don't~want~to~see~this~message~again,~you~can~use~the~option~ 'allow-multiple-labels'~at~the~global~or~environment~level. } @@ -7982,6 +8051,7 @@ version 2005/12/01 or later. % \end{macrocode} % % \section{History} +% % % \subsection*{Changes between 2.7 and 2.8} % diff --git a/macros/generic/witharrows/witharrows.pdf b/macros/generic/witharrows/witharrows.pdf Binary files differindex c04e447231..2b4b9dd2e8 100644 --- a/macros/generic/witharrows/witharrows.pdf +++ b/macros/generic/witharrows/witharrows.pdf diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes index 6e6ba9f53f..5c38357d6f 100644 --- a/macros/latex/contrib/hvextern/Changes +++ b/macros/latex/contrib/hvextern/Changes @@ -1,11 +1,12 @@ hvextern.sty ---------------- +v 0.36 2023-08-24 - added option "vshift" for inline objects v 0.35 2023-08-22 - fix shellesc option, don`t set it globally to true v 0.34 2023-07-05 - fix for missing --shell-escape option v 0.33 2023-01-29 - fixed bug with vertical space before and end of the example code v 0.32 2022-06-23 - fixed introduced bug - - added checkCode also for pdflatex and xelatex + - added checkCode also for pdflatex and xelatex v 0.31 2022-06-20 - added package option checkCode to run the external file only if the code changes. v 0.30 2022-06-09 - added \hfuzz=\maxdimen for filename to prevent diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf Binary files differindex e6743fb28b..fddd186b01 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.pdf +++ b/macros/latex/contrib/hvextern/doc/hvextern.pdf diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex index b05f01e14a..84b2df5183 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.tex +++ b/macros/latex/contrib/hvextern/doc/hvextern.tex @@ -1,7 +1,7 @@ -%% $Id: hvextern.tex 748 2023-08-22 18:03:42Z herbert $ +%% $Id: hvextern.tex 749 2023-08-24 19:10:17Z herbert $ \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} -\documentclass[ngerman,a4paper,twoside]{article} +\documentclass[english,a4paper,twoside]{article} \usepackage{babel} \usepackage{libertinus} \setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro} @@ -10,13 +10,12 @@ \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{hvlogos} -\usepackage%[checkCode] -{hvextern} +\usepackage[checkCode]{hvextern} \usepackage{hvindex} \usepackage{hvdoctools} \usepackage{listings} \lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,breaklines} -\usepackage{xcolor,xspace} +\usepackage{xcolor,xspace,varioref} \usepackage{hyperref} \def\Python{\textsf{Python}\xspace} @@ -28,14 +27,14 @@ \begin{document} \title{Writing, running and including the output of external documents from within a main\newline \LaTeX\ document~--v. \hvexternFileversion} -\author{Herbert Voß \url{herbert@dante.de}\thanks{Thanks to Karl Berry; +\author{Herbert Voß \url{hvoss@tug.org}\thanks{Thanks to Karl Berry; Werner Lemberg; Rolf Niepraschk}} \maketitle \tableofcontents %\newpage -\setkeys{hv}{%moveToExampleDir,ExampleDir=Exa, +\setkeys{hv}{moveToExampleDir,ExampleDir=Exa, showFilename,verbose} @@ -78,7 +77,12 @@ source code {<external filename without extension>} \end{verbatim} -The main document \emph{must} be run with the \Loption{-shell-escape} option, otherwise it won't work, e.g.: +The very first compilation run of the main document must be done + with the \Loption{-shell-escape} command-line option, otherwise it won't + work. Follow-up runs, for example, to resolve references, should + usually be done without \Loption{-shell-escape}. + +The currently used filename for the example is saved in the macro \Lcs{hvExternFilename}. \begin{verbatim} lualatex --shell-escape <file> @@ -107,10 +111,10 @@ This document was run with \LuaLaTeX. Suppose you want to insert the output of a which needs for several reasons a \XeLaTeX\ run. Instead of created and running a document outside of the main document and then to insert the output we can do this from within this \LuaLaTeX\ document itself. The external document is compiled -with \XeLaTeX\ and the output is insert as pdf image: +with \XeLaTeX\ and the output is insert as pdf image:\label{inline-exa} \begin{externalDocument}[% compiler=xelatex, inline, force=true, runs=2, grfOptions={height=8pt},% - crop, cropmargin=0, cleanup, docType=latex]{voss} + crop, cropmargin=0, cleanup, docType=latex,vshift=-1pt]{voss} \documentclass{ctexart} \pagestyle{empty} \begin{document} @@ -118,7 +122,9 @@ with \XeLaTeX\ and the output is insert as pdf image: \end{document} \end{externalDocument} -Another example which needs a \pdfLaTeX\ run. The \Index{source} code itself is also not +The current filename of the above example is \hvExternFilename. + +Let's show another example which needs a \pdfLaTeX\ run. The \Index{source} code itself is also not shown by the environment \Lenv{externalDocument}. @@ -1867,8 +1873,8 @@ to get the directory listed: \section{Other options} \begin{description} -%\item[\Lkeyword{showFilename}] Prints the filename in the outer margin (right for oneside) or in twocolumn mode for -% the first column in the left and the second column in the right margin. +\item[\Lkeyword{vshift}] A length for a vertical shift of the object, only valid for the inline mode. +See document source of example~\vpageref{inline-exa}. %\item[\Lkeyword{outerFN}] Only valid for the twocolumn mode with onecolumn floats (environment \texttt{figure*}), % to get the filename on the right or left of the whole page. %\item[\Lkeyword{shiftFN}] A length to move the printed filename up or down. @@ -1889,6 +1895,9 @@ if the package option \Loption{checkCode} exists. \end{description} + + + \printindex diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty index b61d69a6fa..1304e197e7 100644 --- a/macros/latex/contrib/hvextern/latex/hvextern.sty +++ b/macros/latex/contrib/hvextern/latex/hvextern.sty @@ -1,4 +1,4 @@ -%% $Id: hvextern.sty 747 2023-08-22 17:53:38Z herbert $ +%% $Id: hvextern.sty 749 2023-08-24 19:10:17Z herbert $ %% This is file `hvextern.sty', %% %% Copyright (C) 2016-23 @@ -12,8 +12,8 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\def\hvexternFileversion{0.35} -\ProvidesFile{hvextern}[2023/08/22 v\hvexternFileversion: package for running external documents (HV)] +\def\hvexternFileversion{0.36} +\ProvidesFile{hvextern}[2023/08/24 v\hvexternFileversion: package for running external documents (HV)] \newif\ifhv@extern@checkCode \hv@extern@checkCodefalse @@ -36,7 +36,6 @@ \def\hv@mkdir{mkdir }% \else \def\hv@move{mv }% - \def\hv@move{mv }% \def\hv@rm{rm }% \def\hv@mkdir{mkdir -p }% \def\hv@diff{diff } @@ -56,6 +55,7 @@ \newlength\hv@extern@belowbodyskip \newlength\hv@extern@belowskip \newlength\hv@extern@shiftFN +\newlength\hv@extern@vshift \newlength\hvExternLineWidth \AtBeginDocument{\hvExternLineWidth=\the\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} @@ -94,6 +94,7 @@ \define@boolkey{hv}[hv@extern@]{showFilename}[true]{} \define@boolkey{hv}[hv@extern@]{outerFN}[true]{} \define@key{hv}{shiftFN}[0pt]{\setlength\hv@extern@shiftFN{#1}} +\define@key{hv}{vshift}[0pt]{\setlength\hv@extern@vshift{#1}}% \define@boolkey{hv}[hv@extern@]{code}[true]{} \define@boolkey{hv}[hv@extern@]{force}[true]{} \define@boolkey{hv}[hv@extern@]{crop}[true]{} @@ -140,9 +141,10 @@ \def\ResetKeys{% \setkeys{hv}{% - showFilename=false,% Dateinamen im Rand angeben + showFilename=false,% Filenamen im Rand angeben outerFN=false,% use fullwidth in twocolumn mode (starred floats) shiftFN=\z@,% raise printed filename + vshift=\z@,% raise object (pdf) with \raisebox{}{} ext=tex,% file extension code=false,% show Code crop=false,% erzeugte PDF "croppen" @@ -219,7 +221,7 @@ \ExplSyntaxOn \NewDocumentCommand\run@hv@extern@cleanup{ m } { - \clist_map_inline:nn {#1}{\ShellEscape{\hv@rm \hv@extern@ExamplesDir\hvExternDateiname.##1}} + \clist_map_inline:nn {#1}{\ShellEscape{\hv@rm \hv@extern@ExamplesDir\hvExternFilename.##1}} \ifnum\hv@extern@compilerNo=0\relax % we have metapost \ShellEscape{\hv@rm\space epsf.*}% \fi @@ -228,7 +230,7 @@ { \clist_map_inline:nn {#1}{% \hv@ex@typeout{sequencerun: ##1}% - \ShellEscape{\hv@extern@progpath##1\space\hv@run@options\hvExternDateiname}% + \ShellEscape{\hv@extern@progpath##1\space\hv@run@options\hvExternFilename}% } } \ExplSyntaxOff @@ -428,42 +430,42 @@ %%%--------------------------------- end config part ------------------ %% -%% [#1]: Optionen #2: Dateiname +%% [#1]: Optionen #2: Filename %% \newenvironment{externalDocument}[2][] {% \ifhv@extern@shellesc\gdef\hv@run@options{ --shell-escape }\else\gdef\hv@run@options{}\fi% - \xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}% + \xdef\hvExternFilename{#2-\arabic{hv@example@counter}}% \gdef\hv@extern@savePara{#1}% \setkeys{hv}{#1}% \begin - \hv@ex@typeout{External filename: \hvExternDateiname}% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.png}{}{% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.txt}{}{% + \hv@ex@typeout{External filename: \hvExternFilename}% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.pdf}{}{% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.png}{}{% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.txt}{}{% \global\hv@extern@forcetrue}}}% set force, if no pdf or png exists \begingroup - \hv@ex@typeout{writing file \hvExternDateiname\hv@extern@ext ...}% - \filecontents[force,noheader]{\hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{writing file \hvExternFilename\hv@extern@ext ...}% + \filecontents[force,noheader]{\hvExternFilename\hv@extern@ext}% } {\endfilecontents% \end% \hv@ex@typeout{... done}% \global\stepcounter{hv@example@counter}% \endgroup \expandafter\hvExternSetKeys\expandafter{\hv@extern@savePara}% - \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}% + \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternFilename}% \ifhv@extern@checkCode \ifluatex - \directlua{if GetFileContents("\hvExternDateiname\hv@extern@ext", - "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext") then + \directlua{if GetFileContents("\hvExternFilename\hv@extern@ext", + "\hv@extern@ExamplesDir\hvExternFilename\hv@extern@ext") then tex.print("\\csname hv@ex@typeout\\endcsname{current file is NOT newer: no run }\\global\\csname hv@extern@forcefalse\\endcsname") else tex.print("\\csname hv@ex@typeout\\endcsname{current file is newer: force run }\\global\\csname hv@extern@forcetrue\\endcsname") end}% \else \hv@ex@typeout{Check, if new file has a different code}% - \ShellEscape{hvextern-checkfile "\hvExternDateiname\hv@extern@ext" - "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext"}% - \InputIfFileExists{\hvExternDateiname\hv@extern@ext.diff}{}{}% + \ShellEscape{hvextern-checkfile "\hvExternFilename\hv@extern@ext" + "\hv@extern@ExamplesDir\hvExternFilename\hv@extern@ext"}% + \InputIfFileExists{\hvExternFilename\hv@extern@ext.diff}{}{}% \ifx\hvCheckNewFile\empty \hv@ex@typeout{current file is NOT newer: no run }% \global\hv@extern@forcefalse @@ -471,63 +473,63 @@ \hv@ex@typeout{current file is newer: force run }% \global\hv@extern@forcetrue \fi - \ifhv@extern@verbose\else\ShellEscape{\hv@rm \hvExternDateiname\hv@extern@ext.diff}\fi + \ifhv@extern@verbose\else\ShellEscape{\hv@rm \hvExternFilename\hv@extern@ext.diff}\fi \fi \fi \ifhv@extern@force \ifx\hv@extern@runsequence\@empty - \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler\ \hv@run@options \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler\ \hv@run@options \hvExternFilename\hv@extern@ext ...}% \setcounter{@@@runs}{\value{hv@extern@runs}}% \loop\ifnum\the@@@runs > 0\relax \ifcase\hv@extern@compilerNo \relax % we have metapost - \hv@ex@typeout{running mpost \hvExternDateiname\hv@extern@ext}% - \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running mpost \hvExternFilename\hv@extern@ext}% + \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %1 - \hv@ex@typeout{running tex \hvExternDateiname\hv@extern@ext}% - \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running tex \hvExternFilename\hv@extern@ext}% + \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %2 - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% - \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext}% + \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \else \ifhv@extern@redirect - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext > \hvExternFilename.txt}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename\hv@extern@ext\space > \hvExternFilename.txt}% \else - \hv@ex@typeout{running \hv@extern@compiler~\hv@run@options~\hvExternDateiname\hv@extern@ext}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hv@run@options\space\hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~\hv@run@options~\hvExternFilename\hv@extern@ext}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hv@run@options\space\hvExternFilename\hv@extern@ext}% \fi \fi \addtocounter{@@@runs}{-1}% \repeat \hv@ex@typeout{... done}% \ifhv@extern@biber - \ShellEscape{biber \hvExternDateiname}% NAch biber nochmal latex - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% + \ShellEscape{biber \hvExternFilename}% NAch biber nochmal latex + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename}% \fi \ifhv@extern@xindex - \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternDateiname.idx}% NAch xindex nochmal latex - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% + \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternFilename.idx}% NAch xindex nochmal latex + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename}% \fi \expandafter\ifnum\value{hv@extern@runsAfter} > 0 - \hv@ex@typeout{runsAfter>0: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{runsAfter>0: running \hv@extern@progpath\hv@extern@compiler~ \hvExternFilename\hv@extern@ext ...}% \setcounter{@@@runs}{\value{hv@extern@runsAfter}}% \loop\ifnum\the@@@runs > 0\relax \ifcase\hv@extern@compilerNo \relax % we have metapost - \hv@ex@typeout{running mpost \hvExternDateiname\hv@extern@ext}% - \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running mpost \hvExternFilename\hv@extern@ext}% + \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %1 - \hv@ex@typeout{running tex \hvExternDateiname\hv@extern@ext}% - \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running tex \hvExternFilename\hv@extern@ext}% + \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %2 - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% - \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext}% + \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \else \ifhv@extern@redirect - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext > \hvExternFilename.txt}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename\hv@extern@ext\space > \hvExternFilename.txt}% \else - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename\hv@extern@ext}% \fi \fi \addtocounter{@@@runs}{-1}% @@ -538,14 +540,14 @@ \expandafter\run@hv@extern@sequenceList\expandafter{\hv@extern@runsequence}% \fi \ifhv@extern@crop - \ShellEscape{pdfcrop --margins \hv@extern@cropmargin \hvExternDateiname}% - \ShellEscape{\hv@move \hvExternDateiname-crop.pdf \hvExternDateiname.pdf}% + \ShellEscape{pdfcrop --margins \hv@extern@cropmargin \hvExternFilename}% + \ShellEscape{\hv@move \hvExternFilename-crop.pdf \hvExternFilename.pdf}% \fi \ifhv@extern@eps - \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}% + \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}% \fi \else - \hv@ex@typeout{force=false: NOT running \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{force=false: NOT running \hvExternFilename\hv@extern@ext ...}% \fi% end force \hfuzz=\maxdimen \ifhv@extern@code%-------------- Code Part @@ -573,20 +575,20 @@ \@nameuse{\hv@extern@docType @initPreambleFancy}% \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}% % we need lstinputlisting, because \VerbatimInput doesn't work in a box - \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}% + \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv@extern@ext}}% \ifdim\wd\hv@extern@box > \z@\relax \expandafter\fvset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}% - \PreambleVerbatim{\hvExternDateiname\hv@extern@ext}% + \PreambleVerbatim{\hvExternFilename\hv@extern@ext}% \vspace{\hv@extern@belowpreambleskip}% \fi \else \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}% - \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}% + \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv@extern@ext}}% \ifdim\wd\hv@extern@box>\z@\relax \expandafter\lstset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}% - \PreambleListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}% + \PreambleListing[\@@@temp]{\hvExternFilename\hv@extern@ext}% \vspace{\hv@extern@belowpreambleskip}% \fi \fi @@ -594,7 +596,7 @@ \hv@ex@typeout{Set filename in the margin!}% \noindent \hfuzz=\maxdimen - \hv@marginpar{\hvExternDateiname\hv@extern@ext}% + \hv@marginpar{\hvExternFilename\hv@extern@ext}% \fi % \hv@ex@typeout{Starting Code body ...}%} @@ -602,12 +604,12 @@ \@nameuse{\hv@extern@docType @initTextFancy}% \expandafter\fvset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}% - \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hvExternDateiname\hv@extern@ext}% + \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hvExternFilename\hv@extern@ext}% \else \expandafter\lstset\expandafter{\hv@extern@lstOptions}% \edef\@@@temp{\@nameuse{\hv@extern@docType @initText}}% \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}% - \BodyListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}% + \BodyListing[\@@@temp]{\hvExternFilename\hv@extern@ext}% \fi \ifdim\hv@extern@mpwidth > \z@\relax \endminipage\fi \endgroup @@ -616,19 +618,20 @@ \ifhv@extern@showFilename \hv@ex@typeout{Set filename in the margin!}% \noindent - \hv@marginpar{\hvExternDateiname\hv@extern@ext}% + \hv@marginpar{\hvExternFilename\hv@extern@ext}% \fi \fi \ifhv@extern@moveToExampleDir % \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}% \hv@ex@typeout{Move file into example dir}% - \hv@ex@typeout{\hvExternDateiname ----> \hv@extern@ExamplesDir}% - \ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}% + \hv@ex@typeout{\hvExternFilename ----> \hv@extern@ExamplesDir}% + \ShellEscape{\hv@move \hvExternFilename.*\space \hv@extern@ExamplesDir}% \fi \ifhv@extern@showoutput \ifhv@extern@includegraphic \ifhv@extern@inline - \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}% + \raisebox{\hv@extern@vshift}{% + \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}}% \else \ifhv@extern@float \hv@ex@typeout{Floating environment}% @@ -687,19 +690,22 @@ \fi \fi \fi - \fi% end of \ifshowoutput - \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup + \fi% end of \ifshowoutput + \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup + \hv@ex@typeout{Move source file into example dir, in case of missing --shell-escape}% +% \hv@ex@typeout{\hvExternFilename ----> \hv@extern@ExamplesDir}% + \ShellEscape{\hv@move \hvExternFilename\hv@extern@ext\space \hv@extern@ExamplesDir}% \vspace{\hv@extern@belowskip}% } \newcommand\runExtCmd[3][]{% #1:options; #2:comamnd; #3:filename \begingroup \setkeys{hv}{cleanup={},code=false,includegraphic=false,#1}% - \xdef\hvExternDateiname{#3-\arabic{hv@example@counter}}% - \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}% + \xdef\hvExternFilename{#3-\arabic{hv@example@counter}}% + \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternFilename}% \hv@ex@typeout{running #2}% \ifhv@extern@redirect - \ShellEscape{\hv@extern@progpath#2 > \hv@extern@ExamplesDir\hvExternDateiname.txt}% + \ShellEscape{\hv@extern@progpath#2 > \hv@extern@ExamplesDir\hvExternFilename.txt}% \else \ShellEscape{\hv@extern@progpath#2}% \fi @@ -708,7 +714,7 @@ \ifhv@extern@showoutput \ifhv@extern@includegraphic \ifhv@extern@inline - \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}% + \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternFilename}% \else \ifhv@extern@float \hv@ex@typeout{Floating environment}% @@ -718,7 +724,7 @@ \par\noindent\begingroup \fi \hv@extern@align - \hv@ex@typeout{Input image \hv@extern@ExamplesDir\hvExternDateiname}% + \hv@ex@typeout{Input image \hv@extern@ExamplesDir\hvExternFilename}% \ifhv@extern@frame \begingroup \fboxsep=\hv@extern@framesep @@ -864,37 +870,37 @@ \newenvironment{createPNGfromPSTricks}[3][]% #1:options #2: pstricks packages #3: filename {% - \xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}% + \xdef\hvExternFilename{#2-\arabic{hv@example@counter}}% \gdef\hv@extern@savePara{#1}% \setkeys{hv}{#1}% \begin - \hv@ex@typeout{External filename: \hvExternDateiname}% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.png}{}{% - \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.txt}{}{% + \hv@ex@typeout{External filename: \hvExternFilename}% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.pdf}{}{% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.png}{}{% + \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.txt}{}{% \global\hv@extern@forcetrue}}}% set force, if no pdf or png exists \begingroup - \hv@ex@typeout{writing file \hvExternDateiname\hv@extern@ext ...}% - \filecontents[force,noheader]{\hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{writing file \hvExternFilename\hv@extern@ext ...}% + \filecontents[force,noheader]{\hvExternFilename\hv@extern@ext}% } {\endfilecontents% \end% \hv@ex@typeout{... done}% \global\stepcounter{hv@example@counter}% \endgroup \expandafter\hvExternSetKeys\expandafter{\hv@extern@savePara}% - \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}% + \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternFilename}% \ifhv@extern@checkCode \ifluatex - \directlua{if GetFileContents("\hvExternDateiname\hv@extern@ext", - "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext") then + \directlua{if GetFileContents("\hvExternFilename\hv@extern@ext", + "\hv@extern@ExamplesDir\hvExternFilename\hv@extern@ext") then tex.print("\\csname hv@ex@typeout\\endcsname{current file is NOT newer: no run }\\global\\csname hv@extern@forcefalse\\endcsname") else tex.print("\\csname hv@ex@typeout\\endcsname{current file is newer: force run }\\global\\csname hv@extern@forcetrue\\endcsname") end}% \else \hv@ex@typeout{Check, if new file has a different code}% - \ShellEscape{hvextern-checkfile "\hvExternDateiname\hv@extern@ext" - "\hv@extern@ExamplesDir\hvExternDateiname\hv@extern@ext"}% - \InputIfFileExists{\hvExternDateiname\hv@extern@ext.diff}{}{}% + \ShellEscape{hvextern-checkfile "\hvExternFilename\hv@extern@ext" + "\hv@extern@ExamplesDir\hvExternFilename\hv@extern@ext"}% + \InputIfFileExists{\hvExternFilename\hv@extern@ext.diff}{}{}% \ifx\hvCheckNewFile\empty \hv@ex@typeout{current file is NOT newer: no run }% \global\hv@extern@forcefalse @@ -902,55 +908,55 @@ \hv@ex@typeout{current file is newer: force run }% \global\hv@extern@forcetrue \fi - \ifhv@extern@verbose\else\hv@rm{\hvExternDateiname\hv@extern@ext.diff}\fi + \ifhv@extern@verbose\else\hv@rm{\hvExternFilename\hv@extern@ext.diff}\fi \fi \fi \ifhv@extern@force \ifx\hv@extern@runsequence\@empty - \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternFilename\hv@extern@ext ...}% \setcounter{@@@runs}{\value{hv@extern@runs}}% \loop\ifnum\the@@@runs > 0\relax \ifcase\hv@extern@compilerNo \relax % we have metapost - \hv@ex@typeout{running mpost \hvExternDateiname\hv@extern@ext}% - \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running mpost \hvExternFilename\hv@extern@ext}% + \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %1 - \hv@ex@typeout{running tex \hvExternDateiname\hv@extern@ext}% - \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running tex \hvExternFilename\hv@extern@ext}% + \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \or %2 - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% - \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext}% + \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternFilename}{\hv@extern@ext}% \else \ifhv@extern@redirect - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext > \hvExternFilename.txt}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename\hv@extern@ext\space > \hvExternFilename.txt}% \else - \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternFilename\hv@extern@ext}% + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename\hv@extern@ext}% \fi \fi \addtocounter{@@@runs}{-1}% \repeat \hv@ex@typeout{... done}% \ifhv@extern@biber - \ShellEscape{biber \hvExternDateiname}% NAch biber nochmal latex - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% + \ShellEscape{biber \hvExternFilename}% NAch biber nochmal latex + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename}% \fi \ifhv@extern@xindex - \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternDateiname.idx}% NAch xindex nochmal latex - \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% + \ShellEscape{xindex \hv@extern@xindexOptions\space \hvExternFilename.idx}% NAch xindex nochmal latex + \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternFilename}% \fi \else % runsequence \expandafter\run@hv@extern@sequenceList\expandafter{\hv@extern@runsequence}% \fi \ifhv@extern@crop - \ShellEscape{pdfcrop --margins \hv@extern@cropmargin \hvExternDateiname}% - \ShellEscape{\hv@move \hvExternDateiname-crop.pdf \hvExternDateiname.pdf}% + \ShellEscape{pdfcrop --margins \hv@extern@cropmargin \hvExternFilename}% + \ShellEscape{\hv@move \hvExternFilename-crop.pdf \hvExternFilename.pdf}% \fi \ifhv@extern@eps - \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}% + \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}% \fi \else - \hv@ex@typeout{force=false: NOT running \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{force=false: NOT running \hvExternFilename\hv@extern@ext ...}% \fi% end force \hfuzz=\maxdimen \ifhv@extern@code%-------------- Code Part @@ -977,20 +983,20 @@ \@nameuse{\hv@extern@docType @initPreambleFancy}% \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}% % we need lstinputlisting, because \VerbatimInput doesn't work in a box - \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}% + \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv@extern@ext}}% \ifdim\wd\hv@extern@box > \z@\relax \expandafter\fvset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}% - \PreambleVerbatim{\hvExternDateiname\hv@extern@ext}% + \PreambleVerbatim{\hvExternFilename\hv@extern@ext}% \vspace{\hv@extern@belowpreambleskip}% \fi \else \edef\@@@temp{\@nameuse{\hv@extern@docType @initPreamble}}% - \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv@extern@ext}}% + \savebox\hv@extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv@extern@ext}}% \ifdim\wd\hv@extern@box>\z@\relax \expandafter\lstset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGpreamble,colframe=\hv@extern@BOpreamble}% - \PreambleListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}% + \PreambleListing[\@@@temp]{\hvExternFilename\hv@extern@ext}% \vspace{\hv@extern@belowpreambleskip}% \fi \fi @@ -998,7 +1004,7 @@ \hv@ex@typeout{Set filename in the margin!}% \noindent \hfuzz=\maxdimen - \hv@marginpar{\hvExternDateiname\hv@extern@ext}% + \hv@marginpar{\hvExternFilename\hv@extern@ext}% \fi % \hv@ex@typeout{Starting Code body ...}%} @@ -1006,12 +1012,12 @@ \@nameuse{\hv@extern@docType @initTextFancy}% \expandafter\fvset\expandafter{\hv@extern@lstOptions}% \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}% - \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hvExternDateiname\hv@extern@ext}% + \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hvExternFilename\hv@extern@ext}% \else \expandafter\lstset\expandafter{\hv@extern@lstOptions}% \edef\@@@temp{\@nameuse{\hv@extern@docType @initText}}% \tcbset{colback=\hv@extern@BGbody,colframe=\hv@extern@BObody}% - \BodyListing[\@@@temp]{\hvExternDateiname\hv@extern@ext}% + \BodyListing[\@@@temp]{\hvExternFilename\hv@extern@ext}% \fi \ifdim\hv@extern@mpwidth > \z@\relax \endminipage\fi \endgroup @@ -1020,14 +1026,14 @@ \ifhv@extern@showFilename \hv@ex@typeout{Set filename in the margin!}% \noindent - \hv@marginpar{\hvExternDateiname\hv@extern@ext}% + \hv@marginpar{\hvExternFilename\hv@extern@ext}% \fi \fi \ifhv@extern@moveToExampleDir % \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}% \hv@ex@typeout{Move file into example dir}% - \hv@ex@typeout{\hvExternDateiname ----> \hv@extern@ExamplesDir}% - \ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}% + \hv@ex@typeout{\hvExternFilename.* ----> \hv@extern@ExamplesDir}% + \ShellEscape{\hv@move \hvExternFilename.*\space \hv@extern@ExamplesDir}% \fi \ifhv@extern@showoutput \ifhv@extern@includegraphic diff --git a/macros/latex/contrib/photobook/photobook.cls b/macros/latex/contrib/photobook/photobook.cls index d29c923dd3..899a488069 100644 --- a/macros/latex/contrib/photobook/photobook.cls +++ b/macros/latex/contrib/photobook/photobook.cls @@ -93,8 +93,8 @@ %%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the %%% code and the generated docs... -\edef\photobook@FILEVERSION{v0.1.23} -\edef\photobook@FILEDATE{2023-05-05} +\edef\photobook@FILEVERSION{v0.1.25} +\edef\photobook@FILEDATE{2023-08-24} %% \documentclass{ltxdoc} @@ -4270,6 +4270,8 @@ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%%%% Basic book information +%% \DescribeMacro{BookType=<text>} +\def\BookType{book} % XXX Document metadata -- move to globals... % XXX Use LaTeX generic metadata... %% \DescribeMacro{BookTitle=<text>} @@ -4296,8 +4298,8 @@ Copyright \textcopyright \ \BookYear \ \BookAuthors; All Rights Reserved. \ifx \License \empty% - No part of this book may be reproduced in any form without written permission - of the author except for use for brief quotation in a book review. + No part of this \BookType\ may be reproduced in any form without written permission + of the author except for use for brief quotation in a review. \else% \License\fi} @@ -4307,7 +4309,7 @@ \def\BookFonts{} %% \DescribeMacro{SoftwareNotice=<text>} \def\SoftwareNotice{% - This book was designed and laid out using open source + This \BookType\ was designed and laid out using open source \ifx \BookFonts \empty\else fonts and\fi software including: diff --git a/macros/latex/contrib/photobook/photobook.pdf b/macros/latex/contrib/photobook/photobook.pdf Binary files differindex d78e1f2b17..953e58eace 100644 --- a/macros/latex/contrib/photobook/photobook.pdf +++ b/macros/latex/contrib/photobook/photobook.pdf diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md index e055add8b6..92d2a410b3 100644 --- a/macros/latex/contrib/siunitx/CHANGELOG.md +++ b/macros/latex/contrib/siunitx/CHANGELOG.md @@ -7,10 +7,22 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.3.4] - 2023-08-24 + +### Fixed +- Correct an internal variable name (see issue + [\#689](https://github.com/josephwright/siunitx/issues/689)) + +## [v3.3.3] - 2023-08-23 + +### Fixed +- Include uncertainty divider in number validation (see issue + [\#686](https://github.com/josephwright/siunitx/issues/686)) + ## [v3.3.2] - 2023-08-03 ### Fixed -- Move an `expl3` variant defintion (see issue +- Move an `expl3` variant definition (see issue [\#680](https://github.com/josephwright/siunitx/issues/680)) ## [v3.3.1] - 2023-08-01 @@ -1984,7 +1996,9 @@ 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.2...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.4...HEAD +[v3.3.4]: https://github.com/josephwright/siunitx/compare/v3.3.3...v3.3.4 +[v3.3.3]: https://github.com/josephwright/siunitx/compare/v3.3.2...v3.3.3 [v3.3.2]: https://github.com/josephwright/siunitx/compare/v3.3.1...v3.3.2 [v3.3.1]: https://github.com/josephwright/siunitx/compare/v3.3.0...v3.3.1 [v3.3.0]: https://github.com/josephwright/siunitx/compare/v3.2.9...v3.3.0 diff --git a/macros/latex/contrib/siunitx/siunitx-angle.dtx b/macros/latex/contrib/siunitx/siunitx-angle.dtx index 69bb9a53fb..da61a09fec 100644 --- a/macros/latex/contrib/siunitx/siunitx-angle.dtx +++ b/macros/latex/contrib/siunitx/siunitx-angle.dtx @@ -72,7 +72,7 @@ % may be given as expressions. The \meta{angle} should be a number as understood % by \cs{siunitx_format_number:nN}, with no uncertainty, exponent or imaginary % part. The unit symbols for degrees, minutes and seconds are |\degree|, -% |\arcminute| and |\arcsecond|, respectively +% |\arcminute| and |\arcsecond|, respectively. % \end{function} % % \subsection{Key--value options} diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf Binary files differindex 1f82d980c2..5ee4a1467b 100644 --- a/macros/latex/contrib/siunitx/siunitx-code.pdf +++ b/macros/latex/contrib/siunitx/siunitx-code.pdf diff --git a/macros/latex/contrib/siunitx/siunitx-compound.dtx b/macros/latex/contrib/siunitx/siunitx-compound.dtx index 46d2404136..0ce984f4a0 100644 --- a/macros/latex/contrib/siunitx/siunitx-compound.dtx +++ b/macros/latex/contrib/siunitx/siunitx-compound.dtx @@ -66,7 +66,7 @@ % \end{syntax} % Prints a set of numbers in the \meta{entries}, each of which should % be given as a \meta{balanced text}. Unlike \cs{siunitx_number_list:nn}, this -% function may semantically take any form +% function may semantically take any form. % \end{function} % % \begin{function}{\siunitx_compound_quantity:nn} @@ -75,7 +75,7 @@ % \end{syntax} % Prints a set of quantities in the \meta{entries}, each of which should % be given as a \meta{balanced text}. Unlike \cs{siunitx_quantity_list:nn}, this -% function may semantically take any form +% function may semantically take any form. % \end{function} % % \begin{function}{\siunitx_number_list:nn} @@ -428,6 +428,7 @@ % % \begin{variable} % { +% \l_@@_boundary_text_bool , % \l_@@_boundary_close_tl , % \l_@@_bracket_close_tl , % \l_@@_independent_bool , @@ -456,9 +457,9 @@ { compound-boundary-mode .choice: , compound-boundary-mode / number .code:n = - { \bool_set_false:N \l_@@_delim_text_bool } , + { \bool_set_false:N \l_@@_boundary_text_bool } , compound-boundary-mode / text .code:n = - { \bool_set_true:N \l_@@_delim_text_bool } , + { \bool_set_true:N \l_@@_boundary_text_bool } , compound-close-boundary .tl_set:N = \l_@@_boundary_close_tl , compound-close-bracket .tl_set:N = diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx index 9cb54d21c2..887cea9d20 100644 --- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx +++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx @@ -59,6 +59,8 @@ % % \begin{documentation} % +% This sub-module exposes no API. +% % \end{documentation} % % \begin{implementation} diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx index a46613e42e..5bba843ce6 100644 --- a/macros/latex/contrib/siunitx/siunitx-number.dtx +++ b/macros/latex/contrib/siunitx/siunitx-number.dtx @@ -102,7 +102,7 @@ % \begin{itemize} % \item[\texttt{S}] A single symmetrical uncertainty (\foreign{e.g.}~a % statistical standard uncertainty). The data item here is a single -% value representing the uncertainty in the least-significant digits +% value representing the uncertainty in the least-significant digits. % \item[\texttt{A}] A single unsymmetrical uncertainty. The data item here % contains two brace groups, each using the same least-significant digit % approach as the \texttt{S} type. The positive component is given first @@ -537,7 +537,7 @@ % setting |down| means that the value will be rounded toward zero. The % setting |nearest| means that the value will be rounded to the nearest % (either up or down), taking account of the setting of |round-half|. -% The standard setting is |nearest| +% The standard setting is |nearest|. % \end{function} % % \begin{function}{round-half} @@ -663,7 +663,7 @@ % the setting |down| means that the uncertainty will be rounded toward zero. % The setting |nearest| means that the uncertainty will be rounded to the % nearest (either up or down), taking account of the setting of |round-half|. -% The standard setting is |nearest| +% The standard setting is |nearest|. % \end{function} % % \begin{function}{uncertainty-separator} @@ -712,7 +712,6 @@ % \begin{macrocode} \cs_generate_variant:Nn \keys_set:nn { nx } \cs_generate_variant:Nn \tl_if_blank:nTF { f } -\cs_generate_variant:Nn \tl_if_blank_p:n { f } \cs_generate_variant:Nn \tl_if_in:NnTF { NV } \cs_generate_variant:Nn \tl_if_in:nnTF { nV } \cs_generate_variant:Nn \tl_remove_all:Nn { NV } @@ -4696,6 +4695,7 @@ \l_@@_input_uncert_open_tl \l_siunitx_number_input_sign_tl \l_@@_input_uncert_sign_tl + \l_@@_input_uncert_divide_tl \q_recursion_tail \q_recursion_stop } diff --git a/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx index 8654060651..6786aba79e 100644 --- a/macros/latex/contrib/siunitx/siunitx-print.dtx +++ b/macros/latex/contrib/siunitx/siunitx-print.dtx @@ -70,16 +70,31 @@ % take place in text or math mode. % % The printing routines assume that normal \LaTeXe{} font selection commands -% are available, in particular \cs{bfseries}, \cs{mathrm}, \cs{mathversion}, -% \cs{fontfamily}, \cs{fontseries} and \cs{fontshape}, \cs{familydefault}, -% \cs{seriesdefault}, \cs{shapedefault} and \cs{selectfont}. -% It also requires the standard -% \LaTeXe{} kernel commands \cs{ensuremath}, \cs{mbox}, \cs{textsubscript} and -% \cs{textsuperscript} for printing in text mode. The following packages are +% are available, in particular +% \begin{itemize} +% \item \cs{bfseries}, +% \item \cs{mathrm}, +% \item \cs{mathversion}, +% \item \cs{fontfamily}, +% \item \cs{fontseries}, +% \item \cs{fontshape}, +% \item \cs{familydefault}, +% \item \cs{seriesdefault}, +% \item \cs{shapedefault} and +% \item \cs{selectfont}. +% \end{itemize} +% It also requires the standard \LaTeXe{} kernel commands +% \begin{itemize} +% \item \cs{ensuremath}, +% \item \cs{mbox}, +% \item \cs{textsubscript} and +% \item \cs{textsuperscript} +% \end{itemize} +% for printing in text mode. The following packages are % also required to provide the functionality detailed. % \begin{itemize} % \item \pkg{color}: support for color using \cs{textcolor} -% \item \pkg{textcomp}: \cs{textminus}, \cs{textpm} \cs{texttimes} and +% \item \pkg{textcomp}: \cs{textminus}, \cs{textpm}, \item \cs{texttimes} and % \cs{textcenteredperiod} for printing in text mode % \item \pkg{amstext}: the \cs{text} command for printing in text mode % \end{itemize} diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx index 2a359b5fe0..8a7bad09b8 100644 --- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx +++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx @@ -59,6 +59,8 @@ % % \begin{documentation} % +% This sub-module exposes no API. +% % \end{documentation} % % \begin{implementation} diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx index 398eb7187e..34ccb1ec82 100644 --- a/macros/latex/contrib/siunitx/siunitx-unit.dtx +++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx @@ -648,7 +648,7 @@ % |power-half-as-sqrt| = |true|\verb"|"|false| % \end{syntax} % Used to determine whether a power of exactly half is converted to -% \cs{sqrt} in the output. The standard setting is |false| +% \cs{sqrt} in the output. The standard setting is |false|. % \end{function} % % \begin{function}{qualifier-mode} diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx index a6e8b05866..96f6999841 100644 --- a/macros/latex/contrib/siunitx/siunitx.dtx +++ b/macros/latex/contrib/siunitx/siunitx.dtx @@ -112,8 +112,7 @@ {% \PackageError{siunitx}{Support package expl3 too old} {% - You need to update your installation of the bundles 'l3kernel' and - 'l3packages'.\MessageBreak + You need to update your installation of 'l3kernel'.\MessageBreak Loading~siunitx~will~abort!% }% \endinput @@ -122,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2023-08-03} {3.3.2} +\ProvidesExplPackage {siunitx} {2023-08-24} {3.3.4} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf Binary files differindex 8d6c1a9c4c..edd301f219 100644 --- a/macros/latex/contrib/siunitx/siunitx.pdf +++ b/macros/latex/contrib/siunitx/siunitx.pdf diff --git a/macros/luatex/latex/lualinalg/README.txt b/macros/luatex/latex/lualinalg/README.txt index e63acad671..a3b301cfe1 100644 --- a/macros/luatex/latex/lualinalg/README.txt +++ b/macros/luatex/latex/lualinalg/README.txt @@ -1,5 +1,5 @@ # The lualinalg package -# version 1.7 +# version 1.8 # Authors: Chetan Shirore and Ajit Kumar # Email: mathsbeauty@gmail.com diff --git a/macros/luatex/latex/lualinalg/lualinalg.pdf b/macros/luatex/latex/lualinalg/lualinalg.pdf Binary files differindex 30510d2490..7981b4258c 100644 --- a/macros/luatex/latex/lualinalg/lualinalg.pdf +++ b/macros/luatex/latex/lualinalg/lualinalg.pdf diff --git a/macros/luatex/latex/lualinalg/lualinalg.sty b/macros/luatex/latex/lualinalg/lualinalg.sty index 5c62f329fa..55d0542b93 100644 --- a/macros/luatex/latex/lualinalg/lualinalg.sty +++ b/macros/luatex/latex/lualinalg/lualinalg.sty @@ -1,9 +1,9 @@ % The lualinalg package % Authors: Chetan Shirore and Ajit Kumar -% Version 1.7, Date=21-Aug-2023 +% Version 1.8, Date=23-Aug-2023 % Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt. -\ProvidesPackage{lualinalg}[1.7] +\ProvidesPackage{lualinalg}[1.8] \RequirePackage{xkeyval} \RequirePackage{amsmath} \RequirePackage{luamaths} @@ -17,7 +17,7 @@ matrix = {} --module local matrix_meta = {} -function matrix.new(matrix, rows, columns) +function matrix.new(matrix, rows, columns, str) if type(rows) == "table" then for i = 1, #rows do if #rows[1] ~= #rows[i] then @@ -40,6 +40,15 @@ function matrix.new(matrix, rows, columns) end return setmetatable(mtx, matrix_meta) end + if str == "zero" then + for i = 1, rows do + mtx[i] = {} + for j = 1, columns do + mtx[i][j] = 0 + end + end + return setmetatable(mtx, matrix_meta) + end end setmetatable( @@ -872,6 +881,21 @@ function matrix.show(mtx, format, dig) return str .. "\\end{" .. format .. "} " end +function matrix.chqeql(m1, m2) + if #m1 ~= #m2 or #m1[1] ~= #m2[1] then + return false + end + for i = 1, #m1 do + for j = 1, #m1[1] do + if not(lnumChqEql(m1[i][j],m2[i][j])) then + return false + end + end + end + return true +end + + matrix_meta.__tostring = function(...) return matrix.show(...) end @@ -906,6 +930,10 @@ matrix_meta.__unm = function(mtx) return matrix.mulnum(mtx, -1) end +matrix_meta.__eq = function(...) + return matrix.chqeql(...) +end + local option = { ["*"] = function(m1) return matrix.conjugate(m1) @@ -927,7 +955,7 @@ vector = {} --module local vector_meta = {} function vector.new(vector, rows, columns, n) - if columns ~= "e" then + if columns ~= "e" and columns ~= "zero" then local tbl = {} for i = 1, #rows do tbl[i] = rows[i] @@ -945,6 +973,13 @@ function vector.new(vector, rows, columns, n) end return setmetatable(vec, vector_meta) end + + if columns == "zero" then + for i = 1, rows do + vec[i] = 0 + end + return setmetatable(vec, vector_meta) + end end setmetatable( @@ -1221,6 +1256,18 @@ function vector.gsX(inptTbl, brckt, dignum) return str end +function vector.chqeql(v1, v2) + if #v1 ~= #v2 then + return false + end + for j = 1, #v1 do + if not(lnumChqEql(v1[j],v2[j])) then + return false + end + end + return true +end + vector_meta.__tostring = function(...) return vector.show(...) end @@ -1237,6 +1284,10 @@ vector_meta.__unm = function(vec) return vector.mulnum(vec, -1) end +vector_meta.__eq = function(...) + return vector.chqeql(...) +end + vector_meta.__mul = function(v1, v2) if getmetatable(v1) ~= vector_meta then return vector.mulnum(v2, v1) @@ -1475,6 +1526,12 @@ tex.sprint(tostring(matrix.rank(matrices['#1']))) }% } +\newcommand\matrixEql[2]{% +\directlua{% +tex.sprint(tostring(matrix.chqeql(matrices['#1'],matrices['#2']))) +}% +} + % ========= KEY DEFINITIONS ========= \define@key{matrixrr}{type}{\def\moprr@type{#1}} \define@key{matrixrr}{truncate}{\def\moprr@truncate{#1}} @@ -1624,6 +1681,12 @@ tex.sprint(tostring(vector.getangle(vectors['#1'],vectors['#2']))) }% } +\newcommand\vectorEql[2]{% +\directlua{% +tex.sprint(tostring(vector.chqeql(vectors['#1'],vectors['#2']))) +}% +} + % ========= KEY DEFINITIONS ========= \define@key{vecrr}{brckt}{\def\voprr@brckt{#1}} \define@key{vecrr}{truncate}{\def\voprr@truncate{#1}} diff --git a/macros/luatex/latex/lualinalg/lualinalg.tex b/macros/luatex/latex/lualinalg/lualinalg.tex index a5c792be1d..784bac5199 100644 --- a/macros/luatex/latex/lualinalg/lualinalg.tex +++ b/macros/luatex/latex/lualinalg/lualinalg.tex @@ -1,7 +1,7 @@ \documentclass{article} \usepackage{listings,color,parskip,booktabs,longtable,array, hyperref,multirow,multicol,url,amsmath,amssymb,framed,lualinalg,tikz,tikz-3dplot} -\usepackage[top=1.1in, bottom=1.1in, left=1in, right=1in]{geometry} +\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} \usetikzlibrary{calc,3d,arrows} \hypersetup{colorlinks,urlcolor=blue} \lstset{frame=none, @@ -49,18 +49,17 @@ The \verb|lualinalg| package is released under the LaTeX Project Public License \vectorNew{v1}{{1,2,3,4,5,6}} \vectorNew{v2}{{3,6,lcomplex(6,6)}} \end{lstlisting} -The standard vector of dimension \(n \) with \(i^{th}\) coordinate \(1\) can be produced by using the following command. -\begin{lstlisting} -\vectorNew{e}{n,'e',i} -\end{lstlisting} -For example, the following commands +The standard vector of dimension \(n \) with \(i^{th}\) coordinate \(1\) and zero vectors can also be produced by using the command \verb|\vectorNew|. For example, the following commands \begin{lstlisting} \vectorNew{e_1}{3,'e',1} \(e_1=\left(\vectorPrint{e}\right)\) +\vectorNew{O}{3,'zero'} +\(O=\left(\vectorPrint{O}\right)\) \end{lstlisting} output to \vectorNew{e_1}{3,'e',1} -\(e_1=\left(\vectorPrint{e_1}\right)\). - +\(e_1=\left(\vectorPrint{e_1}\right)\) +\vectorNew{O}{3,'zero'} +\(O=\left(\vectorPrint{O}\right)\) \subsection{Commands for operations on vectors} Table \ref{tbl:luavector} lists commands for operations on vectors. \begin{longtable}{m{7cm}m{8.2cm}} @@ -89,6 +88,13 @@ Sets the \(i\)th coordinate of vector as \verb|val|. \\ \end{lstlisting}& Defines a new vector \(v\) obtained by copying coordinates of vector \(w\). \\ \midrule + +\begin{lstlisting} +\vectorEql{v}{w} +\end{lstlisting}& +Returns true if \(v = w\), otherwise returns false. \\ +\midrule + \begin{lstlisting} \vectorAdd{vector}{v1}{v2} \end{lstlisting}& @@ -218,6 +224,12 @@ third coordinate of vector \\ \midrule \begin{lstlisting} +\vectorEql{z}{w} +\end{lstlisting} & +\vectorEql{z}{w} +\\ +\midrule +\begin{lstlisting} new third coordinate of vector \(z = \vectorSetCoordinate{z}{3}{9.3}\) \(z=\left(\vectorPrint{z}\right)\) @@ -515,15 +527,18 @@ This command has two compulsory arguments: \verb|matrix name| and \verb|row entr \matrixNew{n}{{{1,2,3},{4,5,6},{7,8,10}}} \end{lstlisting} -The identity matrix can be defined as well by using the \verb|\matrixNew| command. For example, the following commands +The identity and zero matrices can be defined as well by using the \verb|\matrixNew| command. For example, the following commands \begin{lstlisting} \matrixNew{mtx}{3,'I'} I = \(\matrixPrint{mtx}\) +\matrixNew{O}{3,4,'zero'} +O = \(\matrixPrint{O}\) \end{lstlisting} output to \matrixNew{mtx}{3,'I'} -I = \(\matrixPrint{mtx}\) - +I = \(\matrixPrint{mtx}\) +\matrixNew{O}{3,4,'zero'} +O = \(\matrixPrint{O}\) \subsection{Commands for operations on matrices} Table \ref{tbl:luamtxcmd} lists all commands for operations on matrices in the \verb|lualinalg| package. \begin{longtable}{m{7cm}m{7.5cm}} @@ -673,6 +688,13 @@ Defines a new matrix obtained by evaluating an expression. The expression suppor \end{lstlisting}& Defines a new matrix obtained by copying values from matrix1. \\ \midrule + +\begin{lstlisting} +\matrixEql{m1}{m2} +\end{lstlisting}& +Returns true if m1 = m2, otherwise returns false. \\ +\midrule + \begin{lstlisting} \matrixCreateRandom {m}{i}{j}{k}{l} @@ -922,7 +944,11 @@ Determinant of matrix \(m =\matrixDet{m}\)\\ \end{lstlisting} & \matrixCopy{m12}{m} \(m12 = \matrixPrint{m12}\)\\ - +\midrule +\begin{lstlisting} +\matrixEql{m12}{m} +\end{lstlisting} & +\matrixEql{m12}{m}\\ \midrule \begin{lstlisting} trace of matrix \( m = \matrixTrace{m}\) diff --git a/macros/luatex/latex/luamaths/README.txt b/macros/luatex/latex/luamaths/README.txt index a4a7a334fd..30ceca2301 100644 --- a/macros/luatex/latex/luamaths/README.txt +++ b/macros/luatex/latex/luamaths/README.txt @@ -1,5 +1,5 @@ # The luamaths package -# version 1.4 +# version 1.5 # Authors: Chetan Shirore and Ajit Kumar # Email: mathsbeauty@gmail.com diff --git a/macros/luatex/latex/luamaths/luamaths-fractions.lua b/macros/luatex/latex/luamaths/luamaths-fractions.lua index f13d335245..6900b25ec4 100644 --- a/macros/luatex/latex/luamaths/luamaths-fractions.lua +++ b/macros/luatex/latex/luamaths/luamaths-fractions.lua @@ -1,9 +1,9 @@ -- The luafractions module -- Authors: Chetan Shirore and Ajit Kumar --- version 1.2, Date=21-Aug-2023 +-- version 1.3, Date=23-Aug-2023 -- Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt. -M = {} -- the module +M = {} -- the module frac_mt = {} -- the metatable function M.new (n, d, mode) mode = mode or 'fracs' @@ -41,8 +41,11 @@ function M.simp (num) end function M.toFnumber(c) +if getmetatable( c ) == frac_mt then return c.n / c.d end +return c +end function M.toFrac(x) if type(x) == "number" then @@ -216,6 +219,48 @@ function M.tostring (c) return string.format("\\frac{%g}{%g}", c.n, c.d) end + +function lnumChqEql(x, y) + + if type(x) == "number" and type(y) == "number" then + return (x == y) + end + + if getmetatable( x ) == frac_mt and getmetatable( y ) == frac_mt then + return (M.toFnumber(x) == M.toFnumber(y)) + end + + if type(x) == "number" and getmetatable( y ) == frac_mt then + return (M.toFnumber(y) == x) + end + + if getmetatable( x ) == frac_mt and type(y) == "number" then + return (M.toFnumber(x) == y) + end + + if getmetatable( x ) == complex_meta and getmetatable( y ) == complex_meta then + return M.toFnumber(x[1]) == M.toFnumber(y[1]) and M.toFnumber(x[2]) == M.toFnumber(y[2]) + end + + if type(x) == "number" and getmetatable( y ) == complex_meta then + return (M.toFnumber(y[1]) == x and M.toFnumber(y[2]) == 0) + end + + if getmetatable(x) == complex_meta and type( y ) == "number" then + return (M.toFnumber(x[1]) == y and M.toFnumber(x[2]) == 0) + end + + if getmetatable( x ) == frac_mt and getmetatable( y ) == complex_meta then + return (M.toFnumber(x)==M.toFnumber(y[1]) and M.toFnumber(y[2]) == 0) + end + + if getmetatable( x ) == complex_meta and getmetatable( y ) == frac_mt then + return (M.toFnumber(y)==M.toFnumber(x[1]) and M.toFnumber(x[2]) == 0) + end + + return false +end + --Setting Metatable operations. frac_mt.__add = M.add frac_mt.__sub = M.sub @@ -224,5 +269,6 @@ frac_mt.__div = M.div frac_mt.__unm = minusFracs frac_mt.__pow = powerFracs frac_mt.__tostring = M.tostring +frac_mt.__eq = lnumChqEql return M
\ No newline at end of file diff --git a/macros/luatex/latex/luamaths/luamaths.pdf b/macros/luatex/latex/luamaths/luamaths.pdf Binary files differindex 13ecb392af..5713dfa7de 100644 --- a/macros/luatex/latex/luamaths/luamaths.pdf +++ b/macros/luatex/latex/luamaths/luamaths.pdf diff --git a/macros/luatex/latex/luamaths/luamaths.sty b/macros/luatex/latex/luamaths/luamaths.sty index 1f6bf1ade0..48c285b61b 100644 --- a/macros/luatex/latex/luamaths/luamaths.sty +++ b/macros/luatex/latex/luamaths/luamaths.sty @@ -1,9 +1,9 @@ % The luamaths package -% version 1.4 +% version 1.5 % Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt. %Authors: Chetan Shirore and Ajit Kumar -\ProvidesPackage{luamaths}[1.4] +\ProvidesPackage{luamaths}[1.5] \RequirePackage{xkeyval} \RequirePackage{amsmath} \RequirePackage{luacode} @@ -50,6 +50,10 @@ tex.sprint(complex.tostring(complex.round(#1,#2))) }% }% \newcommand{\imUnit}{\mathrm{i}} - +\newcommand\luaChkeqnum[2]{% +\directlua{% +tex.sprint(tostring(lnumChqEql(#1,#2)))% +}% +} \endinput diff --git a/macros/luatex/latex/luamaths/luamaths.tex b/macros/luatex/latex/luamaths/luamaths.tex index 3cb499b88c..81b58f9511 100644 --- a/macros/luatex/latex/luamaths/luamaths.tex +++ b/macros/luatex/latex/luamaths/luamaths.tex @@ -1,7 +1,7 @@ \documentclass{article} \renewcommand{\baselinestretch}{1.2} \usepackage{float,listings,color,booktabs,longtable,array,hyperref,luamaths,amsmath,amssymb} -\usepackage[top=1.1in, bottom=1.1in, left=1.1in, right=1.1in]{geometry} +\usepackage[top=1in, bottom=1in, left=1.1in, right=1.1in]{geometry} \hypersetup{colorlinks,urlcolor=blue} \lstset{frame=none, language=[LaTeX]{TeX}, @@ -190,6 +190,13 @@ Table \ref{tbl:opluamaths} lists operations in the \verb|luamaths| package. \begin{lstlisting} \complexRound{cx_num}{digits} \end{lstlisting} & It rounds off a complex number to a specified number of decimal places.\\ +\midrule +\begin{lstlisting} +\luaChkeqnum +\end{lstlisting} & +\begin{lstlisting} +\luaChkeqnum{x}{y} +\end{lstlisting} & It returns true if x = y, otherwise returns false.\\ \bottomrule \\ @@ -333,6 +340,11 @@ Table \ref{tbl:illluamaths} illustrates operations in the \verb|luamaths| packag \begin{lstlisting} \complexRound{lcomplex(\mathPi,6)}{4} \end{lstlisting} & \(\complexRound{lcomplex(\mathPi,6)}{4}\)\\ +\midrule + +\begin{lstlisting} +\luaChkeqnum{\mathCos{0}}{1} +\end{lstlisting} & \luaChkeqnum{\mathCos{0}}{1}\\ \bottomrule \\ \caption{Illustrations of commands in the luamaths package} \label{tbl:illluamaths} |