texlive[59512] Master/texmf-dist: mathcommand (7jun21)
commits+karl at tug.org
commits+karl at tug.org
Mon Jun 7 22:06:06 CEST 2021
Revision: 59512
http://tug.org/svn/texlive?view=revision&revision=59512
Author: karl
Date: 2021-06-07 22:06:05 +0200 (Mon, 07 Jun 2021)
Log Message:
-----------
mathcommand (7jun21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/mathcommand/README.md
trunk/Master/texmf-dist/doc/latex/mathcommand/mathcommand.pdf
trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.dtx
trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.ins
trunk/Master/texmf-dist/tex/latex/mathcommand/mathcommand.sty
Modified: trunk/Master/texmf-dist/doc/latex/mathcommand/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathcommand/README.md 2021-06-07 20:05:52 UTC (rev 59511)
+++ trunk/Master/texmf-dist/doc/latex/mathcommand/README.md 2021-06-07 20:06:05 UTC (rev 59512)
@@ -1,13 +1,36 @@
+ mathcommand.dtx
+
+ Copyright (C) 2019-2021 by Thomas Colcombet
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
+
+ http://www.latex-project.org/lppl.txt
+
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status ‘maintained’.
+
+ The Current Maintainer of this work is Thomas Colcombet.
+
+ This work consists of the files
+ mathcommand.dtx, mathcommand.ins, and makefile,
+ and the derived files
+ mathcommand.sty and readme.md.
+
%%%%%%%%
This directory contains the package
name: mathcommand
- license: LaTeX Project Public License version 1.2 or above
- version: v1.03
- date: 2019/12/06
+ license: LaTeX Project Public License version 1.3 or above
+ version: v1.04
+ date: 2021/06/07
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
- web: -
+ web: https://www.ctan.org/pkg/mathcommand
Purpose:
The mathcommand package provides functionalities for defining macros:
@@ -24,11 +47,11 @@
Content of the file mathcommand-ctan.zip:
- README.md: this file generated while compiling mathcommand.ins,
- - mathcommand.sty: the package file (generated using knowledge.ins)
+ - mathcommand.sty: the package file (generated using mathcommand.ins)
- mathcommand.pdf: the user documentation (generated by compiling
mathcommand.dtx)
- makefile: the makefile. Use 'make all' to generate mathcommand.sty
- and knowledge.pdf. It can also: clean the directory, make zip
+ and mathcommand.pdf. It can also: clean the directory, make zip
version of the sources, or ready for CTAN.
- mathcommand.ins: is the file generating mathcommand.sty and
README.md from mathcommand.dtx (using docstrip).
Modified: trunk/Master/texmf-dist/doc/latex/mathcommand/mathcommand.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.dtx 2021-06-07 20:05:52 UTC (rev 59511)
+++ trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.dtx 2021-06-07 20:06:05 UTC (rev 59512)
@@ -4,26 +4,34 @@
%
%
%
-% meta-comment
-%
-% Copyright (C) 2019-2019 by Thomas Colcombet
-% -----------------------------------
-%
-% This file may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.2
-% of this license or (at your option) any later version.
-% The latest version of this license is in:
-%
-% http://www.latex-project.org/lppl.txt
-%
-% and version 1.2 or later is part of all distributions of LaTeX
-% version 1999/12/01 or later.
-%
+%% mathcommand.dtx
+%%
+%% Copyright (C) 2019-2021 by Thomas Colcombet
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status ‘maintained’.
+%%
+%% The Current Maintainer of this work is Thomas Colcombet.
+%%
+%% This work consists of the files
+%% mathcommand.dtx, mathcommand.ins, and makefile,
+%% and the derived files
+%% mathcommand.sty and readme.md.
+%%
% \fi
%
% \iffalse
%<head>\usepackage{expl3}
-%<head>\ProvidesExplPackage{mathcommand}{2019/12/06}{1.03}{}
+%<head>\ProvidesExplPackage{mathcommand}{2021/06/07}{1.04}{}
%<*driver>
\documentclass{ltxdoc}
\usepackage[utf8]{inputenc}
@@ -40,6 +48,7 @@
\changes{1.01}{2019/05/12}{Initial version} %
\changes{1.02}{2019/07/03}{Bug correction} %
\changes{1.03}{2019/12/06}{added disabling commands} %
+\changes{1.04}{2021/06/05}{correction with respect to modification of xparse package} %
\GetFileInfo{mathcommand.sty} %
\DoNotIndex{}
\edef\mathcommandversiondate{\fileversion--\filedate}
@@ -160,6 +169,7 @@
\knowledge{knowledge}{package,url = {https://www.ctan.org/pkg/knowledge}}
\knowledge{xcolor}{package,url = {https://www.ctan.org/pkg/xcolor}}
\knowledge{amsfonts}{package,url = {https://www.ctan.org/pkg/amsfonts}}
+\knowledge{amssymb}{package,url = {https://www.ctan.org/pkg/amssymb}}
\knowledge{mathcommand}{package}
\knowledge{math variant}{doc notion}
@@ -204,6 +214,7 @@
\item[2019-05-14] New macros \cs\IfEmptyTF, \cs\GetExponent, and \cs\GetIndex.
\item[2019-07-03] Corrects bug of functions declaring PIE's issuing an error when already existing. Version 1.02 on CTAN.
\item[2019-12-06] Added disabling commands, and package options. Version 1.03 on CTAN.
+\item[2021-06-07] Corrected code that was broken due to an update in "xparse". Version 1.04 on CTAN.
\end{compactdesc}
@@ -230,10 +241,9 @@
\end{center}
If the macro \cs{\macro} already exists, it is stored
- under the name \cs{\LaTeXmacro}, and then everything's happen as
+ under the name \cs{\LaTeXmacro}, and then everything happens as
if it had already been defined both in math and text mode.
-
- This is interesting for redefining known macros.
+ This is useful for redefining known macros.
For instance \cs{\c} is a convenient way to producing cedillas in \LaTeX, as in \smallcode{\cs\c\ a}
which yields `\c a'. However, one may want \cs{\c} to reprensent a variable $c$ in math mode.
This is done using, e.g.:
@@ -414,7 +424,7 @@
Hence, for instance:
\begin{code}[10cm]
\cs\LoopCommands\cs\lettersUppercase[bb\#1]\\
- \indent~~~~~~\{\cs\newmathcommand\{\cs\mathbb \#1\}\}\\
+ \indent~~~~~~\{\cs\newmathcommand\#2\{\cs\mathbb \#1\}\}\\
\cs\LoopCommands\cs\lettersGreekLowercase[\#1][LaTeX\#1]\\
\indent~~~~~~\{\cs\renewmathcommand\#2\{\cs\textcolor\{blue\}\{\#3\}\}
\end{code}
@@ -422,7 +432,7 @@
the letters in blackboard bold alphabet (e.g. with the "amsfonts" package),
and the lowercase greek letters \cs\alpha,\dots\ to
be displayed in blue (with the "xcolor" package loaded). Note in the last case
- the use of the third parameter used for accessing the macros \cs\LaTeXalpha,\dots\
+ the use of the third parameter for accessing the macros \cs\LaTeXalpha,\dots\
that are automatically generated by the \cs\renewmathcommand\ macro.
\section{Disabling command}
@@ -439,7 +449,7 @@
\item The original macro is stored as \cs\LaTeXmacro, and thus can still be used.
\item Using \cs\macro\ now displays an error message explaining that it has been disabled, that~\cs\LaTeXmacro\ can be used instead, and also provides a list suggestions of replacement that are defined by the command \cs\suggestcommand.
\end{itemize}
-However, be careful: disabling a command which is used in the system or in the the style will yield an error.
+However, be careful: disabling a command which is used in the system or in the the style may cause problems.
Hence, it is possible to disable all math symbols but macros like \cs\dagger\ would yield problem if used in footnotes or for the affiliation of the authors.
\AP The syntax of~\cs\suggestcommand\ is as follows:
\begin{center}
@@ -462,7 +472,7 @@
\section{Options}
-\AP Options can either be triggered either when the package is loaded, or using:
+\AP Options can be triggered either when the package is loaded, or using:
\begin{center}
\csintro\mathcommandconfigure\{option list\}
\end{center}
@@ -495,12 +505,12 @@
This directory contains the package
name: mathcommand
- license: LaTeX Project Public License version 1.2 or above
- version: v1.03
- date: 2019/12/06
+ license: LaTeX Project Public License version 1.3 or above
+ version: v1.04
+ date: 2021/06/07
author: Thomas Colcombet
mail: thomas.colcombet at irif.fr
- web: -
+ web: https://www.ctan.org/pkg/mathcommand
Purpose:
The mathcommand package provides functionalities for defining macros:
@@ -517,11 +527,11 @@
Content of the file mathcommand-ctan.zip:
- README.md: this file generated while compiling mathcommand.ins,
- - mathcommand.sty: the package file (generated using knowledge.ins)
+ - mathcommand.sty: the package file (generated using mathcommand.ins)
- mathcommand.pdf: the user documentation (generated by compiling
mathcommand.dtx)
- makefile: the makefile. Use 'make all' to generate mathcommand.sty
- and knowledge.pdf. It can also: clean the directory, make zip
+ and mathcommand.pdf. It can also: clean the directory, make zip
version of the sources, or ready for CTAN.
- mathcommand.ins: is the file generating mathcommand.sty and
README.md from mathcommand.dtx (using docstrip).
@@ -676,7 +686,7 @@
%
% \begin{macrocode}
\NewDocumentCommand\newcommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \newcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \newcommandPIE
{
\cs_if_exist:NTF #1
{
@@ -688,7 +698,7 @@
}
}
\NewDocumentCommand\renewcommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \renewcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \renewcommandPIE
{
\cs_if_exist:NTF #1
{ \__mathcommand_declarecommandPIE:Nnnn #1{#2}{#3}{#4} }
@@ -700,7 +710,7 @@
}
}
\NewDocumentCommand\declarecommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \declarecommandPIE
+ \__mathcommand_check_definable:nNT {#1} \declarecommandPIE
{ \__mathcommand_declarecommandPIE:Nnnn #1{#2}{#3}{#4} }
}
% \end{macrocode}
@@ -721,7 +731,7 @@
% \end{macrocode}
% \begin{macrocode}
\cs_new_protected:Npn\NewDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \NewDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentCommandPIE
{
\cs_if_exist:NTF #1
{
@@ -735,12 +745,12 @@
% \end{macrocode}
% \begin{macrocode}
\cs_new_protected:Npn\RenewDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \RenewDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentCommandPIE
{
\cs_if_exist:NTF #1
{ \__mathcommand_DeclareDocumentCommandPIE:Nnn #1 {#2} {#3} }
{
- \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ \__kernel_msg_error:nnxx { mathcommand } { command-not-yet-defined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \RenewDocumentCommandPIE }
}
@@ -749,7 +759,7 @@
% \end{macrocode}
% \begin{macrocode}
\cs_new_protected:Npn\DeclareDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentCommandPIE
{
\__mathcommand_DeclareDocumentCommandPIE:Nnn #1 {#2} {#3}
}
@@ -757,7 +767,7 @@
% \end{macrocode}
% \begin{macrocode}
\cs_new_protected:Npn\ProvideDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentCommandPIE
{
\cs_if_exist:NTF #1{}
{
@@ -970,7 +980,7 @@
% \subsection{Definition of the high level commands}
% \begin{macrocode}
\NewDocumentCommand\declarecommand{m}{
- \__xparse_check_definable:nNT {#1} \declarecommand
+ \__mathcommand_check_definable:nNT {#1} \declarecommand
{
\cs_if_exist:NTF#1
{\renewcommand#1}
@@ -978,7 +988,7 @@
}
}
\newrobustcmd\storecommand[2][\__mathcommand_prefix_store_tl]{
- \__xparse_check_definable:nNT {#2} \storecommand
+ \__mathcommand_check_definable:nNT {#2} \storecommand
{
\cs_if_exist:NTF#2{
\cs_set_eq:cN{#1\cs_to_str:N#2}#2
@@ -992,7 +1002,7 @@
}
\NewDocumentCommand\NewDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -1000,7 +1010,7 @@
}
}
\NewDocumentCommand\NewDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_text:NF#1
@@ -1008,7 +1018,7 @@
}
}
\NewDocumentCommand\newmathcommand{m}{
- \__xparse_check_definable:nNT {#1} \newmathcommand
+ \__mathcommand_check_definable:nNT {#1} \newmathcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -1016,7 +1026,7 @@
}
}
\NewDocumentCommand\newtextcommand{m}{
- \__xparse_check_definable:nNT {#1} \newtextcommand
+ \__mathcommand_check_definable:nNT {#1} \newtextcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_text:NF#1
@@ -1024,7 +1034,7 @@
}
}
\NewDocumentCommand\RenewDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -1032,7 +1042,7 @@
}
}
\NewDocumentCommand\RenewDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_text:NF#1
@@ -1040,7 +1050,7 @@
}
}
\NewDocumentCommand\renewmathcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommand
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -1048,7 +1058,7 @@
}
}
\NewDocumentCommand\renewtextcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewtextcommand
+ \__mathcommand_check_definable:nNT {#1} \renewtextcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_text:NF#1
@@ -1056,7 +1066,7 @@
}
}
\NewDocumentCommand\declaremathcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommand
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommand{\__mathcommand_to_mathtl:N#1}
@@ -1063,7 +1073,7 @@
}
}
\NewDocumentCommand\declaretextcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewtextcommand
+ \__mathcommand_check_definable:nNT {#1} \renewtextcommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommand{\__mathcommand_to_texttl:N#1}
@@ -1071,7 +1081,7 @@
}
\NewDocumentCommand\DeclareDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_mathtl:N#1}
@@ -1078,7 +1088,7 @@
}
}
\NewDocumentCommand\DeclareDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_texttl:N#1}
@@ -1085,7 +1095,7 @@
}
}
\NewDocumentCommand\ProvideDocumentMathCommand{mmm}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommand{\__mathcommand_to_mathtl:N#1}{#2}{#3}
@@ -1092,7 +1102,7 @@
}
}
\NewDocumentCommand\ProvideDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommand{\__mathcommand_to_texttl:N#1}
@@ -1104,7 +1114,7 @@
%
% \begin{macrocode}
\NewDocumentCommand\NewDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -1112,7 +1122,7 @@
}
}
\NewDocumentCommand\newmathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \newmathcommandPiE
+ \__mathcommand_check_definable:nNT {#1} \newmathcommandPiE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -1120,7 +1130,7 @@
}
}
\NewDocumentCommand\RenewDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -1128,7 +1138,7 @@
}
}
\NewDocumentCommand\renewmathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -1136,7 +1146,7 @@
}
}
\NewDocumentCommand\DeclareDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_mathtl:N#1}
@@ -1143,7 +1153,7 @@
}
}
\NewDocumentCommand\declaremathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \declaremathcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \declaremathcommandPIE
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommandPIE{\__mathcommand_to_mathtl:N#1}
@@ -1151,7 +1161,7 @@
}
\NewDocumentCommand\ProvideDocumentMathCommandPIE{mmm}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommandPIE{\__mathcommand_to_mathtl:N#1}{#2}{#3}
@@ -1265,7 +1275,7 @@
\cs_new:Nn\mathcommand_disablecommand:N
{ \cs_if_exist:NTF#1{
- \__xparse_check_definable:nNT#1\disablecommand
+ \__mathcommand_check_definable:nNT#1\disablecommand
{\tl_if_exist:cTF{\__mathcommand_to_disabled_help_tl:N#1}
{}
{\storecommand#1
@@ -1312,7 +1322,45 @@
\NewDocumentCommand\mathcommandconfigure{ m }
{\keys_set:nn{ mathcommand}{ #1} }
% \end{macrocode}
+%
+% \subsection{Testing control sequence for definition}
+% This part of the code is an import of a previous version of xparse (Frank Mittelbach, Chris Rowley, David Carlisle, The LaTeX Project). It is done in a very ugly hack: the code is copied and past, and \texttt{mathcommand} substituted to \texttt{xparse} wherever necessary.
% \begin{macrocode}
+\cs_new_protected:Npn \__mathcommand_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__mathcommand_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__mathcommand_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { mathcommand } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { mathcommand } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
+% \end{macrocode}
+% \subsection{Closure}
+% \begin{macrocode}
\ExplSyntaxOff
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.ins 2021-06-07 20:05:52 UTC (rev 59511)
+++ trunk/Master/texmf-dist/source/latex/mathcommand/mathcommand.ins 2021-06-07 20:06:05 UTC (rev 59512)
@@ -1,34 +1,53 @@
+%% mathcommand.ins
%%
-%% Copyright (C) 2017 by Thomas Colcombet
+%% Copyright (C) 2019-2021 by Thomas Colcombet
%%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either
-%% version 1.2 of this license or (at your option) any later
-%% version. The latest version of this license is in:
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
%%
-
-%% http://www.latex-project.org/lppl.txt
+%% http://www.latex-project.org/lppl.txt
%%
-%% and version 1.2 or later is part of all distributions of
-%% LaTeX version 1999/12/01 or later.
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
%%
+%% This work has the LPPL maintenance status ‘maintained’.
+%%
+%% The Current Maintainer of this work is Thomas Colcombet.
+%%
+%% This work consists of the files
+%% mathcommand.dtx, mathcommand.ins, and makefile,
+%% and the derived files
+%% mathcommand.sty and readme.md.
+%%
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
+ This is a generated file.
-This is a generated file. Copyright (C) 2019 by Thomas Colcombet
+ Copyright (C) 2019-2021 by Thomas Colcombet
-This file may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either
-version 1.2 of this license or (at your option) any later
-version. The latest version of this license is in:
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version 1.3
+ of this license or (at your option) any later version.
+ The latest version of this license is in
- http://www.latex-project.org/lppl.txt
+ http://www.latex-project.org/lppl.txt
-and version 1.2 or later is part of all distributions of
-LaTeX version 1999/12/01 or later.
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+ This work has the LPPL maintenance status ‘maintained’.
+
+ The Current Maintainer of this work is Thomas Colcombet.
+
+ This work consists of the files
+ mathcommand.dtx, mathcommand.ins, and makefile,
+ and the derived files
+ mathcommand.sty and readme.md.
+
\endpreamble
\generate{%
@@ -57,10 +76,11 @@
\Msg{* To finish the installation you have to move the }
\Msg{* following file into a directory searched by TeX:}
\Msg{*}
-\Msg{* knowledge.sty}
+\Msg{* mathcommand.sty }
\Msg{*}
-\Msg{* To produce the documentation run the file *}
-\Msg{* knowledge.dtx through LaTeX.}
+\Msg{* To produce the documentation run the file}
+\Msg{* mathcommand.dtx through LaTeX. or use}
+\Msg{* the makefile }
\Msg{*}
\Msg{****************************************************}
Modified: trunk/Master/texmf-dist/tex/latex/mathcommand/mathcommand.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathcommand/mathcommand.sty 2021-06-07 20:05:52 UTC (rev 59511)
+++ trunk/Master/texmf-dist/tex/latex/mathcommand/mathcommand.sty 2021-06-07 20:06:05 UTC (rev 59512)
@@ -5,21 +5,54 @@
%% The original source files were:
%%
%% mathcommand.dtx (with options: `head,package')
+%% This is a generated file.
%%
-%% This is a generated file. Copyright (C) 2019 by Thomas Colcombet
+%% Copyright (C) 2019-2021 by Thomas Colcombet
%%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either
-%% version 1.2 of this license or (at your option) any later
-%% version. The latest version of this license is in:
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
%%
-%% http://www.latex-project.org/lppl.txt
+%% http://www.latex-project.org/lppl.txt
%%
-%% and version 1.2 or later is part of all distributions of
-%% LaTeX version 1999/12/01 or later.
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
%%
+%% This work has the LPPL maintenance status ‘maintained’.
+%%
+%% The Current Maintainer of this work is Thomas Colcombet.
+%%
+%% This work consists of the files
+%% mathcommand.dtx, mathcommand.ins, and makefile,
+%% and the derived files
+%% mathcommand.sty and readme.md.
+%%
+%% mathcommand.dtx
+%%
+%% Copyright (C) 2019-2021 by Thomas Colcombet
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status ‘maintained’.
+%%
+%% The Current Maintainer of this work is Thomas Colcombet.
+%%
+%% This work consists of the files
+%% mathcommand.dtx, mathcommand.ins, and makefile,
+%% and the derived files
+%% mathcommand.sty and readme.md.
+%%
\usepackage{expl3}
-\ProvidesExplPackage{mathcommand}{2019/12/06}{1.03}{}
+\ProvidesExplPackage{mathcommand}{2021/06/07}{1.04}{}
%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\RequirePackage{expl3,l3keys2e}
@@ -115,7 +148,7 @@
\__mathcommand_absorb_finished:}
\__mathcommand_absorb_finished:}
\NewDocumentCommand\newcommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \newcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \newcommandPIE
{
\cs_if_exist:NTF #1
{
@@ -127,7 +160,7 @@
}
}
\NewDocumentCommand\renewcommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \renewcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \renewcommandPIE
{
\cs_if_exist:NTF #1
{ \__mathcommand_declarecommandPIE:Nnnn #1{#2}{#3}{#4} }
@@ -139,7 +172,7 @@
}
}
\NewDocumentCommand\declarecommandPIE{ m o o m }{
- \__xparse_check_definable:nNT {#1} \declarecommandPIE
+ \__mathcommand_check_definable:nNT {#1} \declarecommandPIE
{ \__mathcommand_declarecommandPIE:Nnnn #1{#2}{#3}{#4} }
}
\cs_new:Nn\__mathcommand_declarecommandPIE:Nnnn{
@@ -156,7 +189,7 @@
{\exp_not:n{#4}}
}}
\cs_new_protected:Npn\NewDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \NewDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentCommandPIE
{
\cs_if_exist:NTF #1
{
@@ -168,12 +201,12 @@
}
}
\cs_new_protected:Npn\RenewDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \RenewDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentCommandPIE
{
\cs_if_exist:NTF #1
{ \__mathcommand_DeclareDocumentCommandPIE:Nnn #1 {#2} {#3} }
{
- \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ \__kernel_msg_error:nnxx { mathcommand } { command-not-yet-defined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \RenewDocumentCommandPIE }
}
@@ -180,13 +213,13 @@
}
}
\cs_new_protected:Npn\DeclareDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentCommandPIE
{
\__mathcommand_DeclareDocumentCommandPIE:Nnn #1 {#2} {#3}
}
}
\cs_new_protected:Npn\ProvideDocumentCommandPIE#1#2#3{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentCommandPIE
{
\cs_if_exist:NTF #1{}
{
@@ -344,7 +377,7 @@
}{ \cs_set_eq:NN#1\__mathcommand_tmp_cs }
}
\NewDocumentCommand\declarecommand{m}{
- \__xparse_check_definable:nNT {#1} \declarecommand
+ \__mathcommand_check_definable:nNT {#1} \declarecommand
{
\cs_if_exist:NTF#1
{\renewcommand#1}
@@ -352,7 +385,7 @@
}
}
\newrobustcmd\storecommand[2][\__mathcommand_prefix_store_tl]{
- \__xparse_check_definable:nNT {#2} \storecommand
+ \__mathcommand_check_definable:nNT {#2} \storecommand
{
\cs_if_exist:NTF#2{
\cs_set_eq:cN{#1\cs_to_str:N#2}#2
@@ -366,7 +399,7 @@
}
\NewDocumentCommand\NewDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -374,7 +407,7 @@
}
}
\NewDocumentCommand\NewDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_text:NF#1
@@ -382,7 +415,7 @@
}
}
\NewDocumentCommand\newmathcommand{m}{
- \__xparse_check_definable:nNT {#1} \newmathcommand
+ \__mathcommand_check_definable:nNT {#1} \newmathcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -390,7 +423,7 @@
}
}
\NewDocumentCommand\newtextcommand{m}{
- \__xparse_check_definable:nNT {#1} \newtextcommand
+ \__mathcommand_check_definable:nNT {#1} \newtextcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_text:NF#1
@@ -398,7 +431,7 @@
}
}
\NewDocumentCommand\RenewDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -406,7 +439,7 @@
}
}
\NewDocumentCommand\RenewDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_text:NF#1
@@ -414,7 +447,7 @@
}
}
\NewDocumentCommand\renewmathcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommand
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -422,7 +455,7 @@
}
}
\NewDocumentCommand\renewtextcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewtextcommand
+ \__mathcommand_check_definable:nNT {#1} \renewtextcommand
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_text:NF#1
@@ -430,7 +463,7 @@
}
}
\NewDocumentCommand\declaremathcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommand
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommand{\__mathcommand_to_mathtl:N#1}
@@ -437,7 +470,7 @@
}
}
\NewDocumentCommand\declaretextcommand{m}{
- \__xparse_check_definable:nNT {#1} \renewtextcommand
+ \__mathcommand_check_definable:nNT {#1} \renewtextcommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommand{\__mathcommand_to_texttl:N#1}
@@ -445,7 +478,7 @@
}
\NewDocumentCommand\DeclareDocumentMathCommand{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_mathtl:N#1}
@@ -452,7 +485,7 @@
}
}
\NewDocumentCommand\DeclareDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_texttl:N#1}
@@ -459,7 +492,7 @@
}
}
\NewDocumentCommand\ProvideDocumentMathCommand{mmm}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommand{\__mathcommand_to_mathtl:N#1}{#2}{#3}
@@ -466,7 +499,7 @@
}
}
\NewDocumentCommand\ProvideDocumentTextCommand{m}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentTextCommand
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentTextCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommand{\__mathcommand_to_texttl:N#1}
@@ -473,7 +506,7 @@
}
}
\NewDocumentCommand\NewDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \NewDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \NewDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -481,7 +514,7 @@
}
}
\NewDocumentCommand\newmathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \newmathcommandPiE
+ \__mathcommand_check_definable:nNT {#1} \newmathcommandPiE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_exist_math:NF#1
@@ -489,7 +522,7 @@
}
}
\NewDocumentCommand\RenewDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \RenewDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \RenewDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -497,7 +530,7 @@
}
}
\NewDocumentCommand\renewmathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \renewmathcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \renewmathcommandPIE
{
\__mathcommand_create_fork:N#1
\__mathcommand_error_if_not_exist_math:NF#1
@@ -505,7 +538,7 @@
}
}
\NewDocumentCommand\DeclareDocumentMathCommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \DeclareDocumentMathCommand
+ \__mathcommand_check_definable:nNT {#1} \DeclareDocumentMathCommand
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\DeclareDocumentCommand{\__mathcommand_to_mathtl:N#1}
@@ -512,7 +545,7 @@
}
}
\NewDocumentCommand\declaremathcommandPIE{m}{
- \__xparse_check_definable:nNT {#1} \declaremathcommandPIE
+ \__mathcommand_check_definable:nNT {#1} \declaremathcommandPIE
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\declarecommandPIE{\__mathcommand_to_mathtl:N#1}
@@ -520,7 +553,7 @@
}
\NewDocumentCommand\ProvideDocumentMathCommandPIE{mmm}{
- \__xparse_check_definable:nNT {#1} \ProvideDocumentMathCommandPIE
+ \__mathcommand_check_definable:nNT {#1} \ProvideDocumentMathCommandPIE
{
\__mathcommand_create_fork:N#1
\exp_args:Nc\ProvideDocumentCommandPIE{\__mathcommand_to_mathtl:N#1}{#2}{#3}
@@ -614,7 +647,7 @@
\cs_new:Nn\mathcommand_disablecommand:N
{ \cs_if_exist:NTF#1{
- \__xparse_check_definable:nNT#1\disablecommand
+ \__mathcommand_check_definable:nNT#1\disablecommand
{\tl_if_exist:cTF{\__mathcommand_to_disabled_help_tl:N#1}
{}
{\storecommand#1
@@ -653,6 +686,38 @@
\ProcessKeysOptions { mathcommand } % Parses the option list
\NewDocumentCommand\mathcommandconfigure{ m }
{\keys_set:nn{ mathcommand}{ #1} }
+\cs_new_protected:Npn \__mathcommand_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__mathcommand_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__mathcommand_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { mathcommand } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { mathcommand } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
\ExplSyntaxOff
\endinput
More information about the tex-live-commits
mailing list.